Changeset 42065 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- Mar 27, 2009, 8:50:39 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/FunctionPrototype.cpp
r41168 r42065 44 44 } 45 45 46 void FunctionPrototype::addFunctionProperties(ExecState* exec, Structure* prototypeFunctionStructure )46 void FunctionPrototype::addFunctionProperties(ExecState* exec, Structure* prototypeFunctionStructure, PrototypeFunction** callFunction) 47 47 { 48 48 putDirectFunctionWithoutTransition(exec, new (exec) PrototypeFunction(exec, prototypeFunctionStructure, 0, exec->propertyNames().toString, functionProtoFuncToString), DontEnum); 49 49 putDirectFunctionWithoutTransition(exec, new (exec) PrototypeFunction(exec, prototypeFunctionStructure, 2, exec->propertyNames().apply, functionProtoFuncApply), DontEnum); 50 putDirectFunctionWithoutTransition(exec, new (exec) PrototypeFunction(exec, prototypeFunctionStructure, 1, exec->propertyNames().call, functionProtoFuncCall), DontEnum); 50 *callFunction = new (exec) PrototypeFunction(exec, prototypeFunctionStructure, 1, exec->propertyNames().call, functionProtoFuncCall); 51 putDirectFunctionWithoutTransition(exec, *callFunction, DontEnum); 51 52 } 52 53 -
trunk/JavaScriptCore/runtime/FunctionPrototype.h
r39670 r42065 26 26 namespace JSC { 27 27 28 class PrototypeFunction; 29 28 30 class FunctionPrototype : public InternalFunction { 29 31 public: 30 32 FunctionPrototype(ExecState*, PassRefPtr<Structure>); 31 void addFunctionProperties(ExecState*, Structure* prototypeFunctionStructure );33 void addFunctionProperties(ExecState*, Structure* prototypeFunctionStructure, PrototypeFunction** callFunction); 32 34 33 35 static PassRefPtr<Structure> createStructure(JSValuePtr proto) -
trunk/JavaScriptCore/runtime/JSGlobalObject.cpp
r41846 r42065 204 204 d()->functionPrototype = new (exec) FunctionPrototype(exec, FunctionPrototype::createStructure(jsNull())); // The real prototype will be set once ObjectPrototype is created. 205 205 d()->prototypeFunctionStructure = PrototypeFunction::createStructure(d()->functionPrototype); 206 d()->functionPrototype->addFunctionProperties(exec, d()->prototypeFunctionStructure.get()); 206 PrototypeFunction* callFunction = 0; 207 d()->functionPrototype->addFunctionProperties(exec, d()->prototypeFunctionStructure.get(), &callFunction); 208 d()->callFunction = callFunction; 207 209 d()->objectPrototype = new (exec) ObjectPrototype(exec, ObjectPrototype::createStructure(jsNull()), d()->prototypeFunctionStructure.get()); 208 210 d()->functionPrototype->structure()->setPrototypeWithoutTransition(d()->objectPrototype); … … 371 373 372 374 markIfNeeded(d()->evalFunction); 375 markIfNeeded(d()->callFunction); 373 376 374 377 markIfNeeded(d()->objectPrototype); -
trunk/JavaScriptCore/runtime/JSGlobalObject.h
r41232 r42065 41 41 class NativeErrorConstructor; 42 42 class ProgramCodeBlock; 43 class PrototypeFunction; 43 44 class RegExpConstructor; 44 45 class RegExpPrototype; … … 105 106 106 107 GlobalEvalFunction* evalFunction; 108 PrototypeFunction* callFunction; 107 109 108 110 ObjectPrototype* objectPrototype;
Note:
See TracChangeset
for help on using the changeset viewer.