JavaScriptCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 May 2004 06:41:06 +0000 (06:41 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 May 2004 06:41:06 +0000 (06:41 +0000)
commit4c2b57b4a87fd931ece3539b1334aa864a55f5da
tree6245c67d90ae18b42e41dd83a62de44cb0d1fa7b
parentf1aedd3e0aec8610b7fb2dc110061d101eea0dc1
JavaScriptCore:

        Reviewed by Darin.

Enable full conservative GC mode in addition to test mode. When
conservative GC is enabled, we now get an 11% speed improvement on
the iBench. Also fix some spots I missed before.

Specific noteworth changes:

        * kjs/collector.cpp:
(KJS::Collector::markStackObjectsConservatively): Check possible
cell pointers for 8-byte aligment and verify they are not 0.

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here...
        (KJS::ProtectedValues::decreaseProtectCount): ...and here...
        * kjs/protect.h:
        (KJS::gcProtectNullTolerant): ...to here...
        (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null
tolerance, and doing the check is expensive.

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one
that is still very good.

        * kjs/protect.h:
        (KJS::gcProtect):
        (KJS::gcUnprotect):
        (KJS::ProtectedValue::ProtectedValue):
        (KJS::ProtectedValue::~ProtectedValue):
        (KJS::ProtectedValue::operator=):
        (KJS::ProtectedObject::ProtectedObject):
        (KJS::ProtectedObject::~ProtectedObject):
        (KJS::ProtectedObject::operator=):
        (KJS::ProtectedReference::ProtectedReference):
        (KJS::ProtectedReference::~ProtectedReference):
        (KJS::ProtectedReference::operator=):
        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::getProtectCount):
        (KJS::ProtectedValues::increaseProtectCount):
        (KJS::ProtectedValues::decreaseProtectCount):
        (KJS::ProtectedValues::computeHash):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::addNativeReference):
        (KJS::Bindings::removeNativeReference):
        (RootObject::removeAllNativeReferences):
        * bindings/runtime_root.h:
        (KJS::Bindings::RootObject::~RootObject):
        (KJS::Bindings::RootObject::setRootObjectImp):
        * kjs/collector.cpp:
        (KJS::Collector::allocate):
        (KJS::Collector::collect):
        * kjs/collector.h:
        * kjs/internal.cpp:
        (NumberImp::create):
        (InterpreterImp::globalInit):
        (InterpreterImp::globalClear):
        (InterpreterImp::mark):
        * kjs/list.cpp:
        (KJS::List::derefValues):
        (KJS::List::refValues):
        (KJS::List::append):
        * kjs/object.cpp:
        (KJS::ObjectImp::setInternalValue):
        (KJS::ObjectImp::putDirect):
        * kjs/value.cpp:
        (ValueImp::mark):
        (ValueImp::marked):
        * kjs/value.h:
        (KJS::ValueImp::ValueImp):
        (KJS::ValueImp::~ValueImp):
        (KJS::ValueImp::):
        (KJS::Value::Value):
        (KJS::Value::~Value):
        (KJS::Value::operator=):

WebCore:

        Reviewed by Darin.

        * khtml/ecma/kjs_events.cpp:
        (JSLazyEventListener::parseCode): Make sure to protect the
permanent "event" string object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/bindings/runtime_root.cpp
JavaScriptCore/bindings/runtime_root.h
JavaScriptCore/kjs/collector.cpp
JavaScriptCore/kjs/collector.h
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/list.cpp
JavaScriptCore/kjs/object.cpp
JavaScriptCore/kjs/protect.h
JavaScriptCore/kjs/protected_values.cpp
JavaScriptCore/kjs/value.cpp
JavaScriptCore/kjs/value.h
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_events.cpp