Skip to content

Commit

Permalink
Remove unused parameter implClass
Browse files Browse the repository at this point in the history
enebo committed Jan 25, 2017
1 parent a82d673 commit 9f054d7
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -1071,14 +1071,14 @@ public void resetState() {
}
}

private FullInterpreterContext inlineMethodCommon(Compilable method, RubyModule implClass, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost) {
private FullInterpreterContext inlineMethodCommon(Compilable method, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost) {
alreadyHasInline = true;
IRMethod methodToInline = (IRMethod) method.getIRScope();

// We need fresh fic so we can modify it during inlining without making already running code explode.
FullInterpreterContext newContext = getFullInterpreterContext().duplicate();

new CFGInliner(newContext).inlineMethod(methodToInline, implClass, classToken, basicBlock, call, cloneHost);
new CFGInliner(newContext).inlineMethod(methodToInline, classToken, basicBlock, call, cloneHost);

// Reset state
resetState();
@@ -1092,8 +1092,8 @@ private FullInterpreterContext inlineMethodCommon(Compilable method, RubyModule
}

// FIXME: Passing in DynamicMethod is gross here we probably can minimally cast to Compilable
public void inlineMethod(Compilable method, RubyModule implClass, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost) {
FullInterpreterContext newContext = inlineMethodCommon(method, implClass, classToken, basicBlock, call, cloneHost);
public void inlineMethod(Compilable method, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost) {
FullInterpreterContext newContext = inlineMethodCommon(method, classToken, basicBlock, call, cloneHost);

newContext.generateInstructionsForIntepretation();
this.optimizedInterpreterContext = newContext;
@@ -1105,7 +1105,7 @@ public void inlineMethod(Compilable method, RubyModule implClass, int classToken

// FIXME: Passing in DynamicMethod is gross here we probably can minimally cast to Compilable
public void inlineMethodJIT(Compilable method, RubyModule implClass, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost) {
FullInterpreterContext newContext = inlineMethodCommon(method, implClass, classToken, basicBlock, call, cloneHost);
FullInterpreterContext newContext = inlineMethodCommon(method, classToken, basicBlock, call, cloneHost);

// We are not running any JIT-specific passes here.
Ruby runtime = implClass.getRuntime();
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/interpreter/Profiler.java
Original file line number Diff line number Diff line change
@@ -346,7 +346,7 @@ private static void analyzeProfile() {
if (shouldInline(scope, callSite.getCall(), parentIC, isClosure)) {
RubyModule implClass = methodToInline.getImplementationClass();
long start = new java.util.Date().getTime();
parentIC.getScope().inlineMethod(methodToInline, implClass, callSite.generation, null, callSite.getCall(), false);//!inlinedScopes.contains(ic));
parentIC.getScope().inlineMethod(methodToInline, callSite.generation, null, callSite.getCall(), false);//!inlinedScopes.contains(ic));
inlinedScopes.add(parentIC.getScope());
long end = new java.util.Date().getTime();
if (Options.IR_PROFILE_DEBUG.load()) LOG.info("Inlined " + methodToInline.getName() + " into " + parentIC.getName() + " @ instr " + callSite.getCall() +
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ private void printInlineSplitBBs(BasicBlock beforeBB, BasicBlock afterBB) {
// methodScope - scope of the method to be inlined
// callBB - BB where callsite is located
// call - callsite where we want to inline the methods body.
public void inlineMethod(IRScope methodScope, RubyModule implClass, int classToken, BasicBlock callBB, CallBase call, boolean cloneHost) {
public void inlineMethod(IRScope methodScope, int classToken, BasicBlock callBB, CallBase call, boolean cloneHost) {
// Temporarily turn off inlining of recursive methods
// Conservative turning off for inlining of a method in a closure nested within the same method
if (isRecursiveInline(methodScope)) return;

0 comments on commit 9f054d7

Please sign in to comment.