File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
core/src/main/java/org/jruby/ir Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -387,15 +387,7 @@ public boolean canReceiveNonlocalReturns() {
387
387
return flags .contains (CAN_RECEIVE_NONLOCAL_RETURNS );
388
388
}
389
389
390
- // FIXME: Should always be built but if not it wil
391
- public CFG buildCFG () {
392
- return getCFG ();
393
- }
394
-
395
390
public CFG getCFG () {
396
- // Closure/nested scopes may not have been built and some passes process all child scopes
397
- if (fullInterpreterContext == null ) prepareFullBuild ();
398
-
399
391
return fullInterpreterContext .getCFG ();
400
392
}
401
393
@@ -459,7 +451,10 @@ private Instr[] cloneInstrs() {
459
451
return newInstructions ;
460
452
}
461
453
462
- protected void prepareFullBuildCommon () {
454
+ public void prepareFullBuildCommon () {
455
+ // We already made it.
456
+ if (fullInterpreterContext != null ) return ;
457
+
463
458
// Clone instrs from startup interpreter so we do not swap out instrs out from under the
464
459
// startup interpreter as we are building the full interpreter.
465
460
Instr [] instrs = cloneInstrs ();
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public String getLabel() {
23
23
public Object execute (IRScope s , Object ... data ) {
24
24
// This let us compute execute scope flags for a method based on what all nested closures do
25
25
for (IRClosure c : s .getClosures ()) {
26
+ if (c .getFullInterpreterContext () == null ) c .prepareFullBuildCommon ();
26
27
run (c , false , true );
27
28
}
28
29
You can’t perform that action at this time.
0 commit comments