private IdFunctionObject NewIdFunction(object tag, int id, string name, int arity, IScriptable scope) { IdFunctionObject f = new IdFunctionObject(this, tag, id, name, arity, scope); if (Sealed) { f.SealObject(); } return(f); }
public void InitPrototypeConstructor(IdFunctionObject f) { int id = prototypeValues.constructorId; if (id == 0) { throw new ApplicationException(); } if (f.MethodId != id) { throw new ArgumentException(); } if (Sealed) { f.SealObject(); } prototypeValues.InitValue(id, "constructor", f, DONTENUM); }
public IdFunctionObject ExportAsJSClass(int maxPrototypeId, IScriptable scope, bool zealed, int attributes) { // Set scope and prototype unless this is top level scope itself if (scope != this && scope != null) { ParentScope = scope; SetPrototype(GetObjectPrototype(scope)); } ActivatePrototypeMap(maxPrototypeId); IdFunctionObject ctor = prototypeValues.createPrecachedConstructor(); if (zealed) { SealObject(); } FillConstructorProperties(ctor); if (zealed) { ctor.SealObject(); } ctor.ExportAsScopeProperty(attributes); return(ctor); }
private IdFunctionObject NewIdFunction (object tag, int id, string name, int arity, IScriptable scope) { IdFunctionObject f = new IdFunctionObject (this, tag, id, name, arity, scope); if (Sealed) { f.SealObject (); } return f; }
public void InitPrototypeConstructor (IdFunctionObject f) { int id = prototypeValues.constructorId; if (id == 0) throw new ApplicationException (); if (f.MethodId != id) throw new ArgumentException (); if (Sealed) { f.SealObject (); } prototypeValues.InitValue (id, "constructor", f, DONTENUM); }