Ignore:
Timestamp:
Oct 8, 2009, 4:24:55 PM (16 years ago)
Author:
[email protected]
Message:

Migrated some code that didn't belong out of Structure.

Patch by Geoffrey Garen <[email protected]> on 2009-10-08
Reviewed by Sam Weinig.

SunSpider says maybe 1.03x faster.

  • runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of

a Structure's prototype the direct responsility of the object using it.
(Giving Structure a mark function was misleading because it implied that
all live structures get marked during GC, when they don't.)

  • runtime/JSGlobalObject.cpp:

(JSC::markIfNeeded):
(JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
on the global object. Maybe this wasn't necessary, but now we don't have
to wonder.

  • runtime/JSObject.cpp:

(JSC::JSObject::getPropertyNames):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::getEnumerableNamesFromClassInfoTable):

  • runtime/JSObject.h:

(JSC::JSObject::markChildrenDirect):

  • runtime/PropertyNameArray.h:
  • runtime/Structure.cpp:
  • runtime/Structure.h:

(JSC::Structure::setEnumerationCache):
(JSC::Structure::enumerationCache): Moved property name gathering code
from Structure to JSObject because having a Structure iterate its JSObject
was a layering violation. A JSObject is implemented using a Structure; not
the other way around.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/PropertyNameArray.h

    r49328 r49331  
    2424#include "CallFrame.h"
    2525#include "Identifier.h"
    26 #include "Structure.h"
    2726#include <wtf/HashSet.h>
    2827#include <wtf/Vector.h>
    2928
    3029namespace JSC {
     30   
     31    class Structure;
     32    class StructureChain;
    3133
    3234    class PropertyNameArrayData : public RefCounted<PropertyNameArrayData> {
Note: See TracChangeset for help on using the changeset viewer.