Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Record if a frame is the first state init.
  • Loading branch information
jnthn committed Jun 21, 2013
1 parent 66d1166 commit 3b70d02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/runtime/CallFrame.java
Expand Up @@ -73,6 +73,11 @@ public class CallFrame implements Cloneable {
*/
public SerializationContext sc;

/**
* This this invocation do the initial setup of state vars?
*/
public boolean stateInit;

// Empty constructor for things that want to fake one up.
public CallFrame()
{
Expand Down Expand Up @@ -122,8 +127,10 @@ public CallFrame(ThreadContext tc, CodeRef cr) {
this.oLex[i] = sci.oLexStatic[i].clone(tc);
break;
case 2:
if (cr.oLexState == null)
if (cr.oLexState == null) {
cr.oLexState = new SixModelObject[sci.oLexStatic.length];
this.stateInit = true;
}
if (cr.oLexState[i] == null)
this.oLex[i] = cr.oLexState[i] = sci.oLexStatic[i].clone(tc);
else
Expand Down

0 comments on commit 3b70d02

Please sign in to comment.