Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created November 26, 2014 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/5741f26b0f02143181e8 to your computer and use it in GitHub Desktop.
Save jnthn/5741f26b0f02143181e8 to your computer and use it in GitHub Desktop.
diff --git a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
index 63c34ed..434d4d4 100644
--- a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
+++ b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
@@ -4942,9 +4942,8 @@ public final class Ops {
nextst.clear();
fates.clear();
- /* XXX needs to be cached, but tc breaks stage0 when I try */
- long[] longlit = new long[200]; // also needs proper sizing to # of alternatives
- int usedlonglit = 0; // lazy initialization highwater
+ long[] longlit = tc.curlonglit; // needs proper sizing to # of alternatives
+ int usedlonglit = 0; // lazy initialization highwater
nextst.add(1);
while (!nextst.isEmpty() && pos <= eos) {
diff --git a/src/vm/jvm/runtime/org/perl6/nqp/runtime/ThreadContext.java b/src/vm/jvm/runtime/org/perl6/nqp/runtime/ThreadContext.java
index 5aaabad..bd72ea4 100644
--- a/src/vm/jvm/runtime/org/perl6/nqp/runtime/ThreadContext.java
+++ b/src/vm/jvm/runtime/org/perl6/nqp/runtime/ThreadContext.java
@@ -112,6 +112,7 @@ public class ThreadContext {
// odds and ends for nqp
ArrayList<Integer> fates = new ArrayList<Integer>(), curst = new ArrayList<Integer>(), nextst = new ArrayList<Integer>();
+ long[] curlonglit = new long[200];
public ThreadContext(GlobalContext gc) {
this.gc = gc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment