Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Have $a op= $b call op() to get a value for $a if $a is not defined.
  • Loading branch information
colomon committed Apr 29, 2010
1 parent 9d955f2 commit 4aeb5a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/builtins/assign.pir
Expand Up @@ -85,6 +85,12 @@ src/builtins/assign.pir - assignment operations
$P0 = find_lex '$opname'
$S0 = $P0
$P0 = get_global $S0
$P1 = a.'defined'()
if $P1 goto defined
$P2 = $P0()
$P1 = $P0($P2, b)
.tailcall '&infix:<=>'(a, $P1)
defined:
$P1 = $P0(a, b)
.tailcall '&infix:<=>'(a, $P1)
.end
Expand Down

0 comments on commit 4aeb5a2

Please sign in to comment.