public class InvokeDynamicCacheCompiler extends InheritedCacheCompiler
scriptCompiler
Constructor and Description |
---|
InvokeDynamicCacheCompiler(StandardASMCompiler scriptCompiler) |
Modifier and Type | Method and Description |
---|---|
void |
cacheBigInteger(BaseBodyCompiler method,
BigInteger bigint)
Cache a BigInteger using invokedynamic.
|
void |
cacheBoolean(BaseBodyCompiler method,
boolean tru) |
void |
cacheByteList(BaseBodyCompiler method,
org.jruby.util.ByteList contents)
This doesn't get used, since it's only used from cacheRegexp in superclass,
and that is completely bound via invokedynamic now.
|
void |
cacheCallSite(BaseBodyCompiler method,
String name,
CallType callType)
Cache a CallSite object using invokedynamic.
|
int |
cacheClosure(BaseBodyCompiler method,
String closureMethod,
int arity,
StaticScope scope,
String file,
int line,
boolean hasMultipleArgsHead,
NodeType argsNodeId,
ASTInspector inspector)
Cache a closure body (BlockBody) using invokedynamic.
|
int |
cacheClosure19(BaseBodyCompiler method,
String closureMethod,
int arity,
StaticScope scope,
String file,
int line,
boolean hasMultipleArgsHead,
NodeType argsNodeId,
String parameterList,
ASTInspector inspector)
Cache a closure body (BlockBody) for 1.9 mode using invokedynamic.
|
void |
cacheConstant(BaseBodyCompiler method,
String constantName)
Cache a constant reference using invokedynamic.
|
void |
cacheConstantBoolean(BaseBodyCompiler method,
String constantName)
Cache a constant boolean using invokedynamic.
|
void |
cachedGetVariable(BaseBodyCompiler method,
String name) |
void |
cachedSetVariable(BaseBodyCompiler method,
String name,
CompilerCallback valueCallback) |
void |
cacheFixnum(BaseBodyCompiler method,
long value)
Cache a Fixnum literal using invokedynamic.
|
void |
cacheFloat(BaseBodyCompiler method,
double value)
Cache a Float literal using invokedynamic.
|
void |
cacheGlobal(BaseBodyCompiler method,
String globalName) |
void |
cacheGlobalBoolean(BaseBodyCompiler method,
String globalName) |
void |
cacheRegexp(BaseBodyCompiler method,
org.jruby.util.ByteList pattern,
int options)
Cache a Regexp literal using invokedynamic.
|
void |
cacheRubyEncoding(BaseBodyCompiler method,
org.jcodings.Encoding encoding)
Cache the __ENCODING__ keyword using invokedynamic.
|
int |
cacheStaticScope(BaseBodyCompiler method,
StaticScope scope)
Cache a StaticScope using invokedynamic.
|
void |
cacheString(BaseBodyCompiler method,
org.jruby.util.ByteList contents,
int codeRange)
Cache a String literal using invokedynamic.
|
void |
cacheSymbol(BaseBodyCompiler method,
String symbol,
org.jcodings.Encoding encoding)
Cache the symbol for the given string using invokedynamic.
|
void |
loadStaticScope(BaseBodyCompiler method,
int index) |
cacheConstantDefined, cacheConstantFrom, cachedGetVariableDefined, cacheDRegexp, cacheDRegexp19, cacheEncoding, cacheMethod, cacheMethod, cacheSpecialClosure, finish, reserveStaticScope
public InvokeDynamicCacheCompiler(StandardASMCompiler scriptCompiler)
public void cacheConstant(BaseBodyCompiler method, String constantName)
cacheConstant
in interface CacheCompiler
cacheConstant
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedconstantName
- the name of the constant to look uppublic void cacheConstantBoolean(BaseBodyCompiler method, String constantName)
cacheConstantBoolean
in interface CacheCompiler
cacheConstantBoolean
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedconstantName
- the name of the constant to look uppublic void cacheByteList(BaseBodyCompiler method, org.jruby.util.ByteList contents)
cacheByteList
in interface CacheCompiler
cacheByteList
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedcontents
- the contents of the bytelist to cachepublic void cacheRubyEncoding(BaseBodyCompiler method, org.jcodings.Encoding encoding)
cacheRubyEncoding
in interface CacheCompiler
cacheRubyEncoding
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedencoding
- the encoding for this scriptpublic int cacheClosure(BaseBodyCompiler method, String closureMethod, int arity, StaticScope scope, String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, ASTInspector inspector)
cacheClosure
in interface CacheCompiler
cacheClosure
in class InheritedCacheCompiler
public int cacheClosure19(BaseBodyCompiler method, String closureMethod, int arity, StaticScope scope, String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, String parameterList, ASTInspector inspector)
cacheClosure19
in interface CacheCompiler
cacheClosure19
in class InheritedCacheCompiler
public void cacheRegexp(BaseBodyCompiler method, org.jruby.util.ByteList pattern, int options)
cacheRegexp
in interface CacheCompiler
cacheRegexp
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedpattern
- the contents of the bytelist for the regexp patternoptions
- the regexp optionspublic void cacheFixnum(BaseBodyCompiler method, long value)
cacheFixnum
in interface CacheCompiler
cacheFixnum
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedvalue
- the value of the Fixnumpublic void cacheFloat(BaseBodyCompiler method, double value)
cacheFloat
in interface CacheCompiler
cacheFloat
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedvalue
- the value of the Floatpublic int cacheStaticScope(BaseBodyCompiler method, StaticScope scope)
cacheStaticScope
in interface CacheCompiler
cacheStaticScope
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedscope
- the original scope to base the new one onpublic void loadStaticScope(BaseBodyCompiler method, int index)
loadStaticScope
in interface CacheCompiler
loadStaticScope
in class InheritedCacheCompiler
public void cacheCallSite(BaseBodyCompiler method, String name, CallType callType)
cacheCallSite
in interface CacheCompiler
cacheCallSite
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedname
- the method name the call site invokes, or null for "super"callType
- the type of callpublic void cacheString(BaseBodyCompiler method, org.jruby.util.ByteList contents, int codeRange)
cacheString
in interface CacheCompiler
cacheString
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedcontents
- the contents of the bytelist for the StringcodeRange
- the code range for the Stringpublic void cacheBigInteger(BaseBodyCompiler method, BigInteger bigint)
cacheBigInteger
in interface CacheCompiler
cacheBigInteger
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedbigint
- the BigInteger to cachepublic void cacheSymbol(BaseBodyCompiler method, String symbol, org.jcodings.Encoding encoding)
cacheSymbol
in interface CacheCompiler
cacheSymbol
in class InheritedCacheCompiler
method
- the method compiler with which bytecode is emittedsymbol
- the string of the Symbol to cachepublic void cachedGetVariable(BaseBodyCompiler method, String name)
cachedGetVariable
in interface CacheCompiler
cachedGetVariable
in class InheritedCacheCompiler
public void cachedSetVariable(BaseBodyCompiler method, String name, CompilerCallback valueCallback)
cachedSetVariable
in interface CacheCompiler
cachedSetVariable
in class InheritedCacheCompiler
public void cacheGlobal(BaseBodyCompiler method, String globalName)
cacheGlobal
in interface CacheCompiler
cacheGlobal
in class InheritedCacheCompiler
public void cacheGlobalBoolean(BaseBodyCompiler method, String globalName)
cacheGlobalBoolean
in interface CacheCompiler
cacheGlobalBoolean
in class InheritedCacheCompiler
public void cacheBoolean(BaseBodyCompiler method, boolean tru)
cacheBoolean
in interface CacheCompiler
cacheBoolean
in class InheritedCacheCompiler
Copyright © 2001-2016 JRuby. All Rights Reserved.