Skip to content

Commit

Permalink
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/IRMethod.java
Original file line number Diff line number Diff line change
@@ -42,10 +42,10 @@ public synchronized InterpreterContext lazilyAcquireInterpreterContext() {
return interpreterContext;
}

public synchronized BasicBlock[] prepareForInitialCompilation() {
public synchronized BasicBlock[] prepareForCompilation() {
if (!hasBeenBuilt()) lazilyAcquireInterpreterContext();

return super.prepareForInitialCompilation();
return super.prepareForCompilation();
}

@Override
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -530,7 +530,7 @@ private Instr[] cloneInstrs() {
return newInstructions;
}

public void prepareFullBuildCommon() {
private void prepareFullBuildCommon() {
// We already made it.
if (fullInterpreterContext != null) return;

@@ -566,8 +566,8 @@ public synchronized FullInterpreterContext prepareFullBuild() {
return fullInterpreterContext;
}

/** Run any necessary passes to get the IR ready for compilation */
public synchronized BasicBlock[] prepareForInitialCompilation() {
/** Run any necessary passes to get the IR ready for compilation (AOT and/or JIT) */
public synchronized BasicBlock[] prepareForCompilation() {
// Don't run if same method was queued up in the tiny race for scheduling JIT/Full Build OR
// for any nested closures which got a a fullInterpreterContext but have not run any passes
// or generated instructions.
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
public class FullInterpreterContext extends InterpreterContext {
private CFG cfg;

// Creation of this field will happen in generateInstructionsForInterpretation or during IRScope.prepareForInitialCompilation.
// Creation of this field will happen in generateInstructionsForInterpretation or during IRScope.prepareForCompilation.
// FIXME: At some point when we relinearize after running another phase of passes we should document that here to know how this field is changed
private BasicBlock[] linearizedBBList = null;

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ private void logScope(IRScope scope) {
}

public void emitScope(IRScope scope, String name, Signature signature, boolean specificArity) {
BasicBlock[] bbs = scope.prepareForInitialCompilation();
BasicBlock[] bbs = scope.prepareForCompilation();

Map <BasicBlock, Label> exceptionTable = scope.buildJVMExceptionTable();

0 comments on commit 9ae041a

Please sign in to comment.