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/kjs/JSGlobalObject.h

    r37088 r37175  
    139139
    140140            HashSet<ProgramCodeBlock*> codeBlocks;
    141 
    142             OwnPtr<HashSet<JSObject*> > arrayVisitedElements; // Global data shared by array prototype functions.
    143141        };
    144142
     
    243241        virtual bool isDynamicScope() const;
    244242
    245         HashSet<JSObject*>& arrayVisitedElements() { if (!d()->arrayVisitedElements) d()->arrayVisitedElements.set(new HashSet<JSObject*>); return *d()->arrayVisitedElements; }
    246 
    247243        HashSet<ProgramCodeBlock*>& codeBlocks() { return d()->codeBlocks; }
    248244
Note: See TracChangeset for help on using the changeset viewer.