public class Interpreter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
Interpreter.CallSiteProfile |
private static class |
Interpreter.IRCallSite |
| Modifier and Type | Field and Description |
|---|---|
private static Interpreter.IRCallSite |
callerSite |
private static java.util.HashMap<java.lang.Long,Interpreter.CallSiteProfile> |
callProfile |
private static int |
codeModificationsCount |
private static int |
globalThreadPollCount |
private static int |
inlineCount |
private static int |
interpInstrsCount |
private static Logger |
LOG |
private static int |
numCyclesWithNoModifications |
private static java.util.HashMap<Operation,Counter> |
opStats |
private static java.util.HashMap<IRScope,Counter> |
scopeThreadPollCounts |
private static java.util.HashMap<IRScope,java.lang.Integer> |
scopeVersionMap |
private static int |
versionCount |
| Constructor and Description |
|---|
Interpreter() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
analyzeProfile() |
private static IRScope |
getEvalContainerScope(Ruby runtime,
StaticScope evalScope) |
private static java.lang.Integer |
initProfiling(IRScope scope) |
static IRubyObject |
INTERPRET_BLOCK(ThreadContext context,
IRubyObject self,
IRScope scope,
IRubyObject[] args,
java.lang.String name,
Block block,
Block.Type blockType) |
static IRubyObject |
INTERPRET_EVAL(ThreadContext context,
IRubyObject self,
IRScope scope,
RubyModule clazz,
IRubyObject[] args,
java.lang.String name,
Block block,
Block.Type blockType) |
static IRubyObject |
INTERPRET_METHOD(ThreadContext context,
InterpretedIRMethod irMethod,
IRubyObject self,
java.lang.String name,
IRubyObject[] args,
Block block,
Block.Type blockType,
boolean isTraceable) |
static IRubyObject |
interpret(Ruby runtime,
Node rootNode,
IRubyObject self) |
private static IRubyObject |
interpret(ThreadContext context,
IRubyObject self,
IRScope scope,
Visibility visibility,
RubyModule implClass,
IRubyObject[] args,
Block block,
Block.Type blockType) |
static IRubyObject |
interpretBindingEval(Ruby runtime,
java.lang.String file,
int lineNumber,
java.lang.String backtraceName,
Node node,
IRubyObject self,
Block block) |
static IRubyObject |
interpretCommonEval(Ruby runtime,
java.lang.String file,
int lineNumber,
java.lang.String backtraceName,
RootNode rootNode,
IRubyObject self,
Block block) |
static IRubyObject |
interpretSimpleEval(Ruby runtime,
java.lang.String file,
int lineNumber,
java.lang.String backtraceName,
Node node,
IRubyObject self) |
private static void |
methodPostTrace(Ruby runtime,
ThreadContext context,
java.lang.String name,
RubyModule implClass) |
private static void |
methodPreTrace(Ruby runtime,
ThreadContext context,
java.lang.String name,
RubyModule implClass) |
private static void |
outputProfileStats() |
private static void |
processCall(ThreadContext context,
Instr instr,
Operation operation,
IRScope scope,
DynamicScope currDynScope,
java.lang.Object[] temp,
IRubyObject self,
Block block,
Block.Type blockType) |
private static void |
receiveArg(ThreadContext context,
Instr i,
Operation operation,
IRubyObject[] args,
int kwArgHashCount,
DynamicScope currDynScope,
java.lang.Object[] temp,
java.lang.Object exception,
Block block) |
private static java.lang.Object |
retrieveOp(Operand r,
ThreadContext context,
IRubyObject self,
DynamicScope currDynScope,
java.lang.Object[] temp) |
static void |
runBeginEndBlocks(java.util.List<IRClosure> beBlocks,
ThreadContext context,
IRubyObject self,
java.lang.Object[] temp) |
private static void |
setResult(java.lang.Object[] temp,
DynamicScope currDynScope,
Instr instr,
java.lang.Object result) |
private static void |
setResult(java.lang.Object[] temp,
DynamicScope currDynScope,
Variable resultVar,
java.lang.Object result) |
private static void |
updateCallSite(Instr instr,
IRScope scope,
java.lang.Integer scopeVersion) |
private static Interpreter.IRCallSite callerSite
private static final Logger LOG
private static int versionCount
private static java.util.HashMap<IRScope,java.lang.Integer> scopeVersionMap
private static int inlineCount
private static int interpInstrsCount
private static int codeModificationsCount
private static int numCyclesWithNoModifications
private static int globalThreadPollCount
private static java.util.HashMap<java.lang.Long,Interpreter.CallSiteProfile> callProfile
private static IRScope getEvalContainerScope(Ruby runtime, StaticScope evalScope)
public static IRubyObject interpretCommonEval(Ruby runtime, java.lang.String file, int lineNumber, java.lang.String backtraceName, RootNode rootNode, IRubyObject self, Block block)
public static IRubyObject interpretSimpleEval(Ruby runtime, java.lang.String file, int lineNumber, java.lang.String backtraceName, Node node, IRubyObject self)
public static IRubyObject interpretBindingEval(Ruby runtime, java.lang.String file, int lineNumber, java.lang.String backtraceName, Node node, IRubyObject self, Block block)
public static void runBeginEndBlocks(java.util.List<IRClosure> beBlocks, ThreadContext context, IRubyObject self, java.lang.Object[] temp)
public static IRubyObject interpret(Ruby runtime, Node rootNode, IRubyObject self)
private static void analyzeProfile()
private static void outputProfileStats()
private static java.lang.Integer initProfiling(IRScope scope)
private static void setResult(java.lang.Object[] temp,
DynamicScope currDynScope,
Variable resultVar,
java.lang.Object result)
private static void setResult(java.lang.Object[] temp,
DynamicScope currDynScope,
Instr instr,
java.lang.Object result)
private static java.lang.Object retrieveOp(Operand r, ThreadContext context, IRubyObject self, DynamicScope currDynScope, java.lang.Object[] temp)
private static void updateCallSite(Instr instr, IRScope scope, java.lang.Integer scopeVersion)
private static void receiveArg(ThreadContext context, Instr i, Operation operation, IRubyObject[] args, int kwArgHashCount, DynamicScope currDynScope, java.lang.Object[] temp, java.lang.Object exception, Block block)
private static void processCall(ThreadContext context, Instr instr, Operation operation, IRScope scope, DynamicScope currDynScope, java.lang.Object[] temp, IRubyObject self, Block block, Block.Type blockType)
private static IRubyObject interpret(ThreadContext context, IRubyObject self, IRScope scope, Visibility visibility, RubyModule implClass, IRubyObject[] args, Block block, Block.Type blockType)
public static IRubyObject INTERPRET_EVAL(ThreadContext context, IRubyObject self, IRScope scope, RubyModule clazz, IRubyObject[] args, java.lang.String name, Block block, Block.Type blockType)
public static IRubyObject INTERPRET_BLOCK(ThreadContext context, IRubyObject self, IRScope scope, IRubyObject[] args, java.lang.String name, Block block, Block.Type blockType)
public static IRubyObject INTERPRET_METHOD(ThreadContext context, InterpretedIRMethod irMethod, IRubyObject self, java.lang.String name, IRubyObject[] args, Block block, Block.Type blockType, boolean isTraceable)
private static void methodPreTrace(Ruby runtime, ThreadContext context, java.lang.String name, RubyModule implClass)
private static void methodPostTrace(Ruby runtime, ThreadContext context, java.lang.String name, RubyModule implClass)