Ignore:
Timestamp:
Aug 4, 2010, 10:18:07 AM (15 years ago)
Author:
[email protected]
Message:

2010-08-04 Nathan Lawrence <[email protected]>

Reviewed by Darin Adler.

Refactoring MarkStack::append to take a reference. This is in
preparation for movable objects when we will need to update pointers.
http://bugs.webkit.org/show_bug.cgi?id=41177

Unless otherwise noted, all changes are to either return by reference
or pass a reference to MarkStack::append.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::markAggregate):
  • runtime/Collector.cpp: (JSC::Heap::markConservatively):

Added a temporary variable to prevent marking from changing an
unknown value on the stack

  • runtime/JSCell.h: (JSC::JSValue::asCell): (JSC::MarkStack::append): (JSC::MarkStack::appendInternal):
  • runtime/JSGlobalObject.cpp: (JSC::markIfNeeded):
  • runtime/JSONObject.cpp: (JSC::Stringifier::Holder::object):
  • runtime/JSObject.h: (JSC::JSObject::prototype):
  • runtime/JSStaticScopeObject.cpp: (JSC::JSStaticScopeObject::markChildren):
  • runtime/JSValue.h: (JSC::JSValue::JSValue): (JSC::JSValue::asCell):
  • runtime/MarkStack.h:
  • runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor::createStructure):

Changed the structure flags to include a custom markChildren.

(JSC::NativeErrorConstructor::markChildren):

Update the prototype of the stored structure.

  • runtime/NativeErrorConstructor.h:

Added structure flags.

  • runtime/Structure.h: (JSC::Structure::storedPrototype):

2010-08-04 Nathan Lawrence <[email protected]>

Reviewed by Darin Adler.

Removed unneeded marking. We need to remove this marking in order to have
MarkStack::append take references for updating movable objects.

https://bugs.webkit.org/show_bug.cgi?id=41177

  • JSValueWrapper.cpp: (JSValueWrapper::JSObjectMark):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptGlue/JSValueWrapper.cpp

    r52856 r64655  
    193193}
    194194
    195 void JSValueWrapper::JSObjectMark(void *data)
    196 {
    197     JSValueWrapper* ptr = (JSValueWrapper*)data;
    198     if (ptr)
    199     {
    200         // This results in recursive marking but will be otherwise safe and correct.
    201         // We claim the array vptr is 0 because we don't have access to it here, and
    202         // claiming 0 is functionally harmless -- it merely means that we can't
    203         // devirtualise marking of arrays when recursing from this point.
    204         MarkStack markStack(0);
    205         markStack.append(ptr->fValue.get());
    206         markStack.drain();
    207     }
    208 }
     195void JSValueWrapper::JSObjectMark(void*)
     196{
     197    // The object doesn't need to be marked here because it is a protected
     198    // object and should therefore be marked by
     199    // JSC::Heap::markProtectedObjects.
     200
     201    // We are keeping the function around because the function is passed as a
     202    // callback.
     203}
Note: See TracChangeset for help on using the changeset viewer.