public static Scriptable newArrayLiteral(Object[] objects, String encodedInts, int skipCount, Context cx, Scriptable scope) { int[] skipIndexces = decodeIntArray(encodedInts, skipCount); return newArrayLiteral(objects, skipIndexces, cx, scope); }
/** * Implement name() call shrinking optimizer code. */ public static Object callName0(String name, Context cx, Scriptable scope) { Callable f = getNameFunctionAndThis(name, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
/** * Implement x.property() call shrinking optimizer code. */ public static Object callProp0(Object value, String property, Context cx, Scriptable scope) { Callable f = getPropFunctionAndThis(value, property, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
public static Object add(Object val1, double val2) { if (val1 instanceof Scriptable) val1 = ((Scriptable) val1).getDefaultValue(null); if (!(val1 instanceof String)) return wrapDouble(toNumber(val1) + val2); return ((String)val1).concat(toString(val2)); }
cfw.add(ByteCode.ICONST_0); } else { cfw.addPush(OptRuntime.encodeIntArray(skipIndexes)); cfw.addPush(skipIndexes.length);
public static Object add(double val1, Object val2) { if (val2 instanceof Scriptable) val2 = ((Scriptable) val2).getDefaultValue(null); if (!(val2 instanceof String)) return wrapDouble(toNumber(val2) + val1); return toString(val1).concat((String)val2); }
cfw.add(ByteCode.ICONST_0); } else { cfw.addPush(OptRuntime.encodeIntArray(skipIndexes)); cfw.addPush(skipIndexes.length);
public static Object add(Object val1, double val2) { if (val1 instanceof Scriptable) val1 = ((Scriptable) val1).getDefaultValue(null); if (!(val1 instanceof String)) return wrapDouble(toNumber(val1) + val2); return ((String)val1).concat(toString(val2)); }
/** * Implement name() call shrinking optimizer code. */ public static Object callName0(String name, Context cx, Scriptable scope) { Callable f = getNameFunctionAndThis(name, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
/** * Implement x.property() call shrinking optimizer code. */ public static Object callProp0(Object value, String property, Context cx, Scriptable scope) { Callable f = getPropFunctionAndThis(value, property, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
public static Scriptable newArrayLiteral(Object[] objects, String encodedInts, int skipCount, Context cx, Scriptable scope) { int[] skipIndexces = decodeIntArray(encodedInts, skipCount); return newArrayLiteral(objects, skipIndexces, cx, scope); }
cfw.add(ByteCode.ICONST_0); } else { cfw.addPush(OptRuntime.encodeIntArray(skipIndexes)); cfw.addPush(skipIndexes.length);
public static Object add(double val1, Object val2) { if (val2 instanceof Scriptable) val2 = ((Scriptable) val2).getDefaultValue(null); if (!(val2 instanceof String)) return wrapDouble(toNumber(val2) + val1); return toString(val1).concat((String)val2); }
/** * Implement name() call shrinking optimizer code. */ public static Object callName0(String name, Context cx, Scriptable scope) { Callable f = getNameFunctionAndThis(name, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
/** * Implement x.property() call shrinking optimizer code. */ public static Object callProp0(Object value, String property, Context cx, Scriptable scope) { Callable f = getPropFunctionAndThis(value, property, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }
public static Scriptable newArrayLiteral(Object[] objects, String encodedInts, int skipCount, Context cx, Scriptable scope) { int[] skipIndexces = decodeIntArray(encodedInts, skipCount); return newArrayLiteral(objects, skipIndexces, cx, scope); }
cfw.add(ByteCode.ICONST_0); } else { cfw.addPush(OptRuntime.encodeIntArray(skipIndexes)); cfw.addPush(skipIndexes.length);
public static Object add(Object val1, double val2) { if (val1 instanceof Scriptable) val1 = ((Scriptable) val1).getDefaultValue(null); if (!(val1 instanceof CharSequence)) return wrapDouble(toNumber(val1) + val2); return new ConsString((CharSequence)val1, toString(val2)); }
/** * Implement name(args) call shrinking optimizer code. */ public static Object callName(Object[] args, String name, Context cx, Scriptable scope) { Callable f = getNameFunctionAndThis(name, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, args); }
/** * Implement x.property() call shrinking optimizer code. */ public static Object callProp0(Object value, String property, Context cx, Scriptable scope) { Callable f = getPropFunctionAndThis(value, property, cx, scope); Scriptable thisObj = lastStoredScriptable(cx); return f.call(cx, scope, thisObj, ScriptRuntime.emptyArgs); }