Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b8823f8d1f6b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a16dfbb46170
Choose a head ref
  • 7 commits
  • 160 files changed
  • 4 contributors

Commits on Oct 9, 2014

  1. Copy the full SHA
    c72837d View commit details
  2. Copy the full SHA
    48601fd View commit details
  3. Split apart InlinerInfo into SimpleCloneInfo and InlineCloneInfo. Spe…

    …cialization used to make it clearer which code is performing which type of cloning
    enebo committed Oct 9, 2014
    Copy the full SHA
    94eb4ae View commit details
  4. Copy the full SHA
    8b1c4ae View commit details
  5. Copy the full SHA
    b6e67a3 View commit details
  6. Merge remote-tracking branch 'origin/master' into non-indy-jit

    Conflicts:
    	core/src/main/java/org/jruby/ir/instructions/InstanceSuperInstr.java
    headius committed Oct 9, 2014
    Copy the full SHA
    dbf56ab View commit details
  7. Copy the full SHA
    a16dfbb View commit details
Showing with 978 additions and 1,158 deletions.
  1. +3 −4 core/src/main/java/org/jruby/ir/IRBuilder.java
  2. +21 −13 core/src/main/java/org/jruby/ir/IRClosure.java
  3. +16 −6 core/src/main/java/org/jruby/ir/IRFor.java
  4. +2 −1 core/src/main/java/org/jruby/ir/IRManager.java
  5. +2 −2 core/src/main/java/org/jruby/ir/instructions/AliasInstr.java
  6. +2 −2 core/src/main/java/org/jruby/ir/instructions/ArgScopeDepthInstr.java
  7. +2 −2 core/src/main/java/org/jruby/ir/instructions/AttrAssignInstr.java
  8. +2 −2 core/src/main/java/org/jruby/ir/instructions/BEQInstr.java
  9. +2 −2 core/src/main/java/org/jruby/ir/instructions/BFalseInstr.java
  10. +2 −2 core/src/main/java/org/jruby/ir/instructions/BNEInstr.java
  11. +2 −2 core/src/main/java/org/jruby/ir/instructions/BNilInstr.java
  12. +2 −2 core/src/main/java/org/jruby/ir/instructions/BTrueInstr.java
  13. +2 −2 core/src/main/java/org/jruby/ir/instructions/BUndefInstr.java
  14. +2 −2 core/src/main/java/org/jruby/ir/instructions/BacktickInstr.java
  15. +2 −2 core/src/main/java/org/jruby/ir/instructions/BlockGivenInstr.java
  16. +34 −31 core/src/main/java/org/jruby/ir/instructions/BreakInstr.java
  17. +2 −2 core/src/main/java/org/jruby/ir/instructions/BuildCompoundArrayInstr.java
  18. +2 −2 core/src/main/java/org/jruby/ir/instructions/BuildCompoundStringInstr.java
  19. +2 −3 core/src/main/java/org/jruby/ir/instructions/BuildDynRegExpInstr.java
  20. +2 −3 core/src/main/java/org/jruby/ir/instructions/BuildLambdaInstr.java
  21. +2 −2 core/src/main/java/org/jruby/ir/instructions/CallBase.java
  22. +2 −2 core/src/main/java/org/jruby/ir/instructions/CallInstr.java
  23. +2 −2 core/src/main/java/org/jruby/ir/instructions/CheckArgsArrayArityInstr.java
  24. +16 −17 core/src/main/java/org/jruby/ir/instructions/CheckArityInstr.java
  25. +2 −2 core/src/main/java/org/jruby/ir/instructions/ClassSuperInstr.java
  26. +2 −2 core/src/main/java/org/jruby/ir/instructions/ConstMissingInstr.java
  27. +2 −2 core/src/main/java/org/jruby/ir/instructions/CopyInstr.java
  28. +2 −2 core/src/main/java/org/jruby/ir/instructions/DefineClassInstr.java
  29. +2 −2 core/src/main/java/org/jruby/ir/instructions/DefineClassMethodInstr.java
  30. +2 −2 core/src/main/java/org/jruby/ir/instructions/DefineInstanceMethodInstr.java
  31. +2 −3 core/src/main/java/org/jruby/ir/instructions/DefineMetaClassInstr.java
  32. +2 −2 core/src/main/java/org/jruby/ir/instructions/DefineModuleInstr.java
  33. +2 −2 core/src/main/java/org/jruby/ir/instructions/EQQInstr.java
  34. +2 −2 core/src/main/java/org/jruby/ir/instructions/ExceptionRegionEndMarkerInstr.java
  35. +2 −2 core/src/main/java/org/jruby/ir/instructions/ExceptionRegionStartMarkerInstr.java
  36. +2 −2 core/src/main/java/org/jruby/ir/instructions/GVarAliasInstr.java
  37. +2 −2 core/src/main/java/org/jruby/ir/instructions/GetClassVarContainerModuleInstr.java
  38. +2 −2 core/src/main/java/org/jruby/ir/instructions/GetClassVariableInstr.java
  39. +2 −2 core/src/main/java/org/jruby/ir/instructions/GetEncodingInstr.java
  40. +2 −2 core/src/main/java/org/jruby/ir/instructions/GetFieldInstr.java
  41. +2 −2 core/src/main/java/org/jruby/ir/instructions/GetGlobalVariableInstr.java
  42. +2 −2 core/src/main/java/org/jruby/ir/instructions/InheritanceSearchConstInstr.java
  43. +2 −2 core/src/main/java/org/jruby/ir/instructions/InstanceSuperInstr.java
  44. +4 −4 core/src/main/java/org/jruby/ir/instructions/Instr.java
  45. +2 −2 core/src/main/java/org/jruby/ir/instructions/JumpInstr.java
  46. +2 −2 core/src/main/java/org/jruby/ir/instructions/LabelInstr.java
  47. +2 −4 core/src/main/java/org/jruby/ir/instructions/LexicalSearchConstInstr.java
  48. +2 −2 core/src/main/java/org/jruby/ir/instructions/LineNumberInstr.java
  49. +2 −2 core/src/main/java/org/jruby/ir/instructions/LoadLocalVarInstr.java
  50. +2 −2 core/src/main/java/org/jruby/ir/instructions/Match2Instr.java
  51. +2 −2 core/src/main/java/org/jruby/ir/instructions/Match3Instr.java
  52. +2 −2 core/src/main/java/org/jruby/ir/instructions/MatchInstr.java
  53. +2 −2 core/src/main/java/org/jruby/ir/instructions/MethodLookupInstr.java
  54. +2 −2 core/src/main/java/org/jruby/ir/instructions/ModuleVersionGuardInstr.java
  55. +2 −2 core/src/main/java/org/jruby/ir/instructions/NoResultCallInstr.java
  56. +17 −15 core/src/main/java/org/jruby/ir/instructions/NonlocalReturnInstr.java
  57. +2 −2 core/src/main/java/org/jruby/ir/instructions/NopInstr.java
  58. +2 −2 core/src/main/java/org/jruby/ir/instructions/OptArgMultipleAsgnInstr.java
  59. +4 −10 core/src/main/java/org/jruby/ir/instructions/PopBindingInstr.java
  60. +4 −10 core/src/main/java/org/jruby/ir/instructions/PopFrameInstr.java
  61. +2 −2 core/src/main/java/org/jruby/ir/instructions/ProcessModuleBodyInstr.java
  62. +3 −4 core/src/main/java/org/jruby/ir/instructions/PushBindingInstr.java
  63. +4 −10 core/src/main/java/org/jruby/ir/instructions/PushFrameInstr.java
  64. +2 −2 core/src/main/java/org/jruby/ir/instructions/PutClassVariableInstr.java
  65. +2 −2 core/src/main/java/org/jruby/ir/instructions/PutConstInstr.java
  66. +2 −2 core/src/main/java/org/jruby/ir/instructions/PutFieldInstr.java
  67. +2 −2 core/src/main/java/org/jruby/ir/instructions/PutGlobalVarInstr.java
  68. +2 −2 core/src/main/java/org/jruby/ir/instructions/RaiseArgumentErrorInstr.java
  69. +13 −16 core/src/main/java/org/jruby/ir/instructions/ReceiveClosureInstr.java
  70. +2 −2 core/src/main/java/org/jruby/ir/instructions/ReceiveJRubyExceptionInstr.java
  71. +2 −2 core/src/main/java/org/jruby/ir/instructions/ReceiveKeywordArgInstr.java
  72. +2 −2 core/src/main/java/org/jruby/ir/instructions/ReceiveKeywordRestArgInstr.java
  73. +16 −16 core/src/main/java/org/jruby/ir/instructions/ReceiveOptArgInstr.java
  74. +21 −21 core/src/main/java/org/jruby/ir/instructions/ReceivePostReqdArgInstr.java
  75. +11 −13 core/src/main/java/org/jruby/ir/instructions/ReceivePreReqdArgInstr.java
  76. +12 −14 core/src/main/java/org/jruby/ir/instructions/ReceiveRestArgInstr.java
  77. +2 −2 core/src/main/java/org/jruby/ir/instructions/ReceiveRubyExceptionInstr.java
  78. +8 −12 core/src/main/java/org/jruby/ir/instructions/ReceiveSelfInstr.java
  79. +2 −2 core/src/main/java/org/jruby/ir/instructions/RecordEndBlockInstr.java
  80. +2 −2 core/src/main/java/org/jruby/ir/instructions/ReqdArgMultipleAsgnInstr.java
  81. +2 −2 core/src/main/java/org/jruby/ir/instructions/RescueEQQInstr.java
  82. +2 −2 core/src/main/java/org/jruby/ir/instructions/RestArgMultipleAsgnInstr.java
  83. +12 −15 core/src/main/java/org/jruby/ir/instructions/ReturnInstr.java
  84. +2 −3 core/src/main/java/org/jruby/ir/instructions/RuntimeHelperCall.java
  85. +2 −2 core/src/main/java/org/jruby/ir/instructions/SearchConstInstr.java
  86. +2 −2 core/src/main/java/org/jruby/ir/instructions/SetCapturedVarInstr.java
  87. +2 −3 core/src/main/java/org/jruby/ir/instructions/StoreLocalVarInstr.java
  88. +7 −10 core/src/main/java/org/jruby/ir/instructions/ThreadPollInstr.java
  89. +2 −2 core/src/main/java/org/jruby/ir/instructions/ThrowExceptionInstr.java
  90. +2 −2 core/src/main/java/org/jruby/ir/instructions/ToAryInstr.java
  91. +2 −2 core/src/main/java/org/jruby/ir/instructions/TraceInstr.java
  92. +2 −2 core/src/main/java/org/jruby/ir/instructions/UndefMethodInstr.java
  93. +2 −2 core/src/main/java/org/jruby/ir/instructions/UnresolvedSuperInstr.java
  94. +3 −3 core/src/main/java/org/jruby/ir/instructions/YieldInstr.java
  95. +2 −2 core/src/main/java/org/jruby/ir/instructions/ZSuperInstr.java
  96. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/AluInstr.java
  97. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/BoxBooleanInstr.java
  98. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/BoxFixnumInstr.java
  99. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/BoxFloatInstr.java
  100. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/UnboxBooleanInstr.java
  101. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/UnboxFixnumInstr.java
  102. +2 −2 core/src/main/java/org/jruby/ir/instructions/boxing/UnboxFloatInstr.java
  103. +3 −3 core/src/main/java/org/jruby/ir/instructions/defined/GetErrorInfoInstr.java
  104. +2 −2 core/src/main/java/org/jruby/ir/instructions/defined/RestoreErrorInfoInstr.java
  105. +2 −2 core/src/main/java/org/jruby/ir/operands/Array.java
  106. +2 −2 core/src/main/java/org/jruby/ir/operands/AsString.java
  107. +3 −3 core/src/main/java/org/jruby/ir/operands/ClosureLocalVariable.java
  108. +2 −5 core/src/main/java/org/jruby/ir/operands/CurrentScope.java
  109. +2 −2 core/src/main/java/org/jruby/ir/operands/DynamicSymbol.java
  110. +2 −2 core/src/main/java/org/jruby/ir/operands/Hash.java
  111. +2 −2 core/src/main/java/org/jruby/ir/operands/IRException.java
  112. +2 −2 core/src/main/java/org/jruby/ir/operands/ImmutableLiteral.java
  113. +2 −2 core/src/main/java/org/jruby/ir/operands/Label.java
  114. +6 −2 core/src/main/java/org/jruby/ir/operands/LocalVariable.java
  115. +2 −2 core/src/main/java/org/jruby/ir/operands/MethodHandle.java
  116. +2 −2 core/src/main/java/org/jruby/ir/operands/ObjectClass.java
  117. +2 −2 core/src/main/java/org/jruby/ir/operands/Operand.java
  118. +2 −2 core/src/main/java/org/jruby/ir/operands/Range.java
  119. +2 −2 core/src/main/java/org/jruby/ir/operands/Reference.java
  120. +2 −2 core/src/main/java/org/jruby/ir/operands/Regexp.java
  121. +2 −2 core/src/main/java/org/jruby/ir/operands/SValue.java
  122. +2 −2 core/src/main/java/org/jruby/ir/operands/ScopeModule.java
  123. +2 −2 core/src/main/java/org/jruby/ir/operands/Self.java
  124. +2 −2 core/src/main/java/org/jruby/ir/operands/Splat.java
  125. +2 −2 core/src/main/java/org/jruby/ir/operands/StandardError.java
  126. +2 −2 core/src/main/java/org/jruby/ir/operands/StringLiteral.java
  127. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryBooleanVariable.java
  128. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryClosureVariable.java
  129. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryCurrentModuleVariable.java
  130. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryCurrentScopeVariable.java
  131. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryFixnumVariable.java
  132. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryFloatVariable.java
  133. +2 −2 core/src/main/java/org/jruby/ir/operands/TemporaryLocalVariable.java
  134. +2 −2 core/src/main/java/org/jruby/ir/operands/UndefinedValue.java
  135. +4 −3 core/src/main/java/org/jruby/ir/operands/Variable.java
  136. +2 −2 core/src/main/java/org/jruby/ir/operands/WrappedIRClosure.java
  137. +8 −8 core/src/main/java/org/jruby/ir/representations/BasicBlock.java
  138. +3 −3 core/src/main/java/org/jruby/ir/representations/CFG.java
  139. +0 −17 core/src/main/java/org/jruby/ir/representations/ExceptionRegion.java
  140. +6 −9 core/src/main/java/org/jruby/ir/transformations/inlining/CFGInliner.java
  141. +97 −0 core/src/main/java/org/jruby/ir/transformations/inlining/CloneInfo.java
  142. +0 −16 core/src/main/java/org/jruby/ir/transformations/inlining/CloneMode.java
  143. +209 −0 core/src/main/java/org/jruby/ir/transformations/inlining/InlineCloneInfo.java
  144. +0 −300 core/src/main/java/org/jruby/ir/transformations/inlining/InlinerInfo.java
  145. +50 −0 core/src/main/java/org/jruby/ir/transformations/inlining/SimpleCloneInfo.java
  146. +18 −25 core/src/main/java/org/jruby/truffle/TruffleBridgeImpl.java
  147. +13 −2 core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  148. +17 −0 core/src/main/java/org/jruby/truffle/nodes/core/NilClassNodes.java
  149. +43 −0 core/src/main/java/org/jruby/truffle/nodes/globals/WriteReadOnlyGlobalNode.java
  150. +15 −8 core/src/main/java/org/jruby/truffle/runtime/RubyContext.java
  151. +1 −7 core/src/main/java/org/jruby/truffle/runtime/control/ThrowException.java
  152. +4 −0 core/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  153. +1 −9 core/src/main/java/org/jruby/truffle/runtime/core/RubyThread.java
  154. +24 −5 core/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
  155. +0 −4 maven/jruby-complete/src/it/osgi-test/invoker.properties
  156. +0 −150 maven/jruby-complete/src/it/osgi-test/pom.xml.skip
  157. +0 −92 ...n/jruby-complete/src/it/osgi-test/src/test/java/org/jruby/embed/osgi/test/JRubyOsgiEmbedTest.java
  158. +0 −8 spec/truffle/tags/language/predefined_tags.txt
  159. +0 −5 spec/truffle/tags/language/regexp/character_classes_tags.txt
  160. +0 −2 spec/truffle/tags/language/throw_tags.txt
7 changes: 3 additions & 4 deletions core/src/main/java/org/jruby/ir/IRBuilder.java
Original file line number Diff line number Diff line change
@@ -13,8 +13,7 @@
import org.jruby.ir.operands.*;
import org.jruby.ir.operands.Boolean;
import org.jruby.ir.operands.Float;
import org.jruby.ir.transformations.inlining.CloneMode;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.SimpleCloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.Arity;
import org.jruby.runtime.CallType;
@@ -221,7 +220,7 @@ public void emitBody(IRBuilder b, IRScope s) {
}

public void cloneIntoHostScope(IRBuilder b, IRScope s) {
InlinerInfo ii = new InlinerInfo(null, s, CloneMode.ENSURE_BLOCK_CLONE);
SimpleCloneInfo ii = new SimpleCloneInfo(s, true);

// Clone required labels.
// During normal cloning below, labels not found in the rename map
@@ -237,7 +236,7 @@ public void cloneIntoHostScope(IRBuilder b, IRScope s) {
b.addInstr(s, new LabelInstr(ii.getRenamedLabel(start)));
b.addInstr(s, new ExceptionRegionStartMarkerInstr(bodyRescuer));
for (Instr i: instrs) {
Instr clonedInstr = i.cloneForInlining(ii);
Instr clonedInstr = i.clone(ii);
if (clonedInstr instanceof CallBase) {
CallBase call = (CallBase)clonedInstr;
Operand block = call.getClosureArg(null);
34 changes: 21 additions & 13 deletions core/src/main/java/org/jruby/ir/IRClosure.java
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@
import org.jruby.ir.operands.*;
import org.jruby.ir.representations.BasicBlock;
import org.jruby.ir.representations.CFG;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.ir.transformations.inlining.SimpleCloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.Arity;
import org.jruby.runtime.BlockBody;
@@ -61,10 +62,11 @@ protected IRClosure(IRManager manager, IRScope lexicalParent, String fileName, i
}

/** Used by cloning code */
protected IRClosure(IRClosure c, IRScope lexicalParent, String prefix) {
/* Inlining generates a new name and id and basic cloning will reuse the originals name */
protected IRClosure(IRClosure c, IRScope lexicalParent, int closureId, String fullName) {
super(c, lexicalParent);
this.closureId = lexicalParent.getNextClosureId();
setName(prefix + closureId);
this.closureId = closureId;
super.setName(fullName);
this.startLabel = getNewLabel(getName() + "_START");
this.endLabel = getNewLabel(getName() + "_END");
if (getManager().isDryRun()) {
@@ -281,12 +283,11 @@ public int getNestingDepth() {
return nestingDepth;
}

protected IRClosure cloneForInlining(InlinerInfo ii, IRClosure clone) {
protected IRClosure cloneForInlining(CloneInfo ii, IRClosure clone) {
clone.nestingDepth = this.nestingDepth;
clone.parameterList = this.parameterList;

// Create a new inliner info object
InlinerInfo clonedII = ii.cloneForCloningClosure(clone);
SimpleCloneInfo clonedII = ii.cloneForCloningClosure(clone);

if (getCFG() != null) {
// Clone the cfg
@@ -296,7 +297,7 @@ protected IRClosure cloneForInlining(InlinerInfo ii, IRClosure clone) {
} else {
// Clone the instruction list
for (Instr i: getInstrs()) {
Instr clonedInstr = i.cloneForInlining(clonedII);
Instr clonedInstr = i.clone(clonedII);
if (clonedInstr instanceof CallBase) {
CallBase call = (CallBase)clonedInstr;
Operand block = call.getClosureArg(null);
@@ -309,9 +310,17 @@ protected IRClosure cloneForInlining(InlinerInfo ii, IRClosure clone) {
return clone;
}

public IRClosure cloneForInlining(InlinerInfo ii) {
// FIXME: This is buggy! Is this not dependent on clone-mode??
IRClosure clonedClosure = new IRClosure(this, ii.getNewLexicalParentForClosure(), "_CLOSURE_CLONE_");
public IRClosure cloneForInlining(CloneInfo ii) {
IRClosure clonedClosure;
IRScope lexicalParent = ii.getScope();

if (ii instanceof SimpleCloneInfo) {
clonedClosure = new IRClosure(this, lexicalParent, closureId, getName());
} else {
int id = lexicalParent.getNextClosureId();
String fullName = lexicalParent.getName() + "_CLOSURE_CLONE_" + id;
clonedClosure = new IRClosure(this, lexicalParent, id, fullName);
}

return cloneForInlining(ii, clonedClosure);
}
@@ -361,8 +370,7 @@ protected boolean addGEBForUncaughtBreaks() {
@Override
public void setName(String name) {
// We can distinguish closures only with parent scope name
String fullName = getLexicalParent().getName() + name;
super.setName(fullName);
super.setName(getLexicalParent().getName() + name);
}

public Arity getArity() {
22 changes: 16 additions & 6 deletions core/src/main/java/org/jruby/ir/IRFor.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jruby.ir;

import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.ir.transformations.inlining.SimpleCloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.parser.StaticScopeFactory;
import org.jruby.runtime.Arity;
@@ -18,8 +19,8 @@ public IRFor(IRManager manager, IRScope lexicalParent, int lineNumber, StaticSco
}

/** Used by cloning code */
private IRFor(IRClosure c, IRScope lexicalParent) {
super(c, lexicalParent, "_FOR_LOOP_CLONE_");
private IRFor(IRClosure c, IRScope lexicalParent, int id, String fullName) {
super(c, lexicalParent, id, fullName);
}

@Override
@@ -28,9 +29,18 @@ public IRScopeType getScopeType() {
}

@Override
public IRClosure cloneForInlining(InlinerInfo ii) {
// FIXME: This is buggy! Is this not dependent on clone-mode??
IRClosure clonedClosure = new IRFor(this, ii.getNewLexicalParentForClosure());
public IRClosure cloneForInlining(CloneInfo ii) {
IRClosure clonedClosure;
IRScope lexicalParent = ii.getScope();

if (ii instanceof SimpleCloneInfo) {
clonedClosure = new IRFor(this, lexicalParent, closureId, getName());
} else {
int id = lexicalParent.getNextClosureId();
String fullName = lexicalParent.getName() + "_FOR_LOOP_CLONE_" + id;
clonedClosure = new IRFor(this, lexicalParent, id, fullName);
}

return cloneForInlining(ii, clonedClosure);
}
}
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/ir/IRManager.java
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@
public class IRManager {
public static String SAFE_COMPILER_PASSES = "";
public static String DEFAULT_COMPILER_PASSES = "OptimizeTempVarsPass,LocalOptimizationPass";
public static String DEFAULT_JIT_PASSES = "DeadCodeElimination,AddLocalVarLoadStoreInstructions,OptimizeDynScopesPass,AddCallProtocolInstructions,EnsureTempsAssigned";
// public static String DEFAULT_JIT_PASSES = "DeadCodeElimination,AddLocalVarLoadStoreInstructions,OptimizeDynScopesPass,AddCallProtocolInstructions,EnsureTempsAssigned";
public static String DEFAULT_JIT_PASSES = "AddLocalVarLoadStoreInstructions,AddCallProtocolInstructions,EnsureTempsAssigned";
public static String DEFAULT_INLINING_COMPILER_PASSES = "LocalOptimizationPass";

private int dummyMetaClassCount = 0;
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/AliasInstr.java
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.runtime.IRRuntimeHelpers;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -49,7 +49,7 @@ public void simplifyOperands(Map<Operand, Operand> valueMap, boolean force) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new AliasInstr(getNewName().cloneForInlining(ii), getOldName().cloneForInlining(ii));
}

Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -35,7 +35,7 @@ public void updateResult(Variable v) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new ArgScopeDepthInstr(ii.getRenamedVariable(result));
}

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import org.jruby.ir.instructions.specialized.OneArgOperandAttrAssignInstr;
import org.jruby.ir.operands.MethAddr;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.*;
import org.jruby.runtime.builtin.IRubyObject;
@@ -22,7 +22,7 @@ public AttrAssignInstr(AttrAssignInstr instr) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new AttrAssignInstr(receiver.cloneForInlining(ii),
(MethAddr)getMethodAddr().cloneForInlining(ii), cloneCallArgs(ii));
}
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BEQInstr.java
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Boolean;
import org.jruby.ir.operands.*;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -25,7 +25,7 @@ protected BEQInstr(Operand v1, Operand v2, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BEQInstr(getArg1().cloneForInlining(ii), getArg2().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}

4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BFalseInstr.java
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -21,7 +21,7 @@ public BFalseInstr(Operand v, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BFalseInstr(getOperation(), getArg1().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}

4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BNEInstr.java
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.UndefinedValue;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -25,7 +25,7 @@ public BNEInstr(Operand v1, Operand v2, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BNEInstr(getArg1().cloneForInlining(ii),
getArg2().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BNilInstr.java
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -16,7 +16,7 @@ public BNilInstr(Operand v, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BNilInstr(getArg1().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}

4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BTrueInstr.java
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -20,7 +20,7 @@ public BTrueInstr(Operand v, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BTrueInstr(getOperation(), getArg1().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}

4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ir/instructions/BUndefInstr.java
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.UndefinedValue;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -17,7 +17,7 @@ public BUndefInstr(Operand v, Label jmpTarget) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BUndefInstr(getArg1().cloneForInlining(ii), ii.getRenamedLabel(getJumpTarget()));
}

Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -68,7 +68,7 @@ public void simplifyOperands(Map<Operand, Operand> valueMap, boolean force) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
List<Operand> newPieces = new ArrayList<Operand>();
for (Operand p : pieces) {
newPieces.add(p.cloneForInlining(ii));
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
import org.jruby.ir.operands.Operand;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.runtime.IRRuntimeHelpers;
import org.jruby.ir.transformations.inlining.InlinerInfo;
import org.jruby.ir.transformations.inlining.CloneInfo;
import org.jruby.parser.StaticScope;
import org.jruby.runtime.DynamicScope;
import org.jruby.runtime.ThreadContext;
@@ -51,7 +51,7 @@ public void updateResult(Variable v) {
}

@Override
public Instr cloneForInlining(InlinerInfo ii) {
public Instr clone(CloneInfo ii) {
return new BlockGivenInstr(ii.getRenamedVariable(result), blockArg.cloneForInlining(ii));
}

Loading