-
-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CheckForLJE out of runtimehelpers. No result instr
- Loading branch information
Showing
7 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
core/src/main/java/org/jruby/ir/instructions/CheckForLJEInstr.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.jruby.ir.instructions; | ||
|
||
import org.jruby.ir.IRVisitor; | ||
import org.jruby.ir.Operation; | ||
import org.jruby.ir.runtime.IRRuntimeHelpers; | ||
import org.jruby.ir.transformations.inlining.CloneInfo; | ||
import org.jruby.runtime.Block; | ||
import org.jruby.runtime.DynamicScope; | ||
import org.jruby.runtime.ThreadContext; | ||
|
||
/** | ||
*/ | ||
public class CheckForLJEInstr extends Instr { | ||
private boolean maybeLambda; | ||
|
||
public CheckForLJEInstr(boolean maybeLambda) { | ||
super(Operation.CHECK_FOR_LJE, EMPTY_OPERANDS); | ||
|
||
this.maybeLambda = maybeLambda; | ||
} | ||
|
||
public boolean maybeLambda() { | ||
return maybeLambda; | ||
} | ||
|
||
@Override | ||
public Instr clone(CloneInfo info) { | ||
return new CheckForLJEInstr(maybeLambda); | ||
} | ||
|
||
public void visit(IRVisitor visitor) { | ||
visitor.CheckForLJEInstr(this); | ||
} | ||
|
||
public void check(ThreadContext context, DynamicScope dynamicScope, Block.Type blockType) { | ||
IRRuntimeHelpers.checkForLJE(context, dynamicScope, maybeLambda, blockType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters