-
-
Save FROGGS/5646d051dca96e3f879f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationReader.java b/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationReader.java | |
index dd6180a..981adad 100644 | |
--- a/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationReader.java | |
+++ b/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationReader.java | |
@@ -516,8 +516,15 @@ public class SerializationReader { | |
for (int i = 0; i < contextTableEntries; i++) { | |
orig.position(contextTableOffset + i * CONTEXTS_TABLE_ENTRY_SIZE + 12); | |
int idx = orig.getInt(); | |
- if (idx > 0) | |
+ if (idx > 0) { | |
contexts[i].outer = contexts[idx - 1]; | |
+ | |
+ /* GORRAM! */ | |
+ if (contexts[idx - 1].outer == null && | |
+ contexts[idx - 1].codeRef.staticInfo.priorInvocation != null && | |
+ contexts[idx - 1].codeRef.staticInfo.priorInvocation.outer != null) | |
+ contexts[idx - 1].outer = contexts[idx - 1].codeRef.staticInfo.priorInvocation.outer; | |
+ } | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment