Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into non-indy-jit
Browse files Browse the repository at this point in the history
Conflicts:
	core/src/main/java/org/jruby/internal/runtime/methods/InterpretedIRMethod.java
  • Loading branch information
headius committed Oct 20, 2014
2 parents ad8ac98 + 6a34a20 commit 981e602
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

if (IRRuntimeHelpers.isDebug()) doDebug();

if (ic.getFlags().contains(HAS_EXPLICIT_CALL_PROTOCOL)) return Interpreter.INTERPRET_METHOD(context, this, self, name, args, block);
if (ic.hasExplicitCallProtocol()) return Interpreter.INTERPRET_METHOD(context, this, self, name, args, block);

pre(ic, context, self, name, block);

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRClosure.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public InterpreterContext prepareInterpreterContext(Operand self) {
Instr[] linearizedInstrArray = prepareInstructions();

interpreterContext = new ClosureInterpreterContext(getTemporaryVariablesCount(), getBooleanVariablesCount(),
getFixnumVariablesCount(), getFloatVariablesCount(),getFlags().clone(), linearizedInstrArray,
getFixnumVariablesCount(), getFloatVariablesCount(), getFlags(), linearizedInstrArray,
self, getStaticScope(), getBlockBody());

return interpreterContext;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public synchronized InterpreterContext prepareForInterpretation() {
Instr[] linearizedInstrArray = prepareInstructions();

interpreterContext = new InterpreterContext(getTemporaryVariablesCount(), getBooleanVariablesCount(),
getFixnumVariablesCount(), getFloatVariablesCount(),getFlags().clone(), linearizedInstrArray);
getFixnumVariablesCount(), getFloatVariablesCount(), getFlags(), linearizedInstrArray);

return interpreterContext;
}
Expand Down
16 changes: 8 additions & 8 deletions core/src/main/java/org/jruby/ir/operands/InterpreterContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ public class InterpreterContext extends Operand {
private final int temporaryFixnumVariablecount;
private final int temporaryFloatVariablecount;

private final EnumSet<IRFlags> flags;

private final Instr[] instructions;

// Cached computed fields
private final boolean hasExplicitCallProtocol;
private final boolean pushNewDynScope;
private final boolean reuseParentDynScope;
private final boolean popDynScope;
Expand All @@ -34,8 +33,8 @@ public InterpreterContext(int temporaryVariablecount, int temporaryBooleanVariab
this.temporaryBooleanVariablecount = temporaryBooleanVariablecount;
this.temporaryFixnumVariablecount = temporaryFixnumVariablecount;
this.temporaryFloatVariablecount = temporaryFloatVariablecount;
this.flags = flags;
this.instructions = instructions;
this.hasExplicitCallProtocol = flags.contains(IRFlags.HAS_EXPLICIT_CALL_PROTOCOL);
this.reuseParentDynScope = flags.contains(IRFlags.REUSE_PARENT_DYNSCOPE);
this.pushNewDynScope = !flags.contains(IRFlags.DYNSCOPE_ELIMINATED) && !this.reuseParentDynScope;
this.popDynScope = this.pushNewDynScope || this.reuseParentDynScope;
Expand All @@ -45,7 +44,7 @@ public InterpreterContext(int temporaryVariablecount, int temporaryBooleanVariab
public void addUsedVariables(List<Variable> l) {}

@Override
public Operand cloneForInlining(CloneInfo ii) {
public Operand cloneForInlining(CloneInfo info) {
throw new IllegalStateException("Should not clone interp context");
}

Expand All @@ -66,14 +65,15 @@ public int getTemporaryFloatVariablecount() {
return temporaryFloatVariablecount;
}

public EnumSet<IRFlags> getFlags() {
return flags;
}

public Instr[] getInstructions() {
return instructions;
}


public boolean hasExplicitCallProtocol() {
return hasExplicitCallProtocol;
}

public boolean pushNewDynScope() {
return pushNewDynScope;
}
Expand Down

0 comments on commit 981e602

Please sign in to comment.