Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into truffle-head
- Loading branch information
Showing
219 changed files
with
4,859 additions
and
1,625 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
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
81 changes: 81 additions & 0 deletions
81
core/src/main/java/org/jruby/internal/runtime/methods/InterpretedIRBodyMethod.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,81 @@ | ||
package org.jruby.internal.runtime.methods; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import org.jruby.RubyModule; | ||
import org.jruby.ir.IRScope; | ||
import org.jruby.ir.interpreter.InterpreterContext; | ||
import org.jruby.ir.runtime.IRRuntimeHelpers; | ||
import org.jruby.runtime.Block; | ||
import org.jruby.runtime.ThreadContext; | ||
import org.jruby.runtime.Visibility; | ||
import org.jruby.runtime.builtin.IRubyObject; | ||
|
||
/** | ||
* Created by enebo on 2/6/15. | ||
*/ | ||
public class InterpretedIRBodyMethod extends InterpretedIRMethod { | ||
public InterpretedIRBodyMethod(IRScope method, RubyModule implementationClass) { | ||
super(method, Visibility.PUBLIC, implementationClass); | ||
|
||
this.box.callCount = -1; | ||
} | ||
|
||
@Override | ||
public List<String[]> getParameterList() { | ||
return new ArrayList<String[]>(); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { | ||
return call(context, self, clazz, name, block); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { | ||
if (IRRuntimeHelpers.isDebug()) doDebug(); | ||
|
||
InterpreterContext ic = ensureInstrsReady(); | ||
return ic.engine.interpret(context, self, ic, getImplementationClass().getMethodLocation(), name, block, null); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { | ||
return call(context, self, clazz, name, block); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { | ||
return call(context, self, clazz, name, block); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { | ||
return call(context, self, clazz, name, block); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { | ||
return call(context, self, clazz, name, Block.NULL_BLOCK); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { | ||
return call(context, self, clazz, name, Block.NULL_BLOCK); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { | ||
return call(context, self, clazz, name, Block.NULL_BLOCK); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { | ||
return call(context, self, clazz, name, Block.NULL_BLOCK); | ||
} | ||
|
||
@Override | ||
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { | ||
return call(context, self, clazz, name, Block.NULL_BLOCK); | ||
} | ||
} |
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
Oops, something went wrong.