public static bool IsContinuationConstructor (IdFunctionObject f) { if (f.HasTag (FTAG) && f.MethodId == Id_constructor) { return true; } return false; }
public static bool IsContinuationConstructor(IdFunctionObject f) { if (f.HasTag(FTAG) && f.MethodId == Id_constructor) { return(true); } return(false); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag (FTAG)) { return base.ExecIdCall (f, cx, scope, thisObj, args); } int id = f.MethodId; switch (id) { case Id_constructor: throw Context.ReportRuntimeError ("Direct call is not supported"); } throw new ArgumentException (Convert.ToString (id)); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag(FTAG)) { return(base.ExecIdCall(f, cx, scope, thisObj, args)); } int id = f.MethodId; switch (id) { case Id_constructor: throw Context.ReportRuntimeError("Direct call is not supported"); } throw new ArgumentException(Convert.ToString(id)); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag(FUNCTION_TAG)) { return(base.ExecIdCall(f, cx, scope, thisObj, args)); } int id = f.MethodId; switch (id) { case Id_constructor: return(JsConstructor(cx, scope, args)); case Id_toString: { BaseFunction realf = RealFunction(thisObj, f); int indent = ScriptConvert.ToInt32(args, 0); return(realf.Decompile(indent, Decompiler.TO_STRING_FLAG)); } case Id_toSource: { BaseFunction realf = RealFunction(thisObj, f); int indent = 0; int flags = Decompiler.TO_SOURCE_FLAG; if (args.Length != 0) { indent = ScriptConvert.ToInt32(args [0]); if (indent >= 0) { flags = 0; } else { indent = 0; } } return(realf.Decompile(indent, flags)); } case Id_apply: case Id_call: return(ScriptRuntime.applyOrCall(id == Id_apply, cx, scope, thisObj, args)); } throw new ArgumentException(Convert.ToString(id)); }
public override object ExecIdCall (IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag (NAMESPACE_TAG)) { return base.ExecIdCall (f, cx, scope, thisObj, args); } int id = f.MethodId; switch (id) { case Id_constructor: return jsConstructor (cx, (thisObj == null), args); case Id_toString: return realThis (thisObj, f).ToString (); case Id_toSource: return realThis (thisObj, f).js_toSource (); } throw new System.ArgumentException (System.Convert.ToString (id)); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag (FUNCTION_TAG)) { return base.ExecIdCall (f, cx, scope, thisObj, args); } int id = f.MethodId; switch (id) { case Id_constructor: return JsConstructor (cx, scope, args); case Id_toString: { BaseFunction realf = RealFunction (thisObj, f); int indent = ScriptConvert.ToInt32 (args, 0); return realf.Decompile (indent, Decompiler.TO_STRING_FLAG); } case Id_toSource: { BaseFunction realf = RealFunction (thisObj, f); int indent = 0; int flags = Decompiler.TO_SOURCE_FLAG; if (args.Length != 0) { indent = ScriptConvert.ToInt32 (args [0]); if (indent >= 0) { flags = 0; } else { indent = 0; } } return realf.Decompile (indent, flags); } case Id_apply: case Id_call: return ScriptRuntime.applyOrCall (id == Id_apply, cx, scope, thisObj, args); } throw new ArgumentException (Convert.ToString (id)); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag (REGEXP_TAG)) { return base.ExecIdCall (f, cx, scope, thisObj, args); } int id = f.MethodId; switch (id) { case Id_compile: return realThis (thisObj, f).compile (cx, scope, args); case Id_toString: case Id_toSource: return realThis (thisObj, f).ToString (); case Id_exec: return realThis (thisObj, f).execSub (cx, scope, args, MATCH); case Id_test: { object x = realThis (thisObj, f).execSub (cx, scope, args, TEST); return true.Equals (x) ? true : false; } case Id_prefix: return realThis (thisObj, f).execSub (cx, scope, args, PREFIX); } throw new ArgumentException (Convert.ToString (id)); }