org.mozilla.javascript.optimizer

Class OptRuntime


public final class OptRuntime
extends ScriptRuntime

Nested Class Summary

static class
OptRuntime.GeneratorState

Field Summary

static Double
minusOneObj
static Double
oneObj
static Double
zeroObj

Fields inherited from class org.mozilla.javascript.ScriptRuntime

BooleanClass, ByteClass, CharacterClass, ClassClass, ContextClass, ContextFactoryClass, DateClass, DoubleClass, ENUMERATE_ARRAY, ENUMERATE_ARRAY_NO_ITERATOR, ENUMERATE_KEYS, ENUMERATE_KEYS_NO_ITERATOR, ENUMERATE_VALUES, ENUMERATE_VALUES_NO_ITERATOR, FloatClass, FunctionClass, IntegerClass, LongClass, NaN, NaNobj, NumberClass, ObjectClass, ScriptableClass, ScriptableObjectClass, ShortClass, StringClass, emptyArgs, emptyStrings, negativeZero

Method Summary

static Object
add(Object val1, double val2)
static Object
add(double val1, Object val2)
static Object
call0(Callable fun, Scriptable thisObj, Context cx, Scriptable scope)
Implement ....() call shrinking optimizer code.
static Object
call1(Callable fun, Scriptable thisObj, Object arg0, Context cx, Scriptable scope)
Implement ....(arg) call shrinking optimizer code.
static Object
call2(Callable fun, Scriptable thisObj, Object arg0, Object arg1, Context cx, Scriptable scope)
Implement ....(arg0, arg1) call shrinking optimizer code.
static Object
callN(Callable fun, Scriptable thisObj, Object[] args, Context cx, Scriptable scope)
Implement ....(arg0, arg1, ...) call shrinking optimizer code.
static Object
callName(Object[] args, String name, Context cx, Scriptable scope)
Implement name(args) call shrinking optimizer code.
static Object
callName0(String name, Context cx, Scriptable scope)
Implement name() call shrinking optimizer code.
static Object
callProp0(Object value, String property, Context cx, Scriptable scope)
Implement x.property() call shrinking optimizer code.
static Object
callSpecial(Context cx, Callable fun, Scriptable thisObj, Object[] args, Scriptable scope, Scriptable callerThis, int callType, String fileName, int lineNumber)
static Scriptable
createNativeGenerator(NativeFunction funObj, Scriptable scope, Scriptable thisObj, int maxLocals, int maxStack)
static Object
elemIncrDecr(Object obj, double index, Context cx, int incrDecrMask)
static Object[]
getGeneratorLocalsState(Object obj)
static Object[]
getGeneratorStackState(Object obj)
static void
initFunction(NativeFunction fn, int functionType, Scriptable scope, Context cx)
static void
main(Script script, String[] args)
static Scriptable
newArrayLiteral(Object[] objects, String encodedInts, int skipCount, Context cx, Scriptable scope)
static Object
newObjectSpecial(Context cx, Object fun, Object[] args, Scriptable scope, Scriptable callerThis, int callType)
static Object[]
padStart(Object[] currentArgs, int count)
static void
throwStopIteration(Object obj)
static Double
wrapDouble(double num)

Methods inherited from class org.mozilla.javascript.ScriptRuntime

add, add, add, addInstructionCount, applyOrCall, bind, call, callRef, callSpecial, checkRegExpProxy, cmp_LE, cmp_LT, constructError, constructError, constructError, createFunctionActivation, delete, deleteObjectElem, doTopCall, elemIncrDecr, enterActivationFunction, enterDotQuery, enterWith, enumId, enumInit, enumInit, enumNext, enumValue, eq, escapeAttributeValue, escapeString, escapeString, escapeTextValue, evalSpecial, exitActivationFunction, getArrayElements, getElemFunctionAndThis, getGlobal, getLibraryScopeOrNull, getMessage, getMessage0, getMessage1, getMessage2, getMessage3, getMessage4, getNameFunctionAndThis, getObjectElem, getObjectElem, getObjectIndex, getObjectIndex, getObjectProp, getObjectProp, getObjectPropNoWarn, getPropFunctionAndThis, getRegExpProxy, getTopCallScope, getTopLevelProp, getValueFunctionAndThis, hasObjectElem, hasTopCall, in, initFunction, initScript, initStandardObjects, instanceOf, isArrayObject, isJSLineTerminator, isRhinoRuntimeType, jsDelegatesTo, lastStoredScriptable, lastUint32Result, leaveDotQuery, leaveWith, memberRef, memberRef, name, nameIncrDecr, nameIncrDecr, nameRef, nameRef, newArrayLiteral, newCatchScope, newObject, newObject, newObjectLiteral, newObjectLiteral, newSpecial, notFoundError, notFunctionError, notFunctionError, notFunctionError, numberToString, padArguments, propIncrDecr, refDel, refGet, refIncrDecr, refSet, searchDefaultNamespace, setConst, setDefaultNamespace, setEnumNumbers, setFunctionProtoAndParent, setName, setObjectElem, setObjectElem, setObjectIndex, setObjectIndex, setObjectProp, setObjectProp, setObjectProtoAndParent, setRegExpProxy, shallowEq, specialRef, storeUint32Result, testUint32String, toBoolean, toInt32, toInt32, toInt32, toInteger, toInteger, toInteger, toIterator, toNumber, toNumber, toNumber, toObject, toObject, toObject, toObject, toObjectOrNull, toString, toString, toString, toUint16, toUint32, toUint32, typeError, typeError0, typeError1, typeError2, typeError3, typeof, typeofName, undefCallError, undefReadError, undefWriteError, updateDotQuery, wrapBoolean, wrapInt, wrapNumber

Field Details

minusOneObj

public static final Double minusOneObj

oneObj

public static final Double oneObj

zeroObj

public static final Double zeroObj

Method Details

add

public static Object add(Object val1,
                         double val2)

add

public static Object add(double val1,
                         Object val2)

call0

public static Object call0(Callable fun,
                           Scriptable thisObj,
                           Context cx,
                           Scriptable scope)
Implement ....() call shrinking optimizer code.

call1

public static Object call1(Callable fun,
                           Scriptable thisObj,
                           Object arg0,
                           Context cx,
                           Scriptable scope)
Implement ....(arg) call shrinking optimizer code.

call2

public static Object call2(Callable fun,
                           Scriptable thisObj,
                           Object arg0,
                           Object arg1,
                           Context cx,
                           Scriptable scope)
Implement ....(arg0, arg1) call shrinking optimizer code.

callN

public static Object callN(Callable fun,
                           Scriptable thisObj,
                           Object[] args,
                           Context cx,
                           Scriptable scope)
Implement ....(arg0, arg1, ...) call shrinking optimizer code.

callName

public static Object callName(Object[] args,
                              String name,
                              Context cx,
                              Scriptable scope)
Implement name(args) call shrinking optimizer code.

callName0

public static Object callName0(String name,
                               Context cx,
                               Scriptable scope)
Implement name() call shrinking optimizer code.

callProp0

public static Object callProp0(Object value,
                               String property,
                               Context cx,
                               Scriptable scope)
Implement x.property() call shrinking optimizer code.

callSpecial

public static Object callSpecial(Context cx,
                                 Callable fun,
                                 Scriptable thisObj,
                                 Object[] args,
                                 Scriptable scope,
                                 Scriptable callerThis,
                                 int callType,
                                 String fileName,
                                 int lineNumber)
Overrides:
callSpecial in interface ScriptRuntime

createNativeGenerator

public static Scriptable createNativeGenerator(NativeFunction funObj,
                                               Scriptable scope,
                                               Scriptable thisObj,
                                               int maxLocals,
                                               int maxStack)

elemIncrDecr

public static Object elemIncrDecr(Object obj,
                                  double index,
                                  Context cx,
                                  int incrDecrMask)

getGeneratorLocalsState

public static Object[] getGeneratorLocalsState(Object obj)

getGeneratorStackState

public static Object[] getGeneratorStackState(Object obj)

initFunction

public static void initFunction(NativeFunction fn,
                                int functionType,
                                Scriptable scope,
                                Context cx)

main

public static void main(Script script,
                        String[] args)

newArrayLiteral

public static Scriptable newArrayLiteral(Object[] objects,
                                         String encodedInts,
                                         int skipCount,
                                         Context cx,
                                         Scriptable scope)

newObjectSpecial

public static Object newObjectSpecial(Context cx,
                                      Object fun,
                                      Object[] args,
                                      Scriptable scope,
                                      Scriptable callerThis,
                                      int callType)

padStart

public static Object[] padStart(Object[] currentArgs,
                                int count)

throwStopIteration

public static void throwStopIteration(Object obj)

wrapDouble

public static Double wrapDouble(double num)