Ignore:
Timestamp:
Oct 1, 2008, 6:30:13 PM (17 years ago)
Author:
Darin Adler
Message:

2008-09-30 Darin Adler <Darin Adler>

Reviewed by Eric Seidel.

Eliminate some unneeded uses of dynamicGlobalObject.

  • API/JSClassRef.cpp: (OpaqueJSClass::contextData): Changed to use a map in the global data instead of on the global object. Also fixed to use only a single hash table lookup.
  • API/JSObjectRef.cpp: (JSObjectMakeConstructor): Use lexicalGlobalObject rather than dynamicGlobalObject to get the object prototype.
  • kjs/ArrayPrototype.cpp: (JSC::arrayProtoFuncToString): Use arrayVisitedElements set in global data rather than in the global object. (JSC::arrayProtoFuncToLocaleString): Ditto. (JSC::arrayProtoFuncJoin): Ditto.
  • kjs/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): Don't initialize opaqueJSClassData, since it's no longer a pointer. (JSC::JSGlobalData::~JSGlobalData): We still need to delete all the values, but we don't need to delete the map since it's no longer a pointer.
  • kjs/JSGlobalData.h: Made opaqueJSClassData a map instead of a pointer to a map. Also added arrayVisitedElements.
  • kjs/JSGlobalObject.h: Removed arrayVisitedElements.
  • kjs/Shell.cpp: (functionRun): Use lexicalGlobalObject instead of dynamicGlobalObject. (functionLoad): Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSObjectRef.cpp

    r36784 r37175  
    106106    JSValue* jsPrototype = jsClass
    107107        ? jsClass->prototype(exec)
    108         : exec->dynamicGlobalObject()->objectPrototype();
     108        : exec->lexicalGlobalObject()->objectPrototype();
    109109   
    110110    JSCallbackConstructor* constructor = new (exec) JSCallbackConstructor(exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor);
Note: See TracChangeset for help on using the changeset viewer.