Skip to content

Commit 3b70d02

Browse files
committed
Record if a frame is the first state init.
1 parent 66d1166 commit 3b70d02

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/CallFrame.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ public class CallFrame implements Cloneable {
7373
*/
7474
public SerializationContext sc;
7575

76+
/**
77+
* This this invocation do the initial setup of state vars?
78+
*/
79+
public boolean stateInit;
80+
7681
// Empty constructor for things that want to fake one up.
7782
public CallFrame()
7883
{
@@ -122,8 +127,10 @@ public CallFrame(ThreadContext tc, CodeRef cr) {
122127
this.oLex[i] = sci.oLexStatic[i].clone(tc);
123128
break;
124129
case 2:
125-
if (cr.oLexState == null)
130+
if (cr.oLexState == null) {
126131
cr.oLexState = new SixModelObject[sci.oLexStatic.length];
132+
this.stateInit = true;
133+
}
127134
if (cr.oLexState[i] == null)
128135
this.oLex[i] = cr.oLexState[i] = sci.oLexStatic[i].clone(tc);
129136
else

0 commit comments

Comments
 (0)