コード例 #1
0
 internal IdFunctionObject createPrecachedConstructor()
 {
     if (constructorId != 0)
     {
         throw new ApplicationException();
     }
     constructorId = obj.FindPrototypeId("constructor");
     if (constructorId == 0)
     {
         throw new ApplicationException("No id for constructor property");
     }
     obj.InitPrototypeId(constructorId);
     if (constructor == null)
     {
         throw new ApplicationException(obj.GetType().FullName + ".initPrototypeId() did not " + "initialize id=" + constructorId);
     }
     constructor.InitFunction(obj.ClassName, ScriptableObject.GetTopLevelScope(obj));
     constructor.MarkAsConstructor(obj);
     return(constructor);
 }