Changeset 6452 in webkit for trunk/JavaScriptCore/kjs/internal.h


Ignore:
Timestamp:
Apr 22, 2004, 9:53:36 AM (21 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Darin.

Preliminary change for conservative GC. Create "protected"
subclasses to GC-protect objects when on heap, since we will soon
remove the built-in refcounting of the normal wrapper classes. Use
them where needed.

  • JavaScriptCore.pbproj/project.pbxproj:
  • kjs/context.h:
  • kjs/internal.h: (KJS::InterpreterImp::globalObject):
  • kjs/interpreter.h:
  • kjs/property_map.cpp:
  • kjs/reference.h:
  • kjs/reference_list.cpp:

WebCore:

Reviewed by Darin.

Preliminary change for conservative GC. Use new "protected"
subclasses to GC-protect objects when on heap, since we will soon
remove the built-in refcounting of the normal wrapper classes.

  • ForwardingHeaders/kjs/protect.h: Added.
  • khtml/ecma/kjs_binding.h:
  • khtml/ecma/kjs_events.h:
  • khtml/ecma/kjs_traversal.h:
  • khtml/ecma/kjs_window.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.h

    r6347 r6452  
    215215    friend class InterpreterImp;
    216216  private:
    217     Object b_Object;
    218     Object b_Function;
    219     Object b_Array;
    220     Object b_Boolean;
    221     Object b_String;
    222     Object b_Number;
    223     Object b_Date;
    224     Object b_RegExp;
    225     Object b_Error;
    226 
    227     Object b_ObjectPrototype;
    228     Object b_FunctionPrototype;
    229     Object b_ArrayPrototype;
    230     Object b_BooleanPrototype;
    231     Object b_StringPrototype;
    232     Object b_NumberPrototype;
    233     Object b_DatePrototype;
    234     Object b_RegExpPrototype;
    235     Object b_ErrorPrototype;
    236 
    237     Object b_evalError;
    238     Object b_rangeError;
    239     Object b_referenceError;
    240     Object b_syntaxError;
    241     Object b_typeError;
    242     Object b_uriError;
    243 
    244     Object b_evalErrorPrototype;
    245     Object b_rangeErrorPrototype;
    246     Object b_referenceErrorPrototype;
    247     Object b_syntaxErrorPrototype;
    248     Object b_typeErrorPrototype;
    249     Object b_uriErrorPrototype;
     217    ProtectedObject b_Object;
     218    ProtectedObject b_Function;
     219    ProtectedObject b_Array;
     220    ProtectedObject b_Boolean;
     221    ProtectedObject b_String;
     222    ProtectedObject b_Number;
     223    ProtectedObject b_Date;
     224    ProtectedObject b_RegExp;
     225    ProtectedObject b_Error;
     226
     227    ProtectedObject b_ObjectPrototype;
     228    ProtectedObject b_FunctionPrototype;
     229    ProtectedObject b_ArrayPrototype;
     230    ProtectedObject b_BooleanPrototype;
     231    ProtectedObject b_StringPrototype;
     232    ProtectedObject b_NumberPrototype;
     233    ProtectedObject b_DatePrototype;
     234    ProtectedObject b_RegExpPrototype;
     235    ProtectedObject b_ErrorPrototype;
     236
     237    ProtectedObject b_evalError;
     238    ProtectedObject b_rangeError;
     239    ProtectedObject b_referenceError;
     240    ProtectedObject b_syntaxError;
     241    ProtectedObject b_typeError;
     242    ProtectedObject b_uriError;
     243
     244    ProtectedObject b_evalErrorPrototype;
     245    ProtectedObject b_rangeErrorPrototype;
     246    ProtectedObject b_referenceErrorPrototype;
     247    ProtectedObject b_syntaxErrorPrototype;
     248    ProtectedObject b_typeErrorPrototype;
     249    ProtectedObject b_uriErrorPrototype;
    250250  };
    251251
     
    259259    ~InterpreterImp();
    260260
    261     Object &globalObject() const { return const_cast<Object &>(global); }
     261    ProtectedObject &globalObject() const { return const_cast<ProtectedObject &>(global); }
    262262    Interpreter* interpreter() const { return m_interpreter; }
    263263
     
    327327    void clear();
    328328    Interpreter *m_interpreter;
    329     Object global;
     329    ProtectedObject global;
    330330    Debugger *dbg;
    331331
     
    334334    // Array.prototype)
    335335
    336     Object b_Object;
    337     Object b_Function;
    338     Object b_Array;
    339     Object b_Boolean;
    340     Object b_String;
    341     Object b_Number;
    342     Object b_Date;
    343     Object b_RegExp;
    344     Object b_Error;
    345 
    346     Object b_ObjectPrototype;
    347     Object b_FunctionPrototype;
    348     Object b_ArrayPrototype;
    349     Object b_BooleanPrototype;
    350     Object b_StringPrototype;
    351     Object b_NumberPrototype;
    352     Object b_DatePrototype;
    353     Object b_RegExpPrototype;
    354     Object b_ErrorPrototype;
    355 
    356     Object b_evalError;
    357     Object b_rangeError;
    358     Object b_referenceError;
    359     Object b_syntaxError;
    360     Object b_typeError;
    361     Object b_uriError;
    362 
    363     Object b_evalErrorPrototype;
    364     Object b_rangeErrorPrototype;
    365     Object b_referenceErrorPrototype;
    366     Object b_syntaxErrorPrototype;
    367     Object b_typeErrorPrototype;
    368     Object b_uriErrorPrototype;
     336    ProtectedObject b_Object;
     337    ProtectedObject b_Function;
     338    ProtectedObject b_Array;
     339    ProtectedObject b_Boolean;
     340    ProtectedObject b_String;
     341    ProtectedObject b_Number;
     342    ProtectedObject b_Date;
     343    ProtectedObject b_RegExp;
     344    ProtectedObject b_Error;
     345
     346    ProtectedObject b_ObjectPrototype;
     347    ProtectedObject b_FunctionPrototype;
     348    ProtectedObject b_ArrayPrototype;
     349    ProtectedObject b_BooleanPrototype;
     350    ProtectedObject b_StringPrototype;
     351    ProtectedObject b_NumberPrototype;
     352    ProtectedObject b_DatePrototype;
     353    ProtectedObject b_RegExpPrototype;
     354    ProtectedObject b_ErrorPrototype;
     355
     356    ProtectedObject b_evalError;
     357    ProtectedObject b_rangeError;
     358    ProtectedObject b_referenceError;
     359    ProtectedObject b_syntaxError;
     360    ProtectedObject b_typeError;
     361    ProtectedObject b_uriError;
     362
     363    ProtectedObject b_evalErrorPrototype;
     364    ProtectedObject b_rangeErrorPrototype;
     365    ProtectedObject b_referenceErrorPrototype;
     366    ProtectedObject b_syntaxErrorPrototype;
     367    ProtectedObject b_typeErrorPrototype;
     368    ProtectedObject b_uriErrorPrototype;
    369369
    370370    ExecState *globExec;
Note: See TracChangeset for help on using the changeset viewer.