Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
A couple of cloning-related fixes.
Fix the mixins bug that affected various tests with the self-host.
  • Loading branch information
jnthn committed Feb 28, 2013
1 parent 3e0363c commit b972587
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/org/perl6/nqp/runtime/CodeRef.java
Expand Up @@ -51,7 +51,10 @@ public SixModelObject clone(ThreadContext tc) {
CodeRef clone = new CodeRef();
clone.st = this.st;
clone.staticInfo = this.staticInfo;
clone.outer = this.outer;
if (this.outer != null)
clone.outer = this.outer;
else
clone.outer = staticInfo.outerStaticInfo.priorInvocation;
return clone;
}

Expand Down
5 changes: 4 additions & 1 deletion src/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java
Expand Up @@ -32,7 +32,10 @@ public final SixModelObject autoViv(int slot) {

public SixModelObject clone(ThreadContext tc) {
try {
return (SixModelObject)this.clone();
if (this.delegate != null)
return this.delegate.clone(tc);
else
return (SixModelObject)this.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit b972587

Please sign in to comment.