Skip to content

Commit

Permalink
We need to call .clone() rather than just using Parrot's clone vtable…
Browse files Browse the repository at this point in the history
… method fairly generally, I expect. This does that in a couple of places, which in turn resolves RT#63002 and gets an integration test passing.
  • Loading branch information
jnthn committed Feb 11, 2009
1 parent 59024e0 commit 1beabec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/builtins/op.pir
Expand Up @@ -30,7 +30,7 @@ src/builtins/op.pir - Perl 6 builtin operators
## autoincrement
.sub 'postfix:++' :multi(_)
.param pmc a
$P0 = clone a
$P0 = a.'clone'()
$I0 = defined a
if $I0 goto have_a
'infix:='(a, 0)
Expand All @@ -41,7 +41,7 @@ src/builtins/op.pir - Perl 6 builtin operators
.sub 'postfix:--' :multi(_)
.param pmc a
$P0 = clone a
$P0 = a.'clone'()
$I0 = defined a
if $I0 goto have_a
'infix:='(a, 0)
Expand Down
1 change: 1 addition & 0 deletions src/classes/Object.pir
Expand Up @@ -52,6 +52,7 @@ like this.
.local pmc p6meta, parrotclass, attributes, it
p6meta = get_hll_global ['Perl6Object'], '$!P6META'
parrotclass = p6meta.'get_parrotclass'(result)
if null parrotclass goto attrinit_done
attributes = inspect parrotclass, 'attributes'
it = iter attributes
attrinit_loop:
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Range.pir
Expand Up @@ -228,7 +228,7 @@ Generate the next element at the front of the Range.
fromexc = getattribute self, '$!from_exclusive'
value = 'postfix:++'(from)
unless fromexc goto have_value
value = clone from
value = from.'clone'()
have_value:
$I0 = self.'!to_test'(value)
if $I0 goto success
Expand Down

0 comments on commit 1beabec

Please sign in to comment.