Package org.jruby.ast.executable
Class RuntimeCache
java.lang.Object
org.jruby.ast.executable.RuntimeCache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal RubyRegexpcacheRegexp(int index, RubyRegexp regexp) Deprecated.final RubyRegexpcacheRegexp(int index, RubyString pattern, int options) Deprecated.final BigIntegergetBigInteger(int index, String pattern) final ByteListgetByteList(int index) final CallSitegetCallSite(int index) final IRubyObjectgetConstant(ThreadContext context, StaticScope scope, String name, int index) final IRubyObjectgetConstantDefined(ThreadContext context, StaticScope scope, String name, int index) final IRubyObjectgetConstantFrom(RubyModule target, ThreadContext context, String name, int index) final org.jcodings.EncodinggetEncoding(int index) final RubyFixnumgetFixnum(ThreadContext context, int index, int value) final RubyFixnumgetFixnum(ThreadContext context, int index, long value) final RubyFloatgetFloat(ThreadContext context, int index, double value) final RubyStringgetFrozenString(ThreadContext context, int bytelistIndex, int stringIndex, int codeRange) getMethod(ThreadContext context, RubyClass selfType, int index, String methodName) getMethod(ThreadContext context, IRubyObject self, int index, String methodName) getMethodEntry(ThreadContext context, RubyClass selfType, int index, String methodName) final RubyRegexpgetRegexp(int index) final RubyRegexpgetRegexp(ThreadContext context, int index, ByteList pattern, int options) final StaticScopegetScope(int index) final StaticScopegetScope(ThreadContext context, StaticScope parent, String varNamesDescriptor, int index) final RubyStringgetString(ThreadContext context, int index, int codeRange) final RubySymbolgetSymbol(ThreadContext context, int index, String name, String encodingName) getValue(ThreadContext context, StaticScope scope, String name, int index) getValueFrom(RubyModule target, ThreadContext context, String name, int index) final IRubyObjectgetVariable(ThreadContext context, int index, String name, IRubyObject object) final IRubyObjectgetVariableDefined(ThreadContext context, int index, String name, IRubyObject object) final voidinitBigIntegers(int size) final voidinitCallSites(int size) final voidinitConstants(int size) final org.jcodings.Encoding[]initEncodings(int size) final voidinitFixnums(int size) final voidinitFloats(int size) final voidinitFromDescriptor(String descriptor) Given a packed descriptor listing methods and their type, populate the call site cache.final RubyString[]initFrozenStrings(int size) final voidinitMethodCache(int size) final voidinitOthers(String descriptor) Given a packed descriptor of other cache sizes, construct the cache arrays The format of the descriptor is the actual size cast to char in this order: scopeCount inheritedSymbolCount inheritedFixnumCount inheritedConstantCount inheritedRegexpCount inheritedBigIntegerCount inheritedVariableReaderCount inheritedVariableWriterCount inheritedBlockBodyCount inheritedBlockCallbackCount inheritedMethodCount inheritedStringCountfinal voidinitRegexps(int size) final voidinitScopes(int size) final ByteList[]initStrings(int size) final voidinitSymbols(int size) final voidinitVariableReaders(int size) final voidinitVariableWriters(int size) reCache(ThreadContext context, StaticScope scope, String name, int index) reCacheFrom(RubyModule target, ThreadContext context, String name, int index) searchWithCache(RubyClass clazz, int index, String name1) searchWithCache(RubyClass clazz, int index, String name1, String name2) searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3) searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3, String name4, String name5) searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3, String name4, String name5, String name6) searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7) searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7, String name8) searchWithCache(IRubyObject obj, int index, String name1) searchWithCache(IRubyObject obj, int index, String name1, String name2) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7) searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7, String name8) final DynamicMethodsearchWithCacheNoMethodMissing(IRubyObject obj, int index, String name1) final DynamicMethodsearchWithCacheNoMethodMissing(IRubyObject obj, int index, String name1, String name2) final IRubyObjectsetVariable(int index, String name, IRubyObject object, IRubyObject value)
-
Field Details
-
scopes
-
callSites
-
methodCache
-
symbols
-
byteLists
-
frozenStrings
-
encodings
public org.jcodings.Encoding[] encodings -
fixnums
-
floats
-
regexps
-
bigIntegers
-
variableReaders
-
variableWriters
-
constants
-
-
Constructor Details
-
RuntimeCache
public RuntimeCache()
-
-
Method Details
-
getScope
public final StaticScope getScope(ThreadContext context, StaticScope parent, String varNamesDescriptor, int index) -
getScope
-
getCallSite
-
getSymbol
public final RubySymbol getSymbol(ThreadContext context, int index, String name, String encodingName) -
getString
-
getFrozenString
public final RubyString getFrozenString(ThreadContext context, int bytelistIndex, int stringIndex, int codeRange) -
getByteList
-
getEncoding
public final org.jcodings.Encoding getEncoding(int index) -
getFixnum
-
getFixnum
-
getFloat
-
getRegexp
-
getRegexp
-
cacheRegexp
@Deprecated(since="10.0") public final RubyRegexp cacheRegexp(int index, RubyString pattern, int options) Deprecated. -
cacheRegexp
Deprecated. -
getBigInteger
-
getVariable
public final IRubyObject getVariable(ThreadContext context, int index, String name, IRubyObject object) -
getVariableDefined
public final IRubyObject getVariableDefined(ThreadContext context, int index, String name, IRubyObject object) -
setVariable
-
initScopes
public final void initScopes(int size) -
initCallSites
public final void initCallSites(int size) -
initFromDescriptor
Given a packed descriptor listing methods and their type, populate the call site cache. The format of the methods portion of the descriptor is name1;type1;name2;type2 where type1 and type2 are a single capital letter N, F, V, or S for the four main call types. After the method portion, the other cache sizes are provided as a packed String of char values representing the numeric sizes. @see RuntimeCache#initOthers.- Parameters:
descriptor- The descriptor to use for populating call sites and caches
-
initOthers
Given a packed descriptor of other cache sizes, construct the cache arrays The format of the descriptor is the actual size cast to char in this order:- scopeCount
- inheritedSymbolCount
- inheritedFixnumCount
- inheritedConstantCount
- inheritedRegexpCount
- inheritedBigIntegerCount
- inheritedVariableReaderCount
- inheritedVariableWriterCount
- inheritedBlockBodyCount
- inheritedBlockCallbackCount
- inheritedMethodCount
- inheritedStringCount
- Parameters:
descriptor- The descriptor to use for preparing caches
-
initSymbols
public final void initSymbols(int size) -
initStrings
-
initFrozenStrings
-
initEncodings
public final org.jcodings.Encoding[] initEncodings(int size) -
initFixnums
public final void initFixnums(int size) -
initFloats
public final void initFloats(int size) -
initRegexps
public final void initRegexps(int size) -
initBigIntegers
public final void initBigIntegers(int size) -
initConstants
public final void initConstants(int size) -
initVariableReaders
public final void initVariableReaders(int size) -
initVariableWriters
public final void initVariableWriters(int size) -
initMethodCache
public final void initMethodCache(int size) -
getConstant
public final IRubyObject getConstant(ThreadContext context, StaticScope scope, String name, int index) -
getConstantDefined
public final IRubyObject getConstantDefined(ThreadContext context, StaticScope scope, String name, int index) -
getValue
-
reCache
-
getConstantFrom
public final IRubyObject getConstantFrom(RubyModule target, ThreadContext context, String name, int index) -
getValueFrom
-
reCacheFrom
-
getMethod
public DynamicMethod getMethod(ThreadContext context, RubyClass selfType, int index, String methodName) -
getMethod
public DynamicMethod getMethod(ThreadContext context, IRubyObject self, int index, String methodName) -
getMethodEntry
public CacheEntry getMethodEntry(ThreadContext context, RubyClass selfType, int index, String methodName) -
searchWithCacheNoMethodMissing
-
searchWithCacheNoMethodMissing
public final DynamicMethod searchWithCacheNoMethodMissing(IRubyObject obj, int index, String name1, String name2) -
searchWithCache
-
searchWithCache
-
searchWithCache
public DynamicMethod searchWithCache(RubyClass clazz, int index, String name1, String name2, String name3) -
searchWithCache
-
searchWithCache
-
searchWithCache
-
searchWithCache
-
searchWithCache
-
searchWithCache
-
searchWithCache
-
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3) -
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4) -
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5) -
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6) -
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7) -
searchWithCache
public DynamicMethod searchWithCache(IRubyObject obj, int index, String name1, String name2, String name3, String name4, String name5, String name6, String name7, String name8)
-