diff --git a/src/builtins/op.pir b/src/builtins/op.pir index 8c19da00495..6c798c6cb4b 100644 --- a/src/builtins/op.pir +++ b/src/builtins/op.pir @@ -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) @@ -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) diff --git a/src/classes/Object.pir b/src/classes/Object.pir index cfbf2061ac5..1bd9fa0610c 100644 --- a/src/classes/Object.pir +++ b/src/classes/Object.pir @@ -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: diff --git a/src/classes/Range.pir b/src/classes/Range.pir index a3bc69e9577..f0512369cb8 100644 --- a/src/classes/Range.pir +++ b/src/classes/Range.pir @@ -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