diff options
Diffstat (limited to 'Source/JavaScriptCore')
271 files changed, 32481 insertions, 27306 deletions
diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.cpp b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp index 66c6b88..e8ae274 100644 --- a/Source/JavaScriptCore/API/JSCallbackConstructor.cpp +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp @@ -36,13 +36,14 @@ namespace JSC { -const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 }; +const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &JSObjectWithGlobalObject::s_info, 0, 0 }; JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) : JSObjectWithGlobalObject(globalObject, structure) , m_class(jsClass) , m_callback(callback) { + ASSERT(inherits(&s_info)); if (m_class) JSClassRetain(jsClass); } diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.h b/Source/JavaScriptCore/API/JSCallbackConstructor.h index a6d64cc..cd307a6 100644 --- a/Source/JavaScriptCore/API/JSCallbackConstructor.h +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.h @@ -37,11 +37,11 @@ public: virtual ~JSCallbackConstructor(); JSClassRef classRef() const { return m_class; } JSObjectCallAsConstructorCallback callback() const { return m_callback; } - static const ClassInfo info; - + static const ClassInfo s_info; + static PassRefPtr<Structure> createStructure(JSValue proto) - { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + { + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -49,7 +49,6 @@ protected: private: virtual ConstructType getConstructData(ConstructData&); - virtual const ClassInfo* classInfo() const { return &info; } JSClassRef m_class; JSObjectCallAsConstructorCallback m_callback; diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.cpp b/Source/JavaScriptCore/API/JSCallbackFunction.cpp index c488aa6..28b3419 100644 --- a/Source/JavaScriptCore/API/JSCallbackFunction.cpp +++ b/Source/JavaScriptCore/API/JSCallbackFunction.cpp @@ -40,12 +40,13 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction); -const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunction::info, 0, 0 }; +const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0 }; JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name) : InternalFunction(&exec->globalData(), globalObject, globalObject->callbackFunctionStructure(), name) , m_callback(callback) { + ASSERT(inherits(&s_info)); } EncodedJSValue JSCallbackFunction::call(ExecState* exec) diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.h b/Source/JavaScriptCore/API/JSCallbackFunction.h index b119b97..d8ae608 100644 --- a/Source/JavaScriptCore/API/JSCallbackFunction.h +++ b/Source/JavaScriptCore/API/JSCallbackFunction.h @@ -35,18 +35,17 @@ class JSCallbackFunction : public InternalFunction { public: JSCallbackFunction(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const Identifier& name); - static const ClassInfo info; + static const ClassInfo s_info; // InternalFunction mish-mashes constructor and function behavior -- we should // refactor the code so this override isn't necessary static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } private: virtual CallType getCallData(CallData&); - virtual const ClassInfo* classInfo() const { return &info; } static EncodedJSValue JSC_HOST_CALL call(ExecState*); diff --git a/Source/JavaScriptCore/API/JSCallbackObject.cpp b/Source/JavaScriptCore/API/JSCallbackObject.cpp index b8e5843..e3ef7a4 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.cpp +++ b/Source/JavaScriptCore/API/JSCallbackObject.cpp @@ -36,7 +36,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSObjectWithGlobalObject>); ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject<JSGlobalObject>); // Define the two types of JSCallbackObjects we support. -template <> const ClassInfo JSCallbackObject<JSObjectWithGlobalObject>::info = { "CallbackObject", 0, 0, 0 }; -template <> const ClassInfo JSCallbackObject<JSGlobalObject>::info = { "CallbackGlobalObject", 0, 0, 0 }; +template <> const ClassInfo JSCallbackObject<JSObjectWithGlobalObject>::s_info = { "CallbackObject", &JSObjectWithGlobalObject::s_info, 0, 0 }; +template <> const ClassInfo JSCallbackObject<JSGlobalObject>::s_info = { "CallbackGlobalObject", &JSGlobalObject::s_info, 0, 0 }; } // namespace JSC diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h index f47d0b1..732cc1d 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.h +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -123,14 +123,14 @@ public: void setPrivate(void* data); void* getPrivate(); - static const ClassInfo info; + static const ClassInfo s_info; JSClassRef classRef() const { return m_callbackObjectData->jsClass; } bool inherits(JSClassRef) const; static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info); } JSValue getPrivateProperty(const Identifier& propertyName) const @@ -171,7 +171,6 @@ private: virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); - virtual const ClassInfo* classInfo() const { return &info; } virtual void markChildren(MarkStack& markStack) { diff --git a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h index 59373ec..ca15e1f 100644 --- a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -45,7 +45,7 @@ namespace JSC { template <class Base> inline JSCallbackObject<Base>* JSCallbackObject<Base>::asCallbackObject(JSValue value) { - ASSERT(asObject(value)->inherits(&info)); + ASSERT(asObject(value)->inherits(&s_info)); return static_cast<JSCallbackObject*>(asObject(value)); } @@ -54,6 +54,7 @@ JSCallbackObject<Base>::JSCallbackObject(ExecState* exec, JSGlobalObject* global : Base(globalObject, structure) , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass))) { + ASSERT(Base::inherits(&s_info)); init(exec); } @@ -64,6 +65,7 @@ JSCallbackObject<Base>::JSCallbackObject(JSClassRef jsClass, NonNullPassRefPtr<S : Base(structure) , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass))) { + ASSERT(Base::inherits(&s_info)); ASSERT(Base::isGlobalObject()); init(static_cast<JSGlobalObject*>(this)->globalExec()); } diff --git a/Source/JavaScriptCore/API/JSClassRef.cpp b/Source/JavaScriptCore/API/JSClassRef.cpp index decf493..d953dce 100644 --- a/Source/JavaScriptCore/API/JSClassRef.cpp +++ b/Source/JavaScriptCore/API/JSClassRef.cpp @@ -142,19 +142,12 @@ PassRefPtr<OpaqueJSClass> OpaqueJSClass::createNoAutomaticPrototype(const JSClas return adoptRef(new OpaqueJSClass(definition, 0)); } -static void clearReferenceToPrototype(JSObjectRef prototype) -{ - OpaqueJSClassContextData* jsClassData = static_cast<OpaqueJSClassContextData*>(JSObjectGetPrivate(prototype)); - ASSERT(jsClassData); - jsClassData->cachedPrototype.clear(toJS(prototype)); -} - PassRefPtr<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientDefinition) { JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy. JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; - protoDefinition.finalize = clearReferenceToPrototype; + protoDefinition.finalize = 0; swap(definition.staticFunctions, protoDefinition.staticFunctions); // Move static functions to the prototype. // We are supposed to use JSClassRetain/Release but since we know that we currently have @@ -163,7 +156,7 @@ PassRefPtr<OpaqueJSClass> OpaqueJSClass::create(const JSClassDefinition* clientD return adoptRef(new OpaqueJSClass(&definition, protoClass.get())); } -OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) +OpaqueJSClassContextData::OpaqueJSClassContextData(JSC::JSGlobalData&, OpaqueJSClass* jsClass) : m_class(jsClass) { if (jsClass->m_staticValues) { @@ -209,7 +202,7 @@ OpaqueJSClassContextData& OpaqueJSClass::contextData(ExecState* exec) { OpaqueJSClassContextData*& contextData = exec->globalData().opaqueJSClassData.add(this, 0).first->second; if (!contextData) - contextData = new OpaqueJSClassContextData(this); + contextData = new OpaqueJSClassContextData(exec->globalData(), this); return *contextData; } @@ -256,7 +249,7 @@ JSObject* OpaqueJSClass::prototype(ExecState* exec) if (!jsClassData.cachedPrototype) { // Recursive, but should be good enough for our purposes - jsClassData.cachedPrototype = new (exec) JSCallbackObject<JSObjectWithGlobalObject>(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData); // set jsClassData as the object's private data, so it can clear our reference on destruction + jsClassData.cachedPrototype.set(exec->globalData(), new (exec) JSCallbackObject<JSObjectWithGlobalObject>(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData), 0); // set jsClassData as the object's private data, so it can clear our reference on destruction if (parentClass) { if (JSObject* prototype = parentClass->prototype(exec)) jsClassData.cachedPrototype->setPrototype(prototype); diff --git a/Source/JavaScriptCore/API/JSClassRef.h b/Source/JavaScriptCore/API/JSClassRef.h index 0971700..0f4119a 100644 --- a/Source/JavaScriptCore/API/JSClassRef.h +++ b/Source/JavaScriptCore/API/JSClassRef.h @@ -69,7 +69,7 @@ struct OpaqueJSClass; struct OpaqueJSClassContextData { WTF_MAKE_NONCOPYABLE(OpaqueJSClassContextData); WTF_MAKE_FAST_ALLOCATED; public: - OpaqueJSClassContextData(OpaqueJSClass*); + OpaqueJSClassContextData(JSC::JSGlobalData&, OpaqueJSClass*); ~OpaqueJSClassContextData(); // It is necessary to keep OpaqueJSClass alive because of the following rare scenario: diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp index d3c1993..36ca338 100644 --- a/Source/JavaScriptCore/API/JSObjectRef.cpp +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -79,7 +79,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) APIEntryShim entryShim(exec); if (!jsClass) - return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure())); // slightly more efficient + return toRef(constructEmptyObject(exec)); JSCallbackObject<JSObjectWithGlobalObject>* object = new (exec) JSCallbackObject<JSObjectWithGlobalObject>(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data); if (JSObject* prototype = jsClass->prototype(exec)) @@ -340,9 +340,9 @@ void* JSObjectGetPrivate(JSObjectRef object) { JSObject* jsObject = toJS(object); - if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) + if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) return static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivate(); - else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) + if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) return static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivate(); return 0; @@ -352,10 +352,11 @@ bool JSObjectSetPrivate(JSObjectRef object, void* data) { JSObject* jsObject = toJS(object); - if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) { + if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivate(data); return true; - } else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) { + } + if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivate(data); return true; } @@ -370,9 +371,9 @@ JSValueRef JSObjectGetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSSt JSObject* jsObject = toJS(object); JSValue result; Identifier name(propertyName->identifier(&exec->globalData())); - if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) + if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) result = static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivateProperty(name); - else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) + else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) result = static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivateProperty(name); return toRef(exec, result); } @@ -384,11 +385,11 @@ bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRe JSObject* jsObject = toJS(object); JSValue jsValue = value ? toJS(exec, value) : JSValue(); Identifier name(propertyName->identifier(&exec->globalData())); - if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) { + if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue); return true; } - if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) { + if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue); return true; } @@ -401,11 +402,11 @@ bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStrin APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); Identifier name(propertyName->identifier(&exec->globalData())); - if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) { + if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->deletePrivateProperty(name); return true; } - if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) { + if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) { static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->deletePrivateProperty(name); return true; } diff --git a/Source/JavaScriptCore/API/JSValueRef.cpp b/Source/JavaScriptCore/API/JSValueRef.cpp index faf4712..e2626be 100644 --- a/Source/JavaScriptCore/API/JSValueRef.cpp +++ b/Source/JavaScriptCore/API/JSValueRef.cpp @@ -129,9 +129,9 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla JSValue jsValue = toJS(exec, value); if (JSObject* o = jsValue.getObject()) { - if (o->inherits(&JSCallbackObject<JSGlobalObject>::info)) + if (o->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) return static_cast<JSCallbackObject<JSGlobalObject>*>(o)->inherits(jsClass); - else if (o->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)) + if (o->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) return static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(o)->inherits(jsClass); } return false; diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp index 8182075..bc5e383 100644 --- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp @@ -57,8 +57,8 @@ void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSO JSObject* obj = toJS(object); if (!obj) return; - ASSERT(obj->inherits(&JSCallbackObject<JSGlobalObject>::info) || obj->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::info)); - map->map().set(key, obj); + ASSERT(obj->inherits(&JSCallbackObject<JSGlobalObject>::s_info) || obj->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)); + map->map().set(exec->globalData(), key, obj); } JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key) @@ -73,7 +73,7 @@ bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, J ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* obj = toJS(object); - if (map->map().uncheckedRemove(key, obj)) + if (map->map().deprecatedRemove(key, obj)) return true; return false; } diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h index d36111c..bb3fe96 100644 --- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h @@ -52,8 +52,7 @@ typedef void (*JSWeakMapDestroyedCallback)(JSWeakObjectMapRef map, void* data); @param destructor A function to call when the weak map is destroyed. @result A JSWeakObjectMapRef bound to the given context, data and destructor. @discussion The JSWeakObjectMapRef can be used as a storage mechanism to hold custom JS objects without forcing those objects to - remain live as JSValueProtect would. Any objects that are intended to be stored in a weak map must be user defined objects that - remove themselves from the map in their finalizer. + remain live as JSValueProtect would. */ JS_EXPORT JSWeakObjectMapRef JSWeakObjectMapCreate(JSContextRef ctx, void* data, JSWeakMapDestroyedCallback destructor); diff --git a/Source/JavaScriptCore/API/tests/testapi.c b/Source/JavaScriptCore/API/tests/testapi.c index 1ecfc7e..28d47bb 100644 --- a/Source/JavaScriptCore/API/tests/testapi.c +++ b/Source/JavaScriptCore/API/tests/testapi.c @@ -32,6 +32,10 @@ #include <wtf/Assertions.h> #include <wtf/UnusedParam.h> +#if OS(WINDOWS) +#include <windows.h> +#endif + #if COMPILER(MSVC) #include <wtf/MathExtras.h> @@ -819,6 +823,13 @@ static bool checkForCycleInPrototypeChain() int main(int argc, char* argv[]) { +#if OS(WINDOWS) + // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for + // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the + // error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>. + ::SetErrorMode(0); +#endif + const char *scriptPath = "testapi.js"; if (argc > 1) { scriptPath = argv[1]; diff --git a/Source/JavaScriptCore/Android.mk b/Source/JavaScriptCore/Android.mk index 31d6fde..e789a1a 100644 --- a/Source/JavaScriptCore/Android.mk +++ b/Source/JavaScriptCore/Android.mk @@ -100,7 +100,6 @@ LOCAL_SRC_FILES := \ runtime/GCActivityCallback.cpp \ runtime/GCHandle.cpp \ runtime/GetterSetter.cpp \ - runtime/GlobalEvalFunction.cpp \ runtime/Identifier.cpp \ runtime/InitializeThreading.cpp \ runtime/InternalFunction.cpp \ @@ -144,7 +143,6 @@ LOCAL_SRC_FILES := \ runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ - runtime/PrototypeFunction.cpp \ runtime/RegExp.cpp \ runtime/RegExpCache.cpp \ runtime/RegExpConstructor.cpp \ @@ -218,6 +216,7 @@ JSC_OBJECTS := $(addprefix $(intermediates)/runtime/, \ JSONObject.lut.h \ MathObject.lut.h \ NumberConstructor.lut.h \ + ObjectConstructor.lut.h \ RegExpConstructor.lut.h \ RegExpObject.lut.h \ StringPrototype.lut.h \ diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index f18826e..97f100e 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -6,6 +6,7 @@ SET(JavaScriptCore_INCLUDE_DIRECTORIES "${JAVASCRIPTCORE_DIR}/assembler" "${JAVASCRIPTCORE_DIR}/bytecode" "${JAVASCRIPTCORE_DIR}/bytecompiler" + "${JAVASCRIPTCORE_DIR}/collector/handles" "${JAVASCRIPTCORE_DIR}/debugger" "${JAVASCRIPTCORE_DIR}/interpreter" "${JAVASCRIPTCORE_DIR}/jit" @@ -40,6 +41,8 @@ SET(JavaScriptCore_SOURCES bytecompiler/BytecodeGenerator.cpp bytecompiler/NodesCodegen.cpp + collector/handles/HandleHeap.cpp + debugger/Debugger.cpp debugger/DebuggerActivation.cpp debugger/DebuggerCallFrame.cpp @@ -100,9 +103,7 @@ SET(JavaScriptCore_SOURCES runtime/FunctionConstructor.cpp runtime/FunctionPrototype.cpp runtime/GCActivityCallback.cpp - runtime/GCHandle.cpp runtime/GetterSetter.cpp - runtime/GlobalEvalFunction.cpp runtime/Identifier.cpp runtime/InitializeThreading.cpp runtime/InternalFunction.cpp @@ -146,7 +147,6 @@ SET(JavaScriptCore_SOURCES runtime/PropertyDescriptor.cpp runtime/PropertyNameArray.cpp runtime/PropertySlot.cpp - runtime/PrototypeFunction.cpp runtime/RegExp.cpp runtime/RegExpCache.cpp runtime/RegExpConstructor.cpp @@ -182,6 +182,7 @@ SET(JavaScriptCore_LUT_FILES runtime/JSONObject.cpp runtime/MathObject.cpp runtime/NumberConstructor.cpp + runtime/ObjectConstructor.cpp runtime/RegExpConstructor.cpp runtime/RegExpObject.cpp runtime/StringPrototype.cpp diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 12e0cfd..162f23f 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,24150 +1,2833 @@ -2011-02-13 Jeremy Moskovich <jeremy@chromium.org> +2011-03-06 Yuta Kitamura <yutak@chromium.org> - Reviewed by Adam Barth. - - Add a compile-time option to completely disable WebArchive support. - https://bugs.webkit.org/show_bug.cgi?id=52712 - - Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code. - Ports Affected: - WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt. - This patch preserves this behavior except that it also disables support in the Chromium port. - - * wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports. - -2011-02-13 Cameron Zwarich <zwarich@apple.com> - - Reviewed by Dan Bernstein. - - Bug 53760 - JSC fails to build with TOT Clang - https://bugs.webkit.org/show_bug.cgi?id=53760 - - Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace - benchmark; it is nothing-to-noise on everything else. - - * API/JSCallbackObject.h: Remove pointlessly overloaded method. - * API/JSCallbackObjectFunctions.h: Ditto. - * runtime/Arguments.cpp: - (JSC::Arguments::put): Change signature to match the base class. This implementation - was no longer being called by anyone. This wasn't noticed because it is merely an - optimization of the base class' implementation. - * runtime/Arguments.h: Ditto. - -2011-02-12 Adam Barth <abarth@webkit.org> - - Reviewed by Mark Rowe. - - Use /dev/urandom as the OSRandomSource on OS(DARWIN) - https://bugs.webkit.org/show_bug.cgi?id=54279 - - I'm not sure it makes much of a difference whether we use arc4random or - /dev/urandom on Mac. However, there's some aesthetic benefit to using - the same underlying API on as many platforms as reasonable. - - * config.h: - * wtf/OSRandomSource.cpp: - (WTF::cryptographicallyRandomValuesFromOS): - -2011-02-12 Adam Barth <abarth@webkit.org> - - Reviewed by Kenneth Russell. - - Enable ArrayBuffers by default - https://bugs.webkit.org/show_bug.cgi?id=54310 - - Export the required functions. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2011-02-11 Daniel Bates <dbates@rim.com> - - Reviewed by Geoffrey Garen. - - Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports - https://bugs.webkit.org/show_bug.cgi?id=54107 - - It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE - by the definition of ENABLE(). - - * wtf/Platform.h: - -2011-02-11 Geoffrey Garen <ggaren@apple.com> - - Not reviewed. - - Randomly touch some build files in the hopes of fixing the Qt build. - - * JavaScriptCore.gypi: - * JavaScriptCore.pri: - * JavaScriptCore.pro: - -2011-02-11 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Garbage collection timer cycles forever, even when nothing is happening - https://bugs.webkit.org/show_bug.cgi?id=54320 - - (Rolling back in r78386 with the build fixed.) - - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make - our timer inert after forcing a GC, to avoid GC'ing repeatedly. - -2011-02-11 Geoffrey Garen <ggaren@apple.com> - - Not reviewed. - - Used svn merge -r78386:78385 to roll out r78386 because it broke the build. - - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallbackPlatformData::trigger): - -2011-02-11 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Garbage collection timer cycles forever, even when nothing is happening - https://bugs.webkit.org/show_bug.cgi?id=54320 - - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make - our timer inert after forcing a GC, to avoid GC'ing repeatedly. - -2011-02-11 Geoffrey Garen <ggaren@apple.com> - - Try to fix the Windows build: added an exported symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2011-02-11 Geoffrey Garen <ggaren@apple.com> + Reviewed by Kent Tamura. - Reviewed by Oliver Hunt. + Add SHA-1 for new WebSocket protocol + https://bugs.webkit.org/show_bug.cgi?id=55039 - A little more encapsulation for the heap: Removed CollectorHeapIterator - https://bugs.webkit.org/show_bug.cgi?id=54298 - - CollectorHeapIterator is a God object that knows the internals of each - of the pieces of the heap. This undermines the encapsulation I'm trying - to achieve by splitting concepts into different classes. - - As an alternative, I've given each class a forEach iteration function, - which takes a functor as an argument. Now, each class just needs to - know how to iterate the things it knows about. + The code is based on Chromium's portable SHA-1 implementation + (src/base/sha1_portable.cc). Modifications were made in order + to make the code comply with WebKit coding style. * GNUmakefile.am: * JavaScriptCore.exp: * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator. - - * debugger/Debugger.cpp: - (JSC::Recompiler::Recompiler): - (JSC::Recompiler::~Recompiler): - (JSC::Recompiler::operator()): - (JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface - instead of an iterator. - - * runtime/CollectorHeapIterator.h: Removed. - - * runtime/Heap.cpp: - (JSC::TypeCounter::TypeCounter): - (JSC::TypeCounter::typeName): - (JSC::TypeCounter::operator()): - (JSC::TypeCounter::take): - (JSC::Heap::protectedObjectTypeCounts): - (JSC::Heap::objectTypeCounts): Added forEach and removed iterator. - - * runtime/Heap.h: - (JSC::Heap::forEach): - * runtime/JSGlobalData.cpp: - (JSC::Recompiler::operator()): - (JSC::JSGlobalData::recompileAllJSFunctions): - - * runtime/MarkedBlock.h: - (JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration - for CollectorHeapIterator. Now, we can make all our data private and - change it without breaking any other classes. - - * runtime/MarkedSpace.cpp: - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::forEach): Added forEach and removed iterator. - -2011-02-11 Adam Barth <abarth@webkit.org> - - Reviewed by Andreas Kling. - - CryptographicRandomNumber has its threading ifdefs backwards - https://bugs.webkit.org/show_bug.cgi?id=54280 - - Turns out we want the mutex when thread is enabled. :) - - * wtf/CryptographicallyRandomNumber.cpp: - (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber): - (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues): - -2011-02-10 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - WebKit should have a cryptographic RNG - https://bugs.webkit.org/show_bug.cgi?id=22049 - - Teach JavaScriptCore how to export this function. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2011-02-10 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - A little more encapsulation for MarkedBlock: Made all constants private - so clients don't know whether allocations are fixed-sized or not - https://bugs.webkit.org/show_bug.cgi?id=54270 - - SunSpider reports no change. - - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants. - - * runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like - all other classes. - - * runtime/Heap.cpp: - (JSC::Heap::allocate): Updated for removal of HeapConstants. - (JSC::Heap::reset): Updated to use size(), instead of calculating size - on our own. - - * runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces - on special knowledge of fixed-sizery, which only MarkedBlock is supposed - to know about. - - * runtime/JSCell.h: - (JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants. - Also changed to reset nextCell to 0 at the end of a block, since that - seems more consistent. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char. - This hard-coded size is a little wonky, but the compiler will tell us - if it's ever wrong, so I think it's OK. - - * runtime/MarkedBlock.cpp: - (JSC::MarkedBlock::destroy): - (JSC::MarkedBlock::MarkedBlock): - (JSC::MarkedBlock::sweep): Updated for removal of HeapConstants. - - * runtime/MarkedBlock.h: - (JSC::MarkedBlock::isEmpty): - (JSC::MarkedBlock::clearMarks): - (JSC::MarkedBlock::size): - (JSC::MarkedBlock::capacity): Made constants private to this class. - Removed HeapConstants. Added size() and capacity() functions. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::objectCount): - (JSC::MarkedSpace::size): - (JSC::MarkedSpace::capacity): - * runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of - direct knowledge of MarkedBlock internals. - -2011-02-10 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - A little more encapsulation for MarkedBlock: Made mark bits private - https://bugs.webkit.org/show_bug.cgi?id=54264 - - SunSpider reports no change. - - * runtime/Heap.cpp: - (JSC::Heap::markRoots): - (JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients - don't need to know that marks are represented as bits. Renamed - markedCells => markCount, since clients don't need to know that blocks - are split into cells. - - * runtime/MarkedBlock.h: - (JSC::MarkedBlock::isEmpty): - (JSC::MarkedBlock::clearMarks): - (JSC::MarkedBlock::markCount): New helper functions for encapsulating - the information clients actually need. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::destroy): - (JSC::MarkedSpace::shrink): - (JSC::MarkedSpace::clearMarks): - (JSC::MarkedSpace::markCount): - (JSC::MarkedSpace::objectCount): - * runtime/MarkedSpace.h: Use new helper functions instead of accessing - MarkedBlock data directly. - -2011-02-10 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Cached JavaScript Parser Data Being Left in Memory Cache - https://bugs.webkit.org/show_bug.cgi?id=54245 - - Added clear method which removes SourceProviderCache items. - Cleaned up extraneous whitespace. - - * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * parser/SourceProviderCache.cpp: - (JSC::SourceProviderCache::~SourceProviderCache): - (JSC::SourceProviderCache::clear): - (JSC::SourceProviderCache::byteSize): - (JSC::SourceProviderCache::add): - * parser/SourceProviderCache.h: - -2011-02-10 Joseph Pecoraro <joepeck@webkit.org> - - Follow-up fix to r78291. I should pass (int) 0, not '0' to memset. - - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change. - -2011-02-10 Joseph Pecoraro <joepeck@webkit.org> - - Reviewed by Geoffrey Garen. - - Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass - https://bugs.webkit.org/show_bug.cgi?id=54257 - - A subclass may want to specify the CFRunLoop that the Garbage Collection - will happen on. It was difficult to manipulate this in a subclass because - the current DefaultGCActivityCallback class does this in its constructor. - This patch generalizes things a bit more so that a specific run loop can - be passed in to the constructor. This makes it so all run loop management - can stay in DefaultGCActivityCallback and a subclass can specify any runloop. - - * runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can - specify the runloop GC can be scheduled on. - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors, - one that specifies the run loop and passes that on to commonConstructor and - the old constructor defaults to the current run loop. - (JSC::DefaultGCActivityCallback::commonConstructor): do normal construction, - adding the timer to the given runloop. - -2011-02-10 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock - https://bugs.webkit.org/show_bug.cgi?id=54253 - - SunSpider reports no change. - - * runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it - is now unused. - - * runtime/Heap.cpp: - (JSC::Heap::reset): Moved the call to shrink() here, since it seems a - little more clear for MarkedSpace's client to tell it explicitly when to - shrink. - - * runtime/JSCell.h: - (JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate. - - * runtime/MarkedBlock.cpp: - (JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and - converted to more directly iterate a MarkedBlock based on knowing its - internal structure. - - * runtime/MarkedBlock.h: - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::sweep): - * runtime/MarkedSpace.h: Split out the code mentioned above. - -2011-02-10 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - Fix compilation error on OpenBSD - https://bugs.webkit.org/show_bug.cgi?id=53766 - - Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD. - - * wtf/Platform.h: - * wtf/StringExtras.h: Use HAVE(STRNSTR) now. - -2011-02-10 Adam Roben <aroben@apple.com> - - Print locations of assertions and logs in a way that Visual Studio understands - - With this change, double-clicking one of these locations in Visual Studio's Output Window - will focus that line of code in the editor. - - Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual - Studio's Output Window does nothing - - Reviewed by Alexey Proskuryakov. - - * wtf/Assertions.cpp: - (printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using - the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the - same format that cl.exe uses when it prints compiler errors. - -2011-02-10 Dan Bernstein <mitz@apple.com> - - LLVM Compiler build fix. - - * runtime/MarkedBlock.cpp: - (JSC::MarkedBlock::create): - -2011-02-10 Peter Varga <pvarga@webkit.org> - - Reviewed by Csaba Osztrogonác. - - Remove PCRE source from trunk - https://bugs.webkit.org/show_bug.cgi?id=54188 - - * Android.mk: - * Android.v8.wtf.mk: - * CMakeLists.txt: - * DerivedSources.make: - * DerivedSources.pro: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.order: - * JavaScriptCore.pri: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.xcodeproj/project.pbxproj: - * pcre/AUTHORS: Removed. - * pcre/COPYING: Removed. - * pcre/dftables: Removed. - * pcre/pcre.h: Removed. - * pcre/pcre.pri: Removed. - * pcre/pcre_compile.cpp: Removed. - * pcre/pcre_exec.cpp: Removed. - * pcre/pcre_internal.h: Removed. - * pcre/pcre_tables.cpp: Removed. - * pcre/pcre_ucp_searchfuncs.cpp: Removed. - * pcre/pcre_xclass.cpp: Removed. - * pcre/ucpinternal.h: Removed. - * pcre/ucptable.cpp: Removed. - * wscript: - -2011-02-10 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Add randomValuesFromOS for OS(WINDOWS) - https://bugs.webkit.org/show_bug.cgi?id=54155 - - Use CryptGenRandom for generating cryptographically secure random numbers. - This will work on WinCE and MinGW too. - - * config.h: - * wtf/OSRandomSource.cpp: - (WTF::randomValuesFromOS): - -2011-02-10 Jarred Nicholls <jarred@sencha.com> - - Reviewed by Adam Barth. - - REGRESSION(r78149): Return value of read() shouldn't be ignored. - https://bugs.webkit.org/show_bug.cgi?id=54167 - - stdio read should have its return value handled. Build error in gcc 4.4.5. - - * wtf/OSRandomSource.cpp: - (WTF::randomValuesFromOS): - -2011-02-10 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS - https://bugs.webkit.org/show_bug.cgi?id=54156 - - randomValuesFromOS generates random numbers of cryptographic quality. - Make this clear by adding "cryptographically" to the function name. - - * wtf/CryptographicallyRandomNumber.cpp: - (WTF::ARC4Stream::ARC4RandomNumberGenerator::stir): - * wtf/OSRandomSource.cpp: - (WTF::cryptographicallyRandomValuesFromOS): - * wtf/OSRandomSource.h: - -2011-02-09 Mark Rowe <mrowe@apple.com> - - Reviewed by Sam Weinig. - - <rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader. - - * wtf/FastMalloc.cpp: - (WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely. - (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto. - (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto. - (WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read. - (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto. - * wtf/MallocZoneSupport.h: - (WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid. - (WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in - a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can - handle gracefully. - -2011-02-09 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 54164 - Optimize global_var accesses on JSVALUE64 - - Directly embed the pointer to d->registers, optimize out the load - from the variable object, as we do already in JSVALUE32_64. - - This is a ~1.5% win on sunspidey. - - * jit/JIT.cpp: - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - -2011-02-09 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - A little more encapsulation for MarkedBlock: Made MarkedBlock responsible - for its own initialization and destruction - https://bugs.webkit.org/show_bug.cgi?id=54137 - - * runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is - now unused. - - * runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and - destruct JSCells. - - * runtime/MarkedBlock.cpp: - (JSC::MarkedBlock::create): - (JSC::MarkedBlock::destroy): - (JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction - code from MarkedSpace, updating it not to use ObjectIterator. We don't - want to use an abstract iterator since iteration will be unique to each - block in the future. - - * runtime/MarkedBlock.h: Made the consructor private and moved it into - the .cpp file because it's big now. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocateBlock): - (JSC::MarkedSpace::freeBlock): Migrated code. - - * runtime/MarkedSpace.h: - (JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock - pointers instead of aligned allocations -- how MarkedBlocks are allocated - is now an implementation detail of MarkedBlock. - -2011-02-09 Adam Barth <abarth@webkit.org> - - Another attempt to fix the Qt Windows build. - - * config.h: - * wtf/OSRandomSource.cpp: - (WTF::randomValuesFromOS): - -2011-02-09 Adam Barth <abarth@webkit.org> - - Attempt to fix the Qt Windows build. - - * wtf/OSRandomSource.cpp: - (WTF::randomValuesFromOS): - -2011-02-09 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Add WTF::cryptographicallyRandomNumber - https://bugs.webkit.org/show_bug.cgi?id=54083 - - Introduce a cryptographically strong random number generator to WTF. - The random number generator is based on arc4random as found in: - - http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22 - - I've changed to source to WebKit style and abstracted the operating - system interaction to OSRandomSource. We'll use this functionality to - expose a cryptographically strong random number generator to - JavaScript. - - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.gypi: * JavaScriptCore.vcproj/WTF/WTF.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: - * config.h: * wtf/CMakeLists.txt: - * wtf/CryptographicallyRandomNumber.cpp: Added. - (WTF::initMutexIfNeeded): - (WTF::init): - (WTF::addRandomData): - (WTF::stir): - (WTF::stirIfNeeded): - (WTF::getByte): - (WTF::getWord): - (WTF::cryptographicallyRandomNumber): - (WTF::cryptographicallyRandomValues): - * wtf/CryptographicallyRandomNumber.h: Added. - * wtf/OSRandomSource.cpp: Added. - (WTF::randomValuesFromOS): - * wtf/OSRandomSource.h: Added. + * wtf/MD5.cpp: + (WTF::MD5::MD5): + * wtf/SHA1.cpp: Added. + (WTF::testSHA1): This function will be run the first time SHA1 + constructor is called. This function computes a few hash values + and checks the results in debug builds. However, constructor is + probably not a good place to run these tests, so we need to find + a good place for it (bug 55853). + (WTF::expectSHA1): + (WTF::f): + (WTF::k): + (WTF::rotateLeft): + (WTF::SHA1::SHA1): + (WTF::SHA1::addBytes): + (WTF::SHA1::computeHash): + (WTF::SHA1::finalize): + (WTF::SHA1::processBlock): + (WTF::SHA1::reset): + * wtf/SHA1.h: Added. + (WTF::SHA1::addBytes): * wtf/wtf.pri: -2011-02-09 Geoffrey Garen <ggaren@apple.com> - - Try to fix the build. - - * wtf/Bitmap.h: Include string.h for memset. Not sure why this started - failing now. - -2011-02-09 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - A tiny bit of encapsulation for MarkedBlock: made its heap data member private - https://bugs.webkit.org/show_bug.cgi?id=54129 - - * runtime/MarkedBlock.h: - (JSC::MarkedBlock::isCellAligned): - (JSC::MarkedBlock::MarkedBlock): - (JSC::MarkedBlock::heap): Made the heap data member private, and provided - a constructor and an accessor. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocateBlock): - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::heap): Use the constructor and accessor. - -2011-02-09 Peter Varga <pvarga@webkit.org> - - Reviewed by Gavin Barraclough. - - Replace PCRE with Yarr in WebCore - https://bugs.webkit.org/show_bug.cgi?id=53496 - - * JavaScriptCore.exp: - * JavaScriptCore.gyp/JavaScriptCore.gyp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * create_regex_tables: - * runtime/RegExp.cpp: - * wtf/Platform.h: - * yarr/Yarr.h: - * yarr/YarrJIT.cpp: - * yarr/YarrJIT.h: - * yarr/YarrParser.h: - * yarr/YarrPattern.h: - * yarr/YarrSyntaxChecker.h: - * yarr/yarr.pri: Added. - -2011-02-08 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Removed some dead code from Heap - https://bugs.webkit.org/show_bug.cgi?id=54064 - - * runtime/MarkedSpace.cpp: Removed some now-unused constants and - declarations. - - (JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed - by our caller. Removed redundant typedefs. - -2011-02-08 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code - https://bugs.webkit.org/show_bug.cgi?id=54062 - - SunSpider reports no change. - - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::isValid): - (JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To - know if an object is live, you just need to test its mark bit. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from - CollectorHeap into MarkedSpace, since they're global state. Removed call - to memset since CollectorHeap is a true class with its own constructor now. - - (JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to - m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity(). - - (JSC::MarkedSpace::allocateBlock): - (JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore. - - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::shrink): - (JSC::MarkedSpace::clearMarkBits): - (JSC::MarkedSpace::markedCells): - (JSC::MarkedSpace::sweep): - (JSC::MarkedSpace::objectCount): - (JSC::MarkedSpace::capacity): - (JSC::MarkedSpace::reset): - (JSC::MarkedSpace::primaryHeapEnd): - * runtime/MarkedSpace.h: - (JSC::CollectorHeap::CollectorHeap): - (JSC::MarkedSpace::highWaterMark): - (JSC::MarkedSpace::setHighWaterMark): - (JSC::MarkedSpace::contains): Same as above. - -2011-02-08 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Darin Adler. - - Give each MarkedBlock enough mark bits to cover the whole block - https://bugs.webkit.org/show_bug.cgi?id=54029 - - SunSpider reports no change. - - This simplifies access to mark bits, since any cell-aligned pointer - into a block now has a valid mark bit to test. - - * runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra - mark bits. This happens not to change its actual value. - (JSC::MarkedBlock::cellNumber): - (JSC::MarkedBlock::isMarked): - (JSC::MarkedBlock::testAndSetMarked): - (JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to - remove a cast from our caller, and to more accurately reflect the fact - that MarkedBlock is agnostic about the types pointed to by the pointers - you pass to it. - - (JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider - the null pointer to be a possible cell with a 0 (impossible) block. This - removes a null check from marking. - - * runtime/MarkedSpace.cpp: - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::contains): Simplified the contains check, and inlined - the whole thing, now that it's so simple. - -2011-02-08 Daniel Bates <dbates@rim.com> - - Rubber-stamped by Martin Robinson. - - Rename enum ProtectionSeting [sic] to ProtectionSetting. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::reprotectRegion): - * jit/ExecutableAllocator.h: - -2011-02-08 Balazs Kelemen <kbalazs@webkit.org> - - Reviewed by Andreas Kling. - - [Qt] Should not always define USE_SYSTEM_MALLOC - https://bugs.webkit.org/show_bug.cgi?id=54007 - - * wtf/Platform.h: - -2011-02-08 Dan Bernstein <mitz@apple.com> - - Reviewed by Maciej Stachowiak. - - LLVM Compiler build fix. - - * runtime/WriteBarrier.h: - (JSC::WriteBarrier::WriteBarrier): - -2011-02-07 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Darin Adler. - - JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray. - https://bugs.webkit.org/show_bug.cgi?id=53902 - - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*. - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::copyGlobalsFrom): Ditto. - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register* - for registerArray. - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*. - (JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register* - for registerArray. - -2011-02-07 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Removed some dead code from Heap - https://bugs.webkit.org/show_bug.cgi?id=53969 - - SunSpider reports no change. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::shrink): - (JSC::MarkedSpace::sweep): - * runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and - renamed shrinkBlocks to shrink, making it unconditionally shrink as - much as possible. - -2011-02-07 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Simplified the marked space's mark invariant - https://bugs.webkit.org/show_bug.cgi?id=53968 - - SunSpider reports no change. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): Mark objects when allocating them. This - means that, at all times other than the mark phase, an object is live - if and only if it is marked. - - (JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to - simplify testing whether an object is live. +2011-03-05 Adam Barth <abarth@webkit.org> -2011-02-07 Beth Dakin <bdakin@apple.com> - - Reviewed by Eric Seidel. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=53950 - USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in - Platform.h instead - - * wtf/Platform.h: - -2011-02-07 Darin Adler <darin@apple.com> - - Reviewed by Antti Koivisto. - - Add built-in decoder for UTF-8 for improved performance - https://bugs.webkit.org/show_bug.cgi?id=53898 - - * wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and - U8_APPEND_UNSAFE. Also fixed header. - -2011-02-07 Adam Roben <aroben@apple.com> - - Delete precompiled headers whenever any .vsprops file changes - - Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our - .vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we - give it some assistance by deleting the precompiled headers whenever any .vsprops file - changes. - - I also made some drive-by fixes while I was in the area. - - Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled - headers to be rebuilt, but should - - Reviewed by David Kilzer. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the - return code from react-to-vsprops-changes.py so we will notice when errors are introduced. - But skip the script entirely in production builds, where it is both unnecessary and can't - function correctly (due to not having the entire source tree available to it). - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - (main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was - leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file - to the new delete_if_older_than function. Added code to delete any precompiled headers older - than the newest .vsprops file. - (delete_if_older_than): Added. Code came from main. - -2011-02-07 Antti Koivisto <antti@apple.com> - - Not reviewed. - - ASSERTS_DISABLED -> ASSERT_DISABLED - - * wtf/BloomFilter.h: - -2011-02-06 Ryosuke Niwa <rniwa@webkit.org> - - Unreviewed; speculative Qt build fix. - - * JavaScriptCore.pro: - -2011-02-06 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Darin Adler. - - OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h - https://bugs.webkit.org/show_bug.cgi?id=52867 - - Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set - and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed - OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is - no point in putting deleteOwnedArrayPtr into a separate header. - - Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr - without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=. - - No tests are added since this is a refactoring. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): Calls adoptArrayPtr. - * GNUmakefile.am: Removed OwnArrayPtrCommon.h - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * runtime/Arguments.cpp: - (JSC::Arguments::deleteProperty): Calls adoptArrayPtr. - * runtime/Arguments.h: - (JSC::Arguments::copyRegisters): Ditto. - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto. - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::setRegisters): Calls operator= instead of set. - * runtime/StructureChain.cpp: - (JSC::StructureChain::StructureChain): Ditto. - * wtf/CMakeLists.txt: - * wtf/DateMath.h: - (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr - with a null pointer. - * wtf/OwnArrayPtr.h: - * wtf/OwnArrayPtrCommon.h: Removed. - * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h - (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h - -2011-02-06 Antti Koivisto <antti@apple.com> - - Reviewed by Maciej Stachowiak. + Reviewed by Dimitri Glazkov. - Use bloom filter for descendant selector filtering - https://bugs.webkit.org/show_bug.cgi?id=53880 - - Implement a bloom filter with k=2 and 8 bit counting. + Add Derived Sources to WebCore GYP build + https://bugs.webkit.org/show_bug.cgi?id=55813 - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/BloomFilter.h: Added. - (WTF::BloomFilter::maximumCount): - (WTF::BloomFilter::BloomFilter): - (WTF::BloomFilter::mayContain): - (WTF::BloomFilter::add): - (WTF::BloomFilter::remove): - (WTF::BloomFilter::firstSlot): - (WTF::BloomFilter::secondSlot): - (WTF::::add): - (WTF::::remove): - (WTF::::clear): - (WTF::::likelyEmpty): - (WTF::::isClear): + Rename the action to be friendlier. -2011-02-04 Geoffrey Garen <ggaren@apple.com> + * gyp/JavaScriptCore.gyp: - Reviewed by Oliver Hunt. +2011-03-04 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> - Rolled back in r77612 with ASSERT/crash fixed. - https://bugs.webkit.org/show_bug.cgi?id=53759 - - Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if - necessary. For now, the heap assumes that it always has at least one - block live. + Reviewed by Laszlo Gombos. - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::reset): - * runtime/Heap.h: - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::shrinkBlocks): - (JSC::MarkedSpace::sweep): - (JSC::MarkedSpace::reset): - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::highWaterMark): - (JSC::MarkedSpace::setHighWaterMark): + [Qt] Need symbian version of cryptographicallyRandomValuesFromOS + https://bugs.webkit.org/show_bug.cgi?id=55782 -2011-02-04 David Kilzer <ddkilzer@apple.com> + Implement Symbian version of cryptographicallyRandomValuesFromOS - BUILD FIX: REALLY remove the last vestiges of JSVALUE32! + * wtf/OSRandomSource.cpp: + (WTF::cryptographicallyRandomValuesFromOS): - <rdar://problem/8957409> Remove last vestiges of JSVALUE32 - <http://webkit.org/b/53779> +2011-03-04 Gavin Barraclough <barraclough@apple.com> - * DerivedSources.make: Removed dependency on - JavaScriptCore.JSVALUE32.exp. + Reviewed by Cameron Zwarich. -2011-02-04 David Kilzer <ddkilzer@apple.com> + Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible(). - <rdar://problem/8957409> Remove last vestiges of JSVALUE32 - <http://webkit.org/b/53779> + * runtime/JSObject.cpp: + (JSC::JSObject::defineOwnProperty): + Add missing check. - Reviewed by Darin Adler. +2011-03-04 Gavin Barraclough <barraclough@apple.com> - Support for JSVALUE32 was originaly removed in r70111. + Rubber stamped by olliej. - * Configurations/JavaScriptCore.xcconfig: Changed armv6 to use - JavaScriptCore.JSVALUE32_64.exp and ppc64 to use - JavaScriptCore.JSVALUE64.exp to match Platform.h. - * DerivedSources.make: Removed rule for - JavaScriptCore.JSVALUE32.exp. - * JavaScriptCore.JSVALUE32only.exp: Removed. - * JavaScriptCore.xcodeproj/project.pbxproj: Removed references - to JavaScriptCore.JSVALUE32only.exp. + Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk. -2011-02-04 David Kilzer <ddkilzer@apple.com> + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + (1) don't infinite loop. + (2) goto 1. - Use static_cast and other style cleanup in YarrInterpreter.cpp - <http://webkit.org/b/53772> +2011-03-04 Gavin Barraclough <barraclough@apple.com> - Reviewed by John Sullivan. + cmake build fix. - * yarr/YarrInterpreter.cpp: - (JSC::Yarr::Interpreter::InputStream::readChecked): Use - static_cast. - (JSC::Yarr::Interpreter::InputStream::checkInput): Remove - unnecessary else block. - (JSC::Yarr::Interpreter::matchAssertionEOL): Ditto. - (JSC::Yarr::Interpreter::backtrackBackReference): Ditto. - (JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast. + * CMakeLists.txt: -2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com> +2011-03-04 Adam Barth <abarth@webkit.org> - Unreviewed, rolling out r77625 and r77626. - http://trac.webkit.org/changeset/77625 - http://trac.webkit.org/changeset/77626 - https://bugs.webkit.org/show_bug.cgi?id=53765 + Reviewed by Dimitri Glazkov. - It broke Windows builds (Requested by Ossy_ on #webkit). + Add Copy Files step to JavaScriptCore GYP build for apitest and minidom + https://bugs.webkit.org/show_bug.cgi?id=55798 - * JavaScriptCore.exp: - * JavaScriptCore.gyp/JavaScriptCore.gyp: * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * create_regex_tables: - * runtime/RegExp.cpp: - * wtf/Platform.h: - * yarr/Yarr.h: - * yarr/YarrJIT.cpp: - * yarr/YarrJIT.h: - * yarr/YarrParser.h: - * yarr/YarrPattern.h: - * yarr/YarrSyntaxChecker.h: - * yarr/yarr.pri: Removed. - -2011-02-04 Jessie Berlin <jberlin@apple.com> + * gyp/JavaScriptCore.gyp: - Windows build fix. Unreviewed. +2011-03-04 Adam Barth <abarth@webkit.org> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2011-02-04 Peter Varga <pvarga@webkit.org> - - Reviewed by Gavin Barraclough. + Reviewed by Dimitri Glazkov. - Replace PCRE with Yarr in WebCore - https://bugs.webkit.org/show_bug.cgi?id=53496 + Remove unneeded round-trips through ../Source in the Chromium GYP build + https://bugs.webkit.org/show_bug.cgi?id=55795 - * JavaScriptCore.exp: * JavaScriptCore.gyp/JavaScriptCore.gyp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * create_regex_tables: - * runtime/RegExp.cpp: - * wtf/Platform.h: - * yarr/Yarr.h: - * yarr/YarrJIT.cpp: - * yarr/YarrJIT.h: - * yarr/YarrParser.h: - * yarr/YarrPattern.h: - * yarr/YarrSyntaxChecker.h: - * yarr/yarr.pri: Added. - -2011-02-04 Ilya Tikhonovsky <loislo@chromium.org> - - Unreviewed rollout two patches r77614 and r77612. - - REGRESSION: Snow Leopard Intel Release anumber of failing tests. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::reset): - * runtime/Heap.h: - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::sweep): - (JSC::MarkedSpace::reset): - * runtime/MarkedSpace.h: - -2011-02-04 Geoffrey Garen <ggaren@apple.com> - - Try to fix 32bit build. - - * runtime/Heap.cpp: - (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings, - since 1.5 is double (64bit), and the result is size_t (32bit). -2011-02-03 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Cameron Zwarich. - - Changed MarkedSpace to delegate grow/shrink decisions to Heap - https://bugs.webkit.org/show_bug.cgi?id=53759 - - SunSpider reports no change. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::reset): - * runtime/Heap.h: Reorganized a few data members for better cache locality. - Added a grow policy. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::sweep): - (JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for - the heap to make an explicit sweep call. - - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::highWaterMark): - (JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how - many bytes to allocate before failing and giving the heap an opportunity - to collect garbage. This also means that we allocate blocks on demand, - instead of ahead of time. - -2011-02-03 James Kozianski <koz@chromium.org> +2011-03-04 Adam Barth <abarth@webkit.org> Reviewed by Dimitri Glazkov. - Add navigator.registerProtocolHandler behind a flag. - https://bugs.webkit.org/show_bug.cgi?id=52609 - - * Configurations/FeatureDefines.xcconfig: - -2011-02-03 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Not all blocks are freed when the heap is freed (counting is hard!) - https://bugs.webkit.org/show_bug.cgi?id=53732 + Use target_defaults to reduce boilerplate in GYP build system + https://bugs.webkit.org/show_bug.cgi?id=55790 - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just - keep freeing block 0 until there are no blocks left. - -2011-02-03 Geoffrey Garen <ggaren@apple.com> + Instead of setting up the configuration in each target, just defer to + target_defaults. Also, removed a define that was redundant with the + xcconfig. - Try to fix the Mac build. + * gyp/JavaScriptCore.gyp: - * JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header - needs to be private, not project, so other projects can include headers - that depend on it. - -2011-02-03 Geoffrey Garen <ggaren@apple.com> +2011-03-03 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - Start using MarkedBlock instead of CollectorBlock - https://bugs.webkit.org/show_bug.cgi?id=53693 - - SunSpider reports no change. - - * runtime/MarkedBlock.h: - (JSC::MarkedBlock::blockFor): - (JSC::MarkedBlock::setMarked): - (JSC::MarkedBlock::isCellAligned): - (JSC::MarkedBlock::isPossibleCell): Updated for const-ness. + Bug 55736 - Implement seal/freeze/preventExtensions for normal object types. + Provide basic functionallity from section 15.2.4 of ECMA-262. + This support will need expanding to cover arrays, too. - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocateBlock): - (JSC::MarkedSpace::containsSlowCase): - (JSC::MarkedSpace::clearMarkBits): Updated for const-ness. - - * runtime/MarkedSpace.h: - (JSC::CollectorHeap::collectorBlock): - (JSC::MarkedSpace::heap): - (JSC::MarkedSpace::isMarked): - (JSC::MarkedSpace::testAndSetMarked): - (JSC::MarkedSpace::setMarked): - (JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock, - and deleted dead CollectorBlock-related code. - -2011-02-03 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Avoid strlen() in AtomicString::fromUTF8 - https://bugs.webkit.org/show_bug.cgi?id=50516 - - Add an overload to calculateStringHashFromUTF8 to get - strlen() of the input data with only one call. - - This change shows about 3% performance win on the xml-parser benchmark. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/text/AtomicString.cpp: - (WTF::AtomicString::fromUTF8): - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal): - (WTF::Unicode::calculateStringHashFromUTF8): - (WTF::Unicode::calculateStringHashAndLengthFromUTF8): - * wtf/unicode/UTF8.h: - -2011-02-02 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2011-02-02 Gavin Barraclough <barraclough@apple.com> - - oops, build fix! - - * wtf/Assertions.cpp: - -2011-02-02 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 53650 - Add a BACKTRACE macro to Assertions.h - - Add a BACKTRACE macro to Assertions.h, which will print a backtrace on - debug Mac builds, make CRASH (and thus ASSERT) automatically call this. - - * JavaScriptCore.exp: - * wtf/Assertions.cpp: - * wtf/Assertions.h: - -2011-02-02 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Improper backtrack of nested non-capturing greedy paren to prior paren - https://bugs.webkit.org/show_bug.cgi?id=53261 - - A paren that follows a non-capturing greedy paren nested within a - non-capturing fixed paren was back tracking to the last paren - processed instead of the immediately prior paren. - Refactored default backtracking of parens to prior paren to work for - both nested (within) and immediately prior (after) parens. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail): - (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState): - (JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen): - (JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen): - (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail): - (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): - (JSC::Yarr::YarrGenerator::generateParenthesesSingle): - (JSC::Yarr::YarrGenerator::generateDisjunction): - -2011-02-02 Jeff Miller <jeffm@apple.com> - - Reviewed by Darin Adler and Steve Falkenburg. - - Add DerivedSources.make to some Visual Studio projects - https://bugs.webkit.org/show_bug.cgi?id=53607 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make. - -2011-02-02 Steve Lacey <sjl@chromium.org> - - Reviewed by Eric Carlson. - - Implement basic media statistics on media elements. - https://bugs.webkit.org/show_bug.cgi?id=53322 - - * Configurations/FeatureDefines.xcconfig: - -2011-02-02 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fixes for wxWebKit. - - * wtf/wx/StringWx.cpp: - (WTF::String::String): - -2011-02-01 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - A little more Heap refactoring - https://bugs.webkit.org/show_bug.cgi?id=53577 - - SunSpider reports no change. - - Split out MarkedBlock into its own file / class. - - Did the following renames: - isCellMarked => isMarked - checkMarkCell => testAndSetMarked - markCell => setMarked - cellOffset => cellNumber - collectorBlock => blockFor - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Heap.cpp: - (JSC::WeakGCHandlePool::update): - * runtime/Heap.h: - (JSC::Heap::isMarked): - (JSC::Heap::testAndSetMarked): - (JSC::Heap::setMarked): - * runtime/JSArray.h: - (JSC::MarkStack::markChildren): - (JSC::MarkStack::drain): - * runtime/JSCell.h: - (JSC::JSCell::MarkStack::internalAppend): - * runtime/MarkedBlock.cpp: Added. - * runtime/MarkedBlock.h: Added. - (JSC::MarkedBlock::blockFor): - (JSC::MarkedBlock::cellNumber): - (JSC::MarkedBlock::isMarked): - (JSC::MarkedBlock::testAndSetMarked): - (JSC::MarkedBlock::setMarked): - (JSC::MarkedBlock::isCellAligned): - (JSC::MarkedBlock::isPossibleCell): - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::isMarked): - (JSC::MarkedSpace::testAndSetMarked): - (JSC::MarkedSpace::setMarked): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::isValid): - (JSC::::get): - (JSC::::take): - (JSC::::set): - -2011-02-02 Sam Weinig <sam@webkit.org> - - Fix windows clean build. + Shows a 0.5% progression on SunSpidey, this seems to be due to changing + ObjectConstructor to use a static table. * DerivedSources.make: - -2011-02-02 Alejandro G. Castro <alex@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Fix dist compilation - https://bugs.webkit.org/show_bug.cgi?id=53579 - - * GNUmakefile.am: Added WriteBarrier.h to the sources, it was - added in r77151 - -2011-02-01 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r77297. - http://trac.webkit.org/changeset/77297 - https://bugs.webkit.org/show_bug.cgi?id=53538 - - caused leopard crashes (Requested by paroga on #webkit). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/text/AtomicString.cpp: - (WTF::AtomicString::fromUTF8): - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::calculateStringHashFromUTF8): - * wtf/unicode/UTF8.h: - -2011-02-01 Sam Weinig <sam@webkit.org> - - Fix Mac production builds. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2011-02-01 Sam Weinig <sam@webkit.org> - - Try to fix the windows build. - - * DerivedSources.make: - -2011-02-01 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Avoid strlen() in AtomicString::fromUTF8 - https://bugs.webkit.org/show_bug.cgi?id=50516 - - Add an overload to calculateStringHashFromUTF8 to get - strlen() of the input data with only one call. - - This change shows about 3% performance win on the xml-parser benchmark. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/text/AtomicString.cpp: - (WTF::AtomicString::fromUTF8): - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal): - (WTF::Unicode::calculateStringHashFromUTF8): - (WTF::Unicode::calculateStringHashAndLengthFromUTF8): - * wtf/unicode/UTF8.h: - -2011-02-01 Sam Weinig <sam@webkit.org> - - Reviewed by Beth Dakin. - - Part 2 for <rdar://problem/8492788> - Adopt WKScrollbarPainterController - - Use header detection to define scrollbar painting controller #define. - - * DerivedSources.make: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2011-02-01 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Refactor JSGlobalObject-related tear-down - https://bugs.webkit.org/show_bug.cgi?id=53478 - - While investigating crashes caused by r77082, I noticed some strange - destructor-time behaviors. This patch makes them less strange. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code - blocks on the Heap, instead of on independent global objects. The heap - is guaranteed to outlast any GC-owned data structure. The heap is also - a natural place to store objects that needs out-of-band marking, since - the heap is responsible for marking all roots. - - * runtime/Heap.cpp: - (JSC::Heap::markRoots): - (JSC::Heap::globalObjectCount): - (JSC::Heap::protectedGlobalObjectCount): - * runtime/Heap.h: - (JSC::Heap::codeBlocks): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::init): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map - owned by JSGlobalData, instead of an instrusive circular linked list. - This is simpler, and it avoids destructor-time access between garbage - collected objects, which is hard to get right. - - (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing - everything down. Otherwise, weak data structures will incorrectly report - that objects pending destruction are still alive. - -2011-02-01 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit - bot; loading trac pages; typing in search field - https://bugs.webkit.org/show_bug.cgi?id=53519 - - The crashes were all caused by failure to run an object's destructor. - - * runtime/CollectorHeapIterator.h: - (JSC::ObjectIterator::ObjectIterator): Don't skip forward upon - construction. The iterator class used to do that when it was designed - for prior-to-beginning initialization. I forgot to remove this line - of code when I changed the iterator to normal initialization. - - Skipping forward upon construction was causing the heap to skip running - the destructor for the very first object in a block when destroying the - block. This usually did not crash, since block destruction is rare and - most objects have pretty trivial destructors. However, in the rare case - when the heap would destroy a block whose first object was a global - object or a DOM node, BOOM. - -2011-01-31 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Update JSObject storage for new marking API - https://bugs.webkit.org/show_bug.cgi?id=53467 - - JSObject no longer uses EncodedJSValue for its property storage. - This produces a stream of mechanical changes to PropertySlot and - anonymous storage APIs. - - * JavaScriptCore.exp: - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/BooleanConstructor.cpp: - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanObject.cpp: - (JSC::BooleanObject::BooleanObject): - * runtime/BooleanObject.h: - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::DatePrototype::DatePrototype): - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnPropertySlot): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertySlot): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObject): - * runtime/JSObject.cpp: - (JSC::JSObject::fillGetterPropertySlot): - * runtime/JSObject.h: - (JSC::JSObject::getDirectLocation): - (JSC::JSObject::offsetForLocation): - (JSC::JSObject::putAnonymousValue): - (JSC::JSObject::clearAnonymousValue): - (JSC::JSObject::getAnonymousValue): - (JSC::JSObject::putThisToAnonymousValue): - (JSC::JSObject::locationForOffset): - (JSC::JSObject::inlineGetOwnPropertySlot): - * runtime/JSObjectWithGlobalObject.cpp: - (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::JSWrapperObject): - (JSC::JSWrapperObject::setInternalValue): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/NumberConstructor.cpp: - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::NumberObject::NumberObject): - (JSC::constructNumber): - * runtime/NumberObject.h: - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/PropertySlot.h: - (JSC::PropertySlot::getValue): - (JSC::PropertySlot::setValue): - (JSC::PropertySlot::setRegisterSlot): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/WriteBarrier.h: - (JSC::WriteBarrierBase::setWithoutWriteBarrier): - -2011-02-01 Daniel Bates <dbates@rim.com> - - Reviewed by Antonio Gomes. - - Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937) - https://bugs.webkit.org/show_bug.cgi?id=53506 - - Currently, use of the Mersenne Twister pseudorandom number generator - is hardcoded to the Windows CE port. With the passing of bug #53253, - we can generalize support for this PRNG to all ports that use srand(3) - and rand(3), including Windows CE. - - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - -2011-02-01 Dave Tapuska <dtapuska@rim.com> - - Reviewed by Gavin Barraclough. - - MacroAssemblerARM would generate code that did 32bit loads - on addresses that were not aligned. More specifically it would - generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower. - The intended instruction really is ldrb r8,[r1, #7]; ensure we - call load8 instead of load32. - - https://bugs.webkit.org/show_bug.cgi?id=46095 - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::set32Test32): - (JSC::MacroAssemblerARM::set32Test8): - -2011-02-01 Darin Fisher <darin@chromium.org> - - Reviewed by Eric Seidel. - - Fix some Visual Studio compiler warnings. - https://bugs.webkit.org/show_bug.cgi?id=53476 - - * wtf/MathExtras.h: - (clampToInteger): - (clampToPositiveInteger): - * wtf/ThreadingWin.cpp: - (WTF::absoluteTimeToWaitTimeoutInterval): - -2011-01-31 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Bogus callframe during stack unwinding - https://bugs.webkit.org/show_bug.cgi?id=53454 - - Trying to access a callframe's globalData after destroying its - ScopeChain is not a good thing. While we could access the - globalData directly through the (known valid) scopechain we're - holding on to, it feels fragile. Instead we push the valid - ScopeChain onto the callframe again to ensure that the callframe - itself remains valid. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - -2011-01-31 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Potentially Unsafe HashSet of RuntimeObject* in RootObject definition - https://bugs.webkit.org/show_bug.cgi?id=53271 - - Reapplying this change again. - Changed isValid() to use .get() as a result of change r77151. - - Added new isValid() methods to check if a contained object in - a WeakGCMap is valid when using an unchecked iterator. - - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::isValid): - -2011-01-31 Oliver Hunt <oliver@apple.com> - - Convert markstack to a slot visitor API - https://bugs.webkit.org/show_bug.cgi?id=53219 - - rolling r77098, r77099, r77100, r77109, and - r77111 back in, along with a few more Qt fix attempts. - - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::setPrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrivateProperty): - * API/JSWeakObjectMapRefInternal.h: * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::findScopedProperty): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): * interpreter/CallFrame.h: - (JSC::ExecState::exception): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::execute): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - * runtime/Arguments.h: - (JSC::Arguments::setActivation): - (JSC::Arguments::Arguments): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/ConservativeSet.cpp: - (JSC::ConservativeSet::grow): - * runtime/ConservativeSet.h: - (JSC::ConservativeSet::~ConservativeSet): - (JSC::ConservativeSet::mark): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::getter): - (JSC::GetterSetter::setGetter): - (JSC::GetterSetter::setter): - (JSC::GetterSetter::setSetter): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::cachedGlobalObject): - * runtime/Heap.cpp: - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - (JSC::JSActivation::put): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSCell.h: - (JSC::JSCell::MarkStack::append): - (JSC::JSCell::MarkStack::internalAppend): - (JSC::JSCell::MarkStack::deprecatedAppend): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): + (JSC::ExecState::objectConstructorTable): + Add a static table for ObjectConstructor. + * runtime/CommonIdentifiers.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + Add a static table for ObjectConstructor. * runtime/JSGlobalData.h: * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::regExpConstructor): - (JSC::JSGlobalObject::errorConstructor): - (JSC::JSGlobalObject::evalErrorConstructor): - (JSC::JSGlobalObject::rangeErrorConstructor): - (JSC::JSGlobalObject::referenceErrorConstructor): - (JSC::JSGlobalObject::syntaxErrorConstructor): - (JSC::JSGlobalObject::typeErrorConstructor): - (JSC::JSGlobalObject::URIErrorConstructor): - (JSC::JSGlobalObject::evalFunction): - (JSC::JSGlobalObject::objectPrototype): - (JSC::JSGlobalObject::functionPrototype): - (JSC::JSGlobalObject::arrayPrototype): - (JSC::JSGlobalObject::booleanPrototype): - (JSC::JSGlobalObject::stringPrototype): - (JSC::JSGlobalObject::numberPrototype): - (JSC::JSGlobalObject::datePrototype): - (JSC::JSGlobalObject::regExpPrototype): - (JSC::JSGlobalObject::methodCallDummy): - (JSC::Structure::prototypeForLookup): - (JSC::constructArray): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::object): - (JSC::Stringifier::Holder::objectSlot): - (JSC::Stringifier::markAggregate): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::callReviver): - (JSC::Walker::walk): + Add a static table for ObjectConstructor. * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::removeDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::putDescriptor): + (JSC::JSObject::seal): + (JSC::JSObject::freeze): + (JSC::JSObject::preventExtensions): + Transition the object's structure. (JSC::JSObject::defineOwnProperty): + Check isExtensible. * runtime/JSObject.h: - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::putUndefinedAtDirectOffset): - (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::isSealed): + (JSC::JSObject::isFrozen): + (JSC::JSObject::isExtensible): + These wrap method on structure. (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSValue::putDirect): - (JSC::JSObject::allocatePropertyStorageInline): - (JSC::JSObject::markChildrenDirect): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::get): - * runtime/JSPropertyNameIterator.h: - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSString.cpp: - (JSC::StringObject::create): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::deprecatedAppendValues): - (JSC::MarkStack::appendValues): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): + Check isExtensible. * runtime/ObjectConstructor.cpp: (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - (JSC::resolveBase): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::setExistingProperty): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::base): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainIterator::operator*): - (JSC::ScopeChainIterator::operator->): - (JSC::ScopeChain::top): - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): - * runtime/SmallStrings.h: - (JSC::SmallStrings::emptyString): - (JSC::SmallStrings::singleCharacterString): - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): + (JSC::ObjectConstructor::getOwnPropertySlot): + (JSC::ObjectConstructor::getOwnPropertyDescriptor): + Change ObjectConstructor to use a static table. + (JSC::objectConstructorSeal): + (JSC::objectConstructorFreeze): + (JSC::objectConstructorPreventExtensions): + (JSC::objectConstructorIsSealed): + (JSC::objectConstructorIsFrozen): + (JSC::objectConstructorIsExtensible): + Add new methods on Object. + * runtime/ObjectConstructor.h: + (JSC::ObjectConstructor::createStructure): * runtime/Structure.cpp: (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): + init/propagate m_preventExtensions + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + transition the structure, materializing the property map, setting m_preventExtensions & changing attributes. + (JSC::Structure::isSealed): + (JSC::Structure::isFrozen): + check attributes to detect if object is sealed/frozen. * runtime/Structure.h: - (JSC::Structure::storedPrototype): - (JSC::Structure::storedPrototypeSlot): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::uncheckedGetSlot): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): - * runtime/WriteBarrier.h: Added. - (JSC::DeprecatedPtr::DeprecatedPtr): - (JSC::DeprecatedPtr::get): - (JSC::DeprecatedPtr::operator*): - (JSC::DeprecatedPtr::operator->): - (JSC::DeprecatedPtr::slot): - (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): - (JSC::DeprecatedPtr::operator!): - (JSC::WriteBarrierBase::set): - (JSC::WriteBarrierBase::get): - (JSC::WriteBarrierBase::operator*): - (JSC::WriteBarrierBase::operator->): - (JSC::WriteBarrierBase::clear): - (JSC::WriteBarrierBase::slot): - (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): - (JSC::WriteBarrierBase::operator!): - (JSC::WriteBarrier::WriteBarrier): - (JSC::operator==): - -2011-01-31 Dan Winship <danw@gnome.org> - - Reviewed by Gustavo Noronha Silva. - - wss (websockets ssl) support for gtk via new gio TLS support - https://bugs.webkit.org/show_bug.cgi?id=50344 - - Add a GPollableOutputStream typedef for TLS WebSockets support - - * wtf/gobject/GTypedefs.h: - -2011-01-31 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=53352 - Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH(). - - The FixedVMPoolAllocator currently uses a best fix policy - - switch to first fit, this is less prone to external fragmentation. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::AllocationTableSizeClass::AllocationTableSizeClass): - (JSC::AllocationTableSizeClass::blockSize): - (JSC::AllocationTableSizeClass::blockCount): - (JSC::AllocationTableSizeClass::blockAlignment): - (JSC::AllocationTableSizeClass::size): - (JSC::AllocationTableLeaf::AllocationTableLeaf): - (JSC::AllocationTableLeaf::~AllocationTableLeaf): - (JSC::AllocationTableLeaf::allocate): - (JSC::AllocationTableLeaf::free): - (JSC::AllocationTableLeaf::isEmpty): - (JSC::AllocationTableLeaf::isFull): - (JSC::AllocationTableLeaf::size): - (JSC::AllocationTableLeaf::classForSize): - (JSC::AllocationTableLeaf::dump): - (JSC::LazyAllocationTable::LazyAllocationTable): - (JSC::LazyAllocationTable::~LazyAllocationTable): - (JSC::LazyAllocationTable::allocate): - (JSC::LazyAllocationTable::free): - (JSC::LazyAllocationTable::isEmpty): - (JSC::LazyAllocationTable::isFull): - (JSC::LazyAllocationTable::size): - (JSC::LazyAllocationTable::dump): - (JSC::LazyAllocationTable::classForSize): - (JSC::AllocationTableDirectory::AllocationTableDirectory): - (JSC::AllocationTableDirectory::~AllocationTableDirectory): - (JSC::AllocationTableDirectory::allocate): - (JSC::AllocationTableDirectory::free): - (JSC::AllocationTableDirectory::isEmpty): - (JSC::AllocationTableDirectory::isFull): - (JSC::AllocationTableDirectory::size): - (JSC::AllocationTableDirectory::classForSize): - (JSC::AllocationTableDirectory::dump): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::allocated): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::classForSize): - (JSC::FixedVMPoolAllocator::offsetToPointer): - (JSC::FixedVMPoolAllocator::pointerToOffset): - (JSC::ExecutableAllocator::committedByteCount): - (JSC::ExecutableAllocator::isValid): - (JSC::ExecutableAllocator::underMemoryPressure): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * wtf/PageReservation.h: - (WTF::PageReservation::PageReservation): - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::committed): - -2011-01-31 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r76969. - http://trac.webkit.org/changeset/76969 - https://bugs.webkit.org/show_bug.cgi?id=53418 - - "It is causing crashes in GTK+ and Leopard bots" (Requested by - alexg__ on #webkit). + (JSC::Structure::isExtensible): + checks the m_preventExtensions flag. - * runtime/WeakGCMap.h: - -2011-01-30 Csaba Osztrogonác <ossy@webkit.org> +2011-03-04 Steve Falkenburg <sfalken@apple.com> - Unreviewed, rolling out r77098, r77099, r77100, r77109, and - r77111. - http://trac.webkit.org/changeset/77098 - http://trac.webkit.org/changeset/77099 - http://trac.webkit.org/changeset/77100 - http://trac.webkit.org/changeset/77109 - http://trac.webkit.org/changeset/77111 - https://bugs.webkit.org/show_bug.cgi?id=53219 + Reviewed by Jon Honeycutt. - Qt build is broken - - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::setPrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrivateProperty): - * API/JSWeakObjectMapRefInternal.h: - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::findScopedProperty): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/CallFrame.h: - (JSC::ExecState::exception): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::execute): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - * runtime/Arguments.h: - (JSC::Arguments::setActivation): - (JSC::Arguments::Arguments): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/ConservativeSet.cpp: - (JSC::ConservativeSet::grow): - * runtime/ConservativeSet.h: - (JSC::ConservativeSet::~ConservativeSet): - (JSC::ConservativeSet::mark): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::getter): - (JSC::GetterSetter::setGetter): - (JSC::GetterSetter::setter): - (JSC::GetterSetter::setSetter): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::cachedGlobalObject): - * runtime/Heap.cpp: - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - (JSC::JSActivation::put): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSCell.h: - (JSC::JSCell::JSValue::toThisObject): - (JSC::JSCell::MarkStack::append): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::regExpConstructor): - (JSC::JSGlobalObject::errorConstructor): - (JSC::JSGlobalObject::evalErrorConstructor): - (JSC::JSGlobalObject::rangeErrorConstructor): - (JSC::JSGlobalObject::referenceErrorConstructor): - (JSC::JSGlobalObject::syntaxErrorConstructor): - (JSC::JSGlobalObject::typeErrorConstructor): - (JSC::JSGlobalObject::URIErrorConstructor): - (JSC::JSGlobalObject::evalFunction): - (JSC::JSGlobalObject::objectPrototype): - (JSC::JSGlobalObject::functionPrototype): - (JSC::JSGlobalObject::arrayPrototype): - (JSC::JSGlobalObject::booleanPrototype): - (JSC::JSGlobalObject::stringPrototype): - (JSC::JSGlobalObject::numberPrototype): - (JSC::JSGlobalObject::datePrototype): - (JSC::JSGlobalObject::regExpPrototype): - (JSC::JSGlobalObject::methodCallDummy): - (JSC::Structure::prototypeForLookup): - (JSC::constructArray): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::object): - (JSC::Stringifier::markAggregate): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::callReviver): - (JSC::Walker::walk): - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::removeDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::flattenDictionaryObject): - (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSValue::putDirect): - (JSC::JSObject::allocatePropertyStorageInline): - (JSC::JSObject::markChildrenDirect): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::get): - * runtime/JSPropertyNameIterator.h: - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSString.cpp: - (JSC::StringObject::create): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MarkStack.h: - (JSC::MarkStack::appendValues): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - (JSC::resolveBase): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::setExistingProperty): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::base): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainIterator::operator*): - (JSC::ScopeChainIterator::operator->): - (JSC::ScopeChain::top): - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): - * runtime/SmallStrings.h: - (JSC::SmallStrings::emptyString): - (JSC::SmallStrings::singleCharacterString): - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): - * runtime/Structure.h: - (JSC::Structure::storedPrototype): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::isValid): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): - * runtime/WriteBarrier.h: Removed. + Adopt VersionStamper tool for Windows WebKit DLLs + https://bugs.webkit.org/show_bug.cgi?id=55784 + <rdar://problem/9021273> + + We now use a tool to stamp the version number onto the Apple WebKit DLLs + during the post-build step. -2011-01-30 Simon Fraser <simon.fraser@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: - Build fix the build fix. I assume Oliver meant m_cell, not m_value. +2011-03-04 Adam Barth <abarth@webkit.org> - * runtime/WriteBarrier.h: - (JSC::WriteBarrierBase::clear): + Reviewed by Dimitri Glazkov. -2011-01-30 Oliver Hunt <oliver@apple.com> + JavaScriptCore GYP build should use a header map + https://bugs.webkit.org/show_bug.cgi?id=55712 - More Qt build fixes + This patch moves the os-win32 files into their own variable so that we + can use a header map in the Apple Mac Xcode build. The problem is that + the header map searches the whole project rather than just the files + included in a given target. Another solution to this problem is to + make GYP smarter about filtering out what files are added to the + project file. - * runtime/WriteBarrier.h: - (JSC::WriteBarrierBase::clear): + * JavaScriptCore.gypi: + * gyp/JavaScriptCore.gyp: -2011-01-30 Oliver Hunt <oliver@apple.com> +2011-03-03 Ryosuke Niwa <rniwa@webkit.org> - Convert markstack to a slot visitor API - https://bugs.webkit.org/show_bug.cgi?id=53219 + Reviewed by Darin Adler. - rolling r77006 and r77020 back in. + Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h + https://bugs.webkit.org/show_bug.cgi?id=55554 - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::setPrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrivateProperty): - * API/JSWeakObjectMapRefInternal.h: - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::findScopedProperty): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/CallFrame.h: - (JSC::ExecState::exception): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::execute): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - * runtime/Arguments.h: - (JSC::Arguments::setActivation): - (JSC::Arguments::Arguments): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/ConservativeSet.cpp: - (JSC::ConservativeSet::grow): - * runtime/ConservativeSet.h: - (JSC::ConservativeSet::~ConservativeSet): - (JSC::ConservativeSet::mark): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::getter): - (JSC::GetterSetter::setGetter): - (JSC::GetterSetter::setter): - (JSC::GetterSetter::setSetter): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::cachedGlobalObject): - * runtime/Heap.cpp: - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - (JSC::JSActivation::put): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSCell.h: - (JSC::JSCell::MarkStack::append): - (JSC::JSCell::MarkStack::internalAppend): - (JSC::JSCell::MarkStack::deprecatedAppend): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): - * runtime/JSGlobalData.h: * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - (JSC::JSGlobalObject::markChildren): + (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0. + (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer. * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::regExpConstructor): - (JSC::JSGlobalObject::errorConstructor): - (JSC::JSGlobalObject::evalErrorConstructor): - (JSC::JSGlobalObject::rangeErrorConstructor): - (JSC::JSGlobalObject::referenceErrorConstructor): - (JSC::JSGlobalObject::syntaxErrorConstructor): - (JSC::JSGlobalObject::typeErrorConstructor): - (JSC::JSGlobalObject::URIErrorConstructor): - (JSC::JSGlobalObject::evalFunction): - (JSC::JSGlobalObject::objectPrototype): - (JSC::JSGlobalObject::functionPrototype): - (JSC::JSGlobalObject::arrayPrototype): - (JSC::JSGlobalObject::booleanPrototype): - (JSC::JSGlobalObject::stringPrototype): - (JSC::JSGlobalObject::numberPrototype): - (JSC::JSGlobalObject::datePrototype): - (JSC::JSGlobalObject::regExpPrototype): - (JSC::JSGlobalObject::methodCallDummy): - (JSC::Structure::prototypeForLookup): - (JSC::constructArray): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::object): - (JSC::Stringifier::Holder::objectSlot): - (JSC::Stringifier::markAggregate): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::callReviver): - (JSC::Walker::walk): - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::removeDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::putUndefinedAtDirectOffset): - (JSC::JSObject::flattenDictionaryObject): - (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSValue::putDirect): - (JSC::JSObject::allocatePropertyStorageInline): - (JSC::JSObject::markChildrenDirect): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::get): - * runtime/JSPropertyNameIterator.h: - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSString.cpp: - (JSC::StringObject::create): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStack): - (JSC::MarkStack::deprecatedAppendValues): - (JSC::MarkStack::appendValues): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - (JSC::resolveBase): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::setExistingProperty): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::base): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainIterator::operator*): - (JSC::ScopeChainIterator::operator->): - (JSC::ScopeChain::top): - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): - * runtime/SmallStrings.h: - (JSC::SmallStrings::emptyString): - (JSC::SmallStrings::singleCharacterString): - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): - * runtime/Structure.h: - (JSC::Structure::storedPrototype): - (JSC::Structure::storedPrototypeSlot): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::uncheckedGetSlot): - (JSC::WeakGCMap::isValid): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): - * runtime/WriteBarrier.h: Added. - (JSC::DeprecatedPtr::DeprecatedPtr): - (JSC::DeprecatedPtr::get): - (JSC::DeprecatedPtr::operator*): - (JSC::DeprecatedPtr::operator->): - (JSC::DeprecatedPtr::slot): - (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): - (JSC::DeprecatedPtr::operator!): - (JSC::WriteBarrierBase::set): - (JSC::WriteBarrierBase::get): - (JSC::WriteBarrierBase::operator*): - (JSC::WriteBarrierBase::operator->): - (JSC::WriteBarrierBase::slot): - (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): - (JSC::WriteBarrierBase::operator!): - (JSC::WriteBarrier::WriteBarrier): - (JSC::operator==): - -2011-01-30 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Filter all Heap collection through a common reset function, in - preparation for adding features triggered by collection. - https://bugs.webkit.org/show_bug.cgi?id=53396 - - SunSpider reports no change. - - * runtime/Heap.cpp: - (JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost - limit, just call collectAllGarbage() instead of rolling our own special - way of resetting the heap. In theory, this may be slower in some cases, - but it also fixes cases of pathological heap growth that we've seen, - where the only objects being allocated are temporary and huge - (<rdar://problem/8885843>). - - (JSC::Heap::allocate): - (JSC::Heap::collectAllGarbage): Use the shared reset function. - - (JSC::Heap::reset): - * runtime/Heap.h: Carved a new shared reset function out of the old - collectAllGarbage. - -2011-01-30 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r77025. - http://trac.webkit.org/changeset/77025 - https://bugs.webkit.org/show_bug.cgi?id=53401 - - It made js1_5/Regress/regress-159334.js fail on 64 bit Linux - (Requested by Ossy on #webkit). - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FreeListEntry::FreeListEntry): - (JSC::AVLTreeAbstractorForFreeList::get_less): - (JSC::AVLTreeAbstractorForFreeList::set_less): - (JSC::AVLTreeAbstractorForFreeList::get_greater): - (JSC::AVLTreeAbstractorForFreeList::set_greater): - (JSC::AVLTreeAbstractorForFreeList::get_balance_factor): - (JSC::AVLTreeAbstractorForFreeList::set_balance_factor): - (JSC::AVLTreeAbstractorForFreeList::null): - (JSC::AVLTreeAbstractorForFreeList::compare_key_key): - (JSC::AVLTreeAbstractorForFreeList::compare_key_node): - (JSC::AVLTreeAbstractorForFreeList::compare_node_node): - (JSC::reverseSortFreeListEntriesByPointer): - (JSC::reverseSortCommonSizedAllocations): - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::addToFreeList): - (JSC::FixedVMPoolAllocator::coalesceFreeSpace): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::allocInternal): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - (JSC::FixedVMPoolAllocator::addToCommittedByteCount): - (JSC::ExecutableAllocator::committedByteCount): - (JSC::maybeModifyVMPoolSize): - (JSC::ExecutableAllocator::isValid): - (JSC::ExecutableAllocator::underMemoryPressure): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * wtf/PageReservation.h: - (WTF::PageReservation::PageReservation): - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - -2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn> - - Reviewed by Daniel Bates. - - Code style issue in JavaScriptCore/wtf/CurrentTime.h - https://bugs.webkit.org/show_bug.cgi?id=53394 - - According to rule #3 at http://webkit.org/coding/coding-style.html, - This patch fix style issue in CurrentTime.h. - - No functionality change, no new tests. - - * wtf/CurrentTime.h: - (WTF::currentTimeMS): - (WTF::getLocalTime): - -2011-01-30 Benjamin Poulain <ikipou@gmail.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] JavaScriptCore does not link on Mac if building WebKit 2 - https://bugs.webkit.org/show_bug.cgi?id=53377 - - The option "-whole-archive" is not availabe with the libtool of Mac OS X, - instead, we can use "-all_load" on Mac. - - * JavaScriptCore.pri: - -2011-01-29 Geoffrey Garen <ggaren@apple.com> - - Sorry Leopard bot -- I committed a change by accident. - - * JavaScriptCore.exp: You may have your symbols back now. - -2011-01-29 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Cameron Zwarich. - - Simplified Heap iteration - https://bugs.webkit.org/show_bug.cgi?id=53393 - - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::isValid): - (JSC::CollectorHeapIterator::isLive): - (JSC::CollectorHeapIterator::advance): Removed "max" argument to - advance because it's a constant. - (JSC::LiveObjectIterator::LiveObjectIterator): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::DeadObjectIterator): - (JSC::DeadObjectIterator::operator++): - (JSC::ObjectIterator::ObjectIterator): - (JSC::ObjectIterator::operator++): Factored out common checks into - two helper functions -- isValid() for "Am I past the end?" and isLive() - for "Is the cell I'm pointing to live?". - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::freeBlock): - (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap - to the end, to avoid making sweep subtly reliant on internal Heap state. - (JSC::MarkedSpace::primaryHeapBegin): - (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where - iteration begins. - -2011-01-29 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Cameron Zwarich. - - Simplified heap destruction - https://bugs.webkit.org/show_bug.cgi?id=53392 - - * JavaScriptCore.exp: - * runtime/Heap.cpp: - (JSC::Heap::destroy): - * runtime/Heap.h: - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::destroy): - * runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected - cells last -- the difficult contortions required to do so just don't seem - justified. We make no guarantees about GC protection after the client - throws away JSGlobalData, and it doesn't seem like any meaningful - guarantee is even possible. - -2011-01-29 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Switched heap to use the Bitmap class and removed CollectorBitmap - https://bugs.webkit.org/show_bug.cgi?id=53391 - - SunSpider says 1.005x as fast. Seems like a fluke. + (JSC::JSGlobalObject::addStaticGlobals): Ditto. + * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR + (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t. - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::allocate): Updated for rename and returning a value - rather than taking a value by reference. - - * runtime/MarkedSpace.h: Code reuse is good. - - * wtf/Bitmap.h: - (WTF::::testAndSet): Added, since this is the one thing Bitmap was missing - which CollectorBitmap had. (Renamed from the less conventional "getset".) - - (WTF::::nextPossiblyUnset): Renamed and changed to return a value for - clarity. It's all the same with inlining. - -2011-01-28 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Some more Heap cleanup. - https://bugs.webkit.org/show_bug.cgi?id=53357 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols. - - * runtime/Heap.cpp: - (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to - reportExtraMemoryCostSlowCase to match our naming conventions. - - (JSC::Heap::capacity): Renamed size to capacity because this function - returns the capacity of the heap, including unused portions. - - * runtime/Heap.h: - (JSC::Heap::globalData): - (JSC::Heap::markedSpace): - (JSC::Heap::machineStackMarker): - (JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file. - Moved ctor and dtor to the beginning of the class definition. Grouped - functions by purpose. +2011-03-03 Adam Barth <abarth@webkit.org> - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::capacity): Renamed size to capacity because this - function returns the capacity of the heap, including unused portions. - - * runtime/MarkedSpace.h: Removed statistics and the Statistics class because - the same information can be gotten just by calling size() and capacity(). - - * runtime/MemoryStatistics.cpp: - * runtime/MemoryStatistics.h: Ditto. - -2011-01-29 Daniel Bates <dbates@rim.com> - - Reviewed by Eric Seidel. - - Move wince/mt19937ar.c to ThirdParty and make it a policy choice - https://bugs.webkit.org/show_bug.cgi?id=53253 - - Make inclusion of MT19937 a policy decision. - - Currently, we hardcoded to use MT19937 when building for - Windows CE. Instead, we should make this a policy decision - with the Windows CE port using this by default. - - * JavaScriptCore.pri: Append Source/ThirdParty to the end - of the list include directories. - * wtf/CMakeLists.txt: Ditto. - * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when - building for Windows CE. - * wtf/RandomNumber.cpp: - (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE). - -2011-01-29 Cameron Zwarich <zwarich@apple.com> - - Reviewed by David Kilzer. - - Bug 53374 - Remove uses of unsafe string functions in debugging code - https://bugs.webkit.org/show_bug.cgi?id=53374 - - * runtime/RegExp.cpp: - (JSC::RegExp::printTraceData): + Reviewed by Dimitri Glazkov. -2011-01-29 Cameron Zwarich <zwarich@apple.com> + Add jsc to JavaScriptCore GYP build + https://bugs.webkit.org/show_bug.cgi?id=55711 - Reviewed by Oliver Hunt. + * JavaScriptCore.gypi: + - Move jsc.cpp into jsc_files because it's really part of the jsc + target. + * JavaScriptCore.xcodeproj/project.pbxproj: + - Remove extraneous files from the normal jsc build. I probably + added these by mistake at some point. + * gyp/JavaScriptCore.gyp: + - Add the jsc target to the GYP file. - JavaScriptCoreUseJIT environment variable broken - https://bugs.webkit.org/show_bug.cgi?id=53372 +2011-03-03 Adam Barth <abarth@webkit.org> - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned - by getenv() rather than just doing a NULL check on the return value. + Reviewed by Dimitri Glazkov. -2011-01-29 Patrick Gansterer <paroga@webkit.org> + Add testapi to JavaScriptCore GYP build + https://bugs.webkit.org/show_bug.cgi?id=55707 - Reviewed by David Kilzer. + The new testapi target is slightly incomplete. There's a resource + copying step that we don't quite have yet. - Move CharacterNames.h into WTF directory - https://bugs.webkit.org/show_bug.cgi?id=49618 + This patch also cleans up some of the configuration issues in + JavaScriptCore.xcodeproj. It seems kind of wordy to repeat these for + each target. I suspect there's a more compact way of defining the + configurations, but this removes the "Default" configuration, which is + progress. - * GNUmakefile.am: * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/CMakeLists.txt: - * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h. - * wtf/unicode/UTF8.cpp: + * gyp/JavaScriptCore.gyp: -2011-01-28 Simon Fraser <simon.fraser@apple.com> +2011-03-03 Adam Barth <abarth@webkit.org> - Reviewed by Gavin Barraclough. + Reviewed by Eric Seidel. - Add various clampToInt() methods to MathExtras.h - https://bugs.webkit.org/show_bug.cgi?id=52910 - - Add functions for clamping doubles and floats to valid int - ranges, for signed and positive integers. + Teach JavaScriptCore GYP build about private headers + https://bugs.webkit.org/show_bug.cgi?id=55532 - * wtf/MathExtras.h: - (clampToInteger): - (clampToPositiveInteger): + This patch distinguishes between public and private framework headers + so that public headers are copied into the Headers directory and + private headers are copied into the PrivateHeaders directory. -2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> + * gyp/JavaScriptCore.gyp: - Unreviewed, rolling out r77006 and r77020. - http://trac.webkit.org/changeset/77006 - http://trac.webkit.org/changeset/77020 - https://bugs.webkit.org/show_bug.cgi?id=53360 +2011-03-03 Geoffrey Garen <ggaren@apple.com> - "Broke Windows tests" (Requested by rniwa on #webkit). + Rolled out 80277 and 80280 because they caused event handler layout test + failures. - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::setPrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrivateProperty): - * API/JSWeakObjectMapRefInternal.h: * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::findScopedProperty): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/CallFrame.h: - (JSC::ExecState::exception): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::execute): - (JSC::Interpreter::tryCacheGetByID): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): - * runtime/ArgList.cpp: - (JSC::MarkedArgumentBuffer::markLists): - * runtime/Arguments.cpp: - (JSC::Arguments::markChildren): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: * runtime/Arguments.h: - (JSC::Arguments::setActivation): - (JSC::Arguments::Arguments): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/ConservativeSet.cpp: - (JSC::ConservativeSet::grow): - * runtime/ConservativeSet.h: - (JSC::ConservativeSet::~ConservativeSet): - (JSC::ConservativeSet::mark): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::getter): - (JSC::GetterSetter::setGetter): - (JSC::GetterSetter::setter): - (JSC::GetterSetter::setSetter): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::cachedGlobalObject): - * runtime/Heap.cpp: - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - (JSC::JSActivation::put): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): + * runtime/JSActivation.h: * runtime/JSCell.h: - (JSC::JSCell::JSValue::toThisObject): - (JSC::JSCell::MarkStack::append): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): - * runtime/JSGlobalData.h: * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): - (JSC::JSGlobalObject::markChildren): * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::regExpConstructor): - (JSC::JSGlobalObject::errorConstructor): - (JSC::JSGlobalObject::evalErrorConstructor): - (JSC::JSGlobalObject::rangeErrorConstructor): - (JSC::JSGlobalObject::referenceErrorConstructor): - (JSC::JSGlobalObject::syntaxErrorConstructor): - (JSC::JSGlobalObject::typeErrorConstructor): - (JSC::JSGlobalObject::URIErrorConstructor): - (JSC::JSGlobalObject::evalFunction): - (JSC::JSGlobalObject::objectPrototype): - (JSC::JSGlobalObject::functionPrototype): - (JSC::JSGlobalObject::arrayPrototype): - (JSC::JSGlobalObject::booleanPrototype): - (JSC::JSGlobalObject::stringPrototype): - (JSC::JSGlobalObject::numberPrototype): - (JSC::JSGlobalObject::datePrototype): - (JSC::JSGlobalObject::regExpPrototype): - (JSC::JSGlobalObject::methodCallDummy): - (JSC::Structure::prototypeForLookup): - (JSC::constructArray): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::object): - (JSC::Stringifier::markAggregate): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::callReviver): - (JSC::Walker::walk): * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::removeDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - (JSC::JSObject::getDirectOffset): - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::flattenDictionaryObject): - (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSValue::putDirect): - (JSC::JSObject::allocatePropertyStorageInline): - (JSC::JSObject::markChildrenDirect): - * runtime/JSPropertyNameIterator.cpp: - (JSC::JSPropertyNameIterator::JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::get): - * runtime/JSPropertyNameIterator.h: * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSString.cpp: - (JSC::StringObject::create): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MarkStack.h: - (JSC::MarkStack::appendValues): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - (JSC::resolveBase): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::setExistingProperty): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::base): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainIterator::operator*): - (JSC::ScopeChainIterator::operator->): - (JSC::ScopeChain::top): - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): - * runtime/SmallStrings.h: - (JSC::SmallStrings::emptyString): - (JSC::SmallStrings::singleCharacterString): - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::toDictionaryTransition): - (JSC::Structure::flattenDictionaryStructure): - * runtime/Structure.h: - (JSC::Structure::storedPrototype): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::isValid): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): - * runtime/WriteBarrier.h: Removed. - -2011-01-28 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=53352 - Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH(). - - The FixedVMPoolAllocator currently uses a best fix policy - - switch to first fit, this is less prone to external fragmentation. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::AllocationTableSizeClass::AllocationTableSizeClass): - (JSC::AllocationTableSizeClass::blockSize): - (JSC::AllocationTableSizeClass::blockCount): - (JSC::AllocationTableSizeClass::blockAlignment): - (JSC::AllocationTableSizeClass::size): - (JSC::AllocationTableLeaf::AllocationTableLeaf): - (JSC::AllocationTableLeaf::~AllocationTableLeaf): - (JSC::AllocationTableLeaf::allocate): - (JSC::AllocationTableLeaf::free): - (JSC::AllocationTableLeaf::isEmpty): - (JSC::AllocationTableLeaf::isFull): - (JSC::AllocationTableLeaf::size): - (JSC::AllocationTableLeaf::classForSize): - (JSC::AllocationTableLeaf::dump): - (JSC::LazyAllocationTable::LazyAllocationTable): - (JSC::LazyAllocationTable::~LazyAllocationTable): - (JSC::LazyAllocationTable::allocate): - (JSC::LazyAllocationTable::free): - (JSC::LazyAllocationTable::isEmpty): - (JSC::LazyAllocationTable::isFull): - (JSC::LazyAllocationTable::size): - (JSC::LazyAllocationTable::dump): - (JSC::LazyAllocationTable::classForSize): - (JSC::AllocationTableDirectory::AllocationTableDirectory): - (JSC::AllocationTableDirectory::~AllocationTableDirectory): - (JSC::AllocationTableDirectory::allocate): - (JSC::AllocationTableDirectory::free): - (JSC::AllocationTableDirectory::isEmpty): - (JSC::AllocationTableDirectory::isFull): - (JSC::AllocationTableDirectory::size): - (JSC::AllocationTableDirectory::classForSize): - (JSC::AllocationTableDirectory::dump): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::allocated): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::classForSize): - (JSC::FixedVMPoolAllocator::offsetToPointer): - (JSC::FixedVMPoolAllocator::pointerToOffset): - (JSC::ExecutableAllocator::committedByteCount): - (JSC::ExecutableAllocator::isValid): - (JSC::ExecutableAllocator::underMemoryPressure): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * wtf/PageReservation.h: - (WTF::PageReservation::PageReservation): - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::committed): - -2011-01-27 Oliver Hunt <oliver@apple.com> + * runtime/JSStaticScopeObject.h: + * runtime/JSVariableObject.h: + * runtime/MarkedSpace.cpp: + * runtime/MarkedSpace.h: - Reviewed by Geoffrey Garen. +2011-03-03 Kevin Ollivier <kevino@theolliviers.com> - Convert markstack to a slot visitor API - https://bugs.webkit.org/show_bug.cgi?id=53219 + [wx] Build fix. Alter order of headers included to make sure windows.h + is configured by wx, and skip Posix implementation file we don't use on Win. - Move the MarkStack over to a slot based marking API. + * wscript: + * wtf/wx/StringWx.cpp: - In order to avoiding aliasing concerns there are two new types - that need to be used when holding on to JSValues and JSCell that - need to be marked: WriteBarrier and DeprecatedPtr. WriteBarrier - is expected to be used for any JSValue or Cell that's lifetime and - marking is controlled by another GC object. DeprecatedPtr is used - for any value that we need to rework ownership for. +2011-03-03 Oliver Hunt <oliver@apple.com> - The change over to this model has produced a large amount of - code changes, but they are mostly mechanical (forwarding JSGlobalData, - etc). + Reviewed by Geoffrey Garen. + + JSVariableObject needs to use WriteBarrier for symboltable property storage + https://bugs.webkit.org/show_bug.cgi?id=55698 + + Replace the direct usage of Register in JSVariableObject (and descendents) + with WriteBarrier. This requires updating the Arguments object to use + WriteBarrier as well. - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): - (JSC::JSCallbackObject::setPrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::put): - (JSC::::staticFunctionGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeConstructor): - (JSObjectSetPrivateProperty): - * API/JSWeakObjectMapRefInternal.h: - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): - (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): - (JSC::BytecodeGenerator::findScopedProperty): - * debugger/DebuggerActivation.cpp: - (JSC::DebuggerActivation::DebuggerActivation): - (JSC::DebuggerActivation::markChildren): - * debugger/DebuggerActivation.h: * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::execute): (JSC::Interpreter::privateExecute): - * interpreter/Register.h: - (JSC::Register::jsValueSlot): + (JSC::Interpreter::retrieveArguments): * jit/JITStubs.cpp: - (JSC::JITThunks::tryCacheGetByID): (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (GlobalObject::GlobalObject): + * runtime/ArgList.h: + (JSC::MarkedArgumentBuffer::initialize): * runtime/Arguments.cpp: (JSC::Arguments::markChildren): + (JSC::Arguments::copyToRegisters): + (JSC::Arguments::fillArgList): (JSC::Arguments::getOwnPropertySlot): (JSC::Arguments::getOwnPropertyDescriptor): (JSC::Arguments::put): * runtime/Arguments.h: (JSC::Arguments::setActivation): (JSC::Arguments::Arguments): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): - * runtime/BatchedTransitionOptimizer.h: - (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): - (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - (JSC::constructBoolean): - (JSC::constructBooleanFromImmediateBoolean): - * runtime/BooleanPrototype.cpp: - (JSC::BooleanPrototype::BooleanPrototype): - * runtime/ConservativeSet.h: - (JSC::ConservativeSet::mark): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/GetterSetter.cpp: - (JSC::GetterSetter::markChildren): - * runtime/GetterSetter.h: - (JSC::GetterSetter::GetterSetter): - (JSC::GetterSetter::getter): - (JSC::GetterSetter::setGetter): - (JSC::GetterSetter::setter): - (JSC::GetterSetter::setSetter): - * runtime/GlobalEvalFunction.cpp: - (JSC::GlobalEvalFunction::GlobalEvalFunction): - (JSC::GlobalEvalFunction::markChildren): - * runtime/GlobalEvalFunction.h: - (JSC::GlobalEvalFunction::cachedGlobalObject): - * runtime/Heap.cpp: - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::InternalFunction): - * runtime/JSAPIValueWrapper.h: - (JSC::JSAPIValueWrapper::value): - (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + (JSC::Arguments::copyRegisters): + (JSC::JSActivation::copyRegisters): * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::symbolTableGet): + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::symbolTablePutWithAttributes): (JSC::JSActivation::put): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSCell.h: - (JSC::JSCell::MarkStack::append): - (JSC::JSCell::MarkStack::appendCell): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSActivation::putWithAttributes): + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: * runtime/JSGlobalObject.cpp: - (JSC::markIfNeeded): - (JSC::JSGlobalObject::reset): - (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::put): + (JSC::JSGlobalObject::putWithAttributes): (JSC::JSGlobalObject::markChildren): + (JSC::JSGlobalObject::copyGlobalsFrom): + (JSC::JSGlobalObject::copyGlobalsTo): + (JSC::JSGlobalObject::resizeRegisters): * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::regExpConstructor): - (JSC::JSGlobalObject::errorConstructor): - (JSC::JSGlobalObject::evalErrorConstructor): - (JSC::JSGlobalObject::rangeErrorConstructor): - (JSC::JSGlobalObject::referenceErrorConstructor): - (JSC::JSGlobalObject::syntaxErrorConstructor): - (JSC::JSGlobalObject::typeErrorConstructor): - (JSC::JSGlobalObject::URIErrorConstructor): - (JSC::JSGlobalObject::evalFunction): - (JSC::JSGlobalObject::objectPrototype): - (JSC::JSGlobalObject::functionPrototype): - (JSC::JSGlobalObject::arrayPrototype): - (JSC::JSGlobalObject::booleanPrototype): - (JSC::JSGlobalObject::stringPrototype): - (JSC::JSGlobalObject::numberPrototype): - (JSC::JSGlobalObject::datePrototype): - (JSC::JSGlobalObject::regExpPrototype): - (JSC::JSGlobalObject::methodCallDummy): - (JSC::constructArray): - * runtime/JSONObject.cpp: - (JSC::Stringifier::Holder::object): - (JSC::Stringifier::Holder::objectSlot): - (JSC::Stringifier::markAggregate): - (JSC::Stringifier::stringify): - (JSC::Stringifier::Holder::appendNextProperty): - (JSC::Walker::callReviver): - (JSC::Walker::walk): - * runtime/JSObject.cpp: - (JSC::JSObject::defineGetter): - (JSC::JSObject::defineSetter): - (JSC::JSObject::removeDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - (JSC::JSObject::putDirectOffset): - (JSC::JSObject::putUndefinedAtDirectOffset): - (JSC::JSObject::flattenDictionaryObject): - (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSObject::putDirectFunction): - (JSC::JSObject::putDirectWithoutTransition): - (JSC::JSObject::putDirectFunctionWithoutTransition): - (JSC::JSValue::putDirect): - (JSC::JSObject::allocatePropertyStorageInline): - (JSC::JSObject::markChildrenDirect): + (JSC::JSGlobalObject::setRegisters): + (JSC::JSGlobalObject::addStaticGlobals): * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::markChildren): - * runtime/JSString.cpp: - (JSC::StringObject::create): - * runtime/JSValue.h: - * runtime/JSWrapperObject.cpp: - (JSC::JSWrapperObject::markChildren): - * runtime/JSWrapperObject.h: - (JSC::JSWrapperObject::internalValue): - (JSC::JSWrapperObject::setInternalValue): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - (JSC::lookupPut): - * runtime/MarkStack.h: - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NativeErrorPrototype.cpp: - (JSC::NativeErrorPrototype::NativeErrorPrototype): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::constructWithNumberConstructor): - * runtime/NumberObject.cpp: - (JSC::constructNumber): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - (JSC::objectConstructorGetOwnPropertyDescriptor): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - (JSC::resolveBase): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::setExistingProperty): - (JSC::PutPropertySlot::setNewProperty): - (JSC::PutPropertySlot::base): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/ScopeChain.h: - (JSC::ScopeChainNode::~ScopeChainNode): - (JSC::ScopeChainIterator::operator*): - (JSC::ScopeChainIterator::operator->): - (JSC::ScopeChain::top): - * runtime/ScopeChainMark.h: - (JSC::ScopeChain::markAggregate): - * runtime/SmallStrings.cpp: - (JSC::isMarked): - (JSC::SmallStrings::markChildren): - * runtime/SmallStrings.h: - (JSC::SmallStrings::emptyString): - (JSC::SmallStrings::singleCharacterString): - (JSC::SmallStrings::singleCharacterStrings): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringObject.cpp: - (JSC::StringObject::StringObject): - * runtime/StringObject.h: - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - * runtime/Structure.cpp: - (JSC::Structure::flattenDictionaryStructure): - * runtime/Structure.h: - (JSC::Structure::storedPrototypeSlot): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::uncheckedGet): - (JSC::WeakGCMap::uncheckedGetSlot): - (JSC::::get): - (JSC::::take): - (JSC::::set): - (JSC::::uncheckedRemove): - * runtime/WriteBarrier.h: Added. - (JSC::DeprecatedPtr::DeprecatedPtr): - (JSC::DeprecatedPtr::get): - (JSC::DeprecatedPtr::operator*): - (JSC::DeprecatedPtr::operator->): - (JSC::DeprecatedPtr::slot): - (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): - (JSC::DeprecatedPtr::operator!): - (JSC::WriteBarrierBase::set): - (JSC::WriteBarrierBase::get): - (JSC::WriteBarrierBase::operator*): - (JSC::WriteBarrierBase::operator->): - (JSC::WriteBarrierBase::slot): - (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): - (JSC::WriteBarrierBase::operator!): - (JSC::WriteBarrier::WriteBarrier): - (JSC::operator==): - -2011-01-28 Adam Roben <aroben@apple.com> - - Chromium build fix after r76967 - - * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other - similar macros in this file. - -2011-01-28 Michael Saboff <msaboff@apple.com> - - Potentially Unsafe HashSet of RuntimeObject* in RootObject definition - https://bugs.webkit.org/show_bug.cgi?id=53271 - - Reapplying this this change. No change from prior patch in - JavaScriptCore. - - Added new isValid() methods to check if a contained object in - a WeakGCMap is valid when using an unchecked iterator. - - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::isValid): - -2011-01-27 Adam Roben <aroben@apple.com> - - Extract code to convert a WTF absolute time to a Win32 wait interval into a separate - function - - Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a - Win32 event - - Reviewed by Dave Hyatt. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function. - - * wtf/ThreadingPrimitives.h: Declare the new function. - - * wtf/ThreadingWin.cpp: - (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait - interval from here... - (WTF::absoluteTimeToWaitTimeoutInterval): ...to here. - -2011-01-28 Sam Weinig <sam@webkit.org> - - Reviewed by Maciej Stachowiak. - - Add basic rubber banding support - <rdar://problem/8219429> - https://bugs.webkit.org/show_bug.cgi?id=53277 - - * wtf/Platform.h: Add ENABLE for rubber banding. - -2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r76893. - http://trac.webkit.org/changeset/76893 - https://bugs.webkit.org/show_bug.cgi?id=53287 - - It made some tests crash on GTK and Qt debug bots (Requested - by Ossy on #webkit). - - * runtime/WeakGCMap.h: - -2011-01-27 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Add WTFString method to compare equality with Vector<UChar> - https://bugs.webkit.org/show_bug.cgi?id=53266 - - I'm planning to use this method in the new XSS filter implementation, - but it seems generally useful. - - * wtf/text/StringImpl.h: - (WTF::equalIgnoringNullity): - * wtf/text/WTFString.h: - (WTF::equalIgnoringNullity): - -2011-01-27 Michael Saboff <msaboff@apple.com> - - Potentially Unsafe HashSet of RuntimeObject* in RootObject definition - https://bugs.webkit.org/show_bug.cgi?id=53271 - - Added new isValid() methods to check if a contained object in - a WeakGCMap is valid when using an unchecked iterator. - - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::isValid): - -2011-01-26 Sam Weinig <sam@webkit.org> - - Reviewed by Maciej Stachowiak. - - Add events to represent the start/end of a gesture scroll - https://bugs.webkit.org/show_bug.cgi?id=53215 - - * wtf/Platform.h: Add ENABLE for gesture events. - -2011-01-26 Yael Aharon <yael.aharon@nokia.com> - - Reviewed by Laszlo Gombos. - - [Qt][Symbian] Fix --minimal build - https://bugs.webkit.org/show_bug.cgi?id=52839 - - Move definition of USE_SYSTEM_MALLOC out of pri file. - Put it in platform.h instead. - - * wtf/Platform.h: - * wtf/TCSystemAlloc.cpp: - * wtf/wtf.pri: - -2011-01-26 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - [WINCE] Add JIT support to build system - https://bugs.webkit.org/show_bug.cgi?id=53079 - - * CMakeListsWinCE.txt: - -2011-01-25 Adam Roben <aroben@apple.com> - - Windows Production build fix - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start - of the file so that ConfigurationBuildDir takes that into account. Also set it the right way - (by redefining the macro) rather than the wrong way (by modifying the environment variable). - -2011-01-25 Steve Falkenburg <sfalken@apple.com> - - Rubber-stamped by Adam Roben. - - Windows production build fix. - Use correct environment variable escaping - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2011-01-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - JSON.stringify processing time exponentially grows with size of object - https://bugs.webkit.org/show_bug.cgi?id=51922 - - Remove last use of reserveCapacity from JSON stringification, as it results - in appalling append behaviour when there are a large number of property names - and nothing else. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendQuotedString): - -2011-01-25 Antti Koivisto <antti@apple.com> - - Not reviewed. - - Try to fix windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2011-01-25 Antti Koivisto <antti@apple.com> - - Reviewed by Oliver Hunt. - - REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector() - https://bugs.webkit.org/show_bug.cgi?id=53061 - - Cache did not know about the subclass so failed to fully delete the items. - Got rid of the subclass and moved the classes to separate files. - - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * parser/JSParser.cpp: - (JSC::JSParser::Scope::saveFunctionInfo): - (JSC::JSParser::Scope::restoreFunctionInfo): - (JSC::JSParser::findCachedFunctionInfo): - (JSC::JSParser::parseFunctionInfo): - * parser/SourceProvider.h: - * parser/SourceProviderCache.cpp: Added. - (JSC::SourceProviderCache::~SourceProviderCache): - (JSC::SourceProviderCache::byteSize): - * parser/SourceProviderCache.h: Added. - (JSC::SourceProviderCache::SourceProviderCache): - (JSC::SourceProviderCache::add): - (JSC::SourceProviderCache::get): - * parser/SourceProviderCacheItem.h: Added. - (JSC::SourceProviderCacheItem::SourceProviderCacheItem): - (JSC::SourceProviderCacheItem::approximateByteSize): - (JSC::SourceProviderCacheItem::closeBraceToken): - -2011-01-25 Marcilio Mendonca <mamendonca@rim.com> - - Reviewed by Darin Adler. - - Bug 53087: Refactoring: replaced a hanging "else" with a "return" - statement - https://bugs.webkit.org/show_bug.cgi?id=53087. - - Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M - with a "return" so that the code is more readable and less error pro - (e.g., "else" doesn't use braces so adding extra lines to the else - block won't have any effect; even worse, code still compiles - successfully. - - * wtf/Assertions.cpp: - -2011-01-24 Chris Marrin <cmarrin@apple.com> - - Reviewed by Eric Seidel. - - Change ENABLE_3D_CANVAS to ENABLE_WEBGL - https://bugs.webkit.org/show_bug.cgi?id=53041 - - * Configurations/FeatureDefines.xcconfig: - -2011-01-25 Adam Roben <aroben@apple.com> - - Windows Production build fix - - * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set". - -2011-01-25 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Eric Seidel. - - Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2) - https://bugs.webkit.org/show_bug.cgi?id=52949 - - * jit/JITStubs.cpp: - -2011-01-24 Adam Roben <aroben@apple.com> - - Windows Production build fix - - * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source. - -2011-01-24 Peter Varga <pvarga@webkit.org> - - Reviewed by Oliver Hunt. - - Optimize regex patterns which contain empty alternatives - https://bugs.webkit.org/show_bug.cgi?id=51395 - - Eliminate the empty alternatives from the regex pattern and convert it to do - the matching in an easier way. - - * yarr/YarrPattern.cpp: - (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): - -2011-01-24 Andras Becsi <abecsi@webkit.org> - - Reviewed by Csaba Osztrogonác. - - [Qt] Move project files into Source - https://bugs.webkit.org/show_bug.cgi?id=52891 - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - * jsc.pro: + (JSC::JSStaticScopeObject::put): + (JSC::JSStaticScopeObject::putWithAttributes): + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::symbolTableGet): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::registerAt): + (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData): + (JSC::JSVariableObject::symbolTableGet): + (JSC::JSVariableObject::symbolTablePut): + (JSC::JSVariableObject::symbolTablePutWithAttributes): + (JSC::JSVariableObject::copyRegisterArray): + (JSC::JSVariableObject::setRegisters): -2011-01-23 Mark Rowe <mrowe@apple.com> +2011-03-03 Geoffrey Garen <ggaren@apple.com> - Follow-up to r76477. + Try to fix Windows build. - Fix the scripts that detect problematic code such as static initializers - and destructors, weak vtables, inappropriate files in the framework wrappers, - and public headers including private headers. These had all been broken - since the projects were moved in to the Source directory as the paths to the - scripts were not updated at that time. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol. - * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function + inline -- it's virtual. -2011-01-23 Patrick Gansterer <paroga@webkit.org> +2011-03-02 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. - Use WTF::StringHasher in WebCore - https://bugs.webkit.org/show_bug.cgi?id=52934 - - Add an additional function to calculate the hash - of data with a runtimedependent size. - - * wtf/StringHasher.h: - (WTF::StringHasher::createBlobHash): - -2011-01-23 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Fix comment in String::ascii() - https://bugs.webkit.org/show_bug.cgi?id=52980 - - * wtf/text/WTFString.cpp: - (WTF::String::ascii): - -2011-01-23 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Add String::containsOnlyLatin1() - https://bugs.webkit.org/show_bug.cgi?id=52979 - - * wtf/text/WTFString.h: - (WTF::String::containsOnlyLatin1): - (WTF::charactersAreAllLatin1): - -2011-01-23 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Oliver Hunt. - - Remove obsolete JSVALUE32 code - https://bugs.webkit.org/show_bug.cgi?id=52948 - - r70111 removed support for JSVALUE32. - ARM, MIPS and X86 support JSVALUE32_64 only. - - * jit/JITStubs.cpp: - -2011-01-22 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Dan Bernstein. - - ASSERT running run-webkit-tests --threaded. - https://bugs.webkit.org/show_bug.cgi?id=52971 - - SunSpider and v8 report no change. - - * runtime/ConservativeSet.cpp: - (JSC::ConservativeSet::grow): - (JSC::ConservativeSet::add): - * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and - the growth policy to 2X, to make SunSpider and v8 happy. - (JSC::ConservativeSet::ConservativeSet): - (JSC::ConservativeSet::~ConservativeSet): - (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc. - Malloc is forbidden during a multi-threaded mark phase because it can - cause deadlock. - -2011-01-22 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Geoffrey Garen. - - Rubber-stamped by Maciej Stachowiak. + Moved all variable object storage inline -- upping the object size limit to 1K + https://bugs.webkit.org/show_bug.cgi?id=55653 - A few of Maciej's review suggestions for my last patch. - https://bugs.webkit.org/show_bug.cgi?id=52946 - - SunSpider reports no change. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems. - - * runtime/ConservativeSet.cpp: Added. - (JSC::isPointerAligned): - (JSC::ConservativeSet::add): - * runtime/ConservativeSet.h: Added. - (JSC::ConservativeSet::ConservativeSet): - (JSC::ConservativeSet::mark): Split ConservativeSet out into its own - file, and moved the conservative check into ConservativeSet::add, making - ConservativeSet's responsibility clearer. - - * runtime/Heap.cpp: - (JSC::Heap::markRoots): - * runtime/MachineStackMarker.cpp: - (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): - (JSC::MachineStackMarker::markOtherThreadConservatively): - * runtime/MachineStackMarker.h: - * runtime/MarkStack.h: Updated for changes above. - -2011-01-22 Patrick Gansterer <paroga@webkit.org> - - Unreviewed WinCE build fix for r76430. - - * runtime/MachineStackMarker.cpp: - (JSC::swapIfBackwards): - -2011-01-21 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Beth Dakin. - - Reorganized MarkedSpace, making many of its functions private. + * JavaScriptCore.exp: + * bytecompiler/BytecodeGenerator.cpp: + * jit/JITOpcodes.cpp: + * runtime/Arguments.h: + * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_. * runtime/JSCell.h: - (JSC::JSCell::Heap::heap): - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::globalData): - (JSC::MarkedSpace::heap): - -2011-01-21 Geoffrey Garen <ggaren@apple.com> - - Try to fix build: moved helper function out of #ifdef. - - * runtime/MachineStackMarker.cpp: - (JSC::swapIfBackwards): - -2011-01-21 Geoffrey Garen <ggaren@apple.com> - - Rubber-stamped by Maciej Stachowiak. - - A few of Maciej's review suggestions for my last patch. - https://bugs.webkit.org/show_bug.cgi?id=52946 - - SunSpider reports no change. - - * runtime/MachineStackMarker.cpp: - (JSC::swapIfBackwards): Added a helper function for handling platforms - where the stack can grow in any direction. - - (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): - (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper - function. - - (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to. - - (JSC::MachineStackMarker::markConservatively): Changed to use a more - standard looping idiom, and to use the helper function above. - - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to. - -2011-01-21 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Cleaned up some conservative marking code. - https://bugs.webkit.org/show_bug.cgi?id=52946 - - SunSpider reports no change. - - * interpreter/RegisterFile.h: No need for a special marking function, - since we already expose a start() and end(). - - * runtime/Heap.cpp: - (JSC::Heap::registerFile): - (JSC::Heap::markRoots): - * runtime/Heap.h: - (JSC::Heap::contains): Migrated markConservatively() to the machine stack - marker class. Now, Heap just provides a contains() function, which the - machine stack marker uses for checking whether a pointer points into the heap. - - * runtime/MachineStackMarker.cpp: - (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): - (JSC::MachineStackMarker::markOtherThreadConservatively): - (JSC::isPointerAligned): - (JSC::MachineStackMarker::markConservatively): - * runtime/MachineStackMarker.h: Move the conservative marking code here. - - * runtime/MarkStack.h: - (JSC::ConservativeSet::add): - (JSC::ConservativeSet::mark): Changed to using a vector instead of hash - set. Vector seems to be a bit faster, and it generates smaller code. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::containsSlowCase): - * runtime/MarkedSpace.h: - (JSC::MarkedSpace::isCellAligned): - (JSC::MarkedSpace::isPossibleCell): - (JSC::MarkedSpace::contains): Kept the code for determining whether a - pointer pointed into marked space, and moved the code for marking - a set of conservative pointers into the machine stack marker. - - * wtf/HashSet.h: - (WTF::::add): Added two missing inlines that I noticed while testing - vector vs hash set. - -2011-01-21 Mark Rowe <mrowe@apple.com> - - Reviewed by Sam Weinig. - - Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access - control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool". - - * wtf/PageAllocation.h: - (WTF::PageAllocation::operator bool): - * wtf/PageReservation.h: - (WTF::PageReservation::operator bool): - -2011-01-21 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - [RegexFuzz] Hang with forward assertion - https://bugs.webkit.org/show_bug.cgi?id=52825 - <rdar://problem/8894332> - - The backtrackTo label from the first term in a list of terms is - being overwritten by processing of subsequent terms. Changed - copyBacktrackToLabel() to check for an existing bcaktrackTo label - before copying and renamed it to propagateBacktrackToLabel() since - it no longer copies. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel): - (JSC::Yarr::YarrGenerator::generateParenthesesSingle): - -2011-01-21 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Moved the mark stack from global data to the heap, since it pertains - to the heap, and not the virtual machine as a whole. - https://bugs.webkit.org/show_bug.cgi?id=52930 - - SunSpider reports no change. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::markRoots): - * runtime/Heap.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - -2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu> - - Reviewed by Darin Adler. - - REGRESSION(r76177): All JavaScriptCore tests fail on ARM - https://bugs.webkit.org/show_bug.cgi?id=52814 - - Get the approximateByteSize value before releasing the OwnPtr. - - * parser/JSParser.cpp: - (JSC::JSParser::parseFunctionInfo): - -2011-01-21 Xan Lopez <xlopez@igalia.com> - - Reviewed by Martin Robinson. - - Remove unnecessary <stdio.h> include - https://bugs.webkit.org/show_bug.cgi?id=52884 - - * jit/JIT.cpp: remove unnecessary include. - -2011-01-20 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Maciej Stachowiak. - - Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr. - - * wtf/OwnArrayPtr.h: - -2011-01-20 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Oliver Hunt. - - [WINCE] Remove obsolete JSVALUE32 code - https://bugs.webkit.org/show_bug.cgi?id=52450 - - Remove the "offset hack" in create_jit_stubs, since we - only support JSVALUE32_64 in the meantime. - - * create_jit_stubs: Removed offset argument - * jit/JITStubs.cpp: - -2011-01-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - When marking conservatively, guard against reviving dead objects. - https://bugs.webkit.org/show_bug.cgi?id=52840 - - SunSpider and v8 say no change. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API. - - * runtime/Heap.cpp: - (JSC::Heap::recordExtraCost): No need to guard against conservative - marking reviving dead objects anymore, since the conservative marking - mechanism guards against this now. - - (JSC::Heap::markConservatively): - (JSC::Heap::markProtectedObjects): - (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a - marking function. We want to establish a separation of concerns between - visiting roots and draining the mark stack. - - (JSC::Heap::markRoots): Gather the set of conservative references before - clearning mark bits, because conservative marking now uses the mark bits - to determine if a reference is valid, and avoid reviving dead objects. - - (JSC::Heap::collectAllGarbage): No need to guard against conservative - marking reviving dead objects anymore, since the conservative marking - mechanism guards against this now. - - * runtime/Heap.h: Updated to use the ConservativeSet API. - - * runtime/MachineStackMarker.cpp: - (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): - (JSC::MachineStackMarker::markCurrentThreadConservatively): - (JSC::MachineStackMarker::markOtherThreadConservatively): - (JSC::MachineStackMarker::markMachineStackConservatively): - * runtime/MachineStackMarker.h: Ditto. - - * runtime/MarkStack.h: - (JSC::ConservativeSet::add): - (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the - set of conservative references. This is different from MarkStack, since - we don't mark the set until it is completely gathered. - - * runtime/MarkedSpace.cpp: - (JSC::MarkedSpace::freeBlock): - (JSC::MarkedSpace::resizeBlocks): - (JSC::MarkedSpace::markConservatively): - * runtime/MarkedSpace.h: When marking conservatively, guard against - reviving dead objects. - -2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com> - - Reviewed by Geoffrey Garen. - - [Symbian] Fix StackBounds::initialize() - https://bugs.webkit.org/show_bug.cgi?id=52842 - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit + (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class + to accomodate objects up to 1K. -2011-01-20 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773) - https://bugs.webkit.org/show_bug.cgi?id=52773 - - Fixed case where an existing DataLabelPtr is overwritten. The - replacing DataLabelPtr is now resolved immediately in - linkDataLabelToBacktrackIfExists(). Cleanup - eliminated bool - return value for the routine as it was never used. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): - -2011-01-20 Andras Becsi <abecsi@webkit.org> - - Reviewed by Csaba Osztrogonác. - - [Qt][WK2] WebKit2 enabled build fails to link - - Work around undefined reference linking issues until the buildsystem gets redesigned. - These issues first occured in minimal builds (see BUG 50519). - - * JavaScriptCore.pri: link as whole-archive for WebKit2 builds - -2011-01-20 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Csaba Osztrogonác. - - Refactoring of the custom allocation framework - https://bugs.webkit.org/show_bug.cgi?id=49897 - - Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589). - The modification replaces Noncopyable and FastAllocBase classes and these inherits with their - equivalent macro implementation at the necessary places. - - * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro. - -2011-01-20 Mark Rowe <mrowe@apple.com> - - Reviewed by Maciej Stachowiak. - - Follow-up to r75766 / <rdar://problem/5469576>. - - We were failing to initialize the key, causing all sorts of unexpected behavior. - - * wtf/FastMalloc.cpp: - (WTF::setThreadHeap): - (WTF::TCMalloc_ThreadCache::GetThreadHeap): - (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized. - -2011-01-18 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Darin Adler. - - Rolled back in r76078, with crash fixed. - https://bugs.webkit.org/show_bug.cgi?id=52668 - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::markChildren): Account for the fact that the global - object moves its variables into and out of the register file. While out - of the register file, the symbol table's size is not an accurate count - for the size of the register array, since the BytecodeGenerator might - be compiling, adding items to the symbol table. - -2011-01-18 Darin Adler <darin@apple.com> + * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_. - Reviewed by Geoffrey Garen. - - Stack overflow when converting an Error object to string - https://bugs.webkit.org/show_bug.cgi?id=46410 + * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum + object size, since it doesn't anymore. - * Android.mk: Added StringRecursionChecker.cpp and - StringRecursionChecker.h. - * CMakeLists.txt: Ditto. - * GNUmakefile.am: Ditto. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.pro: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead - of the older hand-written code to do the same thing. - (JSC::arrayProtoFuncToLocaleString): Ditto. - (JSC::arrayProtoFuncJoin): Ditto. - - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): Use StringRecursionChecker. - - * runtime/JSGlobalData.h: Renamed arrayVisitedElements to - stringRecursionCheckVisitedObjects. - - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): Use StringRecursionChecker. - - * runtime/StringRecursionChecker.cpp: Added. - * runtime/StringRecursionChecker.h: Added. - -2011-01-19 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Remove non-spec support for callable RegExp - https://bugs.webkit.org/show_bug.cgi?id=28285 - - Remove support for callable regexps. If it breaks sites we can - just roll this out. - - * runtime/RegExpObject.cpp: - * runtime/RegExpObject.h: - * tests/mozilla/expected.html: update results. - -2011-01-19 Antti Koivisto <antti@apple.com> - - Reviewed by Oliver Hunt. - - Cache function offsets to speed up javascript parsing - https://bugs.webkit.org/show_bug.cgi?id=52622 - - Use cache to save function offsets and some other info. - This avoids quite a bit of work when reparsing the source. - - * parser/ASTBuilder.h: - * parser/JSParser.cpp: - (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo): - (JSC::JSParser::CachedFunctionInfo::approximateByteSize): - (JSC::JSParser::CachedFunctionInfo::closeBraceToken): - (JSC::JSParser::Scope::copyCapturedVariablesToVector): - (JSC::JSParser::Scope::saveFunctionInfo): - (JSC::JSParser::Scope::restoreFunctionInfo): - (JSC::JSParser::findCachedFunctionInfo): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseFunctionInfo): - * parser/Lexer.h: - (JSC::Lexer::setOffset): - (JSC::Lexer::setLineNumber): - (JSC::Lexer::sourceProvider): - * parser/SourceProvider.h: - (JSC::SourceProviderCache::SourceProviderCache): - (JSC::SourceProviderCache::~SourceProviderCache): - (JSC::SourceProviderCache::byteSize): - (JSC::SourceProviderCache::add): - (JSC::SourceProviderCache::get): - (JSC::SourceProvider::SourceProvider): - (JSC::SourceProvider::~SourceProvider): - (JSC::SourceProvider::cache): - (JSC::SourceProvider::notifyCacheSizeChanged): - (JSC::SourceProvider::cacheSizeChanged): - * parser/SyntaxChecker.h: - -2011-01-19 Mark Rowe <mrowe@apple.com> - - Reviewed by Darin Adler. - - Follow-up to r75766 / <rdar://problem/5469576>. - - * DerivedSources.make: Evaluate the SDKROOT variable correctly. - -2011-01-19 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion - https://bugs.webkit.org/show_bug.cgi?id=52672 - - Rather than coming up with a somewhat convoluted mechanism to ensure that - developers can override the global objects prototype with a function named - __proto__ and expect it to work, we just disallow it at the syntax level. - - * parser/JSParser.cpp: - (JSC::JSParser::parseFunctionInfo): - -2011-01-19 Michael Saboff <msaboff@apple.com> - - Reviewed by Darin Adler. - - <rdar://problem/8882994> Regression: Simple nested backtrack hangs - https://bugs.webkit.org/show_bug.cgi?id=52675 - - The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540 - broke simple backtracking in some cases. Reworked that change to - link both jumps and labels. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel): - (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom): - (JSC::Yarr::YarrGenerator::generateParenthesesSingle): - -2011-01-19 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: [JSC] scripts have incorrect starting line (always 1). - https://bugs.webkit.org/show_bug.cgi?id=52721 - - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): - * debugger/Debugger.h: - * parser/Parser.h: - (JSC::Parser::parse): - * parser/SourceCode.h: - (JSC::SourceCode::SourceCode): - * parser/SourceProvider.h: - (JSC::SourceProvider::startPosition): - -2011-01-19 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Laszlo Gombos and Tor Arne Vestbø. - - [Qt] Remove unnecessary "../Source" from paths - after moving source files into Source is finished. - - * JavaScriptCore.pri: - -2011-01-19 Benjamin Kalman <kalman@chromium.org> - - Reviewed by Darin Adler. - - Don't return void from void function String::split - https://bugs.webkit.org/show_bug.cgi?id=52684 - - * wtf/text/WTFString.cpp: - (WTF::String::split): - -2011-01-18 Kenneth Russell <kbr@google.com> - - Unreviewed, rolling out r76078. - http://trac.webkit.org/changeset/76078 - https://bugs.webkit.org/show_bug.cgi?id=52668 - - Caused crashes of fast/canvas/webgl/constants.html, - fast/canvas/webgl/gl-enum-tests.html, and possibly other layout - test crashes in Release mode. WebGL crashes were observed with - "run-webkit-tests fast/canvas/webgl". It was necessary to run - multiple tests to provoke the crash. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::markGlobals): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::markChildren): - -2011-01-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden - https://bugs.webkit.org/show_bug.cgi?id=52690 - - Clean up code to retrieve arguments from activation and function objects. - Remove the incorrect assertion from JSActivation's argumentsGetter. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::retrieveArguments): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - -2011-01-18 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Darin Adler. - - Removed RegisterFile::markGlobals because it was obtuse, and it - unnecessarily relied on conservative marking. - https://bugs.webkit.org/show_bug.cgi?id=52668 - - * interpreter/RegisterFile.h: Removed markGlobals. - - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): Added a comment explaning why some - JSActivations don't always mark their registers arrays. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark - the registers array directly. - -2011-01-18 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540) - https://bugs.webkit.org/show_bug.cgi?id=52540 - https://bugs.webkit.org/show_bug.cgi?id=52662 - - Directly use backtrack label with parentheses nested under a - non-capturing parentheses. Also linked current parentheses - tail code object for possible parens nested within a non-capturing - parentheses. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel): - (JSC::Yarr::YarrGenerator::generateParenthesesSingle): - -2011-01-18 Daniel Bates <dbates@rim.com> - - Reviewed by Gavin Barraclough. - - Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS - https://bugs.webkit.org/show_bug.cgi?id=52517 - - Patch by David Tapuska - - Currently, we compile code with respect to the Symbian-specific moving memory model - assumption for all ARMv5 or lower architectures. Instead, we should only compile - such code when building for Symbian OS on those architectures because this model - is Symbian-specific. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::intializePageSize): - -2011-01-18 Dimitry Andric <dim@freebsd.org> - - Reviewed by Andreas Kling. - - Fix linking JavaScriptCore on FreeBSD/amd64 - https://bugs.webkit.org/show_bug.cgi?id=52591 - - Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as - in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker - complains about the relocation type. - - * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux - and FreeBSD. - -2011-01-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Antti Koivisto. - - [jsfunfuzz] Assertion in codegen for array of NaN constants - https://bugs.webkit.org/show_bug.cgi?id=52643 - - Don't cache NaN literals in the code generator, as NaN doesn't compare - as equal to itself it causes problems when rehashing the number cache. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - -2011-01-17 Jarred Nicholls <jarred@sencha.com> - - Reviewed by Csaba Osztrogonác. - - REGRESSION(r75709): Return value of fscanf() shouldn't be ignored. - https://bugs.webkit.org/show_bug.cgi?id=52585 - - gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check - the return value to get around the gcc warning - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::maybeModifyVMPoolSize): - -2011-01-17 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - [regexfuzz] Crash running regex with lookahead - https://bugs.webkit.org/show_bug.cgi?id=52548 - - Eliminated agressive chaining of backtracks. This code was overwriting - already valid backtrack information. - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks): - -2011-01-17 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Alexey Proskuryakov. - - Fix some headers with missing or misspelled #ifndef guards - https://bugs.webkit.org/show_bug.cgi?id=52545 - - * wtf/RefPtrHashMap.h: - -2011-01-17 Dan Bernstein <mitz@apple.com> - - Rubber-stamped by Mark Rowe. - - Update xcodeproj svn:ignore to include xcuserdata. - - * JavaScriptCore.xcodeproj: Modified property svn:ignore. - -2011-01-16 Adam Barth <abarth@webkit.org> - - Rubber-stamped by Eric Seidel. - - Move WebKit into Source - https://bugs.webkit.org/show_bug.cgi?id=52530 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2011-01-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - [jsfunfuzz] Parser doesn't correctly validate for-loop syntax - https://bugs.webkit.org/show_bug.cgi?id=52516 - - Ensure that we always check for a semicolon after encountering - multiple declarations in the initialiser portion of a for-loop. - - * parser/JSParser.cpp: - (JSC::JSParser::parseForStatement): - -2011-01-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Strict mode restrictions on arguments and eval usage aren't complete - https://bugs.webkit.org/show_bug.cgi?id=52528 - - Fix a few bugs in strict mode where we incorrect allow mutation of - arguments and eval in the parser. - - Alas the "optimisation" used by the syntax checker for validating - binary and unary expressions was too aggressive: we do actually need - a stack for operations and operands although it needn't be as complete - as that used for the full AST builder. - - Also disallow assignment to arguments in all cases as allowing arguments - to be assignable is always an error in strict mode, regardless of context. - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::BinaryExprContext::BinaryExprContext): - (JSC::ASTBuilder::UnaryExprContext::UnaryExprContext): - * parser/JSParser.cpp: - (JSC::JSParser::parseAssignmentExpression): - (JSC::JSParser::parseBinaryExpression): - (JSC::JSParser::parseUnaryExpression): - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext): - (JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext): - (JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext): - (JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext): - (JSC::SyntaxChecker::appendBinaryExpressionInfo): - (JSC::SyntaxChecker::operatorStackPop): - -2011-01-15 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Rolled back in r75886. - https://bugs.webkit.org/show_bug.cgi?id=52527 - - r75886 broke the GTK Linux bot because Linux was -- quite surprisingly -- - set up to use the constants for embedded devices. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded - constants. - -2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r75886. - http://trac.webkit.org/changeset/75886 - https://bugs.webkit.org/show_bug.cgi?id=52526 - - "Broke GTK+ 64bit" (Requested by xan_ on #webkit). - - * jit/ExecutableAllocatorFixedVMPool.cpp: - -2011-01-15 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - <rdar://problem/8870429> Shrink the executable pool on embedded devices - - * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB - to 16MB. - -2011-01-15 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Incorrect behavior changing attributes of an accessor - https://bugs.webkit.org/show_bug.cgi?id=52515 - - defineProperty doesn't correctly handle changing attributes of an accessor - property. This is because we don't pass the full descriptor to the - putDescriptor helper function, which means we have insufficient information - to do the right thing. Once that's passed the correct behavior is relatively - simple to implement. - - * runtime/JSObject.cpp: - (JSC::putDescriptor): - (JSC::JSObject::defineOwnProperty): - -2011-01-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - [jsfunfuzz] Incorrect handling of consecutive duplicate labels - https://bugs.webkit.org/show_bug.cgi?id=52505 - - Compare StringImpl*'s instead of Identifier*'s when looking for duplicate - labels. - - * parser/JSParser.cpp: - (JSC::JSParser::parseExpressionOrLabelStatement): - -2011-01-14 Simon Fraser <simon.fraser@apple.com> - - No review. - - Initialize m_operationInProgress after r75855. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - -2011-01-14 Geoffrey Garen <ggaren@apple.com> - - Reverted accidentally committed code from my last checkin. - - * runtime/Heap.cpp: - (JSC::Heap::markRoots): - -2011-01-14 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Try to fix the GTK bot. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::markRoots): Kids, remember to initialize your data members. - Knowing is half the battle. - -2011-01-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Stephanie Lewis. - - [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode - https://bugs.webkit.org/show_bug.cgi?id=52501 - - Clear the temporary character buffers used for reading escaped characters and - numbers. - - * parser/Lexer.h: - (JSC::Lexer::setOffset): - -2011-01-14 Geoffrey Garen <ggaren@apple.com> - - Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h. - - * runtime/Heap.cpp: - -2011-01-13 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Split out a MarkedSpace strategy object from Heap. - https://bugs.webkit.org/show_bug.cgi?id=52421 - - SunSpider reports no change. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool. - - * runtime/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::recordExtraCost): - (JSC::Heap::allocate): - (JSC::Heap::markConservatively): - (JSC::Heap::markRoots): - (JSC::Heap::objectCount): - (JSC::Heap::statistics): - (JSC::Heap::size): - (JSC::Heap::isBusy): - (JSC::Heap::collectAllGarbage): - (JSC::Heap::primaryHeapBegin): - (JSC::Heap::primaryHeapEnd): - * runtime/Heap.h: - (JSC::Heap::globalData): - (JSC::Heap::markedSpace): - (JSC::Heap::isCellMarked): - (JSC::Heap::checkMarkCell): - (JSC::Heap::markCell): Moved all code pertaining to managing chunks of - collector memory out of this class. Heap now just delegates to MarkedSpace. - - * runtime/JSCell.h: - (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation. - - * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes. + * runtime/JSStaticScopeObject.cpp: + * runtime/JSStaticScopeObject.h: + * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_. - * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp. + * runtime/MarkedSpace.cpp: (JSC::MarkedSpace::MarkedSpace): - (JSC::MarkedSpace::destroy): - (JSC::MarkedSpace::allocateBlock): - (JSC::MarkedSpace::freeBlock): - (JSC::MarkedSpace::allocate): - (JSC::MarkedSpace::resizeBlocks): - (JSC::MarkedSpace::growBlocks): - (JSC::MarkedSpace::shrinkBlocks): - (JSC::MarkedSpace::markConservatively): - (JSC::MarkedSpace::clearMarkBits): - (JSC::MarkedSpace::markedCells): - (JSC::MarkedSpace::sweep): - (JSC::MarkedSpace::objectCount): - (JSC::MarkedSpace::addToStatistics): - (JSC::MarkedSpace::statistics): - (JSC::MarkedSpace::size): (JSC::MarkedSpace::reset): - (JSC::MarkedSpace::primaryHeapBegin): - (JSC::MarkedSpace::primaryHeapEnd): - * runtime/MarkedSpace.h: Copied from runtime/Heap.h. - (JSC::MarkedSpace::globalData): - (JSC::MarkedSpace::didShrink): - (JSC::MarkedSpace::cellBlock): - (JSC::MarkedSpace::cellOffset): - (JSC::MarkedSpace::isCellMarked): - (JSC::MarkedSpace::checkMarkCell): - (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of - collector memory into this class. - - * runtime/MemoryStatistics.cpp: - (JSC::heapStatistics): - * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation. - -2011-01-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [jsfunfuzz] parser doesn't enforce continue restrictions correctly. - https://bugs.webkit.org/show_bug.cgi?id=52493 - - This patch reworks handling of break, continue and label statements - to correctly handle all the valid and invalid cases. Previously certain - errors would be missed by the parser in strict mode, but the bytecode - generator needed to handle those cases for non-strict code so nothing - failed, it simply became non-standard behaviour. - - Now that we treat break and continue errors as early faults in non-strict - mode as well that safety net has been removed so the parser bugs result in - crashes at codegen time. - - * parser/JSParser.cpp: - (JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo): - (JSC::JSParser::next): - (JSC::JSParser::nextTokenIsColon): - (JSC::JSParser::continueIsValid): - Continue is only valid in loops so we can't use breakIsValid() - (JSC::JSParser::pushLabel): - We now track whether the label is for a loop (and is therefore a - valid target for continue. - (JSC::JSParser::popLabel): - (JSC::JSParser::getLabel): - Replace hasLabel with getLabel so that we can validate the target - when parsing continue statements. - (JSC::JSParser::Scope::continueIsValid): - (JSC::JSParser::Scope::pushLabel): - (JSC::JSParser::Scope::getLabel): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseBreakStatement): - (JSC::JSParser::parseContinueStatement): - (JSC::LabelInfo::LabelInfo): - (JSC::JSParser::parseExpressionOrLabelStatement): - Consecutive labels now get handled iteratively so that we can determine - whether they're valid targets for continue. - * parser/Lexer.cpp: - (JSC::Lexer::nextTokenIsColon): - * parser/Lexer.h: - (JSC::Lexer::setOffset): - -2011-01-14 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Roben. - - Use the Windows thread pool instead of an extra thread for FastMalloc scavenging - https://bugs.webkit.org/show_bug.cgi?id=45186 - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer(). - -2011-01-14 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Roben. - - Use the Windows thread pool instead of an extra thread for FastMalloc scavenging - https://bugs.webkit.org/show_bug.cgi?id=45186 - - r75819 accidentally changed the initial state of the scavenge timer. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true. - -2011-01-14 Patrick Gansterer <paroga@webkit.org> - - Unreviewed Windows Release build fix. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavengerTimerFired): - -2011-01-14 Patrick Gansterer <paroga@webkit.org> - - Unreviewed Windows Release build fix. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavengerTimerFired): - -2011-01-14 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Roben. - - Use the Windows thread pool instead of an extra thread for FastMalloc scavenging - https://bugs.webkit.org/show_bug.cgi?id=45186 - - Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer(). + * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): - (WTF::TCMalloc_PageHeap::isScavengerSuspended): - (WTF::TCMalloc_PageHeap::scheduleScavenger): - (WTF::TCMalloc_PageHeap::rescheduleScavenger): - (WTF::TCMalloc_PageHeap::suspendScavenger): - (WTF::scavengerTimerFired): - (WTF::TCMalloc_PageHeap::periodicScavenge): - (WTF::TCMalloc_PageHeap::signalScavenger): +2011-03-03 Timothy Hatcher <timothy@apple.com> -2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Align import/export directives - https://bugs.webkit.org/show_bug.cgi?id=52208 - - * API/JSBase.h: Align import/export directives with - WebKit2/Shared/API/c/WKBase.h - -2011-01-14 Michael Saboff <msaboff@apple.com> + Make APIShims usable from WebCore. Reviewed by Oliver Hunt. - Incorrect backtracking for nested alternatives - https://bugs.webkit.org/show_bug.cgi?id=52387 - - In the process of propigating a datalabel it wasn't getting connected - to a destination when the destination was an indirect jump. Added - code to recognize a direct backtrack destination that was an indirect - jump and added mechanism to associate DataLabelPtrs with indirect - jump entries. - Removed dead method - BacktrackDestination::linkDataLabelToHereIfExists() - - * yarr/YarrJIT.cpp: - (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry): - (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel): - (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry): - (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable): - Changes to link indirect jumps with DataLabelPtr's. - (JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr): - (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): - Updated to handle immediate linking of indirect jumps to - DataLabelPtr. - (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to - reflect updated linkDataLabelToBacktrackIfExists(). - -2011-01-14 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: provide script column offset to frontend. - https://bugs.webkit.org/show_bug.cgi?id=52377 - - * parser/SourceCode.h: - (JSC::SourceCode::SourceCode): - (JSC::SourceCode::firstColumn): - -2011-01-13 Darin Adler <darin@apple.com> - - Reviewed by Geoff Garen. - - <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available. - - * DerivedSources.make: Create a header file, HeaderDetection.h, that tells - us whether pthread_machdep.h is available. - * wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then - don't do the pthread_getspecific_function_pointer trick. - (WTF::setThreadHeap): Ditto, but set thread-specific data. - (WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set. - -2011-01-13 Xan Lopez <xlopez@igalia.com> - - Reviewed by Gavin Barraclough. - - JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap? - https://bugs.webkit.org/show_bug.cgi?id=42756 - - The FixedVMPool Allocator does not work well on systems where - allocating very large amounts of memory upfront is not reasonable, - like Linux without overcommit enabled. As a workaround, on Linux, - default to the values used in embedded environments (in the MB - range), and only jump to the GB range if we detect at runtime that - overcommit is enabled. Should fix crashes on Linux/x86_64 with - less than 3 or 4GB of RAM. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::free): use new variables for VM pool - size and coalesce limit. - (JSC::ExecutableAllocator::isValid): swap the variables from - embedded to generic values at runtime, on linux, if overcommit is - enabled. - (JSC::ExecutableAllocator::underMemoryPressure): use new variables - for VM pool size and coalesce limit. - -2011-01-12 Xan Lopez <xlopez@igalia.com> - - Reviewed by Martin Robinson. - - Add new Yarr.h header to the list file. - - * GNUmakefile.am: ditto. - -2011-01-12 Martin Robinson <mrobinson@igalia.com> - - Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball - https://bugs.webkit.org/show_bug.cgi?id=52299 - - * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source - files in the source list. - -2011-01-12 Peter Varga <pvarga@webkit.org> - - Reviewed by Gavin Barraclough. - - Add Yarr.h to YARR - https://bugs.webkit.org/show_bug.cgi?id=51021 - - Move other common constants and functions from YARR's different files - to Yarr.h. - Use Yarr.h header instead of including other YARR headers where it - is possible. - + * ForwardingHeaders/JavaScriptCore/APIShims.h: Added. + * GNUmakefile.am: + * JavaScriptCore.exp: * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - * yarr/Yarr.h: Added. - * yarr/YarrInterpreter.cpp: - * yarr/YarrInterpreter.h: - * yarr/YarrJIT.cpp: - (JSC::Yarr::jitCompile): - (JSC::Yarr::execute): - * yarr/YarrJIT.h: - * yarr/YarrParser.h: - * yarr/YarrPattern.cpp: - (JSC::Yarr::YarrPattern::compile): - (JSC::Yarr::YarrPattern::YarrPattern): - * yarr/YarrPattern.h: -2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r75595. - http://trac.webkit.org/changeset/75595 - https://bugs.webkit.org/show_bug.cgi?id=52286 - - It broke fast/regex/pcre-test-1.html (Requested by Ossy on - #webkit). - - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - * yarr/Yarr.h: Removed. - * yarr/YarrInterpreter.cpp: - * yarr/YarrInterpreter.h: - * yarr/YarrJIT.cpp: - (JSC::Yarr::jitCompile): - * yarr/YarrJIT.h: - (JSC::Yarr::execute): - * yarr/YarrParser.h: - * yarr/YarrPattern.cpp: - (JSC::Yarr::compile): - (JSC::Yarr::YarrPattern::YarrPattern): - * yarr/YarrPattern.h: +2011-03-03 Peter Varga <pvarga@webkit.org> -2011-01-12 Peter Varga <pvarga@webkit.org> + Reviewed by Oliver Hunt. - Reviewed by Gavin Barraclough. + Begin Characters Optimization Causes YARR Interpreter Errors + https://bugs.webkit.org/show_bug.cgi?id=55479 - Add Yarr.h to YARR - https://bugs.webkit.org/show_bug.cgi?id=51021 + The addBeginTerm function is removed because it doesn't correctly handle those + cases when an "invalid" term has been + collected (e.g. CharacterClass). Move the removed function to the + setupAlternativeBeginTerms method's switch-case + where the non-allowed cases are correctly handled. - Move other common constants and functions from YARR's different files - to Yarr.h. - Use Yarr.h header instead of including other YARR headers where it - is possible. + Reenable the Beginning Character Optimization in the YARR Interpreter again. - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - * yarr/Yarr.h: Added. - * yarr/YarrInterpreter.cpp: - * yarr/YarrInterpreter.h: - * yarr/YarrJIT.cpp: - (JSC::Yarr::jitCompile): - (JSC::Yarr::execute): - * yarr/YarrJIT.h: - * yarr/YarrParser.h: * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms): (JSC::Yarr::YarrPattern::compile): - (JSC::Yarr::YarrPattern::YarrPattern): - * yarr/YarrPattern.h: - -2011-01-11 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Missing call to popTempSortVector() for exception case in JSArray::sort. - https://bugs.webkit.org/show_bug.cgi?id=50718 - - Fix to patch of 50718 that added pushTempSortVector() and - popTempSortVector() to JSArray::sort() to mark elements during sort. - Need to add popTempSortVector() for the return case if toString() - had an exception. - - * runtime/JSArray.cpp: - (JSC::JSArray::sort): Added popTempSortVector() - -2011-01-11 Xan Lopez <xlopez@igalia.com> - - Reviewed by Darin Adler. - Microoptimization in ~JSString - https://bugs.webkit.org/show_bug.cgi?id=52222 +2011-03-02 Jessie Berlin <jberlin@apple.com> - The case where m_fibers is 0 seems to be the most common one - (almost 1/2 of the time, followed at some distance by m_fibers = 1 - in 1/4 of the cases in a typical SunSpider execution). We can save - one comparison in this common case by doing a bit of refactoring - in the JSString destructor; overall a 0.3% progression, but only - the string tests show improvement. - - * runtime/JSString.h: - (JSC::RopeBuilder::~JSString): - -2011-01-10 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - ASSERTION Failure in JSC::binaryChop - https://bugs.webkit.org/show_bug.cgi?id=25614 - - Changed JITStubs::cti_register_file_check() to use the current stack's - return PC to find the bytecode for handling the exception in the prior - frame. Also added the appropriate arrity check routine call to the - JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock. - - * jit/JIT.cpp: - (JSC::JIT::privateCompile): Changed the arrity check call location - so that it gets added to the m_calls list so that it's included in - CodeBlock::m_callReturnIndexVector. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC. - -2011-01-10 Daniel Bates <dbates@rim.com> - - Reviewed by Martin Robinson. - - Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST() - https://bugs.webkit.org/show_bug.cgi?id=52178 + Reviewed by Adam Roben. - It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and - GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we - are not compiling with GCC. + WebKit2: Use CFNetwork Sessions API. + https://bugs.webkit.org/show_bug.cgi?id=55435 - Fixes style issues at the callsites (i.e. replace comma with comma-space in - macro function argument list). Also, makes a spelling correction in a comment. + Add the ability to create a Private Browsing storage session. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): * wtf/Platform.h: + Add a new #define for using CF Storage Sessions. -2011-01-10 Geoffrey Garen <ggaren@apple.com> - - Build fix: removed some uses of nextNumber that I missed last time. - - * runtime/Heap.cpp: - (JSC::Heap::reset): - (JSC::Heap::collectAllGarbage): - -2011-01-10 Daniel Bates <dbates@rim.com> - - Reviewed by Darin Adler. - - Use __builtin_expect when compiling using RVCT in GNU mode - https://bugs.webkit.org/show_bug.cgi?id=51866 - - We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode - as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>. - - * wtf/AlwaysInline.h: - * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro - function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT - version. - -2011-01-10 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Moved Collector.* => Heap.*, since the file contains a class named "Heap". - - * API/JSCallbackObject.cpp: - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/Interpreter.cpp: - * interpreter/RegisterFile.h: - * jit/JITStubs.cpp: - * runtime/Collector.cpp: Removed. - * runtime/Collector.h: Removed. - * runtime/CollectorHeapIterator.h: - * runtime/GCActivityCallbackCF.cpp: - * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp. - * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h. - * runtime/InitializeThreading.cpp: - * runtime/JSCell.h: - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalData.h: - * runtime/JSLock.cpp: - * runtime/JSNumberCell.h: - * runtime/MachineStackMarker.cpp: - * runtime/MemoryStatistics.h: - * runtime/Protect.h: - * runtime/UString.cpp: - * runtime/WeakGCMap.h: - * runtime/WeakGCPtr.h: - -2011-01-10 Xan Lopez <xlopez@igalia.com> +2011-03-02 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - Remove unused isString() case in JSString::toPrimitiveString() - https://bugs.webkit.org/show_bug.cgi?id=52167 + Remove "register slot" concept from PropertySlot + https://bugs.webkit.org/show_bug.cgi?id=55621 - We never call toPrimitiveString() with strings, so remove the - check and add an ASSERT ensuring this never happens. 0.7% overall - progression in sunspider, since one of the call sites is very hot. + PropertySlot had already stopped storing Register "slots" + so this patch is simply removing that api entirely. + This exposed a problem in the ProgramNode constructor for + BytecodeGenerator where it reads from the registerfile + before it has initialised it. - * runtime/JSString.h: - (JSC::JSValue::toPrimitiveString): - -2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. + This bug wasn't a problem before as we were merely testing + for property existence rather than the actual value, and + used to work because setRegisterSlot didn't check that the + provided slot contained an initialised value. - Rename the existing YARR files and classes - https://bugs.webkit.org/show_bug.cgi?id=51872 + To get around this issue we now use symbolTableHasProperty + to do the symbol table check without trying to read the + RegisterFile. - Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - (JSC::RegExp::match): - (JSC::RegExp::printTraceData): - * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp. - (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext): - (JSC::Yarr::Interpreter::DisjunctionContext::operator new): - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput): - (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::InputStream::InputStream): - (JSC::Yarr::Interpreter::InputStream::next): - (JSC::Yarr::Interpreter::InputStream::rewind): - (JSC::Yarr::Interpreter::InputStream::read): - (JSC::Yarr::Interpreter::InputStream::readPair): - (JSC::Yarr::Interpreter::InputStream::readChecked): - (JSC::Yarr::Interpreter::InputStream::reread): - (JSC::Yarr::Interpreter::InputStream::prev): - (JSC::Yarr::Interpreter::InputStream::getPos): - (JSC::Yarr::Interpreter::InputStream::setPos): - (JSC::Yarr::Interpreter::InputStream::atStart): - (JSC::Yarr::Interpreter::InputStream::atEnd): - (JSC::Yarr::Interpreter::InputStream::checkInput): - (JSC::Yarr::Interpreter::InputStream::uncheckInput): - (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput): - (JSC::Yarr::Interpreter::testCharacterClass): - (JSC::Yarr::Interpreter::checkCharacter): - (JSC::Yarr::Interpreter::checkCasedCharacter): - (JSC::Yarr::Interpreter::checkCharacterClass): - (JSC::Yarr::Interpreter::tryConsumeBackReference): - (JSC::Yarr::Interpreter::matchAssertionBOL): - (JSC::Yarr::Interpreter::matchAssertionEOL): - (JSC::Yarr::Interpreter::matchAssertionWordBoundary): - (JSC::Yarr::Interpreter::backtrackPatternCharacter): - (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter): - (JSC::Yarr::Interpreter::matchCharacterClass): - (JSC::Yarr::Interpreter::backtrackCharacterClass): - (JSC::Yarr::Interpreter::matchBackReference): - (JSC::Yarr::Interpreter::backtrackBackReference): - (JSC::Yarr::Interpreter::recordParenthesesMatch): - (JSC::Yarr::Interpreter::resetMatches): - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): - (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): - (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): - (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin): - (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin): - (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd): - (JSC::Yarr::Interpreter::matchParentheses): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::Interpreter::lookupForBeginChars): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::Interpreter::matchNonZeroDisjunction): - (JSC::Yarr::Interpreter::interpret): - (JSC::Yarr::Interpreter::Interpreter): - (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry): - (JSC::Yarr::ByteCompiler::ByteCompiler): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::ByteCompiler::checkInput): - (JSC::Yarr::ByteCompiler::assertionBOL): - (JSC::Yarr::ByteCompiler::assertionEOL): - (JSC::Yarr::ByteCompiler::assertionWordBoundary): - (JSC::Yarr::ByteCompiler::atomPatternCharacter): - (JSC::Yarr::ByteCompiler::atomCharacterClass): - (JSC::Yarr::ByteCompiler::atomBackReference): - (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): - (JSC::Yarr::ByteCompiler::popParenthesesStack): - (JSC::Yarr::ByteCompiler::dumpDisjunction): - (JSC::Yarr::ByteCompiler::closeAlternative): - (JSC::Yarr::ByteCompiler::closeBodyAlternative): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::regexEnd): - (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): - (JSC::Yarr::ByteCompiler::alternativeDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - (JSC::Yarr::byteCompile): - (JSC::Yarr::interpret): - * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h. - (JSC::Yarr::ByteTerm::ByteTerm): - (JSC::Yarr::ByteTerm::BOL): - (JSC::Yarr::ByteTerm::CheckInput): - (JSC::Yarr::ByteTerm::EOL): - (JSC::Yarr::ByteTerm::WordBoundary): - (JSC::Yarr::ByteTerm::BackReference): - (JSC::Yarr::ByteTerm::BodyAlternativeBegin): - (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): - (JSC::Yarr::ByteTerm::BodyAlternativeEnd): - (JSC::Yarr::ByteTerm::AlternativeBegin): - (JSC::Yarr::ByteTerm::AlternativeDisjunction): - (JSC::Yarr::ByteTerm::AlternativeEnd): - (JSC::Yarr::ByteTerm::SubpatternBegin): - (JSC::Yarr::ByteTerm::SubpatternEnd): - (JSC::Yarr::ByteTerm::invert): - (JSC::Yarr::ByteTerm::capture): - (JSC::Yarr::ByteDisjunction::ByteDisjunction): - (JSC::Yarr::BytecodePattern::BytecodePattern): - (JSC::Yarr::BytecodePattern::~BytecodePattern): - * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp. - (JSC::Yarr::YarrGenerator::optimizeAlternative): - (JSC::Yarr::YarrGenerator::matchCharacterClassRange): - (JSC::Yarr::YarrGenerator::matchCharacterClass): - (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput): - (JSC::Yarr::YarrGenerator::jumpIfAvailableInput): - (JSC::Yarr::YarrGenerator::checkInput): - (JSC::Yarr::YarrGenerator::atEndOfInput): - (JSC::Yarr::YarrGenerator::notAtEndOfInput): - (JSC::Yarr::YarrGenerator::jumpIfCharEquals): - (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals): - (JSC::Yarr::YarrGenerator::readCharacter): - (JSC::Yarr::YarrGenerator::storeToFrame): - (JSC::Yarr::YarrGenerator::storeToFrameWithPatch): - (JSC::Yarr::YarrGenerator::loadFromFrame): - (JSC::Yarr::YarrGenerator::loadFromFrameAndJump): - (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry): - (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump): - (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord): - (JSC::Yarr::YarrGenerator::GenerationState::GenerationState): - (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry): - (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable): - (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel): - (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel): - (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail): - (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail): - (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration): - (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration): - (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration): - (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration): - (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination): - (JSC::Yarr::YarrGenerator::BacktrackDestination::clear): - (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination): - (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset): - (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList): - (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget): - (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo): - (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr): - (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack): - (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset): - (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps): - (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel): - (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack): - (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists): - (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists): - (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks): - (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo): - (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState): - (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative): - (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid): - (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative): - (JSC::Yarr::YarrGenerator::TermGenerationState::alternative): - (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative): - (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm): - (JSC::Yarr::YarrGenerator::TermGenerationState::termValid): - (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm): - (JSC::Yarr::YarrGenerator::TermGenerationState::term): - (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm): - (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum): - (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction): - (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail): - (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail): - (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm): - (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm): - (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset): - (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack): - (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack): - (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists): - (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): - (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump): - (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel): - (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset): - (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel): - (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks): - (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo): - (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink): - (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks): - (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps): - (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination): - (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom): - (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail): - (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks): - (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration): - (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump): - (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::YarrGenerator::generateAssertionBOL): - (JSC::Yarr::YarrGenerator::generateAssertionEOL): - (JSC::Yarr::YarrGenerator::matchAssertionWordchar): - (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary): - (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle): - (JSC::Yarr::YarrGenerator::generatePatternCharacterPair): - (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed): - (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy): - (JSC::Yarr::YarrGenerator::generateCharacterClassSingle): - (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): - (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): - (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): - (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): - (JSC::Yarr::YarrGenerator::generateParenthesesSingle): - (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack): - (JSC::Yarr::YarrGenerator::generateParentheticalAssertion): - (JSC::Yarr::YarrGenerator::generateTerm): - (JSC::Yarr::YarrGenerator::generateDisjunction): - (JSC::Yarr::YarrGenerator::generateEnter): - (JSC::Yarr::YarrGenerator::generateReturn): - (JSC::Yarr::YarrGenerator::YarrGenerator): - (JSC::Yarr::YarrGenerator::generate): - (JSC::Yarr::YarrGenerator::compile): - (JSC::Yarr::jitCompile): - * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h. - (JSC::Yarr::YarrCodeBlock::YarrCodeBlock): - (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock): - (JSC::Yarr::YarrCodeBlock::setFallBack): - (JSC::Yarr::YarrCodeBlock::isFallBack): - (JSC::Yarr::YarrCodeBlock::set): - (JSC::Yarr::YarrCodeBlock::execute): - (JSC::Yarr::YarrCodeBlock::getAddr): - (JSC::Yarr::execute): - * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h. - (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate): - (JSC::Yarr::Parser::CharacterClassParserDelegate::begin): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): - (JSC::Yarr::Parser::CharacterClassParserDelegate::end): - (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference): - (JSC::Yarr::Parser::Parser): - (JSC::Yarr::Parser::parseEscape): - (JSC::Yarr::Parser::parseAtomEscape): - (JSC::Yarr::Parser::parseCharacterClassEscape): - (JSC::Yarr::Parser::parseCharacterClass): - (JSC::Yarr::Parser::parseParenthesesBegin): - (JSC::Yarr::Parser::parseParenthesesEnd): - (JSC::Yarr::Parser::parseQuantifier): - (JSC::Yarr::Parser::parseTokens): - (JSC::Yarr::Parser::parse): - (JSC::Yarr::Parser::saveState): - (JSC::Yarr::Parser::restoreState): - (JSC::Yarr::Parser::atEndOfPattern): - (JSC::Yarr::Parser::peek): - (JSC::Yarr::Parser::peekIsDigit): - (JSC::Yarr::Parser::peekDigit): - (JSC::Yarr::Parser::consume): - (JSC::Yarr::Parser::consumeDigit): - (JSC::Yarr::Parser::consumeNumber): - (JSC::Yarr::Parser::consumeOctal): - (JSC::Yarr::Parser::tryConsume): - (JSC::Yarr::Parser::tryConsumeHex): - (JSC::Yarr::parse): - * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp. - (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor): - (JSC::Yarr::CharacterClassConstructor::reset): - (JSC::Yarr::CharacterClassConstructor::append): - (JSC::Yarr::CharacterClassConstructor::putChar): - (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper): - (JSC::Yarr::CharacterClassConstructor::isUnicodeLower): - (JSC::Yarr::CharacterClassConstructor::putRange): - (JSC::Yarr::CharacterClassConstructor::charClass): - (JSC::Yarr::CharacterClassConstructor::addSorted): - (JSC::Yarr::CharacterClassConstructor::addSortedRange): - (JSC::Yarr::BeginCharHelper::BeginCharHelper): - (JSC::Yarr::BeginCharHelper::addBeginChar): - (JSC::Yarr::BeginCharHelper::merge): - (JSC::Yarr::BeginCharHelper::addCharacter): - (JSC::Yarr::BeginCharHelper::linkHotTerms): - (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): - (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor): - (JSC::Yarr::YarrPatternConstructor::reset): - (JSC::Yarr::YarrPatternConstructor::assertionBOL): - (JSC::Yarr::YarrPatternConstructor::assertionEOL): - (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary): - (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter): - (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass): - (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin): - (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom): - (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange): - (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn): - (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd): - (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): - (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): - (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): - (JSC::Yarr::YarrPatternConstructor::atomBackReference): - (JSC::Yarr::YarrPatternConstructor::copyDisjunction): - (JSC::Yarr::YarrPatternConstructor::copyTerm): - (JSC::Yarr::YarrPatternConstructor::quantifyAtom): - (JSC::Yarr::YarrPatternConstructor::disjunction): - (JSC::Yarr::YarrPatternConstructor::regexBegin): - (JSC::Yarr::YarrPatternConstructor::regexEnd): - (JSC::Yarr::YarrPatternConstructor::regexError): - (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets): - (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets): - (JSC::Yarr::YarrPatternConstructor::setupOffsets): - (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses): - (JSC::Yarr::YarrPatternConstructor::optimizeBOL): - (JSC::Yarr::YarrPatternConstructor::addBeginTerm): - (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms): - (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms): - (JSC::Yarr::YarrPatternConstructor::setupBeginChars): - (JSC::Yarr::compile): - (JSC::Yarr::YarrPattern::YarrPattern): - * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h. - (JSC::Yarr::CharacterRange::CharacterRange): - (JSC::Yarr::CharacterClassTable::create): - (JSC::Yarr::CharacterClassTable::CharacterClassTable): - (JSC::Yarr::CharacterClass::CharacterClass): - (JSC::Yarr::PatternTerm::PatternTerm): - (JSC::Yarr::PatternTerm::ForwardReference): - (JSC::Yarr::PatternTerm::BOL): - (JSC::Yarr::PatternTerm::EOL): - (JSC::Yarr::PatternTerm::WordBoundary): - (JSC::Yarr::PatternTerm::invert): - (JSC::Yarr::PatternTerm::capture): - (JSC::Yarr::PatternTerm::quantify): - (JSC::Yarr::PatternAlternative::PatternAlternative): - (JSC::Yarr::PatternAlternative::lastTerm): - (JSC::Yarr::PatternAlternative::removeLastTerm): - (JSC::Yarr::PatternAlternative::setOnceThrough): - (JSC::Yarr::PatternAlternative::onceThrough): - (JSC::Yarr::PatternDisjunction::PatternDisjunction): - (JSC::Yarr::PatternDisjunction::~PatternDisjunction): - (JSC::Yarr::PatternDisjunction::addNewAlternative): - (JSC::Yarr::TermChain::TermChain): - (JSC::Yarr::BeginChar::BeginChar): - (JSC::Yarr::YarrPattern::~YarrPattern): - (JSC::Yarr::YarrPattern::reset): - (JSC::Yarr::YarrPattern::containsIllegalBackReference): - (JSC::Yarr::YarrPattern::newlineCharacterClass): - (JSC::Yarr::YarrPattern::digitsCharacterClass): - (JSC::Yarr::YarrPattern::spacesCharacterClass): - (JSC::Yarr::YarrPattern::wordcharCharacterClass): - (JSC::Yarr::YarrPattern::nondigitsCharacterClass): - (JSC::Yarr::YarrPattern::nonspacesCharacterClass): - (JSC::Yarr::YarrPattern::nonwordcharCharacterClass): - -2011-01-10 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * parser/SyntaxChecker.h: - -2011-01-10 Dave Tapuska <dtapuska@rim.com> - - Reviewed by Gavin Barraclough. - - Add CTI ASM versions for RVCT ARM THUMB2 mode. - - https://bugs.webkit.org/show_bug.cgi?id=52154 - - * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::ctiVMThrowTrampoline): - (JSC::ctiOpThrowNotCaught): - -2011-01-10 Gavin Barraclough <barraclough@apple.com> - - Qt build fix. - - * JavaScriptCore.pro: - -2011-01-10 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 52079 - Syntax errors should be early errors. - - From chapter 16 the spec: - An implementation must report most errors at the time the relevant ECMAScript language construct is - evaluated. An early error is an error that can be detected and reported prior to the evaluation of - any construct in the Program containing the error. An implementation must report early errors in a - Program prior to the first evaluation of that Program. Early errors in eval code are reported at - the time eval is called but prior to evaluation of any construct within the eval code. All errors - that are not early errors are runtime errors. - - An implementation must treat any instance of the following kinds of errors as an early error: - * Any syntax error." - - * JavaScriptCore.xcodeproj/project.pbxproj: - Added new files. - * bytecode/CodeBlock.cpp: - Removed op_throw_syntax_error. - * bytecode/Opcode.h: - Removed op_throw_syntax_error. * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - If m_expressionTooDeep then throw a runtime error. (JSC::BytecodeGenerator::BytecodeGenerator): - Initialize m_expressionTooDeep. - (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): - Sets m_expressionTooDeep. - * bytecompiler/BytecodeGenerator.h: - Added m_expressionTooDeep, removed emitThrowSyntaxError. - * bytecompiler/NodesCodegen.cpp: - (JSC::RegExpNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - Conditions that threw syntax error are now handled during parsing; - during bytecompilation these are now just ASSERTs. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: - * jit/JITStubs.cpp: - * jit/JITStubs.h: - Removed op_throw_syntax_error. - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createRegExp): - Renamed; added syntax check. - * parser/JSParser.cpp: - (JSC::JSParser::breakIsValid): - (JSC::JSParser::hasLabel): - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::setIsFunction): - (JSC::JSParser::Scope::isFunctionBoundary): - (JSC::JSParser::ScopeRef::hasContainingScope): - (JSC::JSParser::ScopeRef::containingScope): - (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef): - (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef): - (JSC::JSParser::AutoPopScopeRef::setPopped): - (JSC::JSParser::popScopeInternal): - (JSC::JSParser::popScope): - (JSC::jsParse): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseBreakStatement): - (JSC::JSParser::parseContinueStatement): - (JSC::JSParser::parseReturnStatement): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseExpressionOrLabelStatement): - (JSC::JSParser::parsePrimaryExpression): - * parser/JSParser.h: - * parser/Nodes.h: - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::createRegExp): - Renamed; added syntax check. - * runtime/ExceptionHelpers.cpp: - (JSC::createOutOfMemoryError): - (JSC::throwOutOfMemoryError): - * runtime/ExceptionHelpers.h: - Broke out createOutOfMemoryError. - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - Add check for exception after bytecode generation. - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - RegExp error prefixes not included in error string. - * yarr/RegexParser.h: - (JSC::Yarr::Parser::parse): - Removed regexBegin/regexEnd/regexError. - * yarr/RegexPattern.cpp: - (JSC::Yarr::RegexPatternConstructor::regexBegin): - Removed regexEnd/regexError. - (JSC::Yarr::compileRegex): - Add call to regexBegin (no longer called from the parser). - * yarr/YarrSyntaxChecker.cpp: Added. - (JSC::Yarr::SyntaxChecker::assertionBOL): - (JSC::Yarr::SyntaxChecker::assertionEOL): - (JSC::Yarr::SyntaxChecker::assertionWordBoundary): - (JSC::Yarr::SyntaxChecker::atomPatternCharacter): - (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass): - (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin): - (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom): - (JSC::Yarr::SyntaxChecker::atomCharacterClassRange): - (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn): - (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd): - (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin): - (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin): - (JSC::Yarr::SyntaxChecker::atomParenthesesEnd): - (JSC::Yarr::SyntaxChecker::atomBackReference): - (JSC::Yarr::SyntaxChecker::quantifyAtom): - (JSC::Yarr::SyntaxChecker::disjunction): - (JSC::Yarr::checkSyntax): - * yarr/YarrSyntaxChecker.h: Added. - Check RegExp syntax. - -2011-01-10 Adam Roben <aroben@apple.com> - - Roll out r75289 - - It was causing assertion failures. See <http://webkit.org/b/52156>. - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): - -2011-01-08 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Unify string table adding in AtomicString - https://bugs.webkit.org/show_bug.cgi?id=51927 - - Move code for adding a string into a separate function. - This removes multiple occurrence of the same logic. - - * wtf/text/AtomicString.cpp: - (WTF::addToStringTable): Added. - (WTF::AtomicString::add): Use addToStringTable(). - (WTF::AtomicString::fromUTF8): Ditto. - -2011-01-07 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Gavin Barraclough. - - Split machine stack marking functions into their own class (MachineStackMarker) - https://bugs.webkit.org/show_bug.cgi?id=52088 - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread() - call behind an #ifdef because we shouldn't be registering threads at all - if we don't support usage on multiple threads. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects. - - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::markRoots): - * runtime/Collector.h: - (JSC::Heap::machineStackMarker): Moved code to machineStackMarker. - - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary - level of indirection, to make Heap less of a God class. - - * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h. - * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp. - (JSC::MachineStackMarker::MachineStackMarker): - (JSC::MachineStackMarker::~MachineStackMarker): - (JSC::MachineStackMarker::makeUsableFromMultipleThreads): - (JSC::MachineStackMarker::registerThread): - (JSC::MachineStackMarker::unregisterThread): - (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): - (JSC::MachineStackMarker::markCurrentThreadConservatively): - (JSC::MachineStackMarker::markOtherThreadConservatively): - (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap. - -2011-01-07 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms - - Fix for win32. The base of the stack is stored in the "deallocation stack" field of the - Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block - for more information! - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): - -2011-01-07 Adam Roben <aroben@apple.com> - - Update react-to-vsprops-changes.py after r74855 - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - -2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Port scrollbar painting to GtkStyleContext - https://bugs.webkit.org/show_bug.cgi?id=52051 - - * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward - declaration. - -2011-01-07 Daniel Bates <dbates@rim.com> - - Reviewed by Martin Robinson. - - Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode - https://bugs.webkit.org/show_bug.cgi?id=52034 - - Derived from a patch by Eli Fidler. - - RVCT 4 or greater in GNU mode supports the computed goto GNU language extension - as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>. - - * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead - of hardcoding the GCC compiler. - * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000. - -2011-01-06 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Bug 52035 - Unregistering DOMWrapperWorlds is unsafe - - The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's - destructor early, in order to release wrappers once we know we no longer intend to use them. - Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to - lose any state stored on them) it is not okay to deregister the world from the JSGlobalData. - A sequence of events that triggers the bug would look like this: - - (1) Create a DOMWrapperWorld. - (2) Register a timer in the world. - (3) Call unregisterWorld() on the world. - (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document. - (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've - called forgetWorld() none exists. - (6) Attempt to add a wrapper to a NULL map. - - Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away. - - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::clear): - -2011-01-06 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Darin Adler. - - Bug 52021 - zeroDouble broken on ARMv7 - - The bug here is that zeroDouble was working incorrectly, - leading to op_loop_if_true failing - specifically in the - case where the value being checked is 0.0 encoded as a - double (rather than an integer immediate). - - Additionally this patch removes a redundant duplicate compare - in some (many) case. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::vcmp_F64): - (JSC::ARMv7Assembler::vcmpz_F64): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branchDoubleNonZero): - (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::branchDouble): - (JSC::MacroAssemblerARMv7::branchDoubleNonZero): - (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN): - (JSC::MacroAssemblerARMv7::compare32): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::branchDoubleNonZero): - (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchDoubleNonZero): - (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - -2011-01-06 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + * runtime/JSActivation.cpp: + (JSC::JSActivation::symbolTableGet): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::symbolTableHasProperty): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::symbolTableGet): + * runtime/PropertySlot.h: - Added debug code to compare the results of JIT regexp with - interpreted regexp and displays discrepencies. This debug code is - controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and - is only valid if ENABLE_YARR_JIT is enabled. +2011-03-02 Daniel Cheng <dcheng@chromium.org> - Fixed a discovered problem in RegExp::printTraceData, changing - m_pattern to the getter pattern(). - Also deleted an extraneous semicolon. + Reviewed by David Levin. - Enhancement: Add Regexp Debug Compare between JIT and Interpreter - https://bugs.webkit.org/show_bug.cgi?id=51834 + Add feature define for data transfer items + https://bugs.webkit.org/show_bug.cgi?id=55510 - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - (JSC::RegExp::match): - (JSC::RegExp::printTraceData): + * Configurations/FeatureDefines.xcconfig: * wtf/Platform.h: -2011-01-06 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Eric Seidel. +2011-03-02 Adam Roben <aroben@apple.com> - [WINCE] Remove JSC::g_stackBase - https://bugs.webkit.org/show_bug.cgi?id=51779 + Delete old .res files whenever any .vsprops file changes - * wtf/StackBounds.cpp: + Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to + fail -2011-01-06 Joone Hur <joone.hur@collabora.co.uk> - - Reviewed by Eric Seidel. - - WML Parser should treat line/column number in a consistent way - https://bugs.webkit.org/show_bug.cgi?id=51601 - - Add the equality operators to TextPosition class. - - * wtf/text/TextPosition.h: - (WTF::TextPosition::operator==): Added. - (WTF::TextPosition::operator!=): Added. - (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base(). - (WTF::ZeroBasedNumber::operator==): Added. - (WTF::ZeroBasedNumber::operator!=): Added. - (WTF::OneBasedNumber::operator==): Added. - (WTF::OneBasedNumber::operator!=): Added. - -2011-01-06 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Gavin Barraclough. + Reviewed by Tony Chang. - [WINCE] Determine stack extent - https://bugs.webkit.org/show_bug.cgi?id=26276 - - Scan the stack for writeable pages and use the limits. - - * wtf/StackBounds.cpp: - (WTF::detectGrowingDownward): - (WTF::isPageWritable): - (WTF::getLowerStackBound): - (WTF::getUpperStackBound): - (WTF::StackBounds::initialize): - -2011-01-05 Steve Falkenburg <sfalken@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU. - -2011-01-05 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Darin Adler. - - Debug and Release builds on Windows clobber each other - https://bugs.webkit.org/show_bug.cgi?id=49185 - - Changes the structure of WebKitBuild build products directory so we - completely separate each build configuration into independent directories. - - Although we previously had per-configuration directories for obj, this change adds - per-configuration directories for bin, lib, obj, and include. Each configuration's - build products are stored within a directory inside of WebKitBuild. - - Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir), - defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName). - - For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow - for proper operation of the instrumentation/optimization scripts. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: - * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: - * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: - -2011-01-05 Brent Fulgham <bfulgham@webkit.org> - - Unreviewed build fix. - - * wtf/Encoder.h: Add <stdint.h> include for systems that - do not natively know about uint8_t, etc. - -2011-01-05 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - [CMake] Fix the usage of SOURCE_GROUP - https://bugs.webkit.org/show_bug.cgi?id=51739 - - * CMakeLists.txt: - -2011-01-05 Andras Becsi <abecsi@webkit.org> - - Reviewed by Csaba Osztrogonác. - - [Qt][V8] Fix the build after recent changes. - - * pcre/pcre.pri: Correct the path after Source was introduced. - -2011-01-04 Steve Falkenburg <sfalken@apple.com> - - Build fix. Update path to FindSafari after source code reorganization. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - -2011-01-04 Daniel Bates <dbates@rim.com> - - Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975> - (https://bugs.webkit.org/show_bug.cgi?id=51855). - - * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h. - (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer. - -2011-01-04 Martin Robinson <mrobinson@igalia.com> - - Try to fix the EFL build. - - * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list. - -2011-01-04 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Adler. - - StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC) - https://bugs.webkit.org/show_bug.cgi?id=51881 - - The StackBounds class is only used by JavaScriptCore. + (main): Restructured code to loop over a set of file extensions, deleting any old files that + have that extension. Now deletes .res files, too. (We previously deleted any file matching + *.manifest*, but that turned out to just be the union of *.manifest and *.res.) - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - * wtf/WTFThreadData.h: - (WTF::WTFThreadData::resetCurrentIdentifierTable): +2011-03-02 Adam Barth <abarth@webkit.org> -2011-01-03 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Darin Adler. - - Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr - https://bugs.webkit.org/show_bug.cgi?id=51846 - - * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr. - (JSC::ExecutableAllocator::cacheFlush): Ditto. - * wtf/PlatformRefPtr.h: Removed. - * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr. - (WTF::randomNumber): Ditto. - * wtf/brew/RefPtrBrew.h: Ditto. - (WTF::refIfNotNull): Added. - (WTF::derefIfNotNull): Added. - * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr. - (WTF::createRefPtrInstance): Modified to return a RefPtr. - * wtf/gobject/GRefPtr.cpp: - (WTF::refGPtr): Moved from PlatformRefPtr here. - (WTF::derefGPtr): Ditto. - * wtf/gobject/GRefPtr.h: Ditto. - (WTF::GRefPtr::GRefPtr): Ditto. - (WTF::GRefPtr::~GRefPtr): Ditto. - (WTF::GRefPtr::clear): Ditto. - (WTF::GRefPtr::isHashTableDeletedValue): Ditto. - (WTF::GRefPtr::get): Ditto. - (WTF::GRefPtr::operator*): Ditto. - (WTF::GRefPtr::operator->): Ditto. - (WTF::GRefPtr::operator!): Ditto. - (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto. - (WTF::GRefPtr::hashTableDeletedValue): Ditto. - (WTF::::operator): Ditto. - (WTF::::swap): Ditto. - (WTF::swap): Ditto. - (WTF::operator==): Ditto. - (WTF::operator!=): Ditto. - (WTF::static_pointer_cast): Ditto. - (WTF::const_pointer_cast): Ditto. - (WTF::getPtr): Ditto. - (WTF::adoptGRef): Ditto. - (WTF::refGPtr): Ditto. - (WTF::derefGPtr): Ditto. - -2011-01-04 Daniel Bates <dbates@rim.com> - - Reviewed by Adam Roben. - - LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails - https://bugs.webkit.org/show_bug.cgi?id=51860 - - * wtf/ThreadingWin.cpp: - (WTF::createThreadInternal): - -2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Ariya Hidayat. - - [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian - https://bugs.webkit.org/show_bug.cgi?id=31273 - - On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers - are included before platform headers. On all other platforms continue to use - INCLUDEPATH (as before). This is a continuation of r65877. - - No new tests as there is no new functionality. - - * JavaScriptCore.pri: - -2011-01-04 Darin Adler <darin@apple.com> - - Try to fix Windows build. - - * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing - of conditional includes. - (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer. - (WTF::createThreadInternal): Tweaked #if to not need separate macro. - -2011-01-04 Daniel Bates <dbates@rim.com> - - Reviewed by Adam Roben. - - Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android - https://bugs.webkit.org/show_bug.cgi?id=51855 - - Both the Apple Windows and Android ports implement a similar adapter structure, - called ThreadFunctionInvocation and ThreadData respectively, as part of - their thread creation process. Instead, we should share such an adapter - structure and remove duplicate code. - - * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h. - * wtf/ThreadFunctionInvocation.h: Added. - (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation): - * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation. - (WTF::runThreadWithRegistration): - (WTF::createThreadInternal): - * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that - it can be shared with the Android implementation of createThreadInternal(). - (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation. - -2011-01-04 Daniel Bates <dbates@rim.com> - - Reviewed by Darin Adler. - - Use __builtin_expect when compiling using RVCT in GNU mode - https://bugs.webkit.org/show_bug.cgi?id=51866 - - Derived from a patch by Dave Tapuska. - - * wtf/AlwaysInline.h: - -2011-01-03 Darin Adler <darin@apple.com> - - Reviewed by Brady Eidson. - - * wtf/Forward.h: Added Decoder and Encoder. - -2011-01-03 Brady Eidson <beidson@apple.com> - - Reviewed by Darin Adler. - - Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2. - - Starting out with a pure virtual interface to be implemented in WK2, but we might change that later. - - * GNUmakefile.am: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/CMakeLists.txt: - - * wtf/Decoder.h: Added. - * wtf/Encoder.h: Added. - -2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Unreviewed build fix. - - [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system. - - This fix is required for builds where HAVE(NULLPTR) is false - (e.g. some MSVC and Symbian builds). - - * wtf/wtf.pri: - -2011-01-02 Dan Bernstein <mitz@apple.com> - - Rubber-stamped by Simon Fraser. - - <rdar://problem/8812159> Update copyright strings - - * Info.plist: - -2011-01-02 Csaba Osztrogonác <ossy@webkit.org> - - Fix GTK+ build after r74855. - - Reviewed by Xan Lopez. - - * GNUmakefile.am: Fix include pathes. - -2011-01-02 Adam Barth <abarth@webkit.org> - - One more .. missing in the Qt build. - - * jsc.pro: - -2011-01-02 Xan Lopez <xlopez@igalia.com> - - Fix GTK+ build. - - * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so - that anyone can include its headers without adding the prefix - 'Source/'. - -2011-01-02 Carl Lobo <carllobo@gmail.com> - - Reviewed by Adam Barth. - - Fix Windows Build for non-production where VSPropsRedirectionDir is not defined. - https://bugs.webkit.org/show_bug.cgi?id=51797 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2011-01-01 Adam Barth <abarth@webkit.org> - - Fix relative include paths in an attempt to fix the Qt build. - - * JavaScriptCore.pri: - * JavaScriptCore.pro: - -2011-01-01 Adam Barth <abarth@webkit.org> - - Another speculative build fix for GTK. - - * GNUmakefile.am: - -2011-01-01 Adam Barth <abarth@webkit.org> - - Speculative build fix for GTK. Update the paths in GNUmakefile to - include "Source". - - * GNUmakefile.am: - -2011-01-01 Adam Barth <abarth@webkit.org> - - Update relative paths in JavaScriptCore.gyp to account for the extra - level of directories. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2010-12-31 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal - https://bugs.webkit.org/show_bug.cgi?id=50517 - - This change shows about 2% performance win on the xml-parser benchmark. - - * wtf/text/AtomicString.cpp: - (WTF::HashAndUTF8CharactersTranslator::equal): - -2010-12-30 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Ariya Hidayat. - - [CMake] Add WTF_HEADERS - https://bugs.webkit.org/show_bug.cgi?id=51741 - - Add the WTF headers to show them in Visual Studio. - - * wtf/CMakeLists.txt: - * wtf/CMakeListsWinCE.txt: - -2010-12-30 Konstantin Tokarev <annulen@yandex.ru> - - Reviewed by David Kilzer. - - [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is - used - https://bugs.webkit.org/show_bug.cgi?id=51672 - - * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1 - -2010-12-30 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp - https://bugs.webkit.org/show_bug.cgi?id=51743 - - Most of the ifdefs belong to windows and not to the MSVC compiler. - - * wtf/FastMalloc.cpp: - -2010-12-29 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9. - - * parser/Lexer.cpp: - (JSC::Lexer::parseString): - -2010-12-29 Helder Correia <helder@sencha.com> - - Reviewed by Eric Seidel. - - <VT> and <FF> are not valid JSON whitespace characters - https://bugs.webkit.org/show_bug.cgi?id=51671 - - Vertical Tab and Form Feed are not allowed white spaces by the JSON - RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar). - - Tests: ietestcenter/Javascript/15.12.1.1-0-2.html - ietestcenter/Javascript/15.12.1.1-0-3.html - - * runtime/LiteralParser.cpp: - (JSC::isJSONWhiteSpace): - (JSC::LiteralParser::Lexer::lex): - -2010-12-28 Helder Correia <helder@sencha.com> - - Reviewed by Eric Seidel. - - JSON.stringify must exist as a function taking 3 parameters - https://bugs.webkit.org/show_bug.cgi?id=51667 - - The reported function length is 1 instead. - - Test: ietestcenter/Javascript/15.12.3-0-2.html - - * runtime/JSONObject.cpp: - -2010-12-28 Helder Correia <helder@sencha.com> - - Reviewed by Sam Weinig. - - JSON.parse must exist as a function taking 2 parameters - https://bugs.webkit.org/show_bug.cgi?id=51666 - - Support for revivers was introduced in bug 26591, but the function - length has since remained unchanged. - - Test: ietestcenter/Javascript/15.12.2-0-2.html - - * runtime/JSONObject.cpp: - -2010-12-27 Jake Helfert <jake@jakeonthenet.com> - - Reviewed and reworked by Darin Adler. - - Building WebKit with Visual Studio 2010 fails due - to ambiguous assignment operator errors. - https://bugs.webkit.org/show_bug.cgi?id=51116 - - * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with - Platform.h HAVE macro, and included the Visual Studio 2010 compiler - as one of the ones that has nullptr. - * wtf/NullPtr.cpp: Updated condition to match. - - * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t) - overload if we are compiling in loose mode and the compiler has - nullptr, because assignment of 0 will otherwise encounter - ambiguitity with this overload and the overload for loose mode - that takes a raw pointer. The conditional can be removed when we - get rid of loose mode. - * wtf/PassOwnPtr.h: Ditto. - - * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload - if the compiler has nullptr, because assignment of 0 would be - ambiguous with the overload that takes a raw pointer. The conditional - can be removed if we ever decide we no longer need to support - assigning 0, but might need a way to catch that usage on older compilers. - * wtf/RefPtr.h: Ditto. - * wtf/RetainPtr.h: Ditto - - * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp, - accidentally omitted when the file was first added. - -2010-12-26 Xan Lopez <xlopez@igalia.com> - - Reviewed by Eric Seidel. - - [GTK] Add standalone target for JSC - https://bugs.webkit.org/show_bug.cgi?id=51607 - - * GNUmakefile.am: add convenience target to only build jsc and its - dependencies. - -2010-12-24 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Eric Seidel. - - [WINCE] Add CPU(MIPS) detection - https://bugs.webkit.org/show_bug.cgi?id=51342 - - WinCE usually defines MIPS and _MIPS_. - - * wtf/Platform.h: - -2010-12-23 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. + Reviewed by Dimitri Glazkov. - Rename RegexCompiler.cpp to RegexPattern.cpp. - Implicitly call compileRegex from RegexPattern's constructor. + Teach JavaScriptCore GYP build how to build minidom + https://bugs.webkit.org/show_bug.cgi?id=55536 - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - * yarr/RegexCompiler.cpp: Removed. - * yarr/RegexCompiler.h: Removed. - * yarr/RegexInterpreter.cpp: - * yarr/RegexJIT.cpp: - * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp. - (JSC::Yarr::compileRegex): - (JSC::Yarr::RegexPattern::RegexPattern): - * yarr/RegexPattern.h: - -2010-12-23 Patrick Gansterer <paroga@webkit.org> + * gyp/JavaScriptCore.gyp: - Unreviewed build fix for WinCE after r74360. +2011-03-01 Adam Barth <abarth@webkit.org> - Move the OS(WINDOWS) section after the OS(WINCE) section - and add missing argument to the getStackMax call. - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): - -2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Unreviewed build fix. - - [Symbian] Make sure OSAllocatorSymbian builds - - This patch only addresses the build problem. - - https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full - (re)implementation of the Symbian allocator. - - * wtf/OSAllocatorSymbian.cpp: - (WTF::OSAllocator::reserveUncommitted): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - -2010-12-22 Dan Bernstein <mitz@apple.com> - - Changed WebKitTools to Tools. - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - -2010-12-22 Dan Bernstein <mitz@apple.com> - - Rubber-stamped by Mark Rowe. - - Changed WebKitTools to Tools in script build phases. - - * JavaScriptCore.xcodeproj/project.pbxproj: + Reviewed by Eric Seidel. -2010-12-22 Andrei Popescu <andreip@google.com> + JavaScriptCore GYP build should copy some headers into the target framework + https://bugs.webkit.org/show_bug.cgi?id=55524 - Unreviewed build fix. + After this patch, all the framework headers are exported as public + headers. We need to teach GYP how to handle private headers. - Fix Chromium Linux shared library build. - [Chromium] r74431 broke the Chromium Linux shared library build - https://bugs.webkit.org/show_bug.cgi?id=51462 + I struggled to determine how to store the information about whether a + header was public, private, or project (i.e., not exported). + Generally, the GYPI should just list the files, but it seemed siliy to + have an almost duplicated list of files in the GYP file itself. If + this design doesn't scale, we might have to revisit it in the future. * JavaScriptCore.gyp/JavaScriptCore.gyp: * JavaScriptCore.gypi: + * gyp/JavaScriptCore.gyp: -2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r74462. - http://trac.webkit.org/changeset/74462 - https://bugs.webkit.org/show_bug.cgi?id=51449 - - broke chromium win (Requested by tonyg-cr on #webkit). - - * JavaScriptCore.gypi: - -2010-12-21 Tony Gentilcore <tonyg@chromium.org> - - Unreviewed build fix. - - [chromium] Build fix after r74431 - https://bugs.webkit.org/show_bug.cgi?id=51447 - - * JavaScriptCore.gypi: - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Speculative build fix. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::underMemoryPressure): - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 26276 - Need a mechanism to determine stack extent - - This patch adds accurate stack size calculation for: - DARWIN, QNX, UNIX - We still need to fix: - WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com - https://bugs.webkit.org/show_bug.cgi?id=51443 - - The problem here is that each page uses a reasonable amount of memory, (~4Mb), - and that when miultiple pages are open we keep all JIT code for all functions - in all pages alive. - - Add a check to detect high memory pressure situations in the executable allocator - (>50% of available memory allocated), and upon a top level entry into JSC (no code - running on the stack) in this situation throw away all JIT code. - - * JavaScriptCore.exp: - * debugger/Debugger.cpp: - (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile. - * jit/ExecutableAllocator.h: - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::ExecutablePool::systemAlloc): Count allocations. - (JSC::ExecutablePool::systemRelease): Count deallocations. - (JSC::ExecutablePool::underMemoryPressure): Check memory pressure. - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool. - * jit/ExecutableAllocatorWin.cpp: - (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool. - * runtime/Executable.cpp: - (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile. - * runtime/Executable.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code. - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.h: - (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away. - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching - https://bugs.webkit.org/show_bug.cgi?id=51434 - - Reduce the amount of memory the RegExpCache can hold on to on iOS. - Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate - ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of - memory. Firstly, we can reduce this by simply reducing the size of the cache to 32 - entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated - from RegExp objects. This helps in two ways (1) it increases the probability that - RegExps in the cache share the same pool, and (2) it means that a RegExp can't end - up holding on to a large ExecutablePool containing a translation of JS code. - (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the - same pool, but large RegExp patterns are less common). - - * runtime/JSGlobalData.h: - * runtime/RegExpCache.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Eeeep! build fix! - - * wtf/OSAllocator.h: - (WTF::OSAllocator::decommitAndRelease): - -2010-12-21 Gavin Barraclough <barraclough@apple.com> - - Ooops, fixed typo in comment. - - * wtf/OSAllocator.h: - -2010-12-21 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Gavin Barraclough & Oliver Hunt. - - Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements - https://bugs.webkit.org/show_bug.cgi?id=51359 - - I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in - Heap::allocateBlock (1902752929), and some other leaks and crashes as well. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files. - - * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by - PageAllocationAligned. - - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::addWeakGCHandle): - * runtime/Collector.h: Switched from AlignedMemoryAllocator to - PageAllocationAligned. - - * runtime/GCHandle.cpp: - * runtime/GCHandle.h: Ditto. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation - functions. Supplanted by PageAllocationAligned. - - * wtf/PageAllocationAligned.cpp: Added. - (WTF::PageAllocationAligned::allocate): - (WTF::PageAllocationAligned::deallocate): - * wtf/PageAllocationAligned.h: Added. - (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform - class for doing aligned memory allocation. This class properly matches - allocation and deallocation library calls, fixing a long-standing bug - in PageAllocation. - - * wtf/Platform.h: Removed some defunction VM platform defines. - - * wtf/wtf.pri: Updated build files. - -2010-12-21 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com - https://bugs.webkit.org/show_bug.cgi?id=49006 - - This problem was caused by having a parameter named 'arguments'. - The fix is to treat parameters named 'arguments' as shadowing - the actual arguments property, and so logically turn the function - into one that doesn't "use" arguments. - - This required a bit of fiddling in the parser to ensure we correctly - propagate the 'feature' of shadowing is set correctly. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::createArgumentsIfNecessary): - Change assertion to an early return as we may now reference - a property named 'arguments' without being in a function that - has the ArgumentsFeature - * parser/JSParser.cpp: - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::declareParameter): - (JSC::JSParser::Scope::shadowsArguments): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionInfo): - * parser/Nodes.h: - (JSC::ScopeNode::usesArguments): - -2010-12-21 Daniel Bates <dbates@rim.com> - - Reviewed by Eric Seidel and Darin Adler. - - Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory. - https://bugs.webkit.org/show_bug.cgi?id=51367 - - Inspired by a patch by George Staikos. - - * wtf/DateMath.cpp: - (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now - of type OwnPtrArray<char>. - * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed. - (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone. - (JSC::GregorianDateTime::operator tm): Ditto. - (JSC::GregorianDateTime::copyFrom): Ditto. - -2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r74402. - http://trac.webkit.org/changeset/74402 - https://bugs.webkit.org/show_bug.cgi?id=51402 - - This patch broke the Windows 7 Release Layout Tests (Requested - by jessieberlin on #webkit). - - * wtf/StackBounds.cpp: - (WTF::estimateStackBound): - (WTF::StackBounds::initialize): - -2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Csaba Osztrogonác. - - Unify the name of parentheses in YARR: rename parenthesis to - parentheses. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): - -2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Andreas Kling. - - [Qt] Set BUILDING_QT__ consistently - https://bugs.webkit.org/show_bug.cgi?id=51341 - - * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it - is already defined in WebKit.pri. - -2010-12-20 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 26276 - Need a mechanism to determine stack extent - - This patch adds accurate stack size calculation for: - DARWIN, WINDOWS, QNX, UNIX - We still need to fix: - SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE - - * wtf/StackBounds.cpp: - (WTF::StackBounds::initialize): - -2010-12-20 Gavin Barraclough <barraclough@apple.com> - - PPC build fix; stop using std::swap on PageAllocation/PageReservation, - this was failing on some compilers since the lack of default construction - for the m_executable/m_writable fields meant the value being swapped may - not have been fully initialized. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::deallocate): - * wtf/PageBlock.h: - * wtf/PageReservation.h: - (WTF::PageReservation::deallocate): - -2010-12-20 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - |delete name| in strict mode code should be an early error - https://bugs.webkit.org/show_bug.cgi?id=50431 - - Disallow the |delete IDENTIFIER| production in strict mode, and removed - a bunch of now unnecessary code. - - * parser/JSParser.cpp: - (JSC::JSParser::Scope::collectFreeVariables): - (JSC::jsParse): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseUnaryExpression): - * parser/JSParser.h: - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/Parser.h: - (JSC::Parser::parse): - -2010-12-20 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Olver Hunt. - - Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation - - The current implementation of recursion limit checking is not safe on smaller stacks. - Switch to using a common mechanism, shared with the parser, to check recursion limits. - - Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest - footprint on the stack, at just under 1k on x86-64. Given this, the default recursion - check (requiring 4k of available space to recurse) seems reasonable. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNode): - (JSC::BytecodeGenerator::emitNodeInConditionContext): - * bytecompiler/NodesCodegen.cpp: - (JSC::BinaryOpNode::emitStrcat): - -2010-12-20 Tony Gentilcore <tonyg@chromium.org> - - Unreviewed build fix. - - Include pthread to fix chromium mac build (broken by r74360) - https://bugs.webkit.org/show_bug.cgi?id=51356 - - * wtf/StackBounds.cpp: - -2010-12-20 Xan Lopez <xlopez@igalia.com> - - Reviewed by Gustavo Noronha. - - * GNUmakefile.am: add missing files. - -2010-12-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 26276 - Need a mechanism to determine stack extent - - This patch adds a class 'StackBounds', to hold information about the machine stack. - The implementation of this class broadly adheres to the current implmentation of - stack limit checking, and as such does not solve the problem of determining stack - extent, but gives us a common place to do so. - - Currently two mechanism are provided to determine the stack origin (the point the - stack is growing away from). currentThreadStackBase() in Collector provides a - more accurate determination of the stack origin, so use this to calculate - StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and - as such can be removed. Cache the StackBounds on WTFThreadData such that they - need only be determined once per thread, and for non-API contexts cache this - information in JSGlobalData, to save a thread-specific access. - - For the time being retain the estimate of stack size used by JSC's parser - (128 * sizeof(void*) * 1024), with a view to replacing this with something more - accurate in the near future. - - * parser/JSParser.cpp: - (JSC::JSParser::canRecurse): - (JSC::JSParser::JSParser): - Change to use StackBounds. - * runtime/Collector.cpp: - (JSC::Heap::registerThread): - (JSC::Heap::markCurrentThreadConservativelyInternal): - Change to use StackBounds, cached on JSGlobalData. - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::stack): - Add a cached copy of StackBounds. - * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp. - (WTF::estimateStackBound): - (WTF::StackBounds::initialize): - (WTF::getStackMax): - Copy code from Collector.cpp to determine stack origin. - * wtf/StackBounds.h: Added. - (WTF::StackBounds::StackBounds): - No argument constructor; returns a null StackBounds. - (WTF::StackBounds::currentThreadStackBounds): - Returns a StackBounds object representing the stack limits - of the current thread. - (WTF::StackBounds::origin): - Returns to stack origin (the point the stack is growing away - from; the highest extent of the stack on machines where the - stack grows downwards. - (WTF::StackBounds::recursionLimit): - Returns a limit value that is 'a comfortable distance from - the end of the stack'. Our concept of this is currently 1 page - away from the end, however the default value may be tuned in - the future, and clients may override passing a larger delta; - should only be called on StackBounds object representing the - stack of the thread this method is called on (checked by - checkConsistency). - (WTF::StackBounds::recursionCheck): - Checks whether we are currently 'a comfortable distance from - the end of the stack'. Our concept of this is currently 1 page - away from the end, however the default value may be tuned in - the future, and clients may override passing a larger delta - to apply when checking, if they wish to do so. This method - should only be called on StackBounds object representing the - stack of the thread this method is called on (checked by - checkConsistency). - (WTF::StackBounds::current): - Approximate current stack position. On machines where the stack - is growing downwards this is the lowest address that might need - conservative collection. - (WTF::StackBounds::isGrowingDownward): - True for all platforms other than WINCE, which has to check. - (WTF::StackBounds::checkConsistency): - This is called in methods that shoulds only be operating on a - valid set of bounds; as such we expect m_origin != m_bounds - (i.e. stack size != zero) - we're really testing that this - object is not null (the constructor initializes both fields - to zero). Also checks that current() is within the stack's - bounds. - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - * wtf/WTFThreadData.h: - (WTF::WTFThreadData::stack): - Add the StackBounds member variable. - -2010-12-17 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Factored common page set management into a new PageBlock base class - https://bugs.webkit.org/show_bug.cgi?id=51285 - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::intializePageSize): - * wtf/PageAllocation.cpp: Removed. - * wtf/PageAllocation.h: - (WTF::PageAllocation::deallocate): - (WTF::PageAllocation::PageAllocation): - * wtf/PageReservation.h: - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::deallocate): - (WTF::PageReservation::PageReservation): - * wtf/wtf.pri: - -2010-12-17 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - RegExp Jit'ed expression crashes clicking link on yelp.com - https://bugs.webkit.org/show_bug.cgi?id=51284 - - When transitioning between an non-repeating beginning of line - anchored expression and the remaining refactored repeating - expression, we should not clear any residual datalabel in - state's m_backtrack. It will be resolved and cleared in subsequent - code when linkAlternativeBacktracks() is called for the repeating - alternative(s). - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::BacktrackDestination::clear): - (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack): - -2010-12-17 Dan Bernstein <mitz@apple.com> - - Rubber-stamped by Mark Rowe. - - Updated for the renaming of WebKitTools to Tools - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: - -2010-12-17 Ariya Hidayat <ariya@sencha.com> - - Reviewed by Oliver Hunt. - - [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST - https://bugs.webkit.org/show_bug.cgi?id=51268 - - * parser/JSParser.cpp: - (JSC::JSParser::parseAssignmentExpression): - -2010-12-17 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - Removed RChunk from PageAllocation/PageReservation, since it's now unused. - https://bugs.webkit.org/show_bug.cgi?id=51276 - - * wtf/PageAllocation.h: - (WTF::PageAllocation::PageAllocation): - * wtf/PageReservation.h: - (WTF::PageReservation::PageReservation): - -2010-12-17 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Incorrect encoding of some constants in ARMv7 JIT - https://bugs.webkit.org/show_bug.cgi?id=51273 - <rdar://problem/8650210> - - When using immediate encoding 3 we need to write the byte - that holds a duplicated value. - - * assembler/ARMv7Assembler.h: - (JSC::ARMThumbImmediate::makeEncodedImm): - -2010-12-16 Evan Martin <evan@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] useless warnings when building on Windows - https://bugs.webkit.org/show_bug.cgi?id=50985 - - Disable some compiler warnings that aren't indicative of real problems. - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2010-12-16 Pratik Solanki <psolanki@apple.com> - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=51166 - ExecutableAllocator::cacheFlush should call sys_cache_control - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API - - sys_cache_control(kCacheFunctionPrepareForExecution,...). - -2010-12-16 Ariya Hidayat <ariya@sencha.com> - - Reviewed by Andreas Kling. - - [JSC] Const correctness in ASTBuilder and SyntaxChecker - https://bugs.webkit.org/show_bug.cgi?id=51141 - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::getName): - (JSC::ASTBuilder::getType): - (JSC::ASTBuilder::isResolve): - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::operatorStackPop): - -2010-12-15 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Web Audio API: port FFTFrame to MKL - https://bugs.webkit.org/show_bug.cgi?id=50986 - - Fixed bug in log2 emulation function provided for Windows port of - Web Audio API. - - * wtf/MathExtras.h: - (log2): - -2010-12-14 Mark Rowe <mrowe@apple.com> - - Reviewed by Sam Weinig. - - <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video> - - * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool. - It was previously implicitly convertible to bool on Mac via operator NSString*, - but since that always has a non-zero return value it would give unexpected results. - -2010-12-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> - - Reviewed by Eric Seidel. - - [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported - https://bugs.webkit.org/show_bug.cgi?id=50231 +2011-03-01 Sheriff Bot <webkit.review.bot@gmail.com> - Guard CONFIG+=link_pkgconfig with !symbian. + Unreviewed, rolling out r80079. + http://trac.webkit.org/changeset/80079 + https://bugs.webkit.org/show_bug.cgi?id=55547 - * jsc.pro: - -2010-12-14 Cameron Zwarich <zwarich@apple.com> - - Not reviewed. - - Revert accidental change disabling the JIT for most platforms. + "Broke the Win debug build?" (Requested by dcheng on #webkit). * wtf/Platform.h: -2010-12-13 Cameron Zwarich <zwarich@apple.com> - - Reviewed by Eric Seidel. - - Clang fails to build the JSC interpreter - https://bugs.webkit.org/show_bug.cgi?id=51016 - - Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows - them, but it does not correctly generate the cleanup, causing a leak if the - cleanup decrements a reference count. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Put an Identifier into its own scope. - -2010-12-14 Carlos Garcia Campos <cgarcia@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Simplify context-menu handling code - https://bugs.webkit.org/show_bug.cgi?id=49658 - - * wtf/PlatformRefPtr.h: Add leakRef() - -2010-12-13 Cameron Zwarich <zwarich@apple.com> - - Reviewed by Gavin Barraclough. - - JavaScriptCore should not use "asm volatile" outside of a function - https://bugs.webkit.org/show_bug.cgi?id=50991 - - * jit/JITStubs.cpp: Remove the volatile keyword from asm statements. - -2010-12-13 Steve Falkenburg <sfalken@apple.com> - - Windows production build fix. - Try copying ICU 4.6 in addition to 4.4 and 4.2. - - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: - -2010-12-13 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - REGRESSION: mobileme mail viewing is broken - https://bugs.webkit.org/show_bug.cgi?id=50884 - - Fixed problem where simple parenthesis (those without capture and - with a fixed count) where not propagating backtrack to labels for - nested parentheses. Also added the nesting level for the parentheses - state created in that case as well. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel): - (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): - (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - -2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR - https://bugs.webkit.org/show_bug.cgi?id=49385 - - Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchParentheses): - (JSC::Yarr::Interpreter::backtrackParentheses): - * yarr/RegexPattern.h: - -2010-12-10 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting - bugs.webkit.org - https://bugs.webkit.org/show_bug.cgi?id=50816 - - First nested parentheses of the second or greater alternative - where backtracking to the prior parentheses. Changed the default - handling of initial parentheses for all alternatives to go back - to the immediate outer paren. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): - (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): - (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex): - (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail): - (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail): - (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): - (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks): - (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - -2010-12-11 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Add an overload to makeString for Vector<char> - https://bugs.webkit.org/show_bug.cgi?id=50123 - - Also cleanup StringTypeAdapter. - - * wtf/text/StringConcatenate.h: - -2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com> - - Reviewed by Eric Seidel. - - [Qt] Build fix for Symbian: don't compile POSIX memory management implementation - https://bugs.webkit.org/show_bug.cgi?id=50707 - - * wtf/wtf.pri: +2011-03-01 Daniel Cheng <dcheng@chromium.org> -2010-12-10 Steve Falkenburg <sfalken@apple.com> - - Windows production build fix. - - Don't stop if react-to-vsprops-changes.py exits with an error, - since this will occur in production builds. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2010-12-10 Brian Weinstein <bweinstein@apple.com> - - Reviewed by Adam Roben. + Reviewed by David Levin. - Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows. + Add feature define for data transfer items + https://bugs.webkit.org/show_bug.cgi?id=55510 * wtf/Platform.h: -2010-12-10 Martin Robinson <mrobinson@igalia.com> - - Unreviewed, rolling out r73703. - http://trac.webkit.org/changeset/73703 - https://bugs.webkit.org/show_bug.cgi?id=49658 +2011-03-01 Oliver Hunt <oliver@apple.com> - This patch is causing crashes on the GTK+ bots. + Reviewed by Joseph Pecoraro. - * wtf/PlatformRefPtr.h: - -2010-12-10 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Eric Seidel. - - Cleanup StringWx.cpp - https://bugs.webkit.org/show_bug.cgi?id=50525 - - Use StringImpl::createUninitialized to avoid memcpy and fix style issues. - - * wtf/wx/StringWx.cpp: - (WTF::String::String): - -2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Simplify context-menu handling code - https://bugs.webkit.org/show_bug.cgi?id=49658 - - * wtf/PlatformRefPtr.h: - -2010-12-09 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION (r73065?): A regex no longer works - https://bugs.webkit.org/show_bug.cgi?id=50570 - - Changed the handling of adjacent parentheses backtracks in two ways. - First, only outer most paren backtracks default to back tracking - to the "next character" looping code. Second, added a jump around - backtracks that fall through to the next backtrack where the - second backtrack has some greedy processing before the backtracking - from outside the parentheses code. - Also cleaned up extraneous white spce, removing white space at the - end of or that makes up a whole line. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::GenerationState::GenerationState): - (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel): - (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel): - (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): - (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail): - (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): - (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration): - (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - -2010-12-09 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Addressed the "FIXME" issues in array sort for toString() methods that - mutate the array in either size or contents. The change is to mark - the temporary array contents so that they are not garbage collected - and to make sure the array is large enough to hold the contents - of the sorted temporary vector. - https://bugs.webkit.org/show_bug.cgi?id=50718 - - * runtime/Collector.cpp: - (JSC::Heap::addTempSortVector): - (JSC::Heap::removeTempSortVector): - (JSC::Heap::markTempSortVectors): - (JSC::Heap::markRoots): - * runtime/Collector.h: - * runtime/JSArray.cpp: - (JSC::JSArray::sort): - * runtime/JSValue.h: - -2010-12-09 Michael Saboff <msaboff@apple.com> - - Reviewed by Darin Adler. + Misaligned memory access in CloneDeserializer on all ARM arch. + https://bugs.webkit.org/show_bug.cgi?id=48742 - Changed setting of backtrack labels to not overwrite a prior - label. Where losing prior labe which then reverted back to - next character label. - https://bugs.webkit.org/show_bug.cgi?id=50579 + Add a CPU class for architectures that need aligned addresses + for memory access. - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel): + * wtf/Platform.h: -2010-12-08 Gavin Barraclough <barraclough@apple.com> +2011-03-01 Adam Barth <abarth@webkit.org> - Reviewed by Sam Weinig. + Reviewed by Dimitri Glazkov. - Permit Character Class Escape in CharacterRange in Character Class. - https://bugs.webkit.org/show_bug.cgi?id=50483 - https://bugs.webkit.org/show_bug.cgi?id=50538 - https://bugs.webkit.org/show_bug.cgi?id=50654 - https://bugs.webkit.org/show_bug.cgi?id=50646 + Add pre- and post-build actions for JavaScriptCore GYP build + https://bugs.webkit.org/show_bug.cgi?id=55507 - We recently tightened up our spec conformance in generating syntax - error in these cases, however testing in the wild has shown this - to be problematic. This reverts the previous change in allowing - class escapes (e.g. \d) in ranges in character classes ([]), but - does retain some closer conformance to the spec in only allowing - ranges that would be permitted per the grammar rules in the spec - (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range). + After this patch, we have all the steps for building the main + JavaScriptCore framework except the "copy headers" step, which I'll do + next. - * yarr/RegexParser.h: - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): - (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): - (JSC::Yarr::Parser::parse): + * gyp/JavaScriptCore.gyp: -2010-12-08 Geoffrey Garen <ggaren@apple.com> +2011-03-01 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. - Try to fix crash-on-launch seen on Windows builder. - - * wtf/OSAllocatorWin.cpp: - (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for - a bug that hasn't been fixed yet. - -2010-12-08 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file. - -2010-12-08 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def - file to remove a symbol -- the next build failure will say which symbol - to add back. - -2010-12-08 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file. + Rolled back in r79627 now that the underlying cause for it crashing is fixed. + https://bugs.webkit.org/show_bug.cgi?id=55159 -2010-12-08 Geoffrey Garen <ggaren@apple.com> - - Try to fix GTK Linux build. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutablePool::systemAlloc): - * runtime/AlignedMemoryAllocator.h: - (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator. + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Heap.cpp: + (JSC::Heap::allocateSlowCase): + * runtime/Heap.h: + * runtime/JSCell.h: + (JSC::JSCell::MarkedSpace::sizeClassFor): + (JSC::JSCell::Heap::allocate): + (JSC::JSCell::JSCell::operator new): + * runtime/MarkedBlock.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::SizeClass::SizeClass): -2010-12-07 Geoffrey Garen <ggaren@apple.com> +2011-03-01 Mark Rowe <mrowe@apple.com> Reviewed by Sam Weinig. - Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator - https://bugs.webkit.org/show_bug.cgi?id=50653 + Replace two script phases that do nothing but copy files with copy files build phases. - * JavaScriptCore.exp: Updated for new function signature. - - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay. - OSAllocator is now the central location for verifying that allocation succeeds. - This allowed me to remove some complicating cross-platform cruft. - - * runtime/AlignedMemoryAllocator.h: - (JSC::::allocate): Updated for code motion. - - * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to - support VM features required by clients of PageAllocation and PageReservation. - - * wtf/OSAllocatorPosix.cpp: - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing - executable memory here. - - * wtf/OSAllocatorSymbian.cpp: - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): Updated for new function signatures. - - * wtf/OSAllocatorWin.cpp: - (WTF::protection): - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - (WTF::OSAllocator::release): Updated for new function signatures. Moved - some protection-related and WINCE-related code from PageAllocation here. - - * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since - it was only used by checkAllocatedOkay, which is now gone. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::allocate): - (WTF::PageAllocation::allocateAligned): - (WTF::PageAllocation::deallocate): - (WTF::PageAllocation::isPowerOfTwo): - (WTF::PageAllocation::systemAllocateAligned): Removed system* functions, - and replaced calls to them with calls to OSAllocator. - - * wtf/PageReservation.h: - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::reserve): - (WTF::PageReservation::deallocate): - (WTF::PageReservation::PageReservation): Ditto. Added m_writable and - m_executable because these flags are now required when committing memory. - -2010-12-08 Chris Rogers <crogers@google.com> - - Reviewed by Kenneth Russell. - - Add web audio files to mac port Xcode projects - https://bugs.webkit.org/show_bug.cgi?id=50721 + This speeds up the build by a few seconds on high-end Mac Pros. * JavaScriptCore.xcodeproj/project.pbxproj: -2010-12-08 Oliver Hunt <oliver@apple.com> +2011-03-01 David Kilzer <ddkilzer@apple.com> - Reviewed by Gavin Barraclough. + Spring cleaning! - Marking the active global object re-enters through markConservatively - https://bugs.webkit.org/show_bug.cgi?id=50711 - - draining of the MarkStack is not allowed to be re-entrant, we got away - with this simply due to the logic in MarkStack::drain implicitly handling - changes that could be triggered by the re-entry. - - Just to be safe this patch removes the re-entry through markConservatively - so we don't accidentally introduce such an issue in future. I've also - added an assertion to catch such errors. - - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): - (JSC::Heap::markCurrentThreadConservativelyInternal): - (JSC::Heap::markOtherThreadConservatively): - * runtime/JSArray.h: - (JSC::MarkStack::drain): - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStack): - -2010-12-08 Chris Marrin <cmarrin@apple.com> - - Reviewed by Simon Fraser. - - Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations - https://bugs.webkit.org/show_bug.cgi?id=49388 - - Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG) - which was decided was the best way to identify a build with CoreAnimation - - * wtf/Platform.h: - -2010-12-07 Anders Carlsson <andersca@apple.com> - - Build fix follow up build fix. + Rubber-stamped by Mark Rowe. - * pcre/pcre_ucp_searchfuncs.cpp: - (jsc_pcre_ucp_othercase): + * JavaScriptCore.xcodeproj/project.pbxproj: + (Copy Into Framework): Remove "set -x" and its comment. -2010-12-07 Anders Carlsson <andersca@apple.com> +2011-03-01 Michael Saboff <msaboff@apple.com> Reviewed by Darin Adler. - Fix clang++ build - https://bugs.webkit.org/show_bug.cgi?id=50645 - - Explicitly cast offset to int. - - * pcre/pcre_ucp_searchfuncs.cpp: - (jsc_pcre_ucp_othercase): - -2010-12-07 Kenneth Russell <kbr@google.com> - - Reviewed by David Levin. - - Fix compilation of core web audio files on Windows - https://bugs.webkit.org/show_bug.cgi?id=50603 - - Added log2 definition to MathExtras.h on Windows platform. - - * wtf/MathExtras.h: - (log2): - -2010-12-07 Antti Koivisto <antti@apple.com> - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=50412 - http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading - - Creating a substring caused the original string be flattened if it was in the rope form. This could use - significant amount of memory by reducing buffer sharing between strings. - - Add a rope specific substring function that constructs the substring by reusing the rope fibers - instead of flattening the rope. - - No change observed in SunSpider. - - * runtime/JSString.cpp: - (JSC::JSString::substringFromRope): - * runtime/JSString.h: - (JSC::jsSubstring): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - -2010-12-06 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Gavin Barraclough. - - Simplified some ASLR-related code in PageAllocation/Reservation - https://bugs.webkit.org/show_bug.cgi?id=50599 - - Removed reserveAt, allocateAt, and friends, since they all existed to - serve one feature: ASLR for executable memory on x86_64 on Mac. Moved - ASLR code down into systemAllocate -- now, any time you allocate - executable memory on a supporting platform, the memory's location is - randomized. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller - to randomize anything. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and - beefed up executable allocation with randomization. - - * wtf/PageReservation.h: - (WTF::PageReservation::systemReserve): Removed some *At() functions. - -2010-12-06 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems - https://bugs.webkit.org/show_bug.cgi?id=50588 - - * wtf/OSAllocatorPosix.cpp: - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): Tightened up some comments. Changed - reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems. - -2010-12-06 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - [WINCE] Add build system - https://bugs.webkit.org/show_bug.cgi?id=50522 - - * CMakeListsWinCE.txt: Added. - * shell/CMakeListsWinCE.txt: Added. - * wtf/CMakeListsWinCE.txt: Added. - -2010-12-06 John Tantalo <john.tantalo@gmail.com> - - Reviewed by Geoffrey Garen. - - jsc does not ignore shebang - https://bugs.webkit.org/show_bug.cgi?id=49576 - - * jsc.cpp: - (fillBufferWithContentsOfFile): - - translate shebang into a valid JavaScript comment so the lexer ignores it - -2010-12-05 Adam Roben <aroben@apple.com> - - Windows production build fix - - Put spaces after trailing backslashes when setting - %WebKitVSPropsRedirectionDir%. According to MSDN - <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>: - - A backslash ( \ ) followed by a newline character is interpreted as - a space in the command; use a backslash at the end of a line to - continue a command onto the next line. NMAKE interprets the - backslash literally if any other character, including a space or - tab, follows the backslash. - - * JavaScriptCore.vcproj/JavaScriptCore.make: - -2010-12-04 Patrick Gansterer <paroga@webkit.org> - - Unreviewed, build fix after r69132. - - * shell/CMakeLists.txt: Fix directory name (jsc -> shell). - -2010-12-04 Xan Lopez <xlopez@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow - https://bugs.webkit.org/show_bug.cgi?id=50451 - - * wtf/gobject/GTypedefs.h: add GdkWindow defines. - -2010-12-03 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Oliver Hunt. - - Bug 50509 - set* methods on MacroAssembler are awfully named. - - Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison. - set8 compares 32-bit operands, and sets an 8-bit result based on the comparison. - setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison. - - Rename to clarify. - - set32 -> set32Compare32 - setTest32 -> set32Test32 - set8 -> set8Compare32 - setTest8 -> set32Test8 - - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::setPtr): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::set32Compare32): - (JSC::MacroAssemblerARM::set8Compare32): - (JSC::MacroAssemblerARM::set32Test32): - (JSC::MacroAssemblerARM::set32Test8): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::set32Compare32): - (JSC::MacroAssemblerARMv7::set8Compare32): - (JSC::MacroAssemblerARMv7::set32Test32): - (JSC::MacroAssemblerARMv7::set32Test8): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::set8Compare32): - (JSC::MacroAssemblerMIPS::set32Compare32): - (JSC::MacroAssemblerMIPS::set32Test8): - (JSC::MacroAssemblerMIPS::set32Test32): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::set8Compare32): - (JSC::MacroAssemblerX86Common::set32Compare32): - (JSC::MacroAssemblerX86Common::set32Test8): - (JSC::MacroAssemblerX86Common::set32Test32): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_eq): - (JSC::JIT::emit_op_neq): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - -2010-12-03 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Incorrect logic for returning memory at the end of linking. - Reviewed by Geoff Garen. - - At the end of linking we return any space at the end of the - allocated executable region that was saved due to branch - compaction. This is currently by done by subtracting the - different from the m_freePtr in the allocation pool. This - can be incorrect if your allocation was made from a new - page that was not selected for subsequent allocations. - - This patch corrects this behaviour by verifying that the - memory being returned actually comes from the current - allocation pool. - - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::linkCode): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::tryShrink): - -2010-12-03 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough - - Changes to significantly reduce branches to branches in JIT'ed - parentheses backtrack processing. The changes include the following: - - Taking the backtracking processing out of line and adding it as - code at the end of the JIT'ed routine. - - Allow backtracks to be direct via an indirect branch for an address - pushed onto the stack. If the use of an indirect branch is from a - conditional jump, then we emit a trampoline at the end of the - routine. - - Propogate backtracks instead of adding trampolines. Backtracks are - propogated to where they are used. This change also eliminated - trampoline branch code that aren't used. - - Added global expression state to keep track of parentheses tail - code and indirect branches. - Other changes made to support these changes. - - Split invertOrCapture flag on Patterns to two separate flags. Added - getters for these flags. Rippled these changes to both the JIT - and interpreter code. - - Split BacktrackDestination out off TermGenerationState struct. - This is done to hold references to a backtrack for later code - generation. - https://bugs.webkit.org/show_bug.cgi?id=50295 - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::JmpDst::isSet): - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::JmpDst::isSet): - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::Label::isSet): - (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed): - (JSC::AbstractMacroAssembler::DataLabelPtr::used): - (JSC::AbstractMacroAssembler::JumpList::clear): - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::JmpDst::isSet): - * assembler/X86Assembler.h: - (JSC::X86Assembler::JmpDst::isSet): - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin): - (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin): - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexInterpreter.h: - (JSC::Yarr::ByteTerm::ByteTerm): - (JSC::Yarr::ByteTerm::BackReference): - (JSC::Yarr::ByteTerm::invert): - (JSC::Yarr::ByteTerm::capture): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry): - (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump): - (JSC::Yarr::RegexGenerator::GenerationState::GenerationState): - (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry): - (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable): - (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): - (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail): - (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration): - (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration): - (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration): - (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration): - (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination): - (JSC::Yarr::RegexGenerator::BacktrackDestination::clear): - (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination): - (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset): - (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList): - (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget): - (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo): - (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr): - (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack): - (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset): - (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps): - (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel): - (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack): - (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists): - (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists): - (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks): - (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo): - (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): - (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative): - (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack): - (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): - (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists): - (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): - (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump): - (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr): - (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset): - (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel): - (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks): - (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo): - (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink): - (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks): - (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps): - (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination): - (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom): - (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): - (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks): - (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration): - (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): - (JSC::Yarr::RegexGenerator::generateAssertionBOL): - (JSC::Yarr::RegexGenerator::generateAssertionEOL): - (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary): - (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle): - (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): - (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed): - (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassSingle): - (JSC::Yarr::RegexGenerator::generateCharacterClassFixed): - (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy): - (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): - (JSC::Yarr::RegexGenerator::generateDisjunction): - (JSC::Yarr::RegexGenerator::compile): - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::PatternTerm): - (JSC::Yarr::PatternTerm::invert): - (JSC::Yarr::PatternTerm::capture): - -2010-12-03 Chris Rogers <crogers@google.com> - - Reviewed by Kenneth Russell. - - First steps to adding web audio files to build systems - https://bugs.webkit.org/show_bug.cgi?id=49952 - - * wtf/Complex.h: - -2010-12-03 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - Move StringWx.cpp into wtf directory - https://bugs.webkit.org/show_bug.cgi?id=50060 - - * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp. - (WTF::String::String): - -2010-12-03 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - Move StringBrew.cpp into wtf directory - https://bugs.webkit.org/show_bug.cgi?id=50058 - - * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp. - (WTF::String::String): - -2010-12-03 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - Move StringHaiku.cpp into wtf directory - https://bugs.webkit.org/show_bug.cgi?id=50057 - - * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp. - (WTF::String::String): - (WTF::String::operator BString): - -2010-12-02 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build. - - * runtime/GCActivityCallback.cpp: - (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation. - -2010-12-02 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Gavin Barraclough. - - Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at - com.apple.JavaScriptCore: JSC::Heap::markRoots + 746 - - * API/APIShims.h: - (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new - synchronize() function. - - * runtime/Collector.cpp: - (JSC::Heap::activityCallback): - * runtime/Collector.h: Added an activityCallback() accessor, for the - call above. - - * runtime/GCActivityCallback.h: - (JSC::GCActivityCallback::synchronize): - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::operator()): - (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're - scheduled in. If we begin/resume execution within a new run loop, reschedule - on it. This prevents a crash when using a lockless context group on - multiple threads -- the crash would happen if the GC timer scheduled on - thread A, then you continued execution on thread B, then the thread A - timer fired. - -2010-12-02 Darin Adler <darin@apple.com> + TinyMCE not working in nightlies + https://bugs.webkit.org/show_bug.cgi?id=54978 - * wtf/ASCIICType.h: Fix wrong type from last check-in. + Disabling setupBeginChars() to temporarily work arround the test + failure. Filed https://bugs.webkit.org/show_bug.cgi?id=55479 + to track fixing the issue. -2010-12-02 Darin Adler <darin@apple.com> - - Try to fix certain builds (Qt Windows). - - * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete - versions of ICU, UChar32 can be a typedef for unsigned. Adding this - overload should make us compatible with these old ICUs. + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPattern::compile): -2010-12-02 Patrick Gansterer <paroga@webkit.org> +2011-02-23 Joseph Pecoraro <joepeck@webkit.org> - Reviewed by Darin Adler. + Reviewed by Kenneth Rohde Christiansen. - Add AtomicString::fromUTF8 - https://bugs.webkit.org/show_bug.cgi?id=45594 + Viewport parsing no longer accepts "1.0;" value as valid. + https://bugs.webkit.org/show_bug.cgi?id=53705 - Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and - calculates the required length for the UTF16 conversation in one step. - This is then used in a specialized translator for the string table of AtomicString. + Include a didReadNumber parameter to String -> float / double + conversion functions. This way, if the "ok" boolean out + parameter is false, you can check to see if there in fact + was a valid number parsed with garbage at the end. Examples + of that would be parsing "123x456" would have ok = false, + but didReadNumber = true. * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/text/AtomicString.cpp: - (WTF::CStringTranslator::equal): - (WTF::HashAndUTF8CharactersTranslator::hash): - (WTF::HashAndUTF8CharactersTranslator::equal): - (WTF::HashAndUTF8CharactersTranslator::translate): - (WTF::AtomicString::add): - (WTF::AtomicString::addSlowCase): - (WTF::AtomicString::find): - (WTF::AtomicString::fromUTF8): - * wtf/text/AtomicString.h: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::toDouble): + (WTF::StringImpl::toFloat): * wtf/text/StringImpl.h: + * wtf/text/WTFString.cpp: + (WTF::String::toDouble): + (WTF::String::toFloat): + (WTF::charactersToDouble): + (WTF::charactersToFloat): * wtf/text/WTFString.h: - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::readUTF8Sequence): - (WTF::Unicode::convertUTF8ToUTF16): - (WTF::Unicode::calculateStringHashFromUTF8): - (WTF::Unicode::equalUTF16WithUTF8): - * wtf/unicode/UTF8.h: - -2010-12-02 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Added a little hardening to OSAllocator. - - * wtf/OSAllocatorPosix.cpp: - (WTF::OSAllocator::release): - * wtf/OSAllocatorWin.cpp: - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - (WTF::OSAllocator::decommit): - (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system - reports an error. - -2010-12-02 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Geoffrey Garen. - - [Qt] Make platform managing of OSAllocator better than r73106 - https://bugs.webkit.org/show_bug.cgi?id=50385 - - * wtf/OSAllocatorPosix.cpp: Remove platform specific guard. - * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard. - * wtf/OSAllocatorWin.cpp: Remove platform specific guard. - * wtf/wtf.pri: Add the correct platform specific source file instead of all of them. - -2010-12-02 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - [WINCE] Use GetTickCount() for srand() - https://bugs.webkit.org/show_bug.cgi?id=50338 - - time() is not a native function on WinCE, so use GetTickCount() instead. - - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - -2010-12-02 Norbert Leser <norbert.leser@nokia.com> - - Reviewed by Laszlo Gombos. - - [Qt] [Symbian] Reintroduce compiler optimizations for JSC - https://bugs.webkit.org/show_bug.cgi?id=50270 - - Add compiler optimization (symbian ARM target) which was lost after split from WebCore. - Tested via Sunspider and V8 - both of which show significant performance improvement. - - * JavaScriptCore.pro: - -2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Move regex parsing and fallback handling to runtime/RegExp.cpp - https://bugs.webkit.org/show_bug.cgi?id=50015 - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - (JSC::RegExp::compile): - (JSC::RegExp::match): - (JSC::RegExp::printTraceData): - * runtime/RegExp.h: - (JSC::RegExp::pattern): - * yarr/RegexInterpreter.cpp: - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): - (JSC::Yarr::jitCompileRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::setFallBack): - (JSC::Yarr::RegexCodeBlock::isFallBack): - (JSC::Yarr::executeRegex): - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the GTK build. - - * GNUmakefile.am: Use a full path to OSAllocator*.cpp. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the EFL Linux build. - - * CMakeListsEfl.txt: Added OSAllocator to the project. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the Qt build: Include all OS files for Qt's sake, and then - use #ifdefs in the files to exclude things based on OS. - - This is a pretty bad way to manage platforms -- hopefully we can - fix the Qt build system and move away from this in the future. - - * wtf/OSAllocatorPosix.cpp: - * wtf/OSAllocatorSymbian.cpp: - * wtf/OSAllocatorWin.cpp: - * wtf/wtf.pri: - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the Chromium build. - - * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the GTK build. - - * GNUmakefile.am: Added OSAllocator to another project. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the GTK Linux build. - - * JavaScriptCore.gypi: Added OSAllocator to the project. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the Qt Linux build. - - * wtf/OSAllocatorPosix.cpp: Use the right errno.h. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build: export some more symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Try to fix the Qt Linux build. - - * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: commit doesn't have a return value. - - * wtf/OSAllocatorWin.cpp: - (WTF::OSAllocator::commit): - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Build fix: Export some symbols. - - * JavaScriptCore.exp: - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private - so other projects can see it. - - * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM. - -2010-12-01 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Baby step toward a cross-platform virtual memory abstraction: created - an all-static OSAllocator class and changed MarkStack to use it. - - * JavaScriptCore.exp: These functions are inlined now. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp. - - * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp. - - * runtime/MarkStack.h: - (JSC::MarkStack::allocateStack): - (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our - own platform-specific code. - - * runtime/MarkStackNone.cpp: Removed. Nothing used this. - - * runtime/MarkStackPosix.cpp: - * runtime/MarkStackSymbian.cpp: - * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since - we use the OSAllocator abstraction now. - - * wtf/OSAllocator.h: Added. - * wtf/OSAllocatorPosix.cpp: Added. - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - (WTF::OSAllocator::decommit): - (WTF::OSAllocator::release): - * wtf/OSAllocatorSymbian.cpp: Added. - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - (WTF::OSAllocator::decommit): - (WTF::OSAllocator::release): - * wtf/OSAllocatorWin.cpp: Added. - (WTF::OSAllocator::reserve): - (WTF::OSAllocator::reserveAndCommit): - (WTF::OSAllocator::commit): - (WTF::OSAllocator::decommit): - (WTF::OSAllocator::release): The new OSAllocator abstraction. - - * wtf/wtf.pri: Added OSAllocatorSymbian.cpp. - -2010-12-01 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - WinCairo build should not use link-time code generation (LTCG) - https://bugs.webkit.org/show_bug.cgi?id=50353 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -010-12-01 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - vcproj changes can't be applied cleanly by the Windows EWS bot - https://bugs.webkit.org/show_bug.cgi?id=50328 - - * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style. - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style. - * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style. - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style. - -2010-12-01 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs - - For unmatched subpattens we previously used to set the subpattern end to -1, - but now we only set the start value. E.g. consider the following: - /a(b)?c/.exec("ac"); - Previously we would generate an internal results array of: - [ 0, 2, -1, -1 ] - Since fairly recently we have generated results of: - [ 0, 2, -1, ??? ] - (With the end index of the subpattern uninitialized). - - Update these ASSERTs to account for this. - - Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we - were checking the wrong property on the pattern term. We should have been - looking at term.parentheses.subpatternId, but instead were checking - term.subpatternId. The latter is actually only the subpatternId for - back reference terms. Rename this to backReferenceSubpatternId. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchBackReference): - (JSC::Yarr::Interpreter::backtrackBackReference): - -2010-11-30 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - Bug 50297 - \s in YARR should match BOMs. - - From section 15.10.2.12 CharacterClassEscape contains: - - The production CharacterClassEscape :: s evaluates by returning the set of characters containing the - characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions. - - Table 2 in section 7.2 contains: - - \uFEFF Byte Order Mark <BOM> - - * create_regex_tables: - Add BOM to spaces table. - -2010-11-30 Gavin Barraclough <barraclough@apple.com> - Reviewed by Darin Adler. - - Fixed review comments following bug #48101. - Mostly typos, plus gave quantifyInfinite a symbolic name. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): - (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): - (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): - (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): - * yarr/RegexParser.h: - (JSC::Yarr::Parser::parseTokens): - (JSC::Yarr::parse): - -2010-11-30 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Darin Adler. - - WTF project missing build-stopping code from its pre-build event - https://bugs.webkit.org/show_bug.cgi?id=50281 - - * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: - -2010-11-30 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Darin Adler. - - Cleanup UTF8.cpp - https://bugs.webkit.org/show_bug.cgi?id=49581 - - Use macros and functions instead of range values directly. - - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::inlineUTF8SequenceLength): - (WTF::Unicode::UTF8SequenceLength): - (WTF::Unicode::convertUTF16ToUTF8): - (WTF::Unicode::readUTF8Sequence): - (WTF::Unicode::convertUTF8ToUTF16): - * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro. - -2010-11-30 Geoffrey Garen <ggaren@apple.com> +2011-02-28 Geoffrey Garen <ggaren@apple.com> Reviewed by Gavin Barraclough. - Fixed a crash seen when using a PageAllocation to store itself. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping - it, in case unmapping m_base unmaps the PageAllocation. - - * wtf/BumpPointerAllocator.h: - (WTF::BumpPointerPool::destroy): Now this work-around isn't needed! - -2010-11-30 Xan Lopez <xlopez@igalia.com> - - Reviewed by Darin Adler. - - m_hasNonEnumerableProperties is never initialized in Structure - https://bugs.webkit.org/show_bug.cgi?id=50266 - - * runtime/Structure.cpp: - (JSC::Structure::Structure): initialize member variable. - -2010-11-29 Steve Falkenburg <sfalken@apple.com> - - Windows build fix (part 1). Use correct environment variable syntax in cmd files. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: - * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: - * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: - * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: - * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: - * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: - * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: - -2010-11-29 Dan Bernstein <mitz@apple.com> - - Reviewed by Darin Adler. - - WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API. - https://bugs.webkit.org/show_bug.cgi?id=50038 - - * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h. - -2010-11-29 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Darin Adler. - - JavaScriptCore projects on Windows should use cmd files for build events - https://bugs.webkit.org/show_bug.cgi?id=50193 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added. - * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style. - * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added. - * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added. - * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added. - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added. - * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added. - * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added. - -2010-11-29 Dai Mikurube <dmikurube@google.com> - - Reviewed by Kent Tamura. - - when empty, clicking "down" on outer-spin-button returns "max value" - https://bugs.webkit.org/show_bug.cgi?id=45491 - - It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for - date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime() - returns a struct tm, not milliseconds. - - Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all - environments. This calculation is already done in calculateUTCOffset(), and complicated. - Duplicating this complicated calculation is unreasonable because of maintainability. - To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions. - (WTF::calculateUTCOffset): - (WTF::calculateDSTOffset): - * wtf/DateMath.h: - -2010-11-29 Chris Rogers <crogers@google.com> - - Reviewed by Kenneth Russell. - - Switch web audio code to use FloatPoint3D instead of Vector3 - https://bugs.webkit.org/show_bug.cgi?id=50186 - - * wtf/Vector3.h: Removed. - -2010-11-29 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files - https://bugs.webkit.org/show_bug.cgi?id=49858 - - We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files: - - To simplify editing (editing vsprops build steps is confusing). - - For more readable diffs. - - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added. - * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added. - -2010-11-29 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Gavin Barraclough. - - Improved accuracy of command-line SunSpider. - - * jsc.cpp: - (functionRun): Changed the "run" function to run a given test in - its own global object. Previously, all tests ran in the same global - object, which created name conflicts, and made globals from previous - tests artificially survive into later tests. + Past-the-end writes in VM exceptions (caused crashes in r79627) + https://bugs.webkit.org/show_bug.cgi?id=55448 - Also changed "run" to return the elapsed milliseconds when running a - given test, for slightly more accurate numbers. - - (functionCheckSyntax): Ditto on returning elapsed milliseconds. - -2010-11-29 Darin Adler <darin@apple.com> - - Reviewed by Andreas Kling. - - Remove a couple unneeded overflow checks - https://bugs.webkit.org/show_bug.cgi?id=49816 - - * wtf/text/CString.cpp: - (WTF::CString::init): Use an ASSERT instead of - an overflow check with CRASH. + Some exceptions had the wrong structures, so they misoverestimated their + inline storage sizes. -2010-11-29 Adam Roben <aroben@apple.com> - - Robustify react-to-vsprops-changes.py against changes to its location - or the location of the .vsprops files - - Suggested by John Sullivan. - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - Removed file_modification_times. - (main): Use glob.glob to find the .vsprops files and assert that we found some. - -2010-11-29 Adam Roben <aroben@apple.com> - - Touch wtf/Platform.h whenever any .vsprops file changes - - This will cause all files to be recompiled, which will make changes to - preprocessor macros (e.g., ENABLE_*) actually take effect. - - Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_* - macros are changed (because not enough files are rebuilt) - - Reviewed by John Sullivan. - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also - added some comments and logging to make it clearer what the script is - doing and why. - -2010-11-29 Adam Roben <aroben@apple.com> - - Update react-to-vsprops-changes.py after r72555 - - .vsprops files are no longer accessed relative to $WebKitLibrariesDir. - - Fixes <http://webkit.org/b/50166> REGRESSION (r72555): - react-to-vsprops-changes.py no longer works for people with a - non-default $WebKitLibrariesDir - - Reviewed by John Sullivan. - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: - (main): Always look in WebKitLibraries/win for .vsprops files, not in - $WebKitLibrariesDir. - -2010-11-28 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 48100 - YARR allows what seems like a bogus character-class range - - Per ECMA-262 character classes containing character ranges containing - character classes are invalid, eg: - /[\d-x]/ - /[x-\d]/ - /[\d-\d]/ - These should throw a syntax error. - - * yarr/RegexParser.h: - -2010-11-27 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 48101 - Yarr gives different results for /(?:a*?){2,}/ - - The test cases in the linked mozilla bug demonstrate a couple of - problems in subpattern matching. These bugs lie in the optimized - cases - for matching parentheses with a quantity count of 1, and - for matching greedy quantified parentheses at the end of a regex - (which do not backtrack). - - In both of these cases we are failing to correctly handle empty - matches. In the case of parentheses-single matches (quantity count - one) we are failing to test for empty matches at all. In the case - of terminal subpattern matches we do currently check, however there - is a subtler bug here too. In the case of an empty match we will - presently immediately fall through to the next alternative (or - complete the regex match), whereas upon a failed match we should - be backtracking into the failing alternative, to give it a chance - to match further (e.g. consider /a??b?|a/.exec("ab") - upon first - attempting to match the first alternative this will match the empty - string - since a?? is non-greedy, however rather than moving on to - the second alternative we should be re-matching the first one, at - which point the non-greedy a?? will match, and as such the result - should be "ab", not "a"). - - Terminal subpattern matching contains a second bug, too. The frame - location values in the subpattern should be being allocated with - the outer disjunction's frame (as we do for the parentheses-single - optimization). Consider the following three regexes: - /a*(?:b*)*c*/ - /a*(?:b*)c*/ - /a*(?:b*)*/ - Considering only the frame location required by the atoms a,b, and - c, (ignoring space associated with the nested subpattern) the first - regex (a normal subpattern match) requires a frame size of 2 for - the outer disjunction, (to backtrack terms a & c), with each - iteration of the subpattern requiring a frame of size 1 (in order - to backtrack b). In the case of the second regex (where the - parentheses-single optimization will kick in) the outer frame must - be set up with a frame size of 3, since the outer frame will also - be used when running the nested subpattern. We will currently only - allocate a farme of size 1 for the outer disjuntion (to contain a), - howver the frame size should be 2 (since the subpattern will be - evaluated in the outer frame). In addition to failing to allocate - frame space the frame offsets are also presently invalid - in the - case of the last regex b's frame location will be set assuming it - to be the first term in the frame, whereas in this case b lies - after the term a, and should be taking a separate frame location. - - In order to correctly allocate the frame for terminal subpattern - matches we must move this optimization back up from the JIT into - the compiler (and thus interpreter too), since this is where the - frame allocation takes place. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): - (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses): - (JSC::Yarr::compileRegex): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): - (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): - (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): - (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): - (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): - (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - (JSC::Yarr::RegexGenerator::generateTerm): - * yarr/RegexPattern.h: - (JSC::Yarr::PatternTerm::PatternTerm): - -2010-11-24 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Csaba Osztrogonác. - - Remove Bakefile build system files - https://bugs.webkit.org/show_bug.cgi?id=49983 - - r53757 only removed the content, but not the files. - This patch removes that empty files. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): Use the right structure. - * JavaScriptCoreSources.bkl: Removed. - * jscore.bkl: Removed. + * runtime/JSObject.h: + (JSC::JSNonFinalObject::JSNonFinalObject): + (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity + is correct to verify this doesn't happen again. -2010-11-24 Gabor Loki <loki@webkit.org> +2011-03-01 Andras Becsi <abecsi@webkit.org> Reviewed by Csaba Osztrogonác. - Merge the usage of jumps and calls at ARM-JIT - https://bugs.webkit.org/show_bug.cgi?id=50008 - - Those JmpSrc objects which represent jumps (not calls) should point to - after the jump instruction. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::blx): - (JSC::ARMAssembler::loadBranchTarget): - (JSC::ARMAssembler::getAbsoluteJumpAddress): - (JSC::ARMAssembler::linkJump): - (JSC::ARMAssembler::relinkJump): - (JSC::ARMAssembler::linkCall): - (JSC::ARMAssembler::relinkCall): - (JSC::ARMAssembler::getRelocatedAddress): - (JSC::ARMAssembler::getDifferenceBetweenLabels): - (JSC::ARMAssembler::getCallReturnOffset): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::call): - -2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend - https://bugs.webkit.org/show_bug.cgi?id=48625 - - GLib methods use UTF-8 strings, so we have to convert from UTF-16 to - UTF-8 to perform the case operations and then convert back the result to - UTF-16. GLib conversion methods return a new allocated string, so we - have to memcpy the result into the destination buffer too. Using our - own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h - we don't need such memcpy, since they take an already allocated buffer - rather than returning a new one. There's another optimization for the - case when the destination buffer is not large enough. In that case, - methods should return the expected destination buffer size and are - called again with a new buffer. We can avoid the conversion to UTF-16 by - pre-calculating the required size for the destination buffer. - - * wtf/unicode/glib/UnicodeGLib.cpp: - (WTF::Unicode::getUTF16LengthFromUTF8): - (WTF::Unicode::convertCase): - (WTF::Unicode::foldCase): - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - -2010-11-23 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Sam Weinig. - - Use WTF::StringHasher directly in JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=49893 - - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::Hash::hash): - * runtime/Identifier.cpp: - (JSC::IdentifierCStringTranslator::hash): - (JSC::IdentifierUCharBufferTranslator::hash): - -2010-11-22 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Sam Weinig. - - Add WTF::FixedArray::size() - https://bugs.webkit.org/show_bug.cgi?id=49891 + [Qt] Clean up the project files and move common options to WebKit.pri. - Add a method to get the size of a FixedArray. + * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri. + * JavaScriptCore.pro: Deduplicate options. + * jsc.pro: Ditto. - * wtf/FixedArray.h: - (WTF::FixedArray::size): +2011-03-01 Adam Barth <abarth@webkit.org> -2010-11-22 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Roben. - - [WINCE] Set correct preprocessor definitions - https://bugs.webkit.org/show_bug.cgi?id=49887 - - * wtf/Platform.h: - -2010-11-22 Adam Roben <aroben@apple.com> - - Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files - - Apple's Windows build allows placing header files and import libraries for WebKit's - dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the - $WebKitLibrariesDir environment variable. This is both required for production builds and - convenient for Apple-internal developer builds. Apple's production builds also require that - WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production - builds, the files are copied into that directory tree by the - WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the - copying is done by - JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make. - - This .vsprops copying is problematic in one very important case: when a developer updates - their source tree and then tries to build. Visual Studio only reads .vsprops files when a - project is first loaded. So, when Visual Studio is first opened after the .vsprops files are - updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a - build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into - $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build - will proceed with out-of-date .vsprops files, which will likely result in a build failure. - - To fix this, we now use normal relative paths to access the .vsprops files in the source - tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment - variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is - unset, so the normal relative paths are used to read the .vsprops files out of the source - tree directly. In production builds, this environment variable is set to a fake directory - that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path - is resolved. - - For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops: - - $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - - In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the - files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds, - JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to - "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for - FeatureDefines.vsprops becomes: - - $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - - which resolves to: - - $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops - - (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3" - actually exist since they are matched by an equal number of ".." path components.) - - Note that Visual Studio still won't pick up changes made to .vsprops files while Visual - Studio is open, but that problem hasn't seemed to cause developers many headaches so far. + Reviewed by Eric Seidel. - Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are - updated + Teach JavaScriptCore GYP build about DEPTH + https://bugs.webkit.org/show_bug.cgi?id=55425 - Reviewed by Dave Hyatt. + In addition to teaching the JavaScriptCore GYP build about DEPTH, this + change overrides the GCC warning configuration to disable a warning + that's causing probems in Assertions.cpp. With that warning disabled, + JavaScriptCore builds again. - * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that - production builds can find the .vsprops files. + * gyp/JavaScriptCore.gyp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the - .vsprops files. It isn't needed anymore. +2011-02-28 Gavin Barraclough <barraclough@apple.com> - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops - files. + Windows build fix. -2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Reviewed by Gavin Barraclough. +2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com> - YARR JIT should fallback to YARR Interpreter instead of PCRE. - https://bugs.webkit.org/show_bug.cgi?id=46719 + Unreviewed, rolling out r79948. + http://trac.webkit.org/changeset/79948 + https://bugs.webkit.org/show_bug.cgi?id=55439 - Remove the ENABLE_YARR macro and the option of matching regular - expressions with PCRE from JavaScriptCore. + "caused crashes on the SL release bot" (Requested by ggaren on + #webkit). * runtime/JSGlobalData.h: - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - (JSC::RegExp::match): - * tests/mozilla/expected.html: - * wtf/Platform.h: - * yarr/RegexCompiler.cpp: - * yarr/RegexCompiler.h: - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::byteCompileRegex): - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::jitCompileRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::getFallback): - (JSC::Yarr::RegexCodeBlock::isFallback): - (JSC::Yarr::RegexCodeBlock::setFallback): - (JSC::Yarr::executeRegex): - * yarr/RegexParser.h: - * yarr/RegexPattern.h: - -2010-11-20 Kwang Yul Seo <skyul@company100.net> - - Reviewed by David Kilzer. - - [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message - https://bugs.webkit.org/show_bug.cgi?id=49520 - - DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead. + * runtime/WriteBarrier.h: - * wtf/Assertions.cpp: - * wtf/Assertions.h: +2011-02-28 Gavin Barraclough <barraclough@apple.com> -2010-11-20 Gabor Loki <loki@webkit.org> + Windows build fix. - Reviewed by Gavin Barraclough. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Support JIT_OPTIMIZE_MOD on Thumb-2 - https://bugs.webkit.org/show_bug.cgi?id=49432 +2011-02-28 Gavin Barraclough <barraclough@apple.com> - Rewrite the soft modulo operation into macroassembler form, and move it - to JSValue32_64 section. - Add support for soft modulo on Thumb-2 JIT also. + Reviewed by Sam Weinig & Darin Adler. - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::clz): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::countLeadingZeros32): - (JSC::MacroAssemblerARM::relativeTableJump): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::countLeadingZeros32): - (JSC::MacroAssemblerARMv7::relativeTableJump): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::softModulo): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - * wtf/Platform.h: - -2010-11-20 David Kilzer <ddkilzer@apple.com> + Bug 55423 - Clean up property tables in Structure - <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured + Encapsulate, reduce duplication of table search code, + and reduce the size of the tables (remove the index, + just maintain the tables in the correct order). - Reviewed by Darin Adler. + Shows a 0.5% - 1% progression on sunspider. * JavaScriptCore.exp: - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::secure): Added argument that controls whether - the last character is obscured or not. Implemented behavior. - * wtf/text/StringImpl.h: - (WTF::StringImpl::LastCharacterBehavior): Added enum. - (WTF::StringImpl::secure): Updated method signature. - -2010-11-19 William Chan <willchan@chromium.org> - - Reviewed by David Levin. - - Add USE(CHROMIUM_NET) - - Indicates the use of Chromium's network stack. Chromium's network - stack performs better when it has full view of all resource requests, - so USE(CHROMIUM_NET) can be used to bypass throttles. - - https://bugs.webkit.org/show_bug.cgi?id=49778 + * runtime/PropertyMapHashTable.h: + (JSC::isPowerOf2): + (JSC::nextPowerOf2): + bit ops used to calculate table size. + (JSC::PropertyMapEntry::PropertyMapEntry): + (JSC::PropertyTable::ordered_iterator::operator++): + (JSC::PropertyTable::ordered_iterator::operator==): + (JSC::PropertyTable::ordered_iterator::operator!=): + (JSC::PropertyTable::ordered_iterator::operator*): + (JSC::PropertyTable::ordered_iterator::operator->): + (JSC::PropertyTable::ordered_iterator::ordered_iterator): + implementation of the iterator types + (JSC::PropertyTable::PropertyTable): + (JSC::PropertyTable::~PropertyTable): + constructors take an initial capacity for the table, + a table to copy, or both. + (JSC::PropertyTable::begin): + (JSC::PropertyTable::end): + create in-order iterators. + (JSC::PropertyTable::find): + search the hash table + (JSC::PropertyTable::add): + add a value to the hash table + (JSC::PropertyTable::remove): + remove a value from the hash table + (JSC::PropertyTable::size): + (JSC::PropertyTable::isEmpty): + accessors. + (JSC::PropertyTable::propertyStorageSize): + (JSC::PropertyTable::clearDeletedOffsets): + (JSC::PropertyTable::hasDeletedOffset): + (JSC::PropertyTable::getDeletedOffset): + (JSC::PropertyTable::addDeletedOffset): + cache deleted (available) offsets in the property storage array. + (JSC::PropertyTable::copy): + take a copy of the PropertyTable, potentially expanding the capacity. + (JSC::PropertyTable::sizeInMemory): + used for DEBUG build statistics + (JSC::PropertyTable::reinsert): + (JSC::PropertyTable::rehash): + (JSC::PropertyTable::tableCapacity): + (JSC::PropertyTable::deletedEntryIndex): + (JSC::PropertyTable::skipDeletedEntries): + (JSC::PropertyTable::table): + (JSC::PropertyTable::usedCount): + (JSC::PropertyTable::dataSize): + (JSC::PropertyTable::sizeForCapacity): + (JSC::PropertyTable::canInsert): + these methods provide internal implementation. + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::Structure::~Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::despecifyAllFunctions): + (JSC::Structure::put): + (JSC::Structure::remove): + (JSC::Structure::createPropertyMap): + (JSC::Structure::getPropertyNames): + (JSC::PropertyTable::checkConsistency): + (JSC::Structure::checkConsistency): + factored out code to PropertyMapHashTable.h + * runtime/Structure.h: + (JSC::Structure::propertyStorageSize): + (JSC::Structure::isEmpty): + (JSC::Structure::get): + factored out code to PropertyMapHashTable.h - * wtf/Platform.h: +2011-02-28 Xan Lopez <xlopez@igalia.com> -2010-11-19 Steve Falkenburg <sfalken@apple.com> + Another fix build :( - Reviewed by Adam Roben. + Fix typo. - Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files - https://bugs.webkit.org/show_bug.cgi?id=49819 + * runtime/MachineStackMarker.cpp: + (JSC::freePlatformThreadRegisters): - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: +2011-02-28 Xan Lopez <xlopez@igalia.com> -2010-11-19 Oliver Hunt <oliver@apple.com> + Unreviewed build fix for Snow Leopard. - Reviewed by Geoffrey Garen. + * runtime/MachineStackMarker.cpp: + (JSC::freePlatformThreadRegisters): - Don't check for constant registers when we can guarantee that the register won't be in the constant pool - https://bugs.webkit.org/show_bug.cgi?id=49814 +2011-02-28 Alejandro G. Castro <alex@igalia.com> - Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR() - when we can guarantee that the register is not referring to a constant. - This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation - logic correct when we're using a faked callframe (as in the case of the globalExec). + Unreviewed, fix SnowLeopard compilation after r79952. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::createActivation): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::thisObject): - * interpreter/CallFrame.h: - (JSC::ExecState::uncheckedR): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::Interpreter::callEval): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::createExceptionScope): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): + * runtime/MachineStackMarker.cpp: + (JSC::freePlatformThreadRegisters): -2010-11-19 Steve Falkenburg <sfalken@apple.com> +2011-02-28 Mark Rowe <mrowe@apple.com> Reviewed by Darin Adler. - Normalize Cairo/CFLite project/solution configuration names - https://bugs.webkit.org/show_bug.cgi?id=49818 + <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2010-11-18 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - Windows vcproj configuration names should be normalized across projects - https://bugs.webkit.org/show_bug.cgi?id=49776 - - * JavaScriptCore.vcproj/JavaScriptCore.sln: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added. - * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: - -2010-11-19 Patrick Gansterer <paroga@webkit.org> - - Unreviewed, build fix after r72360. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - -2010-11-18 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Geoff Garen. - - Bug 49577 - Function.prototype should be non-configurable - - Ooops, Function.prototype should not be enumerable! - - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertySlot): - -2010-11-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 49708 - Stop recompiling functions to regenerate exception info. - - Instead only hold info as necessary – keep divot info is the inspector - is enabled, line number info is debugging or profiling, and handler - info for functions with try/catch. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpStatistics): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - (JSC::CodeBlock::addExpressionInfo): - (JSC::CodeBlock::addLineInfo): - (JSC::CodeBlock::hasExpressionInfo): - (JSC::CodeBlock::hasLineInfo): - (JSC::CodeBlock::needsCallReturnIndices): - (JSC::CodeBlock::callReturnIndexVector): - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::BytecodeGenerator): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNode): - (JSC::BytecodeGenerator::emitNodeInConditionContext): - (JSC::BytecodeGenerator::emitExpressionInfo): - (JSC::BytecodeGenerator::addLineInfo): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::appendSourceToError): - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Interpreter.h: - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITStubs.cpp: - (JSC::jitThrow): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Collector.cpp: - (JSC::Heap::markRoots): - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - * runtime/Executable.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::usingAPI): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::supportsRichSourceInfo): - (JSC::JSGlobalObject::globalData): - -2010-11-18 Adam Roben <aroben@apple.com> - - Add a script to delete manifest-related files when they are older than - any .vsprops file - - Changes to .vsprops files can cause the manifest files to become - invalid, and Visual Studio doesn't always figure out that it needs to - rebuild them. - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Call the new script. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - Added the new script. - - * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added. - (file_modification_times): Generator to return the modification time of - each file in a directory hierarchy. - (main): Get the modification time of the newest vsprops file, then find - all manifest-related files in the obj directory. Delete all - manifest-related files that are older than the newest vsprops file. - -2010-11-18 Mark Rowe <mrowe@apple.com> - - Rubber-stamped by Adam Roben. - - <rdar://problem/8602509&8602717&8602724> Enable compaction support. - - * Configurations/JavaScriptCore.xcconfig: - -2010-11-18 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 49635 - Profiler implementation is fragile - - The profile presently requires the exception handling mechanism to explicitly - remove all stack frames that are exited during the exception unwind mechanism. - This is fragile in a number of ways: - * We have to change bytecode register allocation when compiling code to run - when profiling, to preserve the callee function (this is also required to - call did_call after the call has returned). - * In the JIT we have to maintain additional data structures - (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register - containing the callee. - * In the interpreter we use 'magic values' to offset into the instruction - stream to rediscover the register containing the function. - - Instead, move profiling into the head and tail of functions. - * This correctly accounts the cost of the call itself to the caller. - * This allows us to access the callee function object from the callframe. - * This means that at the point a call is made we can track the stack depth - on the ProfileNode. - * When unwinding we can simply report the depth at which the exception is - being handled - all call frames above this level are freed. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - (JSC::CodeBlock::methodCallLinkInfo): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallVarargs): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * profiler/Profile.cpp: - (JSC::Profile::Profile): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - (JSC::ProfileGenerator::exceptionUnwind): - (JSC::ProfileGenerator::stopProfiling): - * profiler/ProfileGenerator.h: - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::ProfileNode): - (JSC::ProfileNode::willExecute): - * profiler/ProfileNode.h: - (JSC::ProfileNode::create): - (JSC::ProfileNode::callerCallFrame): - * profiler/Profiler.cpp: - (JSC::dispatchFunctionToProfiles): - (JSC::Profiler::_willExecute): - (JSC::Profiler::_didExecute): - (JSC::Profiler::exceptionUnwind): - * profiler/Profiler.h: - -2010-11-18 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - Remove leftover Windows Debug_Internal configurations - https://bugs.webkit.org/show_bug.cgi?id=49758 - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: - -2010-11-18 Chao-ying Fu <fu@mips.com> - - Reviewed by Csaba Osztrogonác. - - Avoid increasing required alignment of target type warning - https://bugs.webkit.org/show_bug.cgi?id=43963 - - * runtime/UString.h: - (JSC::UStringHash::equal): - * wtf/StdLibExtras.h: + * wtf/OwnArrayPtr.h: + (WTF::::set): Implement OwnArrayPtr::set. -2010-11-17 Sam Weinig <sam@webkit.org> +2011-02-28 Martin Zoubek <martin.zoubek@acision.com> and Alejandro G. Castro <alex@igalia.com> - Reviewed by Anders Carlsson. + Reviewed by Martin Robinson. - Add stubbed out ScrollAnimator for the Mac - https://bugs.webkit.org/show_bug.cgi?id=49678 + Multithread support for JSC on UNIX + https://bugs.webkit.org/show_bug.cgi?id=26838 - * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no - change in behavior at the moment. + Implement suspendThread() and resumeThread() for systems with + pthread.h using thread signal handler. -2010-11-17 David Kilzer <ddkilzer@apple.com> + * runtime/MachineStackMarker.cpp: + (JSC::pthreadSignalHandlerSuspendResume): + (JSC::MachineStackMarker::Thread::Thread): + (JSC::getCurrentPlatformThread): + (JSC::suspendThread): + (JSC::resumeThread): + (JSC::getPlatformThreadRegisters): + (JSC::otherThreadStackPointer): + (JSC::freePlatformThreadRegisters): + (JSC::MachineStackMarker::markOtherThreadConservatively): + * wtf/Platform.h: Added Gtk port to use + ENABLE_JSC_MULTIPLE_THREADS. - <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit +2011-02-28 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. - Add an explicit overflow check prior to allocating our buffer, - rather than implicitly relying on the guard in convertUTF16ToUTF8. - - * wtf/text/WTFString.cpp: - (WTF::String::utf8): - -2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> + Stop using DeprecatedPtr for the global exception slot + https://bugs.webkit.org/show_bug.cgi?id=55424 - Unreviewed, rolling out r72197. - http://trac.webkit.org/changeset/72197 - https://bugs.webkit.org/show_bug.cgi?id=49661 - - broke fast/regex/test1.html (Requested by stampho on #webkit). + Create GCRootPtr to signify that the exception slot is + a gcroot, and so is exempt from the usual writebarrier + restrictions. * runtime/JSGlobalData.h: - * runtime/RegExp.cpp: - (JSC::RegExpRepresentation::~RegExpRepresentation): - (JSC::RegExp::compile): - (JSC::RegExp::match): - * tests/mozilla/expected.html: - * wtf/Platform.h: - * yarr/RegexCompiler.cpp: - * yarr/RegexCompiler.h: - * yarr/RegexInterpreter.cpp: - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::jitCompileRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::getFallback): - (JSC::Yarr::RegexCodeBlock::setFallback): - (JSC::Yarr::executeRegex): - * yarr/RegexParser.h: - * yarr/RegexPattern.h: - -2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - YARR JIT should fallback to YARR Interpreter instead of PCRE. - https://bugs.webkit.org/show_bug.cgi?id=46719 - - Remove the ENABLE_YARR macro and the option of matching regular - expressions with PCRE from JavaScriptCore. - - * runtime/JSGlobalData.h: - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - (JSC::RegExp::match): - * tests/mozilla/expected.html: - * wtf/Platform.h: - * yarr/RegexCompiler.cpp: - * yarr/RegexCompiler.h: - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::byteCompileRegex): - * yarr/RegexInterpreter.h: - * yarr/RegexJIT.cpp: - (JSC::Yarr::jitCompileRegex): - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): - (JSC::Yarr::RegexCodeBlock::getFallback): - (JSC::Yarr::RegexCodeBlock::isFallback): - (JSC::Yarr::RegexCodeBlock::setFallback): - (JSC::Yarr::executeRegex): - * yarr/RegexParser.h: - * yarr/RegexPattern.h: - -2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Extend YARR Interpreter with beginning character look-up optimization - https://bugs.webkit.org/show_bug.cgi?id=45751 - - Add beginning character look-up optimization which sets the start - index to the first possible successful pattern match. - Extend YARR Interpreter with lookupForBeginChars function which - implements the beginning character look-up optimization. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::InputStream::readPair): - (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput): - (JSC::Yarr::Interpreter::lookupForBeginChars): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::Interpreter::interpret): - * yarr/RegexInterpreter.h: - (JSC::Yarr::BytecodePattern::BytecodePattern): - -2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com> - - Reviewed by Kenneth Christiansen, Tor Arne Vestbø. - - [Qt] Add support for use GStreamer with the Qt build - - Enable the build/inclusion of the wtf/QObject convenience classes. - - * JavaScriptCore.pri: - * wtf/wtf.pri: - -2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Collect the beginning characters in a RegExp pattern for look-up - optimization - https://bugs.webkit.org/show_bug.cgi?id=45748 - - Extend the YARR's parser with an algorithm which collects the potential - beginning characters from a RegExp pattern for later look-up optimization. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::BeginCharHelper::BeginCharHelper): - (JSC::Yarr::BeginCharHelper::addBeginChar): - (JSC::Yarr::BeginCharHelper::merge): - (JSC::Yarr::BeginCharHelper::addCharacter): - (JSC::Yarr::BeginCharHelper::linkHotTerms): - (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor): - (JSC::Yarr::RegexPatternConstructor::addBeginTerm): - (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms): - (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms): - (JSC::Yarr::RegexPatternConstructor::setupBeginChars): - (JSC::Yarr::compileRegex): - * yarr/RegexPattern.h: - (JSC::Yarr::TermChain::TermChain): - (JSC::Yarr::BeginChar::BeginChar): - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r72160. - http://trac.webkit.org/changeset/72160 - https://bugs.webkit.org/show_bug.cgi?id=49646 - - Broke lots of fast/profiler tests, among others (Requested by - aroben on #webkit). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::functionRegisterForBytecodeOffset): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addFunctionRegisterInfo): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallVarargs): - (JSC::BytecodeGenerator::emitReturn): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::CallArguments::profileHookRegister): - * bytecompiler/NodesCodegen.cpp: - (JSC::CallArguments::CallArguments): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_profile_will_call): - (JSC::JIT::emit_op_profile_did_call): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * profiler/Profile.cpp: - (JSC::Profile::Profile): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - (JSC::ProfileGenerator::stopProfiling): - * profiler/ProfileGenerator.h: - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::ProfileNode): - (JSC::ProfileNode::willExecute): - * profiler/ProfileNode.h: - (JSC::ProfileNode::create): - (JSC::ProfileNode::operator==): - * profiler/Profiler.cpp: - (JSC::dispatchFunctionToProfiles): - (JSC::Profiler::willExecute): - (JSC::Profiler::didExecute): - * profiler/Profiler.h: - -2010-11-16 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. + * runtime/WriteBarrier.h: + (JSC::GCRootPtr::GCRootPtr): + (JSC::GCRootPtr::operator=): - Bug 49635 - Profiler implementation is fragile - - The profile presently requires the exception handling mechanism to explicitly - remove all stack frames that are exited during the exception unwind mechanism. - This is fragile in a number of ways: - * We have to change bytecode register allocation when compiling code to run - when profiling, to preserve the callee function (this is also required to - call did_call after the call has returned). - * In the JIT we have to maintain additional data structures - (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register - containing the callee. - * In the interpreter we use 'magic values' to offset into the instruction - stream to rediscover the register containing the function. - - Instead, move profiling into the head and tail of functions. - * This correctly accounts the cost of the call itself to the caller. - * This allows us to access the callee function object from the callframe. - * This means that at the point a call is made we can track the stack depth - on the ProfileNode. - * When unwinding we can simply report the depth at which the exception is - being handled - all call frames above this level are freed. +2011-02-28 Adam Barth <abarth@webkit.org> - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - (JSC::CodeBlock::methodCallLinkInfo): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallVarargs): - (JSC::BytecodeGenerator::emitReturn): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::CallArguments::count): - * bytecompiler/NodesCodegen.cpp: - (JSC::CallArguments::CallArguments): - * interpreter/Interpreter.cpp: - (JSC::ProfileHostCall::ProfileHostCall): - (JSC::ProfileHostCall::~ProfileHostCall): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_profile_has_called): - (JSC::JIT::emit_op_profile_will_return): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_profile_has_called): - (JSC::JIT::emit_op_profile_will_return): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * profiler/Profile.cpp: - (JSC::Profile::Profile): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::addParentForConsoleStart): - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - (JSC::ProfileGenerator::exceptionUnwind): - (JSC::ProfileGenerator::stopProfiling): - * profiler/ProfileGenerator.h: - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::ProfileNode): - (JSC::ProfileNode::willExecute): - * profiler/ProfileNode.h: - (JSC::ProfileNode::create): - (JSC::ProfileNode::operator==): - (JSC::ProfileNode::exec): - * profiler/Profiler.cpp: - (JSC::dispatchFunctionToProfiles): - (JSC::Profiler::hasCalled): - (JSC::Profiler::willEvaluate): - (JSC::Profiler::willReturn): - (JSC::Profiler::didEvaluate): - (JSC::Profiler::exceptionUnwind): - * profiler/Profiler.h: + Reviewed by Dimitri Glazkov. -2010-11-16 Brian Weinstein <bweinstein@apple.com> + Use more xcconfig files in JavaScriptCore gyp build + https://bugs.webkit.org/show_bug.cgi?id=55391 - Reviewed by Adam Roben and Steve Falkenburg. + The GYP experts tell me that we have have a total of two xcconfig + files: one for the xcodeproj as a whole and one for each target. This + patch uses that technique to re-use the existing xcconfig files and + eliminate the duplication. - Touch Platform.h to force a rebuild for Windows. + Technically, this patch introduces some build errors because the + xcconfig files assume that the xcodeproj file is one level higher in + the directory hierarchy. Specifically, the xcodeproj file can no + longer find the Info.plist or the prefix header. I plan to fix that in + a subsequent patch. - * wtf/Platform.h: + Also, this patch introduces the Release and Production configurations, + which should work correctly now. -2010-11-16 Steve Falkenburg <sfalken@apple.com> + * gyp/JavaScriptCore.gyp: - Reviewed by Adam Roben. +2011-02-28 Jon Honeycutt <jhoneycutt@apple.com> - Disable LTCG for Windows Release builds. Add new Release_LTCG configuration. - https://bugs.webkit.org/show_bug.cgi?id=49632 + Windows build fix. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.vcproj/testapi/testapi.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Add symbol to export. -2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu> +2011-02-28 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. - The number of recursive match calls isn't limited in YARR Interpreter - https://bugs.webkit.org/show_bug.cgi?id=47906 - - Check the number of the matchDisjunction recursive calls to avoid unbounded - recursion. - Now the matchDisjunction function returns JSRegExpResult instead of bool. - The JSRegExpResult enum contains the result of matching or the error code - of the failure (like HitLimit) which terminates the matching. - The error codes are based on pcre's jsRegExpExecute error codes. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::parenthesesDoBacktrack): - (JSC::Yarr::Interpreter::matchParentheses): - (JSC::Yarr::Interpreter::backtrackParentheses): - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::Interpreter::matchNonZeroDisjunction): - (JSC::Yarr::Interpreter::interpret): - (JSC::Yarr::Interpreter::Interpreter): - * yarr/RegexInterpreter.h: - -2010-11-16 Brian Weinstein <bweinstein@apple.com> - - Rest of the Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-11-16 Gavin Barraclough <barraclough@apple.com> + Make ScopeChainNode GC allocated + https://bugs.webkit.org/show_bug.cgi?id=55283 - Windows build fix pt 1. + Simplify lifetime and other issues with the scopechain + by making it gc allocated. This allows us to simplify + function exit and unwinding, as well as making the + current iterative refcounting go away. + * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-11-16 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=49606 - - The bug here is that we read the prototype from the RHS argument using a regular - op_get_by_id before op_instanceof has checked that this is an object implementing - HasInstance. This incorrect behaviour gives rise to further unnecessary complexity - in the code base, since we have additional logic (implemented using the - GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors - from the get_by_id into invalid parameter errors. Having fixed this bug this code - is all redundant, since in these cases the get_by_id will never have been reached. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addExpressionInfo): - * bytecode/Opcode.h: + (JSC::CodeBlock::createActivation): + * bytecode/StructureStubInfo.cpp: * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitCheckHasInstance): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::InstanceOfNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_check_has_instance): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_check_has_instance): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_check_has_instance): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_check_has_instance): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * runtime/ExceptionHelpers.cpp: - (JSC::createInterruptedExecutionException): - (JSC::createTerminatedExecutionException): - (JSC::createUndefinedVariableError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - * runtime/ExceptionHelpers.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSNotAnObject.cpp: - (JSC::JSNotAnObject::toPrimitive): - (JSC::JSNotAnObject::getPrimitiveNumber): - (JSC::JSNotAnObject::toBoolean): - (JSC::JSNotAnObject::toNumber): - (JSC::JSNotAnObject::toString): - (JSC::JSNotAnObject::toObject): - (JSC::JSNotAnObject::getOwnPropertySlot): - (JSC::JSNotAnObject::getOwnPropertyDescriptor): - (JSC::JSNotAnObject::put): - (JSC::JSNotAnObject::deleteProperty): - (JSC::JSNotAnObject::getOwnPropertyNames): - * runtime/JSNotAnObject.h: - (JSC::JSNotAnObject::JSNotAnObject): - * runtime/JSObject.h: - (JSC::JSObject::isActivationObject): - * runtime/JSValue.cpp: - (JSC::JSValue::toObjectSlowCase): - (JSC::JSValue::synthesizeObject): - (JSC::JSValue::synthesizePrototype): - -2010-11-15 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Harden additional string functions against large lengths - https://bugs.webkit.org/show_bug.cgi?id=49574 - - * wtf/text/CString.cpp: - (WTF::CString::init): Check for length that is too large for CString. - (WTF::CString::newUninitialized): Ditto. - (WTF::CString::copyBufferIfNeeded): Fix types so the length stays - in a size_t. - - * wtf/text/WTFString.cpp: - (WTF::String::append): Check for length that is too large. - -2010-11-15 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 49577 - Function.prototype should be non-configurable - - JSC lazily allocates the prototype property of Function objects. - - We check the prototype exists on 'get', but not on 'put'. - If you 'put' without having first done a 'get' you can end up with a configurable - prototype (prototype should only ever be non-configurable). - - This is visible in a couple of ways: - * 'delete' on the property may succeed. (the next access will result in a new, - reset prototype object). - * the prototype may be set to a getter. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::getOwnPropertyNames): - Reify the prototype property before allowing an enumerate including don't enum properties. - (JSC::JSFunction::put): - Reify the prototype property before any put to it. - -2010-11-15 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Geoff Garen. - - Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException - - Three types of source location information are added to errors. - - (1) Divot information. - - This was added with the intention of using it to provide better source highlighting in the inspector. - We may still want to do so, but we probably should not be exposing these values in a manner visible to - user scripts – only through an internal C++ interface. The code adding divot properties to objects has - been removed. - - (2) Line number information. - - Line number information is presently sometimes added at the point the exception is created, and sometimes - added at the point the exception passes through throwException. Change this so that throwException has - the sole responsibility for adding line number and source file information. - - (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`). - - These messages are currently created at the point the exceptions is raised. Instead reformat the message - such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.` - becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at - the in throw Exception. This presents a number of advantages: - * we no longer need to have source location information to create these TypeErrors. - * we can chose to append source location information in other error messages, including those where - passing source location to the point of construction would be inconvenient. - * we can chose in future to omit to append source location information when running in a non-debug mode. - - This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output, - removing double periods (..) at end of lines, and adding slightly more context to some errors. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - - Separated called to access line and range information. - - * bytecode/CodeBlock.h: - - Separated called to access line and range information. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolve): - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBaseAndProperty): - (JSC::isInvalidParamForIn): - (JSC::isInvalidParamForInstanceOf): - - Update parameters passed to error constructors. - (JSC::appendSourceToError): - - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers) - (JSC::Interpreter::throwException): - - Updated to call appendSourceToError. - (JSC::Interpreter::privateExecute): - - Update parameters passed to error constructors. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - - Update parameters passed to error constructors. - - * runtime/Error.cpp: - (JSC::addErrorInfo): - (JSC::hasErrorInfo): - - Removed divot properties. - - * runtime/Error.h: - - Removed divot properties. - - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - - Initialize new property. - - * runtime/ErrorInstance.h: - (JSC::ErrorInstance::appendSourceToMessage): - (JSC::ErrorInstance::setAppendSourceToMessage): - (JSC::ErrorInstance::clearAppendSourceToMessage): - - Added flag to check for errors needing location information appending. - (JSC::ErrorInstance::isErrorInstance): - - Added virtual method to check for ErrorInstances. - - * runtime/ExceptionHelpers.cpp: - (JSC::createUndefinedVariableError): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages. - - * runtime/ExceptionHelpers.h: - - Updated function signatures. - - * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): - - Update parameters passed to error constructors. - - * runtime/JSObject.h: - (JSC::JSObject::isErrorInstance): - - Added virtual method to check for ErrorInstances. - -2010-11-12 Anders Carlsson <andersca@apple.com> - - Reviewed by Adam Roben. - - CString(const char*) crashes when passed a null pointer - https://bugs.webkit.org/show_bug.cgi?id=49450 - - * wtf/text/CString.cpp: - (WTF::CString::CString): - Return early if str is null. - -2010-11-11 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 49420 - Clean up syntax/reference error throw. - - Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair. - This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data - attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around - this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised. - - We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an - Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitThrowReferenceError): - (JSC::BytecodeGenerator::emitThrowSyntaxError): - (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNodeInConditionContext): - * bytecompiler/NodesCodegen.cpp: - (JSC::ThrowableExpressionData::emitThrowReferenceError): - (JSC::ThrowableExpressionData::emitThrowSyntaxError): - (JSC::RegExpNode::emitBytecode): - (JSC::PostfixErrorNode::emitBytecode): - (JSC::PrefixErrorNode::emitBytecode): - (JSC::AssignErrorNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_throw_reference_error): - (JSC::JIT::emit_op_throw_syntax_error): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_throw_reference_error): - (JSC::JIT::emit_op_throw_syntax_error): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * parser/Nodes.h: - -2010-11-11 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Harden some string functions against large lengths - https://bugs.webkit.org/show_bug.cgi?id=49293 - - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for - strlen results that are too large for StringImpl. - (WTF::StringImpl::lower): Check for lengths that are too large for - int32_t. - (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for - lengths that are too large for int32_t. - (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned - rather than int and int32_t so we can handle any length. - (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for - lengths that are too large for int32_t. - (WTF::StringImpl::find): Check for strlen results that are too large for - StringImpl. - (WTF::StringImpl::findIgnoringCase): Ditto. - (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr. - (WTF::StringImpl::createWithTerminatingNullCharacter): Check before - incrementing length. - -2010-11-11 Dan Horák <dan@danny.cz> - - Reviewed by Andreas Kling. - - Add support for the s390/s390x architectures, it's big-endian - with s390 being 32-bit and s390x being 64-bit. - - https://bugs.webkit.org/show_bug.cgi?id=34786 - - * wtf/Platform.h: - -2010-11-10 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by David Hyatt. - - HTML5 Ruby support should be mandatory feature - https://bugs.webkit.org/show_bug.cgi?id=49272 - - Remove Ruby as optional feature. - - * Configurations/FeatureDefines.xcconfig: - * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows. - -2010-11-10 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Adds TextPosition* classes -- a structure that stores line/column/generation - level coordinates inside text document. Adds *BasedNumber classes -- typesafe int - wrappers that emphasize whether int number is used as zero-based or - one-based. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/TextPosition.h: Added. - (WTF::TextPosition::TextPosition): - (WTF::TextPosition::minimumPosition): - (WTF::TextPosition::belowRangePosition): - (WTF::ZeroBasedNumber::fromZeroBasedInt): - (WTF::ZeroBasedNumber::ZeroBasedNumber): - (WTF::ZeroBasedNumber::zeroBasedInt): - (WTF::ZeroBasedNumber::base): - (WTF::ZeroBasedNumber::belowBase): - (WTF::OneBasedNumber::fromOneBasedInt): - (WTF::OneBasedNumber::OneBasedNumber): - (WTF::OneBasedNumber::oneBasedInt): - (WTF::OneBasedNumber::convertAsZeroBasedInt): - (WTF::OneBasedNumber::convertToZeroBased): - (WTF::OneBasedNumber::base): - (WTF::OneBasedNumber::belowBase): - (WTF::toZeroBasedTextPosition): - (WTF::toOneBasedTextPosition): - (WTF::ZeroBasedNumber::convertToOneBased): - -2010-11-09 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - ARM JIT asserts when loading http://reader.google.com in debug mode - https://bugs.webkit.org/show_bug.cgi?id=48912 - - There are several cases when the uninterrupted sequence is larger than - maximum required offset for pathing the same sequence. Eg.: if in a - uninterrupted sequence the last macroassembler's instruction is a stub - call, it emits store instruction(s) which should not be included in the - calculation of length of uninterrupted sequence. So, the insnSpace and - constSpace should be upper limit instead of hard limit. - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::endUninterruptedSequence): - -2010-11-09 David Kilzer <ddkilzer@apple.com> - - <http://webkit.org/b/49279> Fix include statements for local headers - - Reviewed by Gavin Barraclough. - - Use "Foo.h" instead of <Foo.h> for local headers. - - * assembler/AbstractMacroAssembler.h: Also fixed sort order. - * assembler/CodeLocation.h: - * yarr/RegexJIT.h: - * yarr/RegexParser.h: - -2010-11-08 Adam Roben <aroben@apple.com> - - Roll out r71532 - - It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default - .bashrc unsets %TEMP%, which broke copy-tools.cmd. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed. - * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed. - -2010-11-08 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la' - https://bugs.webkit.org/show_bug.cgi?id=49128 - - r59042 introduced a C++-style comment in Platform.h, which is often - included in C source files. Change it to a C-style comment. - - * wtf/Platform.h: Fix the C++-style comment. - -2010-11-08 Adam Roben <aroben@apple.com> - - Show a message and cause the build to immediately fail when any - .vsprops files are copied - - When $WebKitLibrariesDir is set to a non-standard location, the - .vsprops files have to be copied from WebKitLibraries/win to - $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up - changes to the .vsprops files until the next time it opens the solution - file. Before this patch, the build would soldier on with the old - .vsprops files, leading to strange build failures. Now we detect that - the .vsprops files have been updated, display a message to the user - telling them what to do, and make the build fail immediately. - - Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when - .vsprops files are updated - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - Moved code to copy the tools directory to the new copy-tools.cmd - script. Moved that after the command that writes the buildfailed file - so the build will be considered a failure if copy-tools.cmd fails. - Changed to write the project name into buildfailed like all our other - projects do, so those other projects will know that the failure was due - to this project. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: - Added new scripts. - - * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies - the tools directory to $WebKitLibrariesDir. If any files were copied, - we display a message to the user and exit with error code 1 to cause - the build to fail. In non-interactive builds, we just print the message - to the build log. In interactive builds, we show the message in an - alert. - - * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses - Windows Scripting Host to display a message in an alert. - -2010-11-07 Sam Magnuson <smagnuson@netflix.com> - - Reviewed by Andreas Kling. - - [Qt] make install does not cause JavaScriptCore to be built - https://bugs.webkit.org/show_bug.cgi?id=49114 - - * JavaScriptCore.pro: - -2010-11-05 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Website consistently crashing TOT in JIT::execute() on news.com.au - https://bugs.webkit.org/show_bug.cgi?id=48954 - - The problem here was the strict pass of this conversion was loading the - this structure into one register but doing the flags check off a different - register. This is clearly wrong. I have been unable to trigger the crash - with a reduction, but I've added an assertion to the this conversion to - attempt to make it more readily catchable in future. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_convert_this_strict): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_convert_this_strict): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-11-04 Xan Lopez <xlopez@igalia.com> - - Reviewed by Adam Barth. - - Use leakRef instead of releaseRef - https://bugs.webkit.org/show_bug.cgi?id=48974 - - Use leakRef instead of the deprecated releaseRef. This was renamed - some time ago because 'releaseRef' is too close to 'release', - which does something completely different. - -2010-11-04 Eric Seidel <eric@webkit.org> - - Reviewed by Gavin Barraclough. - - REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute - https://bugs.webkit.org/show_bug.cgi?id=48789 - - The contract for all String/AtomicString methods seems to be that it's - safe to call them, even when the String is null (impl() returns 0). - This contract was broken by r49798 (unintentionally) when optimizing - for dromeo. - This patch adds a null check to AtomicString::lower() fixing this - crash and preventing future confusion. - - * wtf/text/AtomicString.cpp: - (WTF::AtomicString::lower): - -2010-11-04 Adam Barth <abarth@webkit.org> - - Enabled ICCJPEG on Chromium Mac - https://bugs.webkit.org/show_bug.cgi?id=48977 - - * wtf/Platform.h: - -2010-11-03 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Crash in Function.prototype.call.apply - https://bugs.webkit.org/show_bug.cgi?id=48485 - - The problem here was op_load_varargs failing to ensure that - there was sufficient space for the entire callframe prior to - op_call_varargs. This meant that when we then re-entered the - VM it was possible to stomp over an earlier portion of the - stack, so causing sub-optimal behaviour. - - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoadVarargs): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::ApplyFunctionCallDotNode::emitBytecode): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_load_varargs): - -2010-11-03 Kenneth Russell <kbr@google.com> - - Reviewed by Chris Marrin. - - Redesign extension mechanism in GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=46894 - - * JavaScriptCore.exp: - - Exposed String::split(const String&, Vector<String>). - -2010-11-03 Adam Roben <aroben@apple.com> - - Bring WTF.vcproj up to date - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and - unicode directories, added new files, removed old files. - -2010-11-03 Gabor Loki <loki@webkit.org> - - Reviewed by Andreas Kling. - - Remove unused initializeWeakRandomNumberGenerator - https://bugs.webkit.org/show_bug.cgi?id=48899 - - WeakRandom class is used instead of weakRandomNumber and its initializer. - - * wtf/RandomNumberSeed.h: - -2010-11-03 Gabor Loki <loki@webkit.org> - - Reviewed by Geoffrey Garen. - - Unused class: JSFastMath with JSValue64 - https://bugs.webkit.org/show_bug.cgi?id=48835 - - Remove unused JSFastMath class. - - * runtime/JSImmediate.h: - -2010-11-02 Adam Roben <aroben@apple.com> - - Windows build fix after r71127 - - MSVC isn't smart enough to figure out that the definition of the global - nullptr variable isn't needed, so we provide one for it. - - Fixes <http://webkit.org/b/48862> Windows build is broken due to - undefined symbol nullptr - - Reviewed by Anders Carlsson. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS - resort the files. - - * wtf/NullPtr.cpp: Added. - -2010-11-02 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits - https://bugs.webkit.org/show_bug.cgi?id=48841 - - Remove special handling of HashTableDeletedValue in PlatformRefPtr. - This is better handled on a case-by-case basis, when HashTraits - cannot account for it. - - * wtf/PlatformRefPtr.h: - (WTF::PlatformRefPtr::~PlatformRefPtr): - (WTF::PlatformRefPtr::clear): - (WTF::::operator): - -2010-10-29 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute - https://bugs.webkit.org/show_bug.cgi?id=47573 - - I think the interpreter portion of this was introduced by - an incorrect but silent merge when I updated prior to committing. - The JIT change is basically just a correctness fix, but it is - needed to prevent the testcase from asserting in debug builds. - - The basic problem is incorrectly setting the activation object - on an arguments object. The crash was due to us setting a null - activation in the interpreter, in the jit we were setting the - activation of a strict mode arguments object. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * wtf/Platform.h: - -2010-10-29 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Adam Roben and David Kilzer. - - Fix and cleanup of build systems - https://bugs.webkit.org/show_bug.cgi?id=48342 - - * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API - -2010-10-28 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - Include stddef.h unconditionally in Assertions.h - https://bugs.webkit.org/show_bug.cgi?id=48573 - - There is no reason to have stddef.h include be MSVC-only. - - * wtf/Assertions.h: - -2010-10-28 Herczeg Zoltan <zherczeg@webkit.org> - - Rubber stamped by Csaba Osztrogonác. - - Try to fix interpreter build. - - Needed parentheses around assignment to avoid GCC warning after - http://trac.webkit.org/changeset/70703 - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Csaba Osztrogonác. - - resetAssertionMatches() is an unused function in YARR Interpreter - https://bugs.webkit.org/show_bug.cgi?id=48503 - - The resetAssertionMatches() function is removed from YARR Interpreter - because it's never called. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::resetMatches): - -2010-10-28 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Andreas Kling. - - Wrong instruction form for BKPT - https://bugs.webkit.org/show_bug.cgi?id=48427 - - One '0' is missing from BKPT instruction. - Thanks for Jacob Bramley for reporting this error. - - * assembler/ARMAssembler.h: - -2010-10-28 Xan Lopez <xlopez@igalia.com> - - Try to fix Snow Leopard build. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::testPrototype): - -2010-10-28 Xan Lopez <xlopez@igalia.com> - - Reviewed by Oliver Hunt. - - Do not have two different asCell APIs in JSValue - https://bugs.webkit.org/show_bug.cgi?id=47979 - - Remove JSCell* asCell(JSValue) in favor of only using - JSValue::asCell(). - - * API/APICast.h: - (toRef): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::testPrototype): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * runtime/GetterSetter.h: - (JSC::asGetterSetter): - * runtime/JSByteArray.h: - (JSC::asByteArray): - * runtime/JSCell.h: - (JSC::JSCell::getCallData): - (JSC::JSCell::getConstructData): - * runtime/JSString.h: - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::asString): - * runtime/JSValue.h: - * runtime/Operations.cpp: - (JSC::jsIsObjectType): - * runtime/Operations.h: - (JSC::normalizePrototypeChain): - * runtime/Protect.h: - (JSC::gcProtect): - (JSC::gcUnprotect): - -2010-10-27 Chao-ying Fu <fu@mips.com> - - Reviewed by Oliver Hunt. - - Support emit_op_mod() for MIPS on JSVALUE32_64 - https://bugs.webkit.org/show_bug.cgi?id=46511 - - This patch uses MIPS div instructions for op_mod to improve performance. - - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_mod): - -2010-10-27 Brent Fulgham <bfulgham@webkit.org> - - Unreviewed build correction. - - * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is - turned off in the WinCairo port. This isn't supported (yet.) - -2010-10-27 Chris Rogers <crogers@google.com> - - Reviewed by Chris Marrin. - - Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit - https://bugs.webkit.org/show_bug.cgi?id=48279 - - * Configurations/FeatureDefines.xcconfig: - -2010-10-27 Brian Weinstein <bweinstein@apple.com> - - Windows build fix. - - * jit/JITStubs.cpp: - (JSC::jitThrow): - -2010-10-27 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 48365 - Remove output parameters from JITStackFrame - - The JIT stub functions presently use the stackframe to provide a couple of additional return values. - * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property. - * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property. - - Change exception returns such that exceptions are always returned on JSGlobalData::exception. - Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0. - - * JavaScriptCore.xcodeproj/project.pbxproj: * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): + (JSC::Recompiler::operator()): + * debugger/DebuggerCallFrame.h: + (JSC::DebuggerCallFrame::scopeChain): * interpreter/CachedCall.h: (JSC::CachedCall::CachedCall): - (JSC::CachedCall::call): * interpreter/CallFrame.h: - (JSC::ExecState::exception): * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::Interpreter): + (JSC::depth): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): (JSC::Interpreter::execute): (JSC::Interpreter::executeCall): (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - * jit/JITCode.h: - (JSC::JITCode::execute): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::compileOpCall): * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_end): * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::jitThrow): (JSC::DEFINE_STUB_FUNCTION): * jit/JITStubs.h: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - * runtime/CallData.cpp: - (JSC::call): + * runtime/ArgList.cpp: * runtime/Completion.cpp: (JSC::evaluate): - * runtime/ConstructData.cpp: - (JSC::construct): - * runtime/ExceptionHelpers.cpp: - (JSC::createErrorForInvalidGlobalAssignment): - (JSC::throwOutOfMemoryError): - (JSC::throwStackOverflowError): - * runtime/ExceptionHelpers.h: - * runtime/JSArray.cpp: - (JSC::JSArray::sort): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2010-10-27 Gabor Loki <loki@webkit.org> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=48060 - Speed up op_jeq_null and op_jneq_null. - - For both opcodes the NullTag and UndefinedTag are checked to control the - jump. These values can be simply checked by AboveOrEqual or Below - condition if they are the two highest unsigned integers from JSValue's - Tag field. - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - * runtime/JSValue.h: - -2010-10-25 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=41948 - REGRESSION(r60392): Registerfile can be unwound too far following an exception - - SunSpider reports no change. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): Walk the stack to calculate the high - water mark currently in use. It's not safe to assume that the current - CallFrame's high water mark is the highest high water mark because - calls do not always set up at the end of a CallFrame. A large caller - CallFrame can encompass a small callee CallFrame. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock - in the CallFrame of a host call, like the Interpreter does, instead of - leaving the CodeBlock field uninitialized. The backtracing code requires - a valid CodeBlock field in each CallFrame. - -2010-10-27 Gabor Loki <loki@webkit.org> - - Reviewed by Csaba Osztrogonác. - - Add cmn to branch32(reg, imm) on ARM - https://bugs.webkit.org/show_bug.cgi?id=48062 - - The conditional comparison can be done with cmn if the imm value is - negative and can fit into the cmn instruction. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::branch32): - -2010-10-26 Oliver Hunt <oliver@apple.com> - - Interpreter build fix. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-10-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Remove exec and globalData arguments from jsNumber - https://bugs.webkit.org/show_bug.cgi?id=48270 - - Remove the now unused exec and globalData arguments from jsNumber - and mechanically update all users of jsNumber. - - * API/JSValueRef.cpp: - (JSValueMakeNumber): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitLoad): - * bytecompiler/NodesCodegen.cpp: - (JSC::ArrayNode::emitBytecode): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_mod): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jtrue): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jsc.cpp: - (functionRun): - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - * runtime/ArrayConstructor.cpp: - (JSC::ArrayConstructor::ArrayConstructor): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::BooleanConstructor::BooleanConstructor): - * runtime/CachedTranscendentalFunction.h: - (JSC::CachedTranscendentalFunction::operator()): - * runtime/DateConstructor.cpp: - (JSC::DateConstructor::DateConstructor): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): - * runtime/DateInstance.cpp: - (JSC::DateInstance::DateInstance): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - * runtime/Error.cpp: - (JSC::addErrorSourceInfo): - (JSC::addErrorDivotInfo): - * runtime/ErrorConstructor.cpp: - (JSC::ErrorConstructor::ErrorConstructor): - * runtime/FunctionConstructor.cpp: - (JSC::FunctionConstructor::FunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::FunctionPrototype::FunctionPrototype): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::JSByteArray): - * runtime/JSByteArray.h: - (JSC::JSByteArray::getIndex): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::lengthGetter): - (JSC::JSFunction::getOwnPropertyDescriptor): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - * runtime/JSNumberCell.h: - (JSC::JSValue::JSValue): - (JSC::jsNaN): - (JSC::JSValue::toJSNumber): - * runtime/JSONObject.cpp: - (JSC::unwrapBoxedPrimitive): - (JSC::PropertyNameForFunctionCall::value): - (JSC::JSONStringify): - * runtime/JSString.cpp: - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::getStringPropertySlot): - * runtime/JSValue.h: - (JSC::jsDoubleNumber): - (JSC::jsNumber): - (JSC::jsNaN): - (JSC::JSValue::JSValue): - (JSC::JSValue::toJSNumber): - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::parse): - * runtime/MathObject.cpp: - (JSC::MathObject::MathObject): - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/NativeErrorConstructor.cpp: - (JSC::NativeErrorConstructor::NativeErrorConstructor): - * runtime/NumberConstructor.cpp: - (JSC::NumberConstructor::NumberConstructor): - (JSC::numberConstructorNaNValue): - (JSC::numberConstructorNegInfinity): - (JSC::numberConstructorPosInfinity): - (JSC::numberConstructorMaxValue): - (JSC::numberConstructorMinValue): - (JSC::constructWithNumberConstructor): - (JSC::callNumberConstructor): - * runtime/NumberPrototype.cpp: - (JSC::NumberPrototype::NumberPrototype): - * runtime/ObjectConstructor.cpp: - (JSC::ObjectConstructor::ObjectConstructor): - * runtime/Operations.cpp: - (JSC::jsAddSlowCase): - * runtime/Operations.h: - (JSC::jsAdd): - * runtime/PrototypeFunction.cpp: - (JSC::PrototypeFunction::PrototypeFunction): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): - (JSC::RegExpMatchesArray::fillArrayInstance): - * runtime/RegExpObject.cpp: - (JSC::regExpObjectLastIndex): - * runtime/StringConstructor.cpp: - (JSC::StringConstructor::StringConstructor): - * runtime/StringPrototype.cpp: - (JSC::StringPrototype::StringPrototype): - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncLocaleCompare): - -2010-10-25 David Tapuska <dtapuska@rim.com> - - Reviewed by David Kilzer. - - Enable VFP if our compiler settings indicated we had a hardware - VFP. - - https://bugs.webkit.org/show_bug.cgi?id=46096 - - * assembler/MacroAssemblerARM.cpp: - (JSC::isVFPPresent): - -2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70451. - http://trac.webkit.org/changeset/70451 - https://bugs.webkit.org/show_bug.cgi?id=48249 - - Broke set-unloaded-frame-location.html under Qt (Requested by - caseq on #webkit). - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/TextPosition.h: Removed. - -2010-10-25 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Replace _countof with WTF_ARRAY_LENGTH - https://bugs.webkit.org/show_bug.cgi?id=48229 - - * wtf/Platform.h: - -2010-10-25 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Adds TextPosition* classes -- a structure that stores line/column/generation - level coordinates inside text document. Adds *BasedNumber classes -- typesafe int - wrappers that emphasize whether int number is used as zero-based or - one-based. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/TextPosition.h: Added. - (WTF::TextPosition::TextPosition): - (WTF::TextPosition::minimumPosition): - (WTF::TextPosition::belowRangePosition): - (WTF::ZeroBasedNumber::fromZeroBasedInt): - (WTF::ZeroBasedNumber::ZeroBasedNumber): - (WTF::ZeroBasedNumber::zeroBasedInt): - (WTF::ZeroBasedNumber::base): - (WTF::ZeroBasedNumber::belowBase): - (WTF::OneBasedNumber::fromOneBasedInt): - (WTF::OneBasedNumber::OneBasedNumber): - (WTF::OneBasedNumber::oneBasedInt): - (WTF::OneBasedNumber::convertAsZeroBasedInt): - (WTF::OneBasedNumber::convertToZeroBased): - (WTF::OneBasedNumber::base): - (WTF::OneBasedNumber::belowBase): - (WTF::toZeroBasedTextPosition): - (WTF::toOneBasedTextPosition): - (WTF::ZeroBasedNumber::convertToOneBased): - -2010-10-24 Kwang Yul Seo <skyul@company100.net> - - Reviewed by David Kilzer. - - Check endianness with __BIG_ENDIAN in RVCT. - https://bugs.webkit.org/show_bug.cgi?id=46122 - - RVCT defines __BIG_ENDIAN if compiling for a big-endian target. - - * wtf/Platform.h: - -2010-10-24 Dan Bernstein <mitz@apple.com> - - Rubber-stamped by Dave Kilzer. - - Removed empty directories. - - * JavaScriptCore: Removed. - * JavaScriptCore/runtime: Removed. - -2010-10-24 Patrick Gansterer <paroga@webkit.org> - - Unreviewed, fix typo of last build fix. - - * wtf/DateMath.cpp: - -2010-10-24 Patrick Gansterer <paroga@webkit.org> - - Unreviewed build fix for chromium. - - * wtf/DateMath.cpp: Added missing include. - -2010-10-24 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Add WTF_ARRAY_LENGTH macro to WTF - https://bugs.webkit.org/show_bug.cgi?id=32828 - - Unify the different implementations and usages. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendQuotedString): - (JSC::Stringifier::toJSON): - (JSC::Stringifier::appendStringifiedValue): - * runtime/UString.cpp: - (JSC::UString::number): - * wtf/DateMath.cpp: - (WTF::parseDateFromNullTerminatedCharacters): - * wtf/StdLibExtras.h: - -2010-10-24 Dirk Schulze <krit@webkit.org> - - Reviewed by Nikolas Zimmermann. - - Filter example Chiseled from SVG Wow! is slow - https://bugs.webkit.org/show_bug.cgi?id=48174 - - Added 'using WTF::ByteArray;' at the end of ByteArray.h - - * wtf/ByteArray.h: - -2010-10-24 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Inline WTF::bitwise_cast and fix style - https://bugs.webkit.org/show_bug.cgi?id=48208 - - * wtf/StdLibExtras.h: - (WTF::bitwise_cast): - (WTF::bitCount): - -2010-10-23 Xan Lopez <xlopez@igalia.com> - - Reviewed by Sam Weinig. - - Unify globalData APIs - https://bugs.webkit.org/show_bug.cgi?id=47969 - - Make JSGlobalObject::globalData return a reference and adapt - callers. This unifies the API with the existing - CallFrame::globalData, which also returns a reference. - - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * interpreter/CallFrame.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - * jsc.cpp: - (runWithScripts): - * parser/JSParser.cpp: - (JSC::jsParse): - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/Parser.h: - (JSC::Parser::parse): - * runtime/Error.cpp: - (JSC::createError): - (JSC::createEvalError): - (JSC::createRangeError): - (JSC::createReferenceError): - (JSC::createSyntaxError): - (JSC::createTypeError): - (JSC::createURIError): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::~JSGlobalObject): - (JSC::JSGlobalObject::markChildren): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::globalData): - -2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, rolling out r70369. - http://trac.webkit.org/changeset/70369 - https://bugs.webkit.org/show_bug.cgi?id=47974 - - Caused weird artifacts in expected results. - - * wtf/Platform.h: - -2010-10-23 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - Crashes randomly in cairo_scaled_font_destroy - https://bugs.webkit.org/show_bug.cgi?id=46794 - - Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr - goes away this should probably be handled in the future via some special - hooks in RefCounted (or its contained type). - - * wtf/PlatformRefPtr.h: - (WTF::PlatformRefPtr::~PlatformRefPtr): - (WTF::PlatformRefPtr::clear): - (WTF::::operator): - -2010-10-22 Adam Roben <aroben@apple.com> - - Remove the QuartzCorePresent.h mechanism - - This header was used to detect whether QuartzCore headers were present - on the system. Everyone should have these headers now so we no longer - need to detect. - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove - code to generate QuartzCorePresent.h. - - * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and - collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef. - -2010-10-22 Adam Barth <abarth@webkit.org> - - Unreviewed, rolling out r70290. - http://trac.webkit.org/changeset/70290 - https://bugs.webkit.org/show_bug.cgi?id=48111 - - Undelete Android build files. - - * Android.mk: Added. - -2010-10-22 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Csaba Osztrogonác. - - JSC interpreter regressions after r69940 - https://bugs.webkit.org/show_bug.cgi?id=47839 - - Wrong "if": It should test whether the result exists, - and not the opposite. It is an interpreter bug, hence - the bots does not capture it. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveBase): - -2010-10-21 Adam Barth <abarth@webkit.org> - - Reviewed by David Levin. - - Remove Android build system - https://bugs.webkit.org/show_bug.cgi?id=48111 - - * Android.mk: Removed. - -2010-10-21 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Add a String constructor which takes AECHAR* - https://bugs.webkit.org/show_bug.cgi?id=45043 - - Add String(const AECHAR*) constructor for convenience. - - * wtf/text/WTFString.h: - -2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk - https://bugs.webkit.org/show_bug.cgi?id=47896 - - * wtf/gobject/GTypedefs.h: - -2010-10-21 Adam Barth <abarth@webkit.org> - - Unreviewed, rolling out r70174. - http://trac.webkit.org/changeset/70174 - https://bugs.webkit.org/show_bug.cgi?id=41948 - - This patch reverts a change that causes - http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - -2010-10-20 Simon Fraser <simon.fraser@apple.com> - - Fix the EFL build. - - * wtf/CMakeLists.txt: - -2010-10-20 Simon Fraser <simon.fraser@apple.com> - - Fix Windows build: export needed symbols. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-10-19 Simon Fraser <simon.fraser@apple.com> - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=47851 - - Add methods to DecimalNumber to return the buffer length - required for decimal and exponential output. - - Make some of the DecimalNumber code non-inline (no - effect on Sunspider), adding DecimalNumber.cpp to various - build systems. - - Make some DecimalNumber methods 'const'. - - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - * wtf/DecimalNumber.cpp: Added. - (WTF::DecimalNumber::bufferLengthForStringDecimal): - (WTF::DecimalNumber::bufferLengthForStringExponential): - (WTF::DecimalNumber::toStringDecimal): - (WTF::DecimalNumber::toStringExponential): - * wtf/DecimalNumber.h: - (WTF::DecimalNumber::sign): - (WTF::DecimalNumber::exponent): - (WTF::DecimalNumber::significand): - (WTF::DecimalNumber::precision): - * wtf/dtoa.cpp: - (WTF::dtoa): - * wtf/dtoa.h: - * wtf/wtf.pri: - -2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70165. - http://trac.webkit.org/changeset/70165 - https://bugs.webkit.org/show_bug.cgi?id=48007 - - It broke tests on Qt bot (Requested by Ossy on #webkit). - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/TextPosition.h: Removed. - -2010-10-20 Brian Weinstein <bweinstein@apple.com> - - Reviewed by Adam Roben. - - Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build - step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2010-10-20 Dumitru Daniliuc <dumi@chromium.org> - - Unreviewed, fixing the Win build. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2010-10-20 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=41948 - REGRESSION(r60392): Registerfile can be unwound too far following an exception - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): Walk the stack to calculate the high - water mark currently in use. It's not safe to assume that the current - CallFrame's high water mark is the highest high water mark because - calls do not always set up at the end of a CallFrame. A large caller - CallFrame can encompass a small callee CallFrame. - -2010-10-20 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Adds TextPosition* classes -- a structure that stores line/column/generation - level coordinates inside text document. Adds *BasedNumber classes -- typesafe int - wrappers that emphasize whether int number is used as zero-based or - one-based. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/TextPosition.h: Added. - (WTF::TextPosition::TextPosition): - (WTF::TextPosition::minimumPosition): - (WTF::TextPosition::belowRangePosition): - (WTF::ZeroBasedNumber::fromZeroBasedInt): - (WTF::ZeroBasedNumber::ZeroBasedNumber): - (WTF::ZeroBasedNumber::zeroBasedInt): - (WTF::ZeroBasedNumber::base): - (WTF::ZeroBasedNumber::belowBase): - (WTF::OneBasedNumber::fromOneBasedInt): - (WTF::OneBasedNumber::OneBasedNumber): - (WTF::OneBasedNumber::oneBasedInt): - (WTF::OneBasedNumber::convertAsZeroBasedInt): - (WTF::OneBasedNumber::convertToZeroBased): - (WTF::OneBasedNumber::base): - (WTF::OneBasedNumber::belowBase): - (WTF::toZeroBasedTextPosition): - (WTF::toOneBasedTextPosition): - (WTF::ZeroBasedNumber::convertToOneBased): - -2010-10-19 Kwang Yul Seo <skyul@company100.net> - - Reviewed by David Kilzer. - - [BREWMP] Turn off JIT for simulator build - https://bugs.webkit.org/show_bug.cgi?id=47937 - - We don't need to test x86 JIT. - - * wtf/Platform.h: - -2010-10-19 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Remove support for JSVALUE32 from JSC - https://bugs.webkit.org/show_bug.cgi?id=47948 - - Remove all the code for supporting JSVALUE32 from JSC. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_lshift): - (JSC::JIT::emitSlow_op_lshift): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_rshift): - (JSC::JIT::emit_op_urshift): - (JSC::JIT::emitSlow_op_urshift): - (JSC::JIT::emit_op_jnless): - (JSC::JIT::emitSlow_op_jnless): - (JSC::JIT::emit_op_jless): - (JSC::JIT::emitSlow_op_jless): - (JSC::JIT::emit_op_jlesseq): - (JSC::JIT::emitSlow_op_jlesseq): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::emit_op_post_inc): - (JSC::JIT::emit_op_post_dec): - (JSC::JIT::emit_op_pre_inc): - (JSC::JIT::emit_op_pre_dec): - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITCall.cpp: - * jit/JITInlineMethods.h: - (JSC::JIT::emitGetFromCallFrameHeaderPtr): - (JSC::JIT::emitGetFromCallFrameHeader32): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_loop_if_lesseq): - (JSC::JIT::emit_op_bitnot): - (JSC::JIT::emit_op_next_pname): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - * jit/JITStubs.h: - * jit/JSInterfaceJIT.h: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::returnDouble): - (JSC::SpecializedThunkJIT::tagReturnAsInt32): - * jit/ThunkGenerators.cpp: - (JSC::sqrtThunkGenerator): - (JSC::powThunkGenerator): - * runtime/Collector.cpp: - (JSC::isPossibleCell): - (JSC::typeName): - * runtime/JSCell.h: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.h: - (JSC::Structure::prototypeForLookup): - * runtime/JSImmediate.h: - (JSC::reinterpretIntptrToDouble): - (JSC::JSImmediate::isIntegerNumber): - (JSC::JSImmediate::isDouble): - (JSC::JSImmediate::areBothImmediateIntegerNumbers): - (JSC::JSImmediate::makeDouble): - (JSC::JSImmediate::doubleValue): - (JSC::JSImmediate::toBoolean): - (JSC::JSImmediate::fromNumberOutsideIntegerRange): - (JSC::JSImmediate::from): - (JSC::JSImmediate::toDouble): - (JSC::JSFastMath::rightShiftImmediateNumbers): - * runtime/JSNumberCell.cpp: - * runtime/JSNumberCell.h: - * runtime/JSObject.h: - (JSC::JSObject::JSObject): - * runtime/JSValue.h: - * runtime/NumberObject.h: - * wtf/Platform.h: - -2010-10-19 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Geoffrey Garen. - - BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors - https://bugs.webkit.org/show_bug.cgi?id=47920 - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization. - -2010-10-19 Kwang Yul Seo <skyul@company100.net> - - Reviewed by David Kilzer. - - RVCT fails to compile DateMath.cpp due to overloaded function pow - https://bugs.webkit.org/show_bug.cgi?id=47844 - - Choose std::pow(double, double) among multiple overloaded pow functions - to fix build for RVCT. - - * wtf/DateMath.cpp: - (WTF::parseES5DateFromNullTerminatedCharacters): - -2010-10-19 Patrick Gansterer <paroga@webkit.org> - - Reviewed by David Kilzer. - - Use UChar instead of wchar_t in UnicodeWinCE - https://bugs.webkit.org/show_bug.cgi?id=47904 - - Make UnicodeWinCE more portable, so we can use it for other ports too. - - * wtf/unicode/wince/UnicodeWinCE.cpp: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSpace): - (WTF::Unicode::isLetter): - (WTF::Unicode::isUpper): - (WTF::Unicode::isLower): - (WTF::Unicode::isDigit): - (WTF::Unicode::isPunct): - (WTF::Unicode::isAlphanumeric): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::digitValue): - * wtf/unicode/wince/UnicodeWinCE.h: - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isHighSurrogate): - (WTF::Unicode::isLowSurrogate): - (WTF::Unicode::umemcasecmp): - (WTF::Unicode::surrogateToUcs4): - -2010-10-19 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Andreas Kling. - - Fix style of UnicodeWinCE - https://bugs.webkit.org/show_bug.cgi?id=47818 - - * wtf/unicode/wince/UnicodeWinCE.cpp: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - * wtf/unicode/wince/UnicodeWinCE.h: - -2010-10-18 Xan Lopez <xlopez@igalia.com> - - Reviewed by Martin Robinson. - - * GNUmakefile.am: add missing file. - -2010-10-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Strict mode: Functions created with the function constructor don't implement strict mode semantics - https://bugs.webkit.org/show_bug.cgi?id=47860 - - When creating the FunctionExecutable for a new function the function constructor - was always passing false for whether or not a function was strict, rather than - using the information from the freshly parsed function itself. - - * runtime/Executable.cpp: - (JSC::FunctionExecutable::fromGlobalCode): - -2010-10-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Darin Adler. - - Strict mode: |this| should be undefined if it is not explicitly provided - https://bugs.webkit.org/show_bug.cgi?id=47833 - - To make strict mode behave correctly we want to pass undefined instead of null - as the default this value. This has no impact on behaviour outside of strict - mode as both values are replaced with the global object if necessary. - - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - - -2010-10-18 Darin Adler <darin@apple.com> - - Reviewed by Anders Carlsson. - - Make a nullptr that works with OwnPtr and RefPtr - https://bugs.webkit.org/show_bug.cgi?id=47756 - - * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h. - - * wtf/NullPtr.h: Added. - - * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr. - * wtf/OwnPtr.h: Ditto. - * wtf/PassOwnArrayPtr.h: Ditto. - * wtf/PassOwnPtr.h: Ditto. - * wtf/PassRefPtr.h: Ditto. - * wtf/RefPtr.h: Ditto. - * wtf/RetainPtr.h: Ditto. - -2010-10-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Strict mode: JIT doesn't check for |this| being an immediate before dereferencing - https://bugs.webkit.org/show_bug.cgi?id=47826 - - There's no guarantee that |this| will be a cell in a strict mode function, so - don't claim that it is. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isKnownNotImmediate): - -2010-10-18 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Oliver Hunt. - - if (0) throw "x" ; else { } throws parse error after r69906 - https://bugs.webkit.org/show_bug.cgi?id=47807 - - r69906 introduced a bug: the semicolon is not parsed after a throw - expression anymore. Thus, the semicolon terminates the "if" parsing - in the example above, and the else token results a parse error. - - * parser/JSParser.cpp: - (JSC::JSParser::parseThrowStatement): - -2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Andreas Kling. - - Remove some unnecessary lines of code from Parser.cpp - https://bugs.webkit.org/show_bug.cgi?id=47816 - - * parser/Parser.cpp: - -2010-10-18 Xan Lopez <xlopez@igalia.com> - - Reviewed by Csaba Osztrogonác. - - Build broken with JIT disabled - https://bugs.webkit.org/show_bug.cgi?id=47801 - - This is a regression caused by r69940. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveBase): - -2010-10-18 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Darin Adler. - - Change FastAllocBase implementation into a macro - https://bugs.webkit.org/show_bug.cgi?id=42998 - - It was investigated in bug #33896 that inheriting classes from FastAllocBase - can result in objects getting larger which leads to memory regressions. - Using a macro instead of inheriting classes from FastAllocBase would solve the issue. - - * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro - -2010-10-17 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions - https://bugs.webkit.org/show_bug.cgi?id=47791 - - Simple fix, check for arguments in addition to eval. - - * parser/JSParser.cpp: - (JSC::JSParser::parseUnaryExpression): - -2010-10-17 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure - https://bugs.webkit.org/show_bug.cgi?id=47788 - - Fixing this required a couple of changes: - * resolve_base now has a flag to indicate whether it is being used for a put in strict mode. - this allows us to throw an exception when we're doing a completely generic resolve for - assignment, and that assignment would create a new global. - * There is a new opcode 'op_ensure_property_exists' that is used to determine whether - the property being assigned to already exists on the global object. This currently - has no caching, but such caching could be added relatively trivially. It is only used - in the case where we know that a property will be placed on the global object, and - we cannot verify that the property already exists. - - In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather - than making op_resolve_base have an additional runtime branch. - - There's also a new helper function to create the exception for the invalid assignment. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveBaseForPut): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::AssignResolveNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emit_op_ensure_property_exists): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emit_op_ensure_property_exists): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * parser/JSParser.cpp: - (JSC::JSParser::parseProgram): - * runtime/ExceptionHelpers.cpp: - (JSC::createErrorForInvalidGlobalAssignment): - * runtime/ExceptionHelpers.h: - * runtime/Operations.h: - (JSC::resolveBase): - -2010-10-17 Simon Fraser <simon.fraser@apple.com> - - First part of fix for Windows build failure. Will wait for the - next set of link errors to determine the mangled forms for dtoaRoundSF - and dtoaRoundDP. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-10-17 Simon Fraser <simon.fraser@apple.com> - - Reviewed by Nikolas Zimmermann. - - Very large and small numbers fail to round-trip through CSS - https://bugs.webkit.org/show_bug.cgi?id=20674 - - New exports required to use DecimalNumber in WebCore. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-10-16 Kyusun Kim <maniagoon@company100.net> - - Reviewed by Alexey Proskuryakov. - - Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters() - https://bugs.webkit.org/show_bug.cgi?id=47758 - - * wtf/CurrentTime.h: - * wtf/DateMath.h: - -2010-10-16 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Rename StringHasherFunctions.h to StringHasher.h - https://bugs.webkit.org/show_bug.cgi?id=47200 - - Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/StringHashFunctions.h: Removed. - * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h. - * wtf/text/StringHash.h: - * wtf/text/StringImpl.h: - -2010-10-15 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline - https://bugs.webkit.org/show_bug.cgi?id=47762 - - The old YACC parser depended on the lexer for some classes of semicolon insertion. - The new parser handles ASI entirely on its own so when the lexer inserts a semicolon - on its own the net result is a spurious semicolon in the input stream. This can result - in incorrect parsing in some cases: - - if (0) - break - ;else {} - - Would result in a parse failure as the output from the lexer is essentially - - if (0) - break - ;;else - - So the second semicolon is interpreted as a empty statement, which terminates the if, - making the else an error. - - - * parser/JSParser.cpp: - (JSC::JSParser::parseThrowStatement): - Parsing of throw statement was wrong, and only worked due to the weird behaviour - in the lexer - * parser/Lexer.cpp: - (JSC::Lexer::lex): - Remove bogus semicolon insertion from the newline handling - -2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Dirk Schulze. - - Replace some String::format() usages by StringConcatenate in WebKit - https://bugs.webkit.org/show_bug.cgi?id=47714 - - * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString(). - -2010-10-15 Ilya Tikhonovsky <loislo@chromium.org> - - Unreviewed build fix for Debug Leopard which is failng to compile after r69842. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::emitDisjunction): - -2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - The parenthetical assertion checking isn't working in some cases with YARR - Interpreter - https://bugs.webkit.org/show_bug.cgi?id=46893 - - Calculate the countToCheck value of a TypeParentheticalAssertion by - subtracting the number of characters which follows - a TypeParentheticalAssertion term with the number of characters which should - be matched by terms which are contained - in the TypeParentheticalAssertion term (minimumSize). - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::emitDisjunction): - -2010-10-14 Nathan Vander Wilt <nate@andyet.net> - - Reviewed by Darin Adler. - - Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632 - + * runtime/Completion.h: * runtime/DateConversion.cpp: - (JSC::parseDate): - * wtf/DateMath.cpp: - (WTF::ymdhmsToSeconds): - (WTF::parseES5DateFromNullTerminatedCharacters): - * wtf/DateMath.h: - -2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Gavin Barraclough. - - Replace lots of String::format() usages by StringConcatenate - https://bugs.webkit.org/show_bug.cgi?id=47664 - - Add StringTypeAdapter<char> to accept single characters for makeString(). - - * wtf/text/StringConcatenate.h: - (WTF::makeString): - -2010-10-14 David Goodwin <david_goodwin@apple.com> - - Reviewed by Darin Adler. - - need way to measure size of JITed ARM code - https://bugs.webkit.org/show_bug.cgi?id=47121 - - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::linkCode): - (JSC::LinkBuffer::dumpLinkStats): - (JSC::LinkBuffer::dumpCode): - -2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - The backreference checking isn't working in some cases with YARR Interpreter - https://bugs.webkit.org/show_bug.cgi?id=46904 - - The Interpreter::matchBackReference() function returns true without matching - when a backreference points to the same parentheses where it is. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchBackReference): - -2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> - - Reviewed by Andreas Kling. - - [Qt] Text breaking is slow: enable ICU as an opt-in - https://bugs.webkit.org/show_bug.cgi?id=40332 - - Added a config flag that enables ICU as an opt-in instead of the Qt specific code. - Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h - - * JavaScriptCore.pri: - * wtf/unicode/qt4/UnicodeQt4.h: - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::isPunct): - (WTF::Unicode::isLower): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::combiningClass): - (WTF::Unicode::direction): - (WTF::Unicode::category): - -2010-10-14 Anton Faern <anton@bladehawke.com> - - Reviewed by Csaba Osztrogonác. - - https://bugs.webkit.org/show_bug.cgi?id=47658 - NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO - change. This means that OS(NETBSD) is also undefined. - - * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD - -2010-10-13 David Goodwin <david_goodwin@apple.com> - - Reviewed by Oliver Hunt. - - ARMv7 JIT should generated conditional branches when possible - https://bugs.webkit.org/show_bug.cgi?id=47384 - - Use different jump padding sizes for conditional and unconditional - jumps (12 bytes and 10 bytes respectively). This allows the JIT to - include the IT instruction as part of the conditional jump sequence - which in turn allows it to optimize away the IT using an ARMv7 - conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for - conditional branches when displacement is in range. Also use IT/B(T4) - for conditional branch when displacement does not fit in B(T3). - - For unconditional jump, instruction selection options are: - B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection - options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX. - - * assembler/ARMv7Assembler.cpp: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::JmpSrc::JmpSrc): - (JSC::ARMv7Assembler::ifThenElse): - (JSC::ARMv7Assembler::jumpSizeDelta): - (JSC::ARMv7Assembler::canCompact): - (JSC::ARMv7Assembler::computeJumpType): - (JSC::ARMv7Assembler::link): - (JSC::ARMv7Assembler::canBeJumpT1): - (JSC::ARMv7Assembler::canBeJumpT3): - (JSC::ARMv7Assembler::canBeJumpT4): - (JSC::ARMv7Assembler::linkJumpT1): - (JSC::ARMv7Assembler::linkJumpT3): - (JSC::ARMv7Assembler::linkJumpT4): - (JSC::ARMv7Assembler::linkConditionalJumpT4): - (JSC::ARMv7Assembler::linkBX): - (JSC::ARMv7Assembler::linkConditionalBX): - (JSC::ARMv7Assembler::linkJumpAbsolute): - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::linkCode): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::canCompact): - (JSC::MacroAssemblerARMv7::computeJumpType): - (JSC::MacroAssemblerARMv7::jumpSizeDelta): - (JSC::MacroAssemblerARMv7::jump): - (JSC::MacroAssemblerARMv7::nearCall): - (JSC::MacroAssemblerARMv7::call): - (JSC::MacroAssemblerARMv7::ret): - (JSC::MacroAssemblerARMv7::tailRecursiveCall): - (JSC::MacroAssemblerARMv7::makeJump): - (JSC::MacroAssemblerARMv7::makeBranch): - -2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch> - - Reviewed by Darin Adler. - - Don't depend on Windows on sched_yield and sched.h - https://bugs.webkit.org/show_bug.cgi?id=45543 - - sched.h is part of pthreads and sched_yield is implemented - in pthreads-win32 as Sleep(0). This patch avoids a gratuitous - dependency on pthreads-win32 in this file. - - * wtf/TCSpinLock.h: - (TCMalloc_SlowLock): - -2010-10-13 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Port unicode - https://bugs.webkit.org/show_bug.cgi?id=45716 - - Brew MP port uses only the subset of ICU library to reduce the binary size. - Follow the WinCE's implementation. - - * wtf/Platform.h: - * wtf/unicode/Unicode.h: - * wtf/unicode/brew/UnicodeBrew.cpp: Added. - (WTF::Unicode::toLower): - (WTF::Unicode::toUpper): - (WTF::Unicode::foldCase): - (WTF::Unicode::isPrintableChar): - (WTF::Unicode::isUpper): - (WTF::Unicode::isLower): - (WTF::Unicode::isDigit): - (WTF::Unicode::isPunct): - (WTF::Unicode::isAlphanumeric): - (WTF::Unicode::toTitleCase): - (WTF::Unicode::direction): - (WTF::Unicode::category): - (WTF::Unicode::decompositionType): - (WTF::Unicode::combiningClass): - (WTF::Unicode::mirroredChar): - (WTF::Unicode::digitValue): - (WTF::Unicode::isSpace): - (WTF::Unicode::isLetter): - * wtf/unicode/brew/UnicodeBrew.h: Added. - (WTF::Unicode::isArabicChar): - (WTF::Unicode::isSeparatorSpace): - (WTF::Unicode::hasLineBreakingPropertyComplexContext): - (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): - (WTF::Unicode::umemcasecmp): - -2010-10-13 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-10-13 Adam Barth <abarth@webkit.org> - - Reviewed by Maciej Stachowiak. - - [WTFURL] Add URLQueryCanonicalizer - https://bugs.webkit.org/show_bug.cgi?id=45088 - - This class canonicalizes the query component of URLs. The main tricky - bit there is the convertCharset function, which I've moved to a - templated dependency. There'll likely be more about that in future - patches. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/url/src/URLEscape.cpp: Added. - * wtf/url/src/URLEscape.h: Added. - (WTF::appendEscapedCharacter): - * wtf/url/src/URLQueryCanonicalizer.h: Added. - (WTF::URLQueryCanonicalizer::canonicalize): - (WTF::URLQueryCanonicalizer::isAllASCII): - (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString): - (WTF::URLQueryCanonicalizer::convertToQueryEncoding): - -2010-10-13 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43987 - Downloading using XHR is much slower than before - Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector. - Fundamentally this should be the same (copies current contents to expand capacity, - rather than using a rope), but this approach allows the intermadiate state of the - String to be inspected in the buffer without copying to resolve. - - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendQuotedString): - (JSC::Stringifier::Holder::appendNextProperty): - Renamed StringBuilder::size() -> length() (to match other String types). - - * runtime/UStringBuilder.h: - (JSC::UStringBuilder::append): - (JSC::UStringBuilder::toUString): - Update for changes in parent class, can just 'using' the append methods. - - * wtf/text/StringBuilder.cpp: Added. - (WTF::StringBuilder::reifyString): - (WTF::StringBuilder::resize): - (WTF::StringBuilder::reserveCapacity): - (WTF::StringBuilder::allocateBuffer): - (WTF::StringBuilder::appendUninitialized): - (WTF::StringBuilder::append): - (WTF::StringBuilder::shrinkToFit): - * wtf/text/StringBuilder.h: - (WTF::StringBuilder::StringBuilder): - (WTF::StringBuilder::append): - (WTF::StringBuilder::toString): - (WTF::StringBuilder::toStringPreserveCapacity): - (WTF::StringBuilder::length): - (WTF::StringBuilder::isEmpty): - (WTF::StringBuilder::operator[]): - (WTF::StringBuilder::clear): - Class updated to use overcapacity in a StringImpl, rather than a Vector. - - * Android.mk: - * Android.v8.wtf.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.vcproj/jsc/jsc.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/CMakeLists.txt: - * wtf/wtf.pri: - -2010-10-13 Adam Roben <aroben@apple.com> - - Export tryFastRealloc for WebKit2's benefit - - Rubber-stamped by Anders Carlsson. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added - tryFastRealloc. Removed RegExpObject::info, which is now exported via - JS_EXPORTDATA. - -2010-10-13 Adam Barth <abarth@webkit.org> - - Reviewed by Maciej Stachowiak. - - [WTFURL] Add a mechanism for classifying types of characters - https://bugs.webkit.org/show_bug.cgi?id=45085 - - Various characters have different escaping rules depending on where - they are in URLs. This patch adds a table containing that information. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/url/src/URLCharacterTypes.cpp: Added. - * wtf/url/src/URLCharacterTypes.h: Added. - (WTF::URLCharacterTypes::isQueryChar): - (WTF::URLCharacterTypes::isIPv4Char): - (WTF::URLCharacterTypes::isHexChar): - (WTF::URLCharacterTypes::isCharOfType): - -2010-10-13 Xan Lopez <xlopez@igalia.com> - - Reviewed by Csaba Osztrogonác. - - Missing parameters for bytecode dump of next_pname - https://bugs.webkit.org/show_bug.cgi?id=47590 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): add missing parameters to the dump. - -2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Dirk Schulze. - - Add wtf/text/StringConcatenate - https://bugs.webkit.org/show_bug.cgi?id=47584 - - Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too. - Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString. - Exactly the same design that has been followed while refactoring StringBuilder. - - The UString variants can all be removed as soon as WTF::String & JSC::UString converge. - - * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. - * bytecode/CodeBlock.cpp: s/makeString/makeUString/ - (JSC::escapeQuotes): - (JSC::valueToSourceString): - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpToSourceString): - (JSC::regexpName): - * bytecompiler/NodesCodegen.cpp: Ditto. - (JSC::substitute): - * profiler/Profiler.cpp: Ditto. - (JSC::Profiler::createCallIdentifier): - * runtime/ExceptionHelpers.cpp: Ditto. - (JSC::createUndefinedVariableError): - (JSC::createErrorMessage): - (JSC::createInvalidParamError): - * runtime/FunctionConstructor.cpp: Ditto. - (JSC::constructFunction): - * runtime/FunctionPrototype.cpp: Ditto. - (JSC::insertSemicolonIfNeeded): - * runtime/JSONObject.cpp: Ditto. - (JSC::Stringifier::indent): - * runtime/JSStringBuilder.h: - (JSC::jsMakeNontrivialString): - * runtime/RegExpConstructor.cpp: Ditto. - (JSC::constructRegExp): - * runtime/RegExpObject.cpp: Ditto. - (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: Ditto. - (JSC::regExpProtoFuncCompile): - * runtime/StringConcatenate.h: Removed. - * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h - (JSC::makeUString): - * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h. - (WTF::makeString): - -2010-10-12 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * wtf/text/StringBuilder.h: - (WTF::StringBuilder::length): - -2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Gavin Barraclough. - - Unify JSC::StringBuilder & WebCore::StringBuilder - https://bugs.webkit.org/show_bug.cgi?id=47538 - - Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String(). - Move the append(const JSC::UString&) method into runtime/UStringBuilder.h. - UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality. - - No new code, just move code around. - - * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h. - * JavaScriptCore.gypi: Ditto. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. - * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. * runtime/Executable.cpp: - (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString(). - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): Ditto. - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncUnescape): Ditto. - * runtime/JSONObject.cpp: - (JSC::Stringifier::stringify): Ditto. - (JSC::Stringifier::appendQuotedString): Ditto. - (JSC::Stringifier::appendStringifiedValue): Ditto. - (JSC::Stringifier::startNewLine): Ditto. - (JSC::Stringifier::Holder::appendNextProperty): Ditto. - * runtime/LiteralParser.cpp: - (JSC::LiteralParser::Lexer::lexString): Ditto. - * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include. - * runtime/StringBuilder.h: Removed. - * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods. - (JSC::UStringBuilder::append): append(const JSC::UString&) - (JSC::UStringBuilder::toUString): - * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h - (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere. - (WTF::StringBuilder::isEmpty): Ditto (+ constify method). - (WTF::StringBuilder::reserveCapacity): Ditto. - (WTF::StringBuilder::resize): Ditto. - (WTF::StringBuilder::size): Ditto. - (WTF::StringBuilder::operator[]): Ditto. - (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder. - -2010-10-12 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - Cleaned up the processing of replacements after regular expression - processing, especially the case where there wasn't a match. - Changed to use empty strings instead of computing a zero length sub - string. - https://bugs.webkit.org/show_bug.cgi?id=47506 - - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::stringProtoFuncReplace): - -2010-10-11 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Clang build fix after r69472. - https://bugs.webkit.org/show_bug.cgi?id=46523 - - * wtf/text/StringHash.h: - -2010-10-11 Oliver Hunt <oliver@apple.com> - - Undo last minute change to 32bit build. - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_convert_this_strict): - -2010-10-11 Brian Weinstein <bweinstein@apple.com> - - Build fix for Windows. Add a necessary export from r69516. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-10-11 Oliver Hunt <oliver@apple.com> - - Fix interpreter build -- was broken by incorrect merge. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-10-01 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [ES5] Implement strict mode - https://bugs.webkit.org/show_bug.cgi?id=10701 - - Initial strict mode implementation. This is the simplest - implementation that could possibly work and adds (hopefully) - all of the restrictions required by strict mode. There are - a number of inefficiencies, especially in the handling of - arguments and eval as smart implementations would make this - patch more complicated. - - The SyntaxChecker AST builder has become somewhat more complex - as strict mode does require more parse tree information to - validate the syntax. - - Summary of major changes to the parser: - * We track when we enter strict mode (this may come as a surprise) - * Strict mode actually requires a degree of AST knowledge to validate - so the SyntaxChecker now produces values that can be used to distinguish - "node" types. - * We now track variables that are written to. We do this to - statically identify writes to global properties that don't exist - and abort at that point. This should actually make it possible - to optimise some other cases in the future but for now it's - purely for validity checking. Currently writes are only tracked - in strict mode code. - * Labels are now tracked as it is now a syntax error to jump to a label - that does not exist (or to use break, continue, or return in a context - where they would be invalid). - - Runtime changes: - * In order to get correct hanlding of the Arguments object all - strict mode functions that reference arguments create and tearoff - the arguments object on entry. This is not strictly necessary - but was the least work necessary to get the correct behaviour. - * PutPropertySlot now tracks whether it is being used for a strict - mode write, and if so Object::put will throw when a write can't be - completed. - * StrictEvalActivation was added as an "activation" object for strict - mode eval (so that strict eval does not introduce new variables into - the containing scope). - - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isStrictMode): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::createArgumentsIfNecessary): - (JSC::BytecodeGenerator::emitReturn): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::isStrictMode): - (JSC::BytecodeGenerator::makeFunction): - * debugger/Debugger.cpp: - (JSC::evaluateInGlobalCallFrame): - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::evaluate): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::execute): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_pnames): - (JSC::JIT::emit_op_convert_this_strict): - (JSC::JIT::emitSlow_op_convert_this_strict): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_pnames): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createFunctionBody): - (JSC::ASTBuilder::isResolve): - * parser/JSParser.cpp: - (JSC::JSParser::next): - (JSC::JSParser::startLoop): - (JSC::JSParser::endLoop): - (JSC::JSParser::startSwitch): - (JSC::JSParser::endSwitch): - (JSC::JSParser::setStrictMode): - (JSC::JSParser::strictMode): - (JSC::JSParser::isValidStrictMode): - (JSC::JSParser::declareParameter): - (JSC::JSParser::breakIsValid): - (JSC::JSParser::pushLabel): - (JSC::JSParser::popLabel): - (JSC::JSParser::hasLabel): - (JSC::JSParser::DepthManager::DepthManager): - (JSC::JSParser::DepthManager::~DepthManager): - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::startSwitch): - (JSC::JSParser::Scope::endSwitch): - (JSC::JSParser::Scope::startLoop): - (JSC::JSParser::Scope::endLoop): - (JSC::JSParser::Scope::inLoop): - (JSC::JSParser::Scope::breakIsValid): - (JSC::JSParser::Scope::pushLabel): - (JSC::JSParser::Scope::popLabel): - (JSC::JSParser::Scope::hasLabel): - (JSC::JSParser::Scope::isFunction): - (JSC::JSParser::Scope::declareVariable): - (JSC::JSParser::Scope::declareWrite): - (JSC::JSParser::Scope::deleteProperty): - (JSC::JSParser::Scope::declareParameter): - (JSC::JSParser::Scope::setNeedsFullActivation): - (JSC::JSParser::Scope::collectFreeVariables): - (JSC::JSParser::Scope::getUncapturedWrittenVariables): - (JSC::JSParser::Scope::getDeletedVariables): - (JSC::JSParser::Scope::setStrictMode): - (JSC::JSParser::Scope::strictMode): - (JSC::JSParser::Scope::isValidStrictMode): - (JSC::JSParser::pushScope): - (JSC::JSParser::popScope): - (JSC::JSParser::declareVariable): - (JSC::JSParser::declareWrite): - (JSC::JSParser::deleteProperty): - (JSC::jsParse): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseSourceElements): - (JSC::JSParser::parseDoWhileStatement): - (JSC::JSParser::parseWhileStatement): - (JSC::JSParser::parseVarDeclarationList): - (JSC::JSParser::parseConstDeclarationList): - (JSC::JSParser::parseForStatement): - (JSC::JSParser::parseBreakStatement): - (JSC::JSParser::parseContinueStatement): - (JSC::JSParser::parseReturnStatement): - (JSC::JSParser::parseWithStatement): - (JSC::JSParser::parseSwitchStatement): - (JSC::JSParser::parseSwitchClauses): - (JSC::JSParser::parseSwitchDefaultClause): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseBlockStatement): - (JSC::JSParser::parseStatement): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionBody): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseFunctionDeclaration): - (JSC::JSParser::parseExpressionOrLabelStatement): - (JSC::JSParser::parseIfStatement): - (JSC::JSParser::parseExpression): - (JSC::JSParser::parseAssignmentExpression): - (JSC::JSParser::parseConditionalExpression): - (JSC::JSParser::parseBinaryExpression): - (JSC::JSParser::parseStrictObjectLiteral): - (JSC::JSParser::parsePrimaryExpression): - (JSC::JSParser::parseMemberExpression): - (JSC::JSParser::parseUnaryExpression): - * parser/JSParser.h: - * parser/Lexer.cpp: - (JSC::Lexer::parseString): - (JSC::Lexer::lex): - * parser/Lexer.h: - (JSC::Lexer::isReparsing): - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::create): - * parser/Nodes.h: - (JSC::ScopeNode::isStrictMode): - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/Parser.h: - (JSC::Parser::parse): - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::SyntaxChecker): - (JSC::SyntaxChecker::makeFunctionCallNode): - (JSC::SyntaxChecker::appendToComma): - (JSC::SyntaxChecker::createCommaExpr): - (JSC::SyntaxChecker::makeAssignNode): - (JSC::SyntaxChecker::makePrefixNode): - (JSC::SyntaxChecker::makePostfixNode): - (JSC::SyntaxChecker::makeTypeOfNode): - (JSC::SyntaxChecker::makeDeleteNode): - (JSC::SyntaxChecker::makeNegateNode): - (JSC::SyntaxChecker::makeBitwiseNotNode): - (JSC::SyntaxChecker::createLogicalNot): - (JSC::SyntaxChecker::createUnaryPlus): - (JSC::SyntaxChecker::createVoid): - (JSC::SyntaxChecker::thisExpr): - (JSC::SyntaxChecker::createResolve): - (JSC::SyntaxChecker::createObjectLiteral): - (JSC::SyntaxChecker::createArray): - (JSC::SyntaxChecker::createNumberExpr): - (JSC::SyntaxChecker::createString): - (JSC::SyntaxChecker::createBoolean): - (JSC::SyntaxChecker::createNull): - (JSC::SyntaxChecker::createBracketAccess): - (JSC::SyntaxChecker::createDotAccess): - (JSC::SyntaxChecker::createRegex): - (JSC::SyntaxChecker::createNewExpr): - (JSC::SyntaxChecker::createConditionalExpr): - (JSC::SyntaxChecker::createAssignResolve): - (JSC::SyntaxChecker::createFunctionExpr): - (JSC::SyntaxChecker::createFunctionBody): - (JSC::SyntaxChecker::appendBinaryExpressionInfo): - (JSC::SyntaxChecker::operatorStackPop): - * runtime/Arguments.cpp: - (JSC::Arguments::createStrictModeCallerIfNecessary): - (JSC::Arguments::createStrictModeCalleeIfNecessary): - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/Arguments.h: - (JSC::Arguments::Arguments): - * runtime/CommonIdentifiers.cpp: - (JSC::CommonIdentifiers::CommonIdentifiers): - * runtime/CommonIdentifiers.h: - * runtime/Error.cpp: - (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction): - (JSC::StrictModeTypeErrorFunction::constructThrowTypeError): - (JSC::StrictModeTypeErrorFunction::getConstructData): - (JSC::StrictModeTypeErrorFunction::callThrowTypeError): - (JSC::StrictModeTypeErrorFunction::getCallData): - (JSC::createTypeErrorFunction): - * runtime/Error.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::EvalExecutable): - (JSC::ProgramExecutable::ProgramExecutable): - (JSC::FunctionExecutable::FunctionExecutable): (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::checkSyntax): (JSC::ProgramExecutable::compileInternal): (JSC::FunctionExecutable::compileForCallInternal): (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::fromGlobalCode): - (JSC::ProgramExecutable::reparseExceptionInfo): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - (JSC::ScriptExecutable::isStrictMode): - (JSC::EvalExecutable::create): - (JSC::FunctionExecutable::create): - * runtime/JSActivation.cpp: - (JSC::JSActivation::toStrictThisObject): - * runtime/JSActivation.h: + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/GCActivityCallbackCF.cpp: + * runtime/Identifier.cpp: + * runtime/JSCell.h: + * runtime/JSChunk.cpp: Added. + * runtime/JSChunk.h: Added. * runtime/JSFunction.cpp: - (JSC::createDescriptorForThrowingProperty): + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::markChildren): + (JSC::JSFunction::getCallData): (JSC::JSFunction::getOwnPropertySlot): - (JSC::JSFunction::getOwnPropertyDescriptor): - (JSC::JSFunction::put): + (JSC::JSFunction::getConstructData): + * runtime/JSFunction.h: + (JSC::JSFunction::scope): + (JSC::JSFunction::setScope): * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): * runtime/JSGlobalData.h: * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::init): + (JSC::JSGlobalObject::markChildren): * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::internalFunctionStructure): + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::globalScopeChain): * runtime/JSGlobalObjectFunctions.cpp: (JSC::globalFuncEval): - * runtime/JSObject.cpp: - (JSC::JSObject::put): - (JSC::JSObject::toStrictThisObject): - (JSC::throwTypeError): - * runtime/JSObject.h: - (JSC::JSObject::isStrictModeFunction): - (JSC::JSObject::putDirectInternal): - (JSC::JSObject::putDirect): - (JSC::JSValue::putDirect): - (JSC::JSValue::toStrictThisObject): - * runtime/JSStaticScopeObject.cpp: - (JSC::JSStaticScopeObject::toStrictThisObject): - * runtime/JSStaticScopeObject.h: - * runtime/JSValue.h: - * runtime/JSZombie.h: - (JSC::JSZombie::toStrictThisObject): - * runtime/PutPropertySlot.h: - (JSC::PutPropertySlot::PutPropertySlot): - (JSC::PutPropertySlot::isStrictMode): - * runtime/StrictEvalActivation.cpp: Added. - (JSC::StrictEvalActivation::StrictEvalActivation): - (JSC::StrictEvalActivation::deleteProperty): - (JSC::StrictEvalActivation::toThisObject): - (JSC::StrictEvalActivation::toStrictThisObject): - * runtime/StrictEvalActivation.h: Added. - -2010-10-10 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Windows build fix after r69472. - - * wtf/text/StringHash.h: - (WTF::CaseFoldingHash::hash): - -2010-10-10 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Use WTF::StringHasher in WTF::CaseFoldingHash - https://bugs.webkit.org/show_bug.cgi?id=46523 - - * wtf/text/StringHash.h: - (WTF::CaseFoldingHash::foldCase): - (WTF::CaseFoldingHash::hash): - -2010-10-09 Pratik Solanki <psolanki@apple.com> - - Reviewed by Xan Lopez. - - https://bugs.webkit.org/show_bug.cgi?id=47445 - Remove unused function WTFThreadData::initializeIdentifierTable() - - * wtf/WTFThreadData.h: - -2010-10-08 Michael Saboff <msaboff@apple.com> - - Reviewed by Darin Adler. - - Added check to start of subexpression being positive before using - subexpression in replacement. - https://bugs.webkit.org/show_bug.cgi?id=47324 - - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - -2010-10-08 Chris Evans <cevans@google.com> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=47393 - - Use unsigned consistently to check for max StringImpl length. - Add a few integer overflow checks. - Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request. - - * wtf/text/WTFString.cpp: - * wtf/text/StringImpl.h: - * wtf/text/StringImpl.cpp: - Better use of size_t vs. unsigned; check for integer overflows. - -2010-10-07 David Goodwin <david_goodwin@apple.com> - - Reviewed by Oliver Hunt. - - ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount - https://bugs.webkit.org/show_bug.cgi?id=47356 - - * assembler/ARMv7Assembler.h: - -2010-10-06 Chris Evans <cevans@google.com> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=47248 - - Use size_t consistently in CString, to prevent theoretical trouble - with > 4GB strings on 64-bit platforms. - - * wtf/text/CString.h: - * wtf/text/CString.cpp: - Use size_t for string lengths. - * wtf/MD5.cpp: - (WTF::expectMD5): use suitable format string + cast for size_t. - * JavaScriptCore.exp: - Update symbol name. - -2010-10-06 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Start cleaning up Arguments.h - https://bugs.webkit.org/show_bug.cgi?id=47304 - - * wtf/TypeTraits.h: - * wtf/TypeTraits.cpp: - Add RemoveReference type trait. - -2010-10-06 Rafael Antognolli <antognolli@profusion.mobi> - - Unreviewed build fix. - - [EFL] Build fix for glib support. - https://bugs.webkit.org/show_bug.cgi?id=47221 - - If compiling with GLib support enabled, we also need to link wtf against - glib library. - - * wtf/CMakeListsEfl.txt: - -2010-10-05 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Gavin Barraclough. - - [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT - https://bugs.webkit.org/show_bug.cgi?id=47117 - - Use IMemCache1 to flush data cache and invalidate instruction cache. - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2010-10-05 Leandro Pereira <leandro@profusion.mobi> - - Unreviewed. Build fix. - - Moved "jsc" directory to "shell", so that the name does not clash with the - JavaScriptCore shell in some build systems. - http://webkit.org/b/47049 - - * CMakeLists.txt: Changed reference from "jsc" to "shell". - * jsc: Removed. - * jsc/CMakeLists.txt: Removed. - * jsc/CMakeListsEfl.txt: Removed. - * shell: Copied from JavaScriptCore/jsc. + * runtime/JSLock.cpp: + * runtime/JSNumberCell.cpp: + * runtime/JSZombie.cpp: + * runtime/MarkedBlock.cpp: + * runtime/MarkedSpace.cpp: + * runtime/PropertyNameArray.cpp: + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + (JSC::ScopeChainNode::localDepth): + (JSC::ScopeChainNode::markChildren): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::ScopeChainNode): + (JSC::ScopeChainNode::createStructure): + (JSC::ScopeChainNode::push): + (JSC::ScopeChainNode::pop): + (JSC::ScopeChainIterator::ScopeChainIterator): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChainIterator::operator++): + (JSC::ScopeChainNode::begin): + (JSC::ScopeChainNode::end): + (JSC::ExecState::globalData): + (JSC::ExecState::lexicalGlobalObject): + (JSC::ExecState::globalThisValue): + * runtime/ScopeChainMark.h: + * wtf/DateMath.cpp: -2010-10-05 Kwang Yul Seo <skyul@company100.net> +2011-02-27 Adam Barth <abarth@webkit.org> - Reviewed by Kent Tamura. + Reviewed by Eric Seidel. - [BREWMP] Use PlatformRefPtr in randomNumber - https://bugs.webkit.org/show_bug.cgi?id=46989 + Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible + https://bugs.webkit.org/show_bug.cgi?id=55326 - Use PlatformRefPtr to free memory automatically. + Currently, randomNumber does a bunch of platform-specific work that to + get a cryptographic randomness when available. Instead, we should use + cryptographicallyRandomNumber, which abstracts this work. + Unfortunately, we can't remove all of the WTF::randomNumber + implementation because not every port has access to cryptographically + random numbers. * wtf/RandomNumber.cpp: (WTF::randomNumber): -2010-10-05 Oliver Hunt <oliver@apple.com> +2011-02-27 Benjamin Poulain <ikipou@gmail.com> Reviewed by Darin Adler. - REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64) - https://bugs.webkit.org/show_bug.cgi?id=46690 - - Use the correct register value when initialising the arguments - object in the interpreter. This is covered by existing tests. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-10-04 David Goodwin <david_goodwin@apple.com> - - Reviewed by Oliver Hunt. - - ARMv7 JIT should take advantage of 2-byte branches to reduce code size - https://bugs.webkit.org/show_bug.cgi?id=47007 - - * assembler/ARMv7Assembler.cpp: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::computeJumpType): - (JSC::ARMv7Assembler::link): - (JSC::ARMv7Assembler::canBeJumpT2): - (JSC::ARMv7Assembler::canBeJumpT4): - (JSC::ARMv7Assembler::linkBX): - (JSC::ARMv7Assembler::linkJumpT4): - (JSC::ARMv7Assembler::linkJumpT2): - (JSC::ARMv7Assembler::linkJumpAbsolute): - -2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> - - Reviewed by Antonio Gomes. - - [EFL] Use fast malloc for WebKit EFL - https://bugs.webkit.org/show_bug.cgi?id=46691 - - Use fast malloc for WebKit EFL because the fast malloc is to allocate - memory quickly. - - * wtf/CMakeListsEfl.txt: + Eliminate DeprecatedPtrList from RenderBlock + https://bugs.webkit.org/show_bug.cgi?id=54972 -2010-10-04 Oliver Hunt <oliver@apple.com> + Add methods find() and contains() using an adaptor to ListHashSet. + Those method are like the one of HashSet, they allow to find objects + based on a different key than the one used to define the set. - Reviewed by Geoff Garen. + Add convenience methods for direct access to the head and tail of the list. + Those methods are providing similar API/behavior as Vector. - Lazily create activation objects - https://bugs.webkit.org/show_bug.cgi?id=47107 - - Make it possible to lazily create the activation object - for a function that needs one. This allows us to reduce - the overhead of entering a function that may require - an activation in some cases, but not always. - - This does make exception handling a little more complex as - it's now necessary to verify that a callframes activation - has been created, and create it if not, in all of the - paths used in exception handling. - - We also need to add logic to check for the existence of - the activation in the scoped_var opcodes, as well as - op_ret, op_ret_object_or_this and op_tearoff_activation - so that we can avoid creating an activation unnecesarily - on function exit. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::createActivation): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::setActivationRegister): - (JSC::CodeBlock::activationRegister): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitNewFunctionInternal): - (JSC::BytecodeGenerator::emitNewFunctionExpression): - (JSC::BytecodeGenerator::createActivationIfNecessary): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveSkip): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::resolveBase): - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITCall32_64.cpp: - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_ret_object_or_this): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_ret_object_or_this): - (JSC::JIT::emit_op_create_activation): - (JSC::JIT::emit_op_resolve_global_dynamic): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_create_activation): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-10-04 Adam Barth <abarth@webkit.org> - - Reviewed by Sam Weinig. - - Remove ENABLE_SANDBOX - https://bugs.webkit.org/show_bug.cgi?id=47032 - - * Configurations/FeatureDefines.xcconfig: - -2010-10-01 Pratik Solanki <psolanki@apple.com> - - Reviewed by Geoffrey Garen. - Specify ALWAYS_INLINE at function declaration not function definition - https://bugs.webkit.org/show_bug.cgi?id=46960 - - For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well. - - * bytecompiler/BytecodeGenerator.h: - * wtf/FastMalloc.cpp: - -2010-10-01 Kwang Yul Seo <skyul@company100.net> - - Unreviewed. - - [BREWMP] Change Collector BLOCK_SIZE to 64KB - https://bugs.webkit.org/show_bug.cgi?id=46436 - - Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices. - - * runtime/Collector.h: - -2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> - - Reviewed by Andreas Kling. - - [Qt] Stack overflow on symbian platform. - https://bugs.webkit.org/show_bug.cgi?id=40598 - - Move big allocation in arrayProtoFuncToString from stack to heap. - JSC::arrayProtoFuncToString function can be called recursivly and - 1K allocation on stack cahse stack overflow. - Can be useful for other platforms with limited stack size. - - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - -2010-09-30 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr. - https://bugs.webkit.org/show_bug.cgi?id=46373 - - A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef - to wrap the instance in PlatformRefPtr. - - * wtf/brew/ShellBrew.h: - (WTF::createRefPtrInstance): - -2010-09-30 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Port PlatformRefPtr - https://bugs.webkit.org/show_bug.cgi?id=46370 - - Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP. - - * wtf/brew/RefPtrBrew.h: Added. - (WTF::refPlatformPtr): - (WTF::derefPlatformPtr): - -2010-09-29 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - Add additional checks to StringBuffer. - <rdar://problem/7756381> - - * wtf/text/StringBuffer.h: - (WTF::StringBuffer::StringBuffer): - (WTF::StringBuffer::resize): - -2010-09-30 Chris Marrin <cmarrin@apple.com> - - Reviewed by Simon Fraser. - - Make 2D accelerated canvas rendering build on Mac - https://bugs.webkit.org/show_bug.cgi?id=46007 - - Added ACCELERATED_2D_CANVAS to FeatureDefines - - * Configurations/FeatureDefines.xcconfig: - -2010-09-30 Kevin Ollivier <kevino@theolliviers.com> - - [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from - the copy so as not to alter global settings. - - * wscript: - -2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - The case-insensitivity backreference checking isn't working with YARR - Interpreter - https://bugs.webkit.org/show_bug.cgi?id=46882 - - Add ignorecase checking to the Interpreter::tryConsumeBackReference() function. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::tryConsumeBackReference): - -2010-09-30 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Andreas Kling. - - [BREWMP] Leave initializeRandomNumberGenerator empty. - https://bugs.webkit.org/show_bug.cgi?id=46851 - - On Brew MP, AEECLSID_RANDOM initializes itself. - - * wtf/RandomNumberSeed.h: - (WTF::initializeRandomNumberGenerator): - -2010-09-30 Gabor Loki <loki@webkit.org> - - Reviewed by Csaba Osztrogonác. - - Remove unnecessary cacheFlush calls from Thumb-2 - https://bugs.webkit.org/show_bug.cgi?id=46702 - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - -2010-09-29 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Next try to fix cygwin build. - - * wtf/Assertions.cpp: - -2010-09-29 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN). - - * wtf/Assertions.cpp: - -2010-09-29 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Build fix for cygwin. - - * wtf/Assertions.cpp: + * wtf/ListHashSet.h: + (WTF::::first): + (WTF::::last): + (WTF::::removeLast): + (WTF::ListHashSetTranslatorAdapter::hash): + (WTF::ListHashSetTranslatorAdapter::equal): + (WTF::::find): + (WTF::::contains): -2010-09-29 Patrick Gansterer <paroga@webkit.org> +2011-02-26 Patrick Gansterer <paroga@webkit.org> Reviewed by Andreas Kling. - [WINCE] Buildfix for Assertions.cpp after r68511. - https://bugs.webkit.org/show_bug.cgi?id=46807 + Add support for DragonFly BSD + https://bugs.webkit.org/show_bug.cgi?id=54407 - Some, but not all WinCE environments have support for IsDebuggerPresent(). - Add HAVE(ISDEBUGGERPRESENT) to make this a build option. - HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default. + DragonFly BSD is based on FreeBSD, so handle it like FreeBSD. - * wtf/Assertions.cpp: * wtf/Platform.h: -2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Csaba Osztrogonác. - - JSC compile fails on 32bit platform when Regexp Tracing is enabled - https://bugs.webkit.org/show_bug.cgi?id=46713 - - Fix the cast of pointer in regexp tracing to avoid the warning. - - * runtime/RegExp.cpp: - (JSC::RegExp::match): - -2010-09-28 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Begin hooking up painting in the plug-in process - https://bugs.webkit.org/show_bug.cgi?id=46766 - - * JavaScriptCore.exp: - Add tryFastRealloc, used by WebKit2. - -2010-09-28 Philippe Normand <pnormand@igalia.com> - - Reviewed by Martin Robinson. - - Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT) - https://bugs.webkit.org/show_bug.cgi?id=46721 - - Enable GOwnPtr/GRefPtr build only if glib support has been - explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro. - - * wtf/gobject/GOwnPtr.cpp: - * wtf/gobject/GOwnPtr.h: - * wtf/gobject/GRefPtr.cpp: - * wtf/gobject/GRefPtr.h: - -2010-09-28 İsmail Dönmez <ismail@namtrac.org> - - Reviewed by Andreas Kling. - - Test for WINCE instead of WINCEBASIC, compiler always defines WINCE. - Remove reference to unexisting path JavaScriptCore/os-wince. - - * JavaScriptCore.pri: - * wtf/Assertions.cpp: - -2010-09-27 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Changed the initialization of JSArray objects to have space for - 3 elements for the constructor that takes a ArgList argument. - This improves v8-deltablue performance by about 2.8% by reducing - the number of realloc() calls. - https://bugs.webkit.org/show_bug.cgi?id=46664 - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - -2010-09-27 Gavin Barraclough <barraclough@apple.com> +2011-02-26 Adam Barth <abarth@webkit.org> - Reviewed by Darin Adler. - - Bug 46680 - Inlining string concatenation can regress interpreter performance - <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter - Do not inline calls to string concatenation in the interpret loop. + Reviewed by Dimitri Glazkov. - * interpreter/Interpreter.cpp: - (JSC::concatenateStrings): - (JSC::Interpreter::privateExecute): + JavaScriptCore should use the xcconfig file instead of importing that information into GYP + https://bugs.webkit.org/show_bug.cgi?id=55282 -2010-09-27 Anders Carlsson <andersca@apple.com> + Technically, this breaks the build because I had removed one of the + warnings in this config file, but this change seems like an + improvement. - Fix thinko. + * gyp/JavaScriptCore.gyp: - * runtime/JSCell.h: +2011-02-26 Thouraya ANDOLSI <thouraya.andolsi@st.com> -2010-09-27 Anders Carlsson <andersca@apple.com> + Reviewed by Nikolas Zimmermann. - Reviewed by Adam Roben. + SH4 JIT SUPPORT + https://bugs.webkit.org/show_bug.cgi?id=44329 - Try to fix Windows build. + Provide an ExecutableAllocater::cacheFlush() implementation for + Linux/SH4. - * runtime/JSCell.h: - (JSC::MSVCBugWorkaround::MSVCBugWorkaround): - (JSC::MSVCBugWorkaround::~MSVCBugWorkaround): + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): -2010-09-27 Erik Arvidsson <arv@chromium.org> +2011-02-25 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by Darin Adler. + Unreviewed, rolling out r79627. + http://trac.webkit.org/changeset/79627 + https://bugs.webkit.org/show_bug.cgi?id=55274 - Add operator == for AtomicString and Vector<Uchar> - https://bugs.webkit.org/show_bug.cgi?id=46509 + broke worker tests (Requested by olliej on #webkit). * JavaScriptCore.exp: - * wtf/text/AtomicString.cpp: - (WTF::operator==): - * wtf/text/AtomicString.h: - (WTF::operator==): - (WTF::operator!=): - -2010-09-27 Anders Carlsson <andersca@apple.com> - - Try to fix the Windows build. - - * wtf/Noncopyable.h: - -2010-09-26 Anders Carlsson <andersca@apple.com> - - Reviewed by Alexey Proskuryakov and Adam Barth. - - Add WTF_MAKE_NONCOPYABLE macro - https://bugs.webkit.org/show_bug.cgi?id=46589 - - Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The - reason for this is that the Itanium C++ ABI states that no empty classes of the same type - can be laid out at the same offset in the class. This can result in objects getting larger - which leads to memory regressions. (One example of this is the String class which grew by - sizeof(void*) when both its base class and its first member variable inherited indirectly - from FastAllocBase). - - * wtf/Noncopyable.h: - Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated. - + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/Heap.cpp: + (JSC::Heap::allocate): + * runtime/Heap.h: * runtime/JSCell.h: - * wtf/RefCounted.h: - Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE. - -2010-09-27 Philippe Normand <pnormand@igalia.com> - - Reviewed by Martin Robinson. - - [GTK] use ENABLE(GLIB_SUPPORT) - https://bugs.webkit.org/show_bug.cgi?id=46630 - - * wtf/Platform.h: Include GTypedefs.h only if glib support - is explicitly enabled. - -2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com> - - Reviewed by Adam Barth. - - jsc: Document the strcat opcode. - https://bugs.webkit.org/show_bug.cgi?id=46571 - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com> - - Reviewed by Adam Barth. - - make-bytecode-docs.pl: Add a comment to the generated HTML - https://bugs.webkit.org/show_bug.cgi?id=46570 - - Generate an HTML Comment that this file was generated from - Interpreter.cpp with the make-bytecode-docs.pl script. - - * docs/make-bytecode-docs.pl: - -2010-09-27 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Remove WTF::stringHash functions - https://bugs.webkit.org/show_bug.cgi?id=46520 - - Since r68289 the stringHash functions are only wrappers around StringHasher::createHash. - So use StringHasher::createHash directly and remove stringHash. - - * wtf/StringHashFunctions.h: - * wtf/text/StringImpl.h: - (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly. - -2010-09-26 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - Add WTF::StringHasher::createBlobHash - https://bugs.webkit.org/show_bug.cgi?id=46514 - - Add this function for hashing FormElementKey and QualifiedNameComponents. - - * wtf/StringHashFunctions.h: - (WTF::StringHasher::createBlobHash): - -2010-09-26 Patrick Gansterer <paroga@webkit.org> - - Reviewed by Adam Barth. - - REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue) - running websocket/tests/bad-sub-protocol-non-ascii.html - https://bugs.webkit.org/show_bug.cgi?id=46553 - - Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong. - Add an additional member variable to indicate if we have an pending character - instead of only using an invalid character for this purpose. - - * wtf/StringHashFunctions.h: - (WTF::StringHasher::StringHasher): - (WTF::StringHasher::addCharacters): - (WTF::StringHasher::addCharacter): - (WTF::StringHasher::hash): - -2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> - - Reviewed by Oliver Hunt. - - valueOf called in wrong order in atan2 and date constructors. - https://bugs.webkit.org/show_bug.cgi?id=26978 - - Fixed the bug where the arguments to atan2 were being evaluated - out of order. - - * runtime/MathObject.cpp: - (JSC::mathProtoFuncATan2): - -2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> - - Reviewed by Oliver Hunt. - - valueOf called in wrong order in atan2 and date constructors. - https://bugs.webkit.org/show_bug.cgi?id=26978 - - Fixed the issue where the parameters to the Date constructor - were being evaluated to numbers more than once. - - * runtime/DateConstructor.cpp: - (JSC::constructDate): - (JSC::dateUTC): - -2010-09-25 Oliver Hunt <oliver@apple.com> - - Fix various builds - - Relearning the lesson that last minute changes are bad. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetArgumentsLength): - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_get_argument_by_val): - -2010-09-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Cameron Zwarich. - - Avoid constructing arguments object when accessing length and index properties - https://bugs.webkit.org/show_bug.cgi?id=46572 - - Add opcodes to read argument length and properties, and then implement them. - Much like other lazy opcodes these opcodes take a fast path when the arguments - object has not been instantiated, and fall back on generic access mechanisms - if they are acting on an instantiated object. - - 3% win on v8-earleyboyer, no change elsewhere. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitGetArgumentsLength): - (JSC::BytecodeGenerator::emitGetArgumentByVal): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::BracketAccessorNode::emitBytecode): - (JSC::DotAccessorNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_arguments_length): - (JSC::JIT::emitSlow_op_get_arguments_length): - (JSC::JIT::emit_op_get_argument_by_val): - (JSC::JIT::emitSlow_op_get_argument_by_val): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_arguments_length): - (JSC::JIT::emitSlow_op_get_arguments_length): - (JSC::JIT::emit_op_get_argument_by_val): - (JSC::JIT::emitSlow_op_get_argument_by_val): - -2010-09-25 Patrick Gansterer <paroga@webkit.org> - - Unreviewed. - - Fix typo in StringHasher class - https://bugs.webkit.org/show_bug.cgi?id=45970 - - * wtf/StringHashFunctions.h: - (WTF::StringHasher::createHash): - -2010-09-24 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Gavin Barraclough. - - Add WTF::StringHasher - https://bugs.webkit.org/show_bug.cgi?id=45970 - - StringHasher is a class for calculation stringHash out of character string. - This class will unify the different usages of the same algorithm. - - * wtf/StringHashFunctions.h: - (WTF::StringHasher::StringHasher): - (WTF::StringHasher::addCharacters): - (WTF::StringHasher::addCharacter): - (WTF::StringHasher::hash): - (WTF::StringHasher::createHash): - (WTF::StringHasher::defaultCoverter): - (WTF::StringHasher::addCharactersToHash): - (WTF::stringHash): + (JSC::JSCell::JSCell::operator new): + (JSC::JSCell::MarkedSpace::sizeClassFor): + (JSC::JSCell::MarkedSpace::allocate): + * runtime/MarkedBlock.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::SizeClass::SizeClass): -2010-09-24 Oliver Hunt <oliver@apple.com> +2011-02-25 Michael Saboff <msaboff@apple.com> - Reviewed by Geoffrey Garen. + Reviewed by Darin Adler. - Variable declarations inside a catch scope don't get propogated to the parent scope - https://bugs.webkit.org/show_bug.cgi?id=46501 + Leak in JSParser::Scope of ScopeLabelInfo Vector + https://bugs.webkit.org/show_bug.cgi?id=55249 - Add logic to make variable declaration look for a scope for the - new variable. This allows us to create a scope (eg. for catch) - and then seal it, so that additional variable declarations - contained are propogated to the correct target. Strangely this - comes out as a performance win, but I think it's mostly cache - effects. + Changed m_labels to be an OwnPtr<>. Added VectorTraits + and Scope copy constructor to support this change. * parser/JSParser.cpp: - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::preventNewDecls): - (JSC::JSParser::Scope::allowsNewDecls): - (JSC::JSParser::declareVariable): - (JSC::JSParser::parseVarDeclarationList): - (JSC::JSParser::parseConstDeclarationList): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionDeclaration): - -2010-09-24 İsmail Dönmez <ismail@namtrac.org> - - Reviewed by Csaba Osztrogonác. - - Add a Windows compatible inttypes.h header to fix WinCE build. - https://bugs.webkit.org/show_bug.cgi?id=46463 + (JSC::JSParser::Scope::~Scope): - * os-win32/inttypes.h: Added. +2011-02-25 Fumitoshi Ukai <ukai@chromium.org> -2010-09-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit). - https://bugs.webkit.org/show_bug.cgi?id=46448 - - Roll this back in, with additional logic to prevent us from delaying construction - of functions named "arguments" - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitInitLazyRegister): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): - (JSC::BytecodeGenerator::constRegisterFor): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitLazyNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionInternal): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_init_lazy_reg): - (JSC::JIT::emit_op_new_func): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_init_lazy_reg): - * parser/Nodes.h: - (JSC::ScopeNode::needsActivationForMoreThanVariables): - -2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com> + Reviewed by Adam Barth. - Unreviewed, rolling out r68223. - http://trac.webkit.org/changeset/68223 - https://bugs.webkit.org/show_bug.cgi?id=46448 + WebSocket uses insecure random numbers + https://bugs.webkit.org/show_bug.cgi?id=54714 - It broke 2-3 tests on bots (Requested by Ossy on #webkit). + * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber() - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::constRegisterFor): - (JSC::BytecodeGenerator::emitNewFunction): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_func): - (JSC::JIT::emit_op_init_arguments): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_new_func): - (JSC::JIT::emit_op_init_arguments): - * parser/Nodes.h: +2011-02-25 Patrick Gansterer <paroga@webkit.org> -2010-09-23 Oliver Hunt <oliver@apple.com> + Reviewed by Adam Roben. - Reviewed by Geoffrey Garen. + Move timeBeginPeriod into OS(WINDOWS) section + https://bugs.webkit.org/show_bug.cgi?id=55247 - Delay construction of functions that aren't captured - https://bugs.webkit.org/show_bug.cgi?id=46433 + * jsc.cpp: + (main): timeBeginPeriod is available on all Windows versions and not compiler specific. - If a function isn't captured by an activation there's no - way it can be accessed indirectly, so we can delay the - construction until it's used (similar to what we do with - arguments). We rename the existing op_init_arguments to - op_init_lazy_reg and removed its implicit handling of - the anonymous argument register, and make op_new_function - take a parameter to indicate whether it should null check - the target slot before creating the function object. +2011-02-25 Patrick Gansterer <paroga@webkit.org> - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitInitLazyRegister): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): - (JSC::BytecodeGenerator::constRegisterFor): - (JSC::BytecodeGenerator::emitNewFunction): - (JSC::BytecodeGenerator::emitLazyNewFunction): - (JSC::BytecodeGenerator::emitNewFunctionInternal): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_init_lazy_reg): - (JSC::JIT::emit_op_new_func): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_init_lazy_reg): - * parser/Nodes.h: - (JSC::ScopeNode::needsActivationForMoreThanVariables): + Unreviewed WinCE build fix for r79695. -2010-09-23 David Kilzer <ddkilzer@apple.com> + * jsc.cpp: + (main): SetErrorMode isn't available on WinCE. - <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2 - https://bugs.webkit.org/show_bug.cgi?id=46423 +2011-02-25 Adam Roben <aroben@apple.com> - Reviewed by Oliver Hunt. + Work around Cygwin's crash-suppression behavior - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Disable the gcc computed - goto hacks added in r55564 when compiling with llvm-gcc-4.2. + Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will + inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be + invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode + when our test apps launch to work around Cygwin's behavior. -2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi> + Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem + debugger) when launched from Cygwin 1.7 Reviewed by Darin Adler. - Fix usage of enum as if it was a define - https://bugs.webkit.org/show_bug.cgi?id=46355 - - pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an - enum. Hence, it cannot be used by the preprocessor which always - evaluates that condition as true. This was giving a warning when - compiling with gcc and "-Wundef" flag. - - The second path, when PTHREAD_MUTEX_DEFAULT is not the same of - PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path - and get rid of that #if. - - * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to - set mutex type to PTHREAD_MUTEX_NORMAL. - (WTF::Mutex::Mutex): - -2010-09-23 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Removed extraneous truncation of ovector on entry and error exit. - Changed the initialization to -1 of vector to only initialize - the start indecies, which is sufficient for the pattern/subpatterns. - Changed the JIT code to not clear the end index for subpatterns - as it isn't needed. These changes are worth ~2.7% on v8-regexp. - https://bugs.webkit.org/show_bug.cgi?id=46404 - - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - -2010-09-22 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Only copy captured variables into activation - https://bugs.webkit.org/show_bug.cgi?id=46330 - - We now track free variable information which means that - we no longer need to copy every variable defined in a - function. With this patch activations only retain those - variables needed for correctness. In order to interact - safely with the inspector this means that JSActivation - now provides its own lookup functions so it can avoid - trying to read or write to variables that have been - optimised out. - - * bytecode/CodeBlock.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * parser/Nodes.h: - (JSC::ScopeNode::capturedVariableCount): - (JSC::ScopeNode::captures): - * runtime/Arguments.h: - (JSC::JSActivation::copyRegisters): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::FunctionExecutable): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - * runtime/Executable.h: - (JSC::FunctionExecutable::capturedVariableCount): - * runtime/JSActivation.cpp: - (JSC::JSActivation::markChildren): - (JSC::JSActivation::symbolTableGet): - (JSC::JSActivation::symbolTablePut): - (JSC::JSActivation::getOwnPropertyNames): - (JSC::JSActivation::symbolTablePutWithAttributes): - * runtime/JSActivation.h: - -2010-09-23 Ismail Donmez <ismail@namtrac.org> - - Reviewed by Andreas Kling. - - Fix jsc.exe build for Windows CE - - * jsc.pro: Add mmtimer.lib for Windows CE. - -2010-09-23 Ismail Donmez <ismail@namtrac.org> - - Unreviewed. - - JIT should be disabled on Windows CE. Broken in r64176. - - * wtf/Platform.h: - -2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Gavin Barraclough. - - Reduce the number of BOL checks in YARR Interpreter - https://bugs.webkit.org/show_bug.cgi?id=46260 - - Extend the YARR Interpreter with an optimization which reduces the number of - BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a - "TypeAssertionBOL" byteTerm it will be checked just one time. - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::matchDisjunction): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::ByteCompiler::regexBegin): - (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): - (JSC::Yarr::ByteCompiler::emitDisjunction): - * yarr/RegexInterpreter.h: - (JSC::Yarr::ByteTerm::BodyAlternativeBegin): - (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): - (JSC::Yarr::ByteTerm::BodyAlternativeEnd): - (JSC::Yarr::ByteTerm::AlternativeBegin): - (JSC::Yarr::ByteTerm::AlternativeDisjunction): - (JSC::Yarr::ByteTerm::AlternativeEnd): - -2010-09-22 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. + * API/tests/testapi.c: Added a now-needed #include. + (main): + * jsc.cpp: + (main): + Call ::SetErrorMode(0) to undo Cygwin's folly. - Fixed the cross over from alternatives executed once and - those that loop. This fixed the problem where the index - was getting messed up for looping alternatives causing an - infinite loop. - https://bugs.webkit.org/show_bug.cgi?id=46189 + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our + other projects do so that windows.h won't define min/max macros that interfere with + std::numeric_limits<T>::min/max. - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): +2011-02-24 Adam Barth <abarth@webkit.org> -2010-09-22 Steve Falkenburg <sfalken@apple.com> + Reviewed by Eric Seidel. - Rubber stamped by Jon Honeycutt. + Add GYP project for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=55027 - Allow jsc.exe to be run against unversioned ICU. + Again, this GYP files is very rough, but it succeeds in building + JavaScriptCore. There's a lot more work to do here, especially in the + area of sharing with JavaScriptGlue.gyp. This patch is more of a + checkpoint so that other folks can help out if they wish. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * gyp: Added. + * gyp/JavaScriptCore.gyp: Added. + * gyp/generate-derived-sources.sh: Added. -2010-09-22 Kwang Yul Seo <skyul@company100.net> +2011-02-24 Adam Barth <abarth@webkit.org> - Reviewed by Laszlo Gombos. + Reviewed by Eric Seidel. - Use "typedef wchar_t JSChar" when compiled with RVCT - https://bugs.webkit.org/show_bug.cgi?id=40651 + Add missing files to JavaScriptCore.gypi + https://bugs.webkit.org/show_bug.cgi?id=55193 - Use wchar_t for JSChar and UChar when compiled with RVCT. - Linux is the exception for this rule. + I forgot to add mm files in my previous patch. - * API/JSStringRef.h: - * wtf/unicode/qt4/UnicodeQt4.h: + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: -2010-09-22 Oliver Hunt <oliver@apple.com> +2011-02-24 Adam Barth <abarth@webkit.org> - Reviewed by Gavin Barraclough. + Reviewed by Eric Seidel. - [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown - https://bugs.webkit.org/show_bug.cgi?id=44245 + Remove unused parameter name in GCActivityCallback.cpp + https://bugs.webkit.org/show_bug.cgi?id=55194 - Remove incorrect code from op_load_varargs in the interpreter. + This change is not strictly required for the GYP-based build system, + but I noticed this error when working on the new build system. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): + * runtime/GCActivityCallback.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): -2010-09-22 Oliver Hunt <oliver@apple.com> +2011-02-24 James Robinson <jamesr@chromium.org> - Reviewed by Gavin Barraclough. + Reviewed by Darin Fisher. - [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails - https://bugs.webkit.org/show_bug.cgi?id=44246 + Add a USE() macro to control use of the built-in UTF8 codec + https://bugs.webkit.org/show_bug.cgi?id=55189 - JIT code generated for instanceof was not checking to ensure that the prototype property was - an object, this patch ensures that it does. + Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi. - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emitSlow_op_instanceof): + * wtf/Platform.h: -2010-09-22 Patrick Gansterer <paroga@webkit.org> +2011-02-24 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. - Inline UTF8SequenceLength - https://bugs.webkit.org/show_bug.cgi?id=45589 - - * wtf/unicode/UTF8.cpp: - (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance. - -2010-09-21 Oliver Hunt <oliver@apple.com> - - RS=Gavin Barraclough. - - Fix codeblock dumping - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * runtime/Executable.h: - (JSC::ScriptExecutable::ScriptExecutable): - -2010-09-21 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Speed up function.apply(..., arguments) - https://bugs.webkit.org/show_bug.cgi?id=46207 - - Add code to do argument copying inline in the case - where we're using Function.apply to forward our arguments - directly. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - Splitted op_load_varargs into fast and slow paths, so add the call - to the slow path generator. - * jit/JIT.h: - * jit/JITCall32_64.cpp: - Remove 32bit specific emit_op_load_varargs as the logic is the - same for all value representations - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_load_varargs): - Copy arguments inline - (JSC::JIT::emitSlow_op_load_varargs): - -2010-09-21 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt. - - <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in - interpreter due to 54724 and 54596 - - Fixed a typo (using "UNLIKELY" instead of "LIKELY"). + Variable-sized allocation (but still capped at 64 bytes) + https://bugs.webkit.org/show_bug.cgi?id=55159 - * wtf/PassRefPtr.h: - (WTF::refIfNotNull): - (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs - hold real data. Also, in cases where they do not hold real data, the - compiler usually sees a call to release() right before the call to the - destructor, so it can probably optimize out the test completely. - -2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch> - - Reviewed by Martin Robinson. - - Build issues with Windows versions of the GTK+ port - https://bugs.webkit.org/show_bug.cgi?id=45844 - - Link with winmm.dll when necessary and specify the executable extension - explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@ - rule actually works. - - Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses - a section in ThreadSpecific.cpp - - * GNUmakefile.am: - -2010-09-21 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] 'make dist' should be fixed in preparation for the next release - https://bugs.webkit.org/show_bug.cgi?id=46129 - - * GNUmakefile.am: Update the sources list to include missing headers. - -2010-09-21 Dave Tapuska <dtapuska@rim.com> - - Reviewed by Csaba Osztrogonác. - - https://bugs.webkit.org/show_bug.cgi?id=45673 - - r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be - 8 byte aligned. A non 8 byte divisible value for this will - cause the sp to become non 8 byte aligned. - - Verify and correct offset values that r65596 effected that - weren't updated. - - * jit/JITStubs.cpp: - * jit/JITStubs.h: - -2010-09-21 Xan Lopez <xlopez@igalia.com> - - Reviewed by Martin Robinson. - - Fix Opcode stats compilation - https://bugs.webkit.org/show_bug.cgi?id=46079 - - The FixedArray API had changed, and <stdio.h> was not included for - printf. - - * bytecode/Opcode.cpp: - (JSC::OpcodeStats::~OpcodeStats): - -2010-09-20 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Fixed detection of alternative smaller than the first alternative - to only check looping alternatives. - https://bugs.webkit.org/show_bug.cgi?id=46049 - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - -2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. - - REGRESSION(67790): jsc tests are failed with YARR interpreter - https://bugs.webkit.org/show_bug.cgi?id=46083 - - Fix the initializing of the lastSubpatternId member of - parentheses. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): - -2010-09-20 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 46077 - ASSERT failure in YARR JIT - - We will currently attempt to loop if there are multiple alternatives, they are all - BOL predicated, and the last alternative is longer then the first - however if all - alternatives are BOL predicated the head of loop label will not have been set, and - we'll try to link a jump to an undefined label. Stop doing so. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - -2010-09-20 Adam Roben <aroben@apple.com> - - Export RegExpObject::info from JavaScriptCore - - This allows obj->inherits(&RegExpObject::info) to work correctly from - outside JavaScriptCore.dll on Windows. - - Fixes <http://webkit.org/b/46098> - fast/loader/stateobjects/pushstate-object-types.html fails on Windows - - Reviewed by John Sullivan. - - * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as - we already have for some other classes whose info members have to be - used from outside the DLL. - -2010-09-19 Gavin Barraclough <barraclough@apple.com> - - Windows build fix pt 2. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-09-19 Gavin Barraclough <barraclough@apple.com> - - Windows build fix pt 1. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-09-19 Gavin Barraclough <barraclough@apple.com> - - Build fix - implicit double-to-int conversion invalid on 32-bit. - - * runtime/DatePrototype.cpp: - (JSC::fillStructuresUsingDateArgs): - (JSC::dateProtoFuncSetYear): - -2010-09-19 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod. - - These methods implement the same conversion (see discussion in the notes - of sections of 9.5 and 9.6 of the spec), only differing in how the result - is interpretted. - - Date prototype is incorrectly using toInt32, and this is causing us to - provide an output value indicating whether the input to ToInt32 was finite - (the corresponding methods on Date are actually spec'ed to use ToInteger, - not ToInt32). This patch partially fixes this in order to remove this - bogus output value, hoewever more work will be require to bring Date - fully up to spec compliance (the constructor is still performing ToInt32 - conversions). - - * JavaScriptCore.exp: - * runtime/DatePrototype.cpp: - (JSC::fillStructuresUsingTimeArgs): - (JSC::fillStructuresUsingDateArgs): - (JSC::dateProtoFuncSetYear): - * runtime/JSValue.cpp: - (JSC::toInt32): - * runtime/JSValue.h: - (JSC::toUInt32): - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - -2010-09-18 Darin Adler <darin@apple.com> - - First step in fixing Windows build. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Removed incorrect symbol. The build will probably still fail, - but the failure will tell us what symbol to add. - -2010-09-18 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Added code to unroll regular expressions containing ^. - Alternatives that begin with ^ are tagged during parsing - and rolled up in containing sub expression structs. - After parsing, a regular expression flagged as containing - a ^ (a.k.a. BOL) is processed further in optimizeBOL(). - A copy of the disjunction is made excluding alternatives that - are rooted with BOL. The original alternatives are flagged - to only be executed once. The copy of the other alternatives are - added to the original expression. - In the case that all original alternatives are flagged, there - won't be any looping alternatives. - The JIT generator will emit code accordingly, executing the - original alternatives once and then looping over the - alternatives that aren't anchored with a BOL (if any). - https://bugs.webkit.org/show_bug.cgi?id=45787 - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::assertionBOL): - (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): - (JSC::Yarr::RegexPatternConstructor::copyDisjunction): - (JSC::Yarr::RegexPatternConstructor::copyTerm): - (JSC::Yarr::RegexPatternConstructor::optimizeBOL): - (JSC::Yarr::compileRegex): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - * yarr/RegexPattern.h: - (JSC::Yarr::PatternAlternative::PatternAlternative): - (JSC::Yarr::PatternAlternative::setOnceThrough): - (JSC::Yarr::PatternAlternative::onceThrough): - (JSC::Yarr::PatternDisjunction::PatternDisjunction): - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-09-18 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. - - Rename Wince files to WinCE - https://bugs.webkit.org/show_bug.cgi?id=37287 - - * wtf/unicode/Unicode.h: - * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp. - * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h. - * wtf/unicode/wince/UnicodeWince.cpp: Removed. - * wtf/unicode/wince/UnicodeWince.h: Removed. - * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h. - * wtf/wince/FastMallocWince.h: Removed. - -2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> - - Reviewed by Kenneth Rohde Christiansen. - - Enable Platform Strategies on Qt - - [Qt] Turn on PLATFORM_STRATEGIES - https://bugs.webkit.org/show_bug.cgi?id=45831 - - * wtf/Platform.h: Enable Platform Strategies when building QtWebkit - -2010-09-17 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Imprecise tracking of variable capture leads to overly pessimistic creation of activations - https://bugs.webkit.org/show_bug.cgi?id=46020 - - The old logic for track free and captured variables would cause us - to decide we needed an activation in every function along the scope - chain between a variable capture and its declaration. We now track - captured variables precisely which requires a bit of additional work - - The most substantial change is that the parsing routine needs to - be passed the list of function parameters when reparsing a function - as when reparsing we don't parse the function declaration itself only - its body. - - * JavaScriptCore.exp: - * parser/JSParser.cpp: - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::needsFullActivation): - We need to distinguish between use of a feature that requires - an activation and eval so we now get this additional flag. - (JSC::JSParser::Scope::collectFreeVariables): - (JSC::JSParser::Scope::getCapturedVariables): - We can't simply return the list of "capturedVariables" now as - is insufficiently precise, so we compute them instead. - (JSC::JSParser::popScope): - (JSC::jsParse): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseWithStatement): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseFunctionDeclaration): - (JSC::JSParser::parseProperty): - (JSC::JSParser::parseMemberExpression): - * parser/JSParser.h: - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/Parser.h: - (JSC::Parser::parse): - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::checkSyntax): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::fromGlobalCode): - Pass function parameters (if available) to the parser. - -2010-09-17 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Add IsFloatingPoint and IsArithmetic type traits - https://bugs.webkit.org/show_bug.cgi?id=46018 - - * wtf/TypeTraits.h: - * wtf/TypeTraits.cpp: - -2010-09-17 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Oliver Hunt. - - [GTK] FontPlatformDataFreeType should use smart pointers to hold its members - https://bugs.webkit.org/show_bug.cgi?id=45917 - - Added support to PlatformRefPtr for handling HashTableDeletedValue. - - * wtf/PlatformRefPtr.h: - (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue. - (WTF::PlatformRefPtr::isHashTableDeletedValue): Added. - -2010-09-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Crash due to timer triggered GC on one heap while another heap is active - https://bugs.webkit.org/show_bug.cgi?id=45932 - <rdar://problem/8318446> - - The GC timer may trigger for one heap while another heap is active. This - is safe, but requires us to ensure that we have temporarily associated the - thread's identifierTable with the heap we're collecting on. Otherwise we - may end up with the identifier tables in an inconsistent state leading to - an eventual crash. - - * runtime/Collector.cpp: - (JSC::Heap::allocate): - (JSC::Heap::reset): - (JSC::Heap::collectAllGarbage): - Add assertions to ensure we have the correct identifierTable active - while collecting. - * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallbackPlatformData::trigger): - Temporarily make the expected IdentifierTable active - * wtf/WTFThreadData.h: - (JSC::IdentifierTable::remove): - Make it possible to see when IdentifierTable::remove has succeeded - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::~StringImpl): - CRASH if an StringImpl is an Identifier but isn't present in the - active IdentifierTable. If we get to this state something has - gone wrong and we should just crash immediately. - -2010-09-16 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] Implement dissolveDragImageToFraction - https://bugs.webkit.org/show_bug.cgi?id=45826 - - * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose. - -2010-09-16 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Jian Li. - - Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM. - https://bugs.webkit.org/show_bug.cgi?id=45798 - - * Configurations/FeatureDefines.xcconfig: - -2010-09-15 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Use free variable analysis to improve activation performance - https://bugs.webkit.org/show_bug.cgi?id=45837 + SunSpider reports no change. - Adds free and captured variable tracking to the JS parser. This - allows us to avoid construction of an activation object in some - cases. Future patches will make more use of this information to - improve those cases where activations are still needed. + * JavaScriptCore.exp: Some day, I hope not to have to edit this file. - * parser/ASTBuilder.h: - * parser/JSParser.cpp: - (JSC::JSParser::Scope::Scope): - (JSC::JSParser::Scope::declareVariable): - (JSC::JSParser::Scope::useVariable): - (JSC::JSParser::Scope::collectFreeVariables): - (JSC::JSParser::Scope::capturedVariables): - (JSC::JSParser::ScopeRef::ScopeRef): - (JSC::JSParser::ScopeRef::operator->): - (JSC::JSParser::ScopeRef::index): - (JSC::JSParser::currentScope): - (JSC::JSParser::pushScope): - (JSC::JSParser::popScope): - (JSC::JSParser::parseProgram): - (JSC::JSParser::parseVarDeclarationList): - (JSC::JSParser::parseConstDeclarationList): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseFunctionDeclaration): - (JSC::JSParser::parsePrimaryExpression): - * parser/Nodes.cpp: - (JSC::ScopeNodeData::ScopeNodeData): - (JSC::ScopeNode::ScopeNode): - (JSC::ProgramNode::ProgramNode): - (JSC::ProgramNode::create): - (JSC::EvalNode::EvalNode): - (JSC::EvalNode::create): - (JSC::FunctionBodyNode::FunctionBodyNode): - (JSC::FunctionBodyNode::create): - * parser/Nodes.h: - (JSC::ScopeNode::needsActivation): - (JSC::ScopeNode::hasCapturedVariables): - * parser/Parser.cpp: - (JSC::Parser::didFinishParsing): - * parser/Parser.h: - (JSC::Parser::parse): - * parser/SyntaxChecker.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - * runtime/Executable.h: - (JSC::ScriptExecutable::needsActivation): - (JSC::ScriptExecutable::recordParse): + * runtime/Heap.cpp: + (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow + case, so the fast case can inline size class selection and turn it into + a compile-time constant. + + Changed the collect-on-every allocation debugging switch to collect only + on every slow allocation, so you can still flip the switch without + recompiling the world. This may also be preferable for debugging purposes, + since collecting after every single allocation can be unusably slow, + and can mask problems by running destructors early. -2010-09-14 Hyung Song <beergun@company100.net> + * runtime/Heap.h: Ditto. - Reviewed by Kent Tamura. + * runtime/JSCell.h: + (JSC::JSCell::MarkedSpace::sizeClassFor): + (JSC::JSCell::Heap::allocate): + (JSC::JSCell::JSCell::operator new): The inlining mentioned above. - [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type. - https://bugs.webkit.org/show_bug.cgi?id=44764 + * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With + multiple size classes, allocating a full 256KB for the first allocation + in a given class can be pathologically wasteful. (8KB, or 4KB Mac and + 8KB Windows, would be even better, but that seems to be a peformance + regression for now.) + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::reset): There's more than one size class now, and its + cell size is not constant. - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.cpp: - (WTF::deleteOwnedPtr): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::SizeClass::SizeClass): Ditto. -2010-09-14 Darin Adler <darin@apple.com> +2011-02-23 Oliver Hunt <oliver@apple.com> Reviewed by Geoffrey Garen. - Sort with non-numeric custom sort function fails on array with length but no values - https://bugs.webkit.org/show_bug.cgi?id=45781 - - * runtime/JSArray.cpp: - (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead - exit for any array without values, even if it has a non-0 length. - -2010-09-14 Steve Falkenburg <sfalken@apple.com> - - Windows production build fix. - Roll out r65143. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2010-09-14 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - Share UnicodeMacrosFromICU.h - https://bugs.webkit.org/show_bug.cgi?id=45710 - - glib, qt4 and wince use the same macros from ICU. - Remove the code duplication and use the same header file. - - * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h. - * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed. - * wtf/unicode/qt4/UnicodeQt4.h: - * wtf/unicode/wince/UnicodeWince.h: - -2010-09-13 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Preparation for eliminating deprecatedParseURL - https://bugs.webkit.org/show_bug.cgi?id=45695 - - * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from - the HTML tree builder. - -2010-09-13 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - Add option to conditionally compile smooth scrolling support. - https://bugs.webkit.org/show_bug.cgi?id=45689 - - ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms. - - * wtf/Platform.h: - -2010-09-13 Adam Roben <aroben@apple.com> - - Copy JavaScriptCore's generated sources to the right directory - - * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo. - -2010-09-13 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Don't call _msize - https://bugs.webkit.org/show_bug.cgi?id=45556 - - Because Brew MP uses its own memory allocator, it is not correct to use - _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard. - - * wtf/FastMalloc.cpp: - (WTF::fastMallocSize): - -2010-09-11 Simon Hausmann <simon.hausmann@nokia.com> - - Reviewed by Andreas Kling. - - [Qt] V8 port: webcore project files changes - https://bugs.webkit.org/show_bug.cgi?id=45141 + Make WeakGCMap use new handle infrastructure + https://bugs.webkit.org/show_bug.cgi?id=55100 - * JavaScriptCore.pro: Moved wtf specific files to wtf.pri, - so that they can also be used from WebCore.pro for v8 builds. - * wtf/wtf.pri: Added. + Remove old WeakGCMap implementation and move over to new handle + based logic. -2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch> + This has a number of benefits, most notably it makes a WeakGCMap + always reflect the true state of the world by as all entries are + removed at the first gc cycle that makes them dead. This allows + us to get rid of code in a wide variety of objects where the only + purpose was to remove themselves from maps. - Reviewed by Andreas Kling. - - Add a define missing when building with glib unicode backend - https://bugs.webkit.org/show_bug.cgi?id=45544 - - * wtf/unicode/glib/UnicodeMacrosFromICU.h: + It also means that we no longer need to have special "unchecked" + versions of any functions on WeakGCMap. Alas in order to maintain + compatibility with the JSWeakObjectMapClear API it is still + necessary to have an api that resembles uncheckedRemove, this is + now deprecatedRemove and will be dealt with in a later patch. -2010-09-10 Stephanie Lewis <slewis@apple.com> + In order to get correct semantics in WeakGCMap we need more + contextual information in the finalizer, so we've added an + abstract class based finaliser and a context parameter to the + calls. - Reviewed by Alexey Proskuryakov. - - Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know - about the JIT and other implementation details of JavaScriptCore. Necessary - to fix PPC build. - - https://bugs.webkit.org/show_bug.cgi?id=45528 - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/MemoryStatistics.cpp: Added. - (JSC::memoryStatistics): - * runtime/MemoryStatistics.h: Added. + The new an improved WeakGCMap also results in sigificantly more + churn in the weak handle lists so exposed some potential problems + during the post mark phase which have been rectified as well. -2010-09-09 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Added a regular expression tracing facility. This tracing is connected - to jsc. Every compiled regular expression object is added to a list. - When the process exits, each regular expression dumps its pattern, - JIT address, number of times it was executed and the number of matches. - This tracing is controlled by the macro ENABLE_REGEXP_TRACING in - wtf/Platform.h. - https://bugs.webkit.org/show_bug.cgi?id=45401 - - * JavaScriptCore.exp: - * jsc.cpp: - (runWithScripts): + * API/JSWeakObjectMapRefPrivate.cpp: + * API/JSWeakObjectMapRefPrivate.h: + * runtime/Heap.cpp: + (JSC::Heap::globalObjectCount): + (JSC::Heap::protectedGlobalObjectCount): * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - (JSC::JSGlobalData::addRegExpToTrace): - (JSC::JSGlobalData::dumpRegExpTrace): * runtime/JSGlobalData.h: - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - (JSC::RegExp::match): - * runtime/RegExp.h: - * wtf/Platform.h: - * yarr/RegexJIT.h: - (JSC::Yarr::RegexCodeBlock::getAddr): - -2010-09-09 John Therrell <jtherrell@apple.com> - - 32-bit build fix. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::committedByteCount): - -2010-09-09 John Therrell <jtherrell@apple.com> - - Reviewed by Alexey Proskuryakov. - - Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes - https://bugs.webkit.org/show_bug.cgi?id=45134 - - Added thread-safe committed byte counting and reporting functionality to RegisterFile and - ExecutableAllocator. - - * JavaScriptCore.exp: - Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes. - + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::init): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::iterator::iterator): + (JSC::WeakGCMap::iterator::get): + (JSC::WeakGCMap::iterator::getSlot): + (JSC::WeakGCMap::iterator::operator++): + (JSC::WeakGCMap::iterator::operator==): + (JSC::WeakGCMap::iterator::operator!=): + (JSC::WeakGCMap::WeakGCMap): + (JSC::WeakGCMap::isEmpty): + (JSC::WeakGCMap::clear): + (JSC::WeakGCMap::get): + (JSC::WeakGCMap::getSlot): + (JSC::WeakGCMap::set): + (JSC::WeakGCMap::take): + (JSC::WeakGCMap::size): + (JSC::WeakGCMap::deprecatedRemove): + (JSC::WeakGCMap::begin): + (JSC::WeakGCMap::end): + (JSC::WeakGCMap::~WeakGCMap): + (JSC::WeakGCMap::finalize): + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::set): + +2011-02-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Make weaklist processing deal with weak handles being removed during the iteration + https://bugs.webkit.org/show_bug.cgi?id=55105 + + It is possible for the handle heap to end up in a broken state if + a handle's finalizer removes either the current or next handle + to be visited during the post-gc cleanup. This patch removes that + problem by allowing the deallocate(Node*) routine to update the + iterator if it is called during finalization. + + * collector/handles/HandleHeap.cpp: + (JSC::HandleHeap::HandleHeap): + (JSC::HandleHeap::updateAfterMark): + (JSC::HandleHeap::clearWeakPointers): + (JSC::HandleHeap::writeBarrier): + (JSC::HandleHeap::protectedGlobalObjectCount): + * collector/handles/HandleHeap.h: + (JSC::Finalizer::~Finalizer): + (JSC::HandleHeap::getFinalizer): + (JSC::HandleHeap::deallocate): + (JSC::HandleHeap::makeWeak): + (JSC::HandleHeap::makeSelfDestroying): + (JSC::HandleHeap::Node::Node): + (JSC::HandleHeap::Node::setFinalizer): + (JSC::HandleHeap::Node::finalizer): + (JSC::HandleHeap::Node::finalizerContext): * interpreter/RegisterFile.cpp: - (JSC::registerFileStatisticsMutex): - Added function which returns a static Mutex used for locking during read/write access to - static committed byte count variable. - (JSC::RegisterFile::~RegisterFile): - Added call to addToStatistics since memory is decommitted here. - (JSC::RegisterFile::releaseExcessCapacity): - Added call to addToStatistics since memory is decommitted here. - (JSC::RegisterFile::initializeThreading): - Added function which calls registerFileStatisticsMutex(). - (JSC::RegisterFile::committedByteCount): - Added function which returns the current committed byte count for RegisterFile. - (JSC::RegisterFile::addToCommittedByteCount): - Added function which updates committed byte count. - + (JSC::RegisterFile::setGlobalObject): + (JSC::GlobalObjectNotifier::finalize): + (JSC::RegisterFile::globalObjectCollectedNotifier): * interpreter/RegisterFile.h: (JSC::RegisterFile::RegisterFile): - Added call to addToStatistics since memory is committed here. - (JSC::RegisterFile::grow): - Added call to addToStatistics since memory is committed here. - - * jit/ExecutableAllocator.h: - Added function prototype for public static function committedByteCount(). - - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::release): - Added call to addToStatistics since memory is decommitted here. - (JSC::FixedVMPoolAllocator::reuse): - Added call to addToStatistics since memory is committed here. - (JSC::FixedVMPoolAllocator::addToCommittedByteCount): - Added function which updates committed byte count. - (JSC::ExecutableAllocator::committedByteCount): - Added function which returns the current committed byte count for ExecutableAllocator. - - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - Added call to RegisterFile::initializeThreading. - -2010-09-09 Mark Rowe <mrowe@apple.com> - - Reviewed by Oliver Hunt. - - <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims - - * API/JSObjectRef.cpp: - (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion - failure. Instead map NULL directly to the null JSValue. - * API/tests/testapi.c: - (main): Add test coverage for the NULL value case. - -2010-09-09 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Gavin Barraclough. - - [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler - https://bugs.webkit.org/show_bug.cgi?id=29268 - - * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now. - -2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Darin Adler. - - Removing doneSemicolon label in the lexer - https://bugs.webkit.org/show_bug.cgi?id=45289 - - As a side effect of moving the multiline comment parsing - to a separate function, an opportunity raised to simplify - the single line comment parsing, and removing doneSemicolon - label. Slight performance increase on --parse-only - tests (from 32.8ms to 31.5ms) - - * parser/Lexer.cpp: - (JSC::Lexer::lex): - -2010-09-08 Xan Lopez <xlopez@igalia.com> - - Reviewed by Alexey Proskuryakov. - - Remove accessor for private member variable in JSParser - https://bugs.webkit.org/show_bug.cgi?id=45378 - - m_token is private to JSParser, so it does not seem to be useful - to have an accessor for it. On top of that, the file was both - using the accessor and directly accessing the member variable, - only one style should be used. + * runtime/Heap.cpp: + (JSC::Heap::destroy): + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::set): -2010-09-08 Csaba Osztrogonác <ossy@webkit.org> +2011-02-24 Michael Saboff <msaboff@apple.com> Reviewed by Oliver Hunt. - [Qt] REGRESSION(63348): jsc is broken - https://bugs.webkit.org/show_bug.cgi?id=42818 + PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd() + https://bugs.webkit.org/show_bug.cgi?id=55156 - Need fastcall conventions on Qt/Win/MinGW. - Based on patches of Gavin Barraclough: r63947 and r63948. + Added code to delete unneeded PatternAlternative after it is removed + from m_alternatives Vector. - * jit/JITStubs.cpp: - * jit/JITStubs.h: + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): -2010-09-08 Robert Hogan <robert@webkit.org> +2011-02-24 Eric Seidel <eric@webkit.org> - Reviewed by Antonio Gomes. + Reviewed by Anders Carlsson. - Remove some unnecessary duplicate calls to string functions + VectorBuffer should not call malloc(0) + https://bugs.webkit.org/show_bug.cgi?id=55091 - https://bugs.webkit.org/show_bug.cgi?id=45314 + Turns out the malloc() call which was so hot in: + https://bugs.webkit.org/show_bug.cgi?id=55005 + was actually just malloc(0). - * wtf/text/WTFString.cpp: - (WTF::String::format): + We shouldn't be calling malloc(0) anyway, since there is no need to + and it might actually do work on some systems. + I believe on Mac it ends up taking the standard spinlocks (expensive) + and the code on Brew actually does a malloc(1) instead. Neither is desirable. -2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + * wtf/Vector.h: + (WTF::VectorBufferBase::allocateBuffer): + (WTF::VectorBufferBase::tryAllocateBuffer): - Reviewed by Andreas Kling. +2011-02-24 Patrick Gansterer <paroga@webkit.org> - Re-Disable JIT for MSVC 64bit to fix the build on this compiler. - https://bugs.webkit.org/show_bug.cgi?id=45382 + Reviewed by Darin Adler. - It was enabled in the cleanup made in r64176, though it is still - not implemented. + Remove obsolete PLATFORM(CI) + https://bugs.webkit.org/show_bug.cgi?id=55082 * wtf/Platform.h: -2010-09-08 Martin Robinson <mrobinson@igalia.com> +2011-02-24 Martin Robinson <mrobinson@igalia.com> Reviewed by Xan Lopez. - [GTK] Need a WebSocket implementation - https://bugs.webkit.org/show_bug.cgi?id=45197 - - Add a GIO-based WebSocket implementation. - - * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource. - (WTF::refPlatformPtr): - (WTF::derefPlatformPtr): - * wtf/gobject/GRefPtr.h: Added new template specialization declarations. - * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations. - -2010-08-30 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Darin Adler. - - Handle MediaQueryExp memory management exclusively with smart pointers - https://bugs.webkit.org/show_bug.cgi?id=44874 - - Implemented a non-copying sort function to make it possible to sort a Vector - of OwnPtrs (which cannot be copied). This is required for the above. - - * wtf/NonCopyingSort.h: Added. - (WTF::nonCopyingSort): It's secretly heapsort. - (WTF::heapSort): heapsort implementation. - (WTF::siftDown): Helper function for heapsort. - (WTF::heapify): ditto - - Adjust build systems. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Darin Adler. - - Refactoring multiline comments in the lexer - https://bugs.webkit.org/show_bug.cgi?id=45289 + [GTK] Remove the GFile GOwnPtr specialization + https://bugs.webkit.org/show_bug.cgi?id=55154 - MultiLine comment parsing is moved to a separate function. + Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr + to track GFiles since they are just regular reference-counted GObjects. - Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms) - SunSpider reports no change (from 523.1ms to 521.2ms). - - * parser/Lexer.cpp: - (JSC::Lexer::parseMultilineComment): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-09-07 James Robinson <jamesr@chromium.org> - - Compile fix attempt for windows. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-09-07 Mihai Parparita <mihaip@chromium.org> - - Reviewed by James Robinson. - - Fix Windows build after r66936 - https://bugs.webkit.org/show_bug.cgi?id=45348 - - Add symbol names that were missing from r66936. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-09-07 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Oliver Hunt. - - pushState and replaceState do not clone RegExp objects correctly - https://bugs.webkit.org/show_bug.cgi?id=44718 - - Move internal representation of JSC::RegExp (which depends on wether - YARR and YARR_JIT is enabled) into RegExpRepresentation which can live - in the implementation only. This makes it feasible to use RegExp in - WebCore without bringing in all of YARR. - - * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are - needed inside WebCore's JSC bindings. - * runtime/RegExp.cpp: - (JSC::RegExpRepresentation::~RegExpRepresentation): - (JSC::RegExp::RegExp): - (JSC::RegExp::~RegExp): - (JSC::RegExp::compile): - (JSC::RegExp::match): - * runtime/RegExp.h: - -2010-09-07 Anders Carlsson <andersca@apple.com> - - Reviewed by Darin Adler. - - <rdar://problem/8381749> -Wcast-align warning emitted when building with clang - - Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc. - - * Configurations/Base.xcconfig: - -2010-09-07 Zoltan Horvath <zoltan@webkit.org> - - Reviewed by Darin Adler. + * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization. + * wtf/gobject/GOwnPtr.h: Ditto. - REGRESSION(66741): Undefined pthread macros - https://bugs.webkit.org/show_bug.cgi?id=45246 +2011-02-24 Patrick Gansterer <paroga@webkit.org> - PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, - but used in a statement. Add an additional check to test this. + Reviewed by Eric Seidel. - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): + Rename PLATFORM(SKIA) to USE(SKIA) + https://bugs.webkit.org/show_bug.cgi?id=55090 -2010-09-06 Oliver Hunt <oliver@apple.com> + * wtf/Platform.h: - Windows build fix +2011-02-24 Patrick Gansterer <paroga@webkit.org> -2010-09-05 Oliver Hunt <oliver@apple.com> + Reviewed by Alexey Proskuryakov. - Reviewed by Sam Weinig. + Remove pthreads dependecy for JSLock + https://bugs.webkit.org/show_bug.cgi?id=54832 - SerializedScriptValue needs to use a flat storage mechanism - https://bugs.webkit.org/show_bug.cgi?id=45244 + JSLock is only needed to support an obsolete execution model where JavaScriptCore + automatically protected against concurrent access from multiple threads. + So it's safe to disable it on non-mac platforms where we don't have native pthreads. - Export JSArray::put + * runtime/JSLock.cpp: - * JavaScriptCore.exp: +2011-02-24 Chao-ying Fu <fu@mips.com> -2010-09-06 Chao-ying Fu <fu@mips.com> + Reviewed by Eric Seidel. - Reviewed by Oliver Hunt. + Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values + https://bugs.webkit.org/show_bug.cgi?id=54997 - Support JSVALUE32_64 on MIPS - https://bugs.webkit.org/show_bug.cgi?id=43999 - - Add missing functions to support JSVALUE32_64 on MIPS. - Remove JSVALUE32 as the default for MIPS. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::divd): - (JSC::MIPSAssembler::mthc1): - (JSC::MIPSAssembler::cvtwd): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::neg32): - (JSC::MacroAssemblerMIPS::branchOr32): - (JSC::MacroAssemblerMIPS::set8): - (JSC::MacroAssemblerMIPS::loadDouble): - (JSC::MacroAssemblerMIPS::divDouble): - (JSC::MacroAssemblerMIPS::convertInt32ToDouble): - (JSC::MacroAssemblerMIPS::branchDouble): - (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32): - (JSC::MacroAssemblerMIPS::zeroDouble): * jit/JIT.h: - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompilePutByIdTransition): * jit/JITStubs.cpp: (JSC::JITThunks::JITThunks): - * jit/JITStubs.h: - * wtf/Platform.h: - -2010-09-06 Robert Hogan <robert@webkit.org> - - Unreviewed, compile fix. - - Fix compile failure in r66843 - - Revert to original patch in bugzilla. Leave bug open for - discussion on potential removal of double utf8 conversion. - - https://bugs.webkit.org/show_bug.cgi?id=45240 - - * wtf/text/WTFString.cpp: - (WTF::String::format): - -2010-09-06 Robert Hogan <robert@webkit.org> - - Reviewed by Andreas Kling. - - [Qt] utf8 encoding of console() messages - - Unskip: - http/tests/security/xssAuditor/embed-tag-null-char.html - http/tests/security/xssAuditor/object-embed-tag-null-char.html - - Both tests failed because Qt's implementation of String::format() - is casting a utf8 result to String, which assumes latin1 in - its constructor. So instead of casting a QString to a String, use - StringImpl::create() instead. Unfortunately, this involves a lot - of extra casts but the end result is correct. - - https://bugs.webkit.org/show_bug.cgi?id=45240 - - * wtf/text/WTFString.cpp: - (WTF::String::format): - -2010-09-03 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=45135 - <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex - regardless of platform default, so that we can assert that it's held (this is for platforms - that don't have libdispatch). - (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look - at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock - is held. - (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before - manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we - can make unbalanced calls to dispatch_resume(). - -2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi> - - Reviewed by Martin Robinson. - - [EFL] Regression (66531) Build break with Glib Support - https://bugs.webkit.org/show_bug.cgi?id=45011 - - Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory - since when glib is enabled, EFL port needs it, too. - - * CMakeListsEfl.txt: Include gobject directory to find new header - file. - * GNUmakefile.am: Ditto. - * wtf/CMakeListsEfl.txt: Ditto. - * wtf/Platform.h: Include header if port is EFL and glib support is - enabled. - * wtf/gtk/GtkTypedefs.h: Removed. - * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now - guarded by PLATFORM(GTK). - -2010-09-03 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Simon Hausmann. - - Fix warning in wtf/ByteArray.h - https://bugs.webkit.org/show_bug.cgi?id=44672 - - * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers. - -2010-09-02 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Actually parse a URL from ParsedURL - https://bugs.webkit.org/show_bug.cgi?id=45080 - - This patch only handles standard URLs. At some point we'll need to - distinguish between standard URLs and other kinds of URLs. - - * wtf/url/api/ParsedURL.cpp: - (WTF::ParsedURL::ParsedURL): - -2010-09-02 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Add ParsedURL and URLString to WTFURL API - https://bugs.webkit.org/show_bug.cgi?id=45078 - - Currently there's no actual URL parsing going on, but this patch is a - start to sketching out the API. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/url/api/ParsedURL.cpp: Added. - (WTF::ParsedURL::ParsedURL): - (WTF::ParsedURL::scheme): - (WTF::ParsedURL::username): - (WTF::ParsedURL::password): - (WTF::ParsedURL::host): - (WTF::ParsedURL::port): - (WTF::ParsedURL::path): - (WTF::ParsedURL::query): - (WTF::ParsedURL::fragment): - (WTF::ParsedURL::segment): - * wtf/url/api/ParsedURL.h: Added. - (WTF::ParsedURL::spec): - * wtf/url/api/URLString.h: Added. - (WTF::URLString::URLString): - (WTF::URLString::string): - -2010-09-02 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Add WTFURL to the JavaScriptCore build on Mac - https://bugs.webkit.org/show_bug.cgi?id=45075 - - Building code is good. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-09-02 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=43230 - <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser - - One can't delete a ThreadSpecific object that has data in it. It's not even possible to - enumerate data objects in all threads, much less destroy them from a thread that's destroying - the ThreadSpecific. - - * parser/JSParser.cpp: - (JSC::JSParser::JSParser): - * runtime/JSGlobalData.h: - * wtf/WTFThreadData.cpp: - (WTF::WTFThreadData::WTFThreadData): - * wtf/WTFThreadData.h: - (WTF::WTFThreadData::approximatedStackStart): - Moved stack guard tracking from JSGlobalData to WTFThreadData. - - * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't - ever face a situation where we'd want to delete a ThreadSpecific object. - -2010-09-01 Gavin Barraclough <barraclough@apple.com> - Rubber stamped by Oliver Hunt. +2011-02-24 Andras Becsi <abecsi@webkit.org> - Ecma-262 15.11.1.1 states that if the argument is undefined then an - Error object's message property should be set to the empty string. - - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - (JSC::ErrorInstance::create): - * runtime/ErrorInstance.h: - * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - -2010-08-31 Darin Adler <darin@apple.com> - - Reviewed by Anders Carlsson. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that - mixed types with code that uses size_t. - - * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning. - -2010-08-31 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] Isolate all GTK+ typedefs into one file - https://bugs.webkit.org/show_bug.cgi?id=44900 - - * GNUmakefile.am: Add GtkTypedefs.h to the source lists. - * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build. - * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs. - * wtf/gobject/GOwnPtr.h: Ditto. - * wtf/gobject/GRefPtr.h: Ditto. - * wtf/gtk/GtkTypedefs.h: Added. - -2010-08-31 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] Fix 'make dist' in preparation of the 1.3.3 release - https://bugs.webkit.org/show_bug.cgi?id=44978 - - * GNUmakefile.am: Adding missing headers to the sources list. - -2010-08-31 Chao-ying Fu <fu@mips.com> - - Reviewed by Oliver Hunt. - - Support emit_op_mod() for MIPS - https://bugs.webkit.org/show_bug.cgi?id=42855 - - This patch uses MIPS div instructions for op_mod to improve performance. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::div): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - -2010-08-31 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Darin Adler. - - Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED. - https://bugs.webkit.org/show_bug.cgi?id=44870 - - * wtf/Assertions.h: - * wtf/UnusedParam.h: - -2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. + Reviewed by Laszlo Gombos. - JSC TimeoutChecker::didTimeOut overflows on ARM - https://bugs.webkit.org/show_bug.cgi?id=38538 + [Qt] MinGW build fails to link + https://bugs.webkit.org/show_bug.cgi?id=55050 - Make getCPUTime() return values relative to the first call. - The previous implementation relied on simply on currentTime(), which - return a time since epoch and not a time since the thread started. This - made the return value of getCPUTime() overflow on 32 bits. + Prepend the libraries of subcomponents instead of appending them + to fix the library order according to the dependency of the libraries - * runtime/TimeoutChecker.cpp: - (JSC::getCPUTime): + * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore + * jsc.pro: ditto -2010-08-30 Mihai Parparita <mihaip@chromium.org> +2011-02-24 Eric Seidel <eric@webkit.org> Reviewed by Adam Barth. - HISTORY_ALWAYS_ASYNC should be removed (history should always be async) - https://bugs.webkit.org/show_bug.cgi?id=44315 + Deque<T> should support inline capacity + https://bugs.webkit.org/show_bug.cgi?id=55032 - Remove ENABLE_HISTORY_ALWAYS_ASYNC #define. + The title says it all. There are currently no places + which use this code yet, however it's been tested in conjunction + with code for bug 55005. - * wtf/Platform.h: + This also adds an ASSERT that capacity is never 1. If you were able + to set the capacity equal to 1, the Deque would just get confused + and happily append your item but still think it had size 0. -2010-08-30 Chris Rogers <crogers@google.com> - - Reviewed by Kenneth Russell. - - Fix namespace for wtf/Complex.h and wtf/Vector3.h - https://bugs.webkit.org/show_bug.cgi?id=44892 + * wtf/Deque.h: + (WTF::DequeIterator::DequeIterator): + (WTF::DequeConstIterator::DequeConstIterator): + (WTF::DequeReverseIterator::DequeReverseIterator): + (WTF::DequeConstReverseIterator::DequeConstReverseIterator): + (WTF::::checkValidity): + (WTF::::checkIndexValidity): + (WTF::::invalidateIterators): + (WTF::::Deque): + (WTF::deleteAllValues): + (WTF::::operator): + (WTF::::destroyAll): + (WTF::::~Deque): + (WTF::::swap): + (WTF::::clear): + (WTF::::findIf): + (WTF::::expandCapacityIfNeeded): + (WTF::::expandCapacity): + (WTF::::takeFirst): + (WTF::::append): + (WTF::::prepend): + (WTF::::removeFirst): + (WTF::::remove): + (WTF::::addToIteratorsList): + (WTF::::removeFromIteratorsList): + (WTF::::DequeIteratorBase): + (WTF::::~DequeIteratorBase): + (WTF::::isEqual): + (WTF::::increment): + (WTF::::decrement): + (WTF::::after): + (WTF::::before): + * wtf/Vector.h: - * wtf/Complex.h: - * wtf/Vector3.h: +2011-02-22 Adam Barth <abarth@webkit.org> -2010-08-30 Andy Estes <aestes@apple.com> + Reviewed by Ojan Vafai. - Reviewed by Eric Carlson. + Add missing files to JavaScriptCore.gypi + https://bugs.webkit.org/show_bug.cgi?id=55020 - Strings returned by asciiDebug() should be NULL-terminated. - https://bugs.webkit.org/show_bug.cgi?id=44866 + gypi files are supposed to list every file under the sun. This patch + adds some missing files and sorts the rest. - * wtf/text/WTFString.cpp: - (asciiDebug): + * JavaScriptCore.gypi: -2010-08-30 Zoltan Herczeg <zherczeg@webkit.org> +2011-02-23 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. - Refactor number parsing in the lexer - https://bugs.webkit.org/show_bug.cgi?id=44104 - - Number parsing was full of gotos, and needed a complete - redesign to remove them (Only one remained). Furthermore - integer arithmetic is empolyed for fast cases (= small - integer numbers). - - * parser/Lexer.cpp: - (JSC::Lexer::parseHex): - (JSC::Lexer::parseOctal): - (JSC::Lexer::parseDecimal): - (JSC::Lexer::parseNumberAfterDecimalPoint): - (JSC::Lexer::parseNumberAfterExponentIndicator): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-08-29 Darin Adler <darin@apple.com> - - Fix Qt build. - - * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP. - * wtf/unicode/qt4/UnicodeQt4.h: Ditto. - * wtf/unicode/wince/UnicodeWince.h: Ditto. - -2010-08-29 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Port vprintf_stderr_common - https://bugs.webkit.org/show_bug.cgi?id=33568 - - Use BREW's DBGPRINTF to output debug messages. - - * wtf/Assertions.cpp: - -2010-08-28 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values - - We are in places casting doubles to unsigneds, and unsigneds to ints, without always check - that the result is within bounds. This is problematic in the case of double-to-unsigned - conversion because we should be saturating to array length. - - Also, the error return value from Array.splice should be [], not undefined. - - I don't see any security concerns here. These methods are spec'ed in such a way that they - can be applied to non Array objects, so in all cases the (potentially bogus) indices are - being passed to functions that will safely check accesses are within bounds. - - * runtime/ArrayPrototype.cpp: - (JSC::argumentClampedIndexFromStartOrEnd): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/JSValue.h: - (JSC::JSValue::toUInt32): - -2010-08-28 Pratik Solanki <psolanki@apple.com> - - Reviewed by Dan Bernstein. - - Add an ENABLE define for purgeable memory support - https://bugs.webkit.org/show_bug.cgi?id=44777 - - * wtf/Platform.h: - -2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin - https://bugs.webkit.org/show_bug.cgi?id=43179 - - Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent - NPAPI Plugin Cache. The flag is enabled by default. - - * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE - -2010-07-27 Jer Noble <jer.noble@apple.com> - - Reviewed by Eric Carlson. - - Add JavaScript API to allow a page to go fullscreen. - rdar://problem/6867795 - https://bugs.webkit.org/show_bug.cgi?id=43099 - - * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). - -2010-08-27 Gavin Barraclough <barraclough@apple.com> - - Windows build fix pt 2. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-27 Gavin Barraclough <barraclough@apple.com> - - Windows build fix pt 1. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Refactored MarkedSpace to operate in terms of size classes + https://bugs.webkit.org/show_bug.cgi?id=55106 + + SunSpider reports no change. -2010-08-27 Gavin Barraclough <barraclough@apple.com> + * runtime/JSCell.h: + (JSC::JSCell::MarkedSpace::sizeClassFor): + (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size + class. Since these functions are inline, the compiler can constant fold + them. - Reviewed by Oliver Hunt. + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::cellSize): + (JSC::MarkedBlock::size): Factored out a cellSize() helper. - Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate. + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::allocateFromSizeClass): + (JSC::MarkedSpace::shrink): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::SizeClass::SizeClass): + (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of + abstract SizeClass objects, which are independent linked lists of blocks + of a certain size class, instead of a single m_heap object. - These methods should be using a version of dtoa that can generate results accurate - to the requested precision, whereas our version of dtoa is only currently able to - support producing results sufficiently accurate to distinguish the value from any - other IEEE-754 double precision number. +2011-02-23 Adam Barth <abarth@webkit.org> - This change has no impact on benchmarks we track. + Reviewed by James Robinson. - On microbenchmarks for these functions, this is a slight regression where a high - precision is requested (dtoa now need to iterate further to generate a a greater - number of digits), but with smaller precision values (hopefully more common) this - improves performance, since it reduced the accurate of result dtoa is required, - to produce, and removes the need to pre-round values before calling dtoa. + [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox + https://bugs.webkit.org/show_bug.cgi?id=55093 - * JavaScriptCore.exp: - doubleToStringInJavaScriptFormat renamed to numberToString + Exclude OSRandomSource.cpp from the Chromium build. This function is + implemented in WebKit/chromium/src instead. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - doubleToStringInJavaScriptFormat renamed to numberToString + * JavaScriptCore.gyp/JavaScriptCore.gyp: - * runtime/UString.cpp: - (JSC::UString::number): - doubleToStringInJavaScriptFormat renamed to numberToString +2011-02-23 Oliver Hunt <oliver@apple.com> - * wtf/DecimalNumber.h: - (WTF::DecimalNumber::DecimalNumber): - (WTF::DecimalNumber::toStringDecimal): - (WTF::DecimalNumber::toStringExponential): - Remove all pre-rounding of values, instead call dtoa correctly. + Roll out r64156 as it introduces incorrect behaviour. - * wtf/dtoa.cpp: - (WTF::dtoa): - * wtf/dtoa.h: - Reenable support for rounding to specific-figures/decimal-places in dtoa. - Modify to remove unbiased rounding, provide ECMA required away-from-zero. - Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to - numberToString. + * runtime/JSByteArray.h: + (JSC::JSByteArray::setIndex): -2010-08-27 Chao-ying Fu <fu@mips.com> +2011-02-23 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. - Byte alignment issue on MIPS - https://bugs.webkit.org/show_bug.cgi?id=29415 - - MIPS accesses one byte at a time for now to avoid the help from the - kernel to fix unaligned accesses. - - * wtf/text/AtomicString.cpp: - (WebCore::equal): - * wtf/text/StringHash.h: - (WebCore::StringHash::equal): - -2010-08-27 Xan Lopez <xlopez@igalia.com> - - Reviewed by Tor Arne Vestbø. - - Fix a couple of typos in comment. - - * bytecode/CodeBlock.h: - -2010-08-26 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * wtf/dtoa.cpp: - -2010-08-26 Gavin Barraclough <baraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 44735 - Clean up dtoa.cpp - Remove unused & unmaintained code paths, reformat code to match - coding standard & use platform #defines from Platform.h directly. - - * wtf/dtoa.cpp: - (WTF::storeInc): - (WTF::multadd): - (WTF::s2b): - (WTF::lo0bits): - (WTF::mult): - (WTF::pow5mult): - (WTF::lshift): - (WTF::diff): - (WTF::ulp): - (WTF::b2d): - (WTF::d2b): - (WTF::ratio): - (WTF::): - (WTF::strtod): - (WTF::quorem): - (WTF::dtoa): - -2010-08-26 Gavin Barraclough <barraclough@apple.com> - - Rubber Stamped by Oliver Hunt. - - Partially revert r65959. The toString changes regressed the v8 tests, - but keep the toFixed/toExponential/toPrecision changes. - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * runtime/NumberPrototype.cpp: - * runtime/UString.cpp: - (JSC::UString::number): - * wtf/DecimalNumber.h: - * wtf/dtoa.cpp: - (WTF::append): - (WTF::doubleToStringInJavaScriptFormat): - * wtf/dtoa.h: - * wtf/text/WTFString.cpp: - * wtf/text/WTFString.h: - -2010-08-26 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Remove the USE(GLES2_RENDERING) define and associated code - https://bugs.webkit.org/show_bug.cgi?id=43761 - - Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused. - - * wtf/Platform.h: - -2010-08-26 Gavin Barraclough <barraclough@apple.com> - - Rolling out r64608, this regressed performance. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::LinkBuffer): - (JSC::LinkBuffer::~LinkBuffer): - (JSC::LinkBuffer::performFinalization): - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::executableCopy): - * assembler/X86Assembler.h: - (JSC::X86Assembler::executableCopy): - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - * jit/ExecutableAllocator.cpp: - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::create): - (JSC::ExecutableAllocator::ExecutableAllocator): - (JSC::ExecutableAllocator::poolForSize): - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::allocInternal): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compilePatchGetArrayLength): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - (JSC::getPolymorphicAccessStructureListSlot): - * jit/JITStubs.h: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::finalize): - * runtime/ExceptionHelpers.cpp: - * runtime/ExceptionHelpers.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): - -2010-08-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Brady Eidson. - - Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl. - - * wtf/text/WTFString.cpp: - (asciiDebug): - Return a Vector<char> containing the contents of a string as ASCII. - -2010-08-26 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - Add PassOwnArrayPtr - https://bugs.webkit.org/show_bug.cgi?id=44627 - - * GNUmakefile.am: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - Add the new files. - - * wtf/Forward.h: - Forward declare PassOwnArrayPtr. + Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation + https://bugs.webkit.org/show_bug.cgi?id=55079 - * wtf/OwnArrayPtr.h: - Mimic the OwnPtr interface. - - * wtf/OwnArrayPtrCommon.h: Added. - (WTF::deleteOwnedArrayPtr): - Move delete function here so it can be shared by OwnArrayPtr and - PassOwnArrayPtr. - - * wtf/PassOwnArrayPtr.h: Added. - Mimic the PassOwnPtr interface. - -2010-08-26 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - [JSC] JavaScript parsing error when loading Equifax web page - https://bugs.webkit.org/show_bug.cgi?id=42900 - - '-->' is ostensibly only meant to occur when there is only - whitespace preceeding it on the line. However firefox treats - multiline comments as a space character, so they are allowed. - One side effect of the firefox model is that any line terminators - inside the multiline comment are ignored, so - - foo/* - */--> - - is treated as - - foo --> - - and so '-->' will not be a comment in this case. Happily this simply - means that to fix this issue all we need to do is stop updating - m_atLineStart when handling multiline comments. - - * parser/Lexer.cpp: - (JSC::Lexer::lex): - -2010-08-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Improve overflow handling in StringImpl::Replace - https://bugs.webkit.org/show_bug.cgi?id=42502 - <rdar://problem/8203794> - - Harden StringImpl::replace against overflow -- I can't see how this - could be abused, but it's better to be safe than sorry. - - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::replace): - -2010-08-26 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions - https://bugs.webkit.org/show_bug.cgi?id=44624 - - Clean up GNUmakefile.am. - - * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move - a couple include lines from the top-level GNUmakefile.am. - -2010-08-25 Xan Lopez <xlopez@igalia.com> - - Reviewed by Kent Tamura. - - Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used - https://bugs.webkit.org/show_bug.cgi?id=29259 - - Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang. - - * wtf/dtoa.cpp: - (WTF::s2b): - -2010-08-25 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kevin Ollivier. - - [BREWMP] Add build system - https://bugs.webkit.org/show_bug.cgi?id=44645 - - Make waf script portable so that we can add more ports. - - * wscript: - -2010-08-25 Michael Saboff <msaboff@apple.com> - - Reviewed by Sam Weinig. - - Remove the single entry regular expression cache introduced as part of - the fix for https://bugs.webkit.org/show_bug.cgi?id=41238. - The performance problem in Dromaeo that initiated that bug is no - longer present. Dromaeo has been modified so that the regular - expression tests are somewhat random and don't benefit from a - single entry cache. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::match): - * runtime/RegExp.h: - -2010-08-25 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Gustavo Noronha Silva. - - Cairo and EFL port shouldn't depend on glib. - https://bugs.webkit.org/show_bug.cgi?id=44354 - - Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in - GRefPtr.h. - - * GNUmakefile.am: Add PlatformRefPtr.h to the source list. - * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h. - (WTF::PlatformRefPtr::PlatformRefPtr): Ditto. - (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto. - (WTF::PlatformRefPtr::clear): Ditto. - (WTF::PlatformRefPtr::get): Ditto. - (WTF::PlatformRefPtr::operator*): Ditto. - (WTF::PlatformRefPtr::operator->): Ditto. - (WTF::PlatformRefPtr::operator!): Ditto. - (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto. - (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto. - (WTF::::operator): Ditto. - (WTF::::swap): Ditto. - (WTF::swap): Ditto. - (WTF::operator==): Ditto. - (WTF::operator!=): Ditto. - (WTF::static_pointer_cast): Ditto. - (WTF::const_pointer_cast): Ditto. - (WTF::getPtr): Ditto. - (WTF::adoptPlatformRef): Ditto. - * wtf/gobject/GRefPtr.cpp: Changes to reflect new names. - (WTF::refPlatformPtr): - (WTF::derefPlatformPtr): - * wtf/gobject/GRefPtr.h: Ditto. - (WTF::refPlatformPtr): - (WTF::derefPlatformPtr): - -2010-08-25 Xan Lopez <xlopez@igalia.com> - - Reviewed by Alexey Proskuryakov. - - Remove dead code in JSGlobalObject - https://bugs.webkit.org/show_bug.cgi?id=44615 - - The recursion data member in the JSGlobalObject and its getter - plus inc/dec methods seems to be unused, remove them. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): - * runtime/JSGlobalObject.h: - -2010-08-25 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Changed the initial and subsequent allocation of vector storage to - Array()s. The changes are to limit sparse arrays to 100000 entries - and fixed the sparse map to vector storage conversion to use the - minimum amount of memory needed to store the current number of entries. - These changes address https://bugs.webkit.org/show_bug.cgi?id=43707 - - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::getNewVectorLength): - -2010-08-16 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Avoid increasing required alignment of target type warning - https://bugs.webkit.org/show_bug.cgi?id=43963 - - Fix platform independent alignment warnings. - - * wtf/ListHashSet.h: - (WTF::ListHashSetNodeAllocator::pool): - -2010-08-19 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Enable truncated floating point feature on ARM - https://bugs.webkit.org/show_bug.cgi?id=44233 - - Enable truncated floating point feature with the help of VCVTR.S32.F64 - instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit - integer/register, it saturates at INT_MAX or INT_MIN. Testing this - looks quicker than testing FPSCR for exception. - - Inspired by Jacob Bramley's patch from JaegerMonkey - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::): - (JSC::ARMAssembler::cmn_r): - (JSC::ARMAssembler::vcvtr_s32_f64_r): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): - (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): - -2010-08-24 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + SunSpider reports no change. -2010-08-24 Gavin Barraclough <barraclough@apple.com> + * runtime/Heap.cpp: + (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace, + since we want Heap to logically control MarkedSpace. MarkedSpace should + never choose to sweep itself. - Windows build fix. + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a + member of MarkedBlock. No need to reset nextAtom to firstAtom() when + we reach the end of a block, since there's now an explicit reset pass + during GC. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/DecimalNumber.h: - (WTF::DecimalNumber::intPow10): - * wtf/dtoa.cpp: - * wtf/dtoa.h: + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered + some data members to improve cache locality. -2010-08-23 Gavin Barraclough <barraclough@apple.com> + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an + explicit reset pass. - Reviewed by Oliver Hunt. +2011-02-23 James Robinson <jamesr@chromium.org> - https://bugs.webkit.org/show_bug.cgi?id=44487 + Unreviewed, rolling out r79428. + http://trac.webkit.org/changeset/79428 + https://bugs.webkit.org/show_bug.cgi?id=54714 - Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated - code & unnecessary complexity. Add a new DecimalNumber class to encapsulate - double to string conversion, share the implementations of rounding & - decimal-fraction/exponential formatting. + Does not work in the Chromium sandbox * JavaScriptCore.exp: - Update exports. - - * runtime/NumberPrototype.cpp: - (JSC::toThisNumber): - (JSC::getIntegerArgumentInRange): - Helper methods used in implementing toExponential/toFixed/toString. - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - Reimplemented using new DecimalNumber class. - - * runtime/UString.cpp: - (JSC::UString::number): - Updated to call numberToString. - - * wtf/DecimalNumber.h: Added. - (WTF::): - (WTF::DecimalNumber::DecimalNumber): - (WTF::DecimalNumber::toStringDecimal): - (WTF::DecimalNumber::toStringExponential): - (WTF::DecimalNumber::sign): - (WTF::DecimalNumber::exponent): - (WTF::DecimalNumber::significand): - (WTF::DecimalNumber::precision): - (WTF::DecimalNumber::init): - (WTF::DecimalNumber::isZero): - (WTF::DecimalNumber::roundToPrecision): - New class to perform double to string conversion. - Has three constructors, which allow conversion with no rounding, - rounding to significant-figures, or rounding to decimal-places, - and two methods for formatting strings, either using decimal - fraction or exponential encoding. Internal implementation uses - pre-rounding of the values before calling dtoa rather than - relying on dtoa to correctly round, which does not produce - fully accurate results. Hopefully we can address this in the - near future. - - * wtf/dtoa.cpp: - (WTF::intPow10): - * wtf/dtoa.h: - intPow10 is used internally by DecimalNumber. - - * wtf/text/WTFString.cpp: - (WTF::copyToString): - (WTF::nanOrInfToString): - Used internally in numberToString for NaN/Infinity handling. - (WTF::numberToString): - Added new method to convert doubles to strings. - - * wtf/text/WTFString.h: - Added declaration for numberToString. This is here because - we should switch over to using this for all double to string - conversion in WebCore (see section 2.4.4.3 of the HTML5 spec). -2010-08-24 Oliver Hunt <oliver@apple.com> +2011-02-23 Adam Roben <aroben@apple.com> - Reviewed by Geoff Garen. + Fix an off-by-one error in JSC::appendSourceToError - Don't seed the JS random number generator from time() - https://bugs.webkit.org/show_bug.cgi?id=41868 - <rdar://problem/8171025> + Looks like this bug has been around since the code was first added in r35245. - Switch to using the secure random number generator to - seed the fast random generator, and make the generator - be per global object. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): - (JSC::JSGlobalObject::weakRandomNumber): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncRandom): - -2010-08-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Beth Dakin. - - Make overflow guards in UString::utf8 explicit - https://bugs.webkit.org/show_bug.cgi?id=44540 - - Add an explicit overflow check prior to allocating our buffer, - rather than implicitly relying on the guard in convertUTF16ToUTF8. - - * runtime/UString.cpp: - (JSC::UString::utf8): - -2010-08-24 Yael Aharon <yael.aharon@nokia.com> - - Reviewed by Simon Hausmann. - - [Symbian] Fix commit/decommit of system memory using RChunk - - Swap accidentially reversed start and m_base values for determining the - offset within the RChunk. - - * wtf/PageReservation.h: - (WTF::PageReservation::systemCommit): - (WTF::PageReservation::systemDecommit): - -2010-08-23 Patrick Gansterer <paroga@paroga.com> - - Rubber-stamped by Gabor Loki. - - [WINCE] Buildfix for GeneratedJITStubs after r64818 - https://bugs.webkit.org/show_bug.cgi?id=44469 - - Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#". - - * jit/JITStubs.cpp: - -2010-08-23 Oliver Hunt <oliver@apple.com> + Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError + when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled Reviewed by Darin Adler. - [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition - https://bugs.webkit.org/show_bug.cgi?id=44240 - <rdar://problem/8328995> - - Fix an error I introduced when cleaning up the interpreter side of the logic - to prevent setters being called in object initialisers. - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-08-23 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - Fixed case where a single character search string in a string.replace() - did not properly handle back reference replacement. The fix is to - check for a '$' as part of the check to see if we can execute the - single character replace optimization. - https://bugs.webkit.org/show_bug.cgi?id=44067 - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - -2010-08-23 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - JSON.stringify is much slower than Firefox on particular pathological input - https://bugs.webkit.org/show_bug.cgi?id=44456 - - Make StringBuilder::reserveCapacity reserve additional space so we don't end up - repeatedly copying the entire result string. - - * runtime/StringBuilder.h: - (JSC::StringBuilder::append): - (JSC::StringBuilder::reserveCapacity): - -2010-08-23 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - Handle blob resource. - https://bugs.webkit.org/show_bug.cgi?id=43941 - - * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle. - -2010-08-19 Andreas Kling <andreas.kling@nokia.com> - - Reviewed by Geoffrey Garen. - - JSC: Move the static_cast into to(U)Int32 fast case - https://bugs.webkit.org/show_bug.cgi?id=44037 - - Do the static_cast<(u)int32_t> inline to avoid the function call overhead - for easily converted values (within (u)int32_t range.) - - * runtime/JSValue.cpp: - (JSC::toInt32SlowCase): - (JSC::toUInt32SlowCase): - * runtime/JSValue.h: - (JSC::JSValue::toInt32): - (JSC::JSValue::toUInt32): - -2010-08-18 Andreas Kling <andreas.kling@nokia.com> - - Reviewed by Geoffrey Garen. - - REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript - https://bugs.webkit.org/show_bug.cgi?id=43742 - - Add codegen for pow() to return Int32 values when possible. - - * jit/ThunkGenerators.cpp: - (JSC::powThunkGenerator): - -2010-08-18 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64 - https://bugs.webkit.org/show_bug.cgi?id=43897 - - A 64 bits wide member in a structure is aligned to 8 bytes on ARM by - default, but this is not taken into account in the offset defines of - JITStackFrame. - - * jit/JITStubs.cpp: - * jit/JITStubs.h: - -2010-08-18 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - Rename UString::substr to substringSharingImpl, add to WTF::String. - Now WTF::String can do everything that JSC::UString can do! - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::escapeQuotes): - * bytecompiler/NodesCodegen.cpp: - (JSC::substitute): - * parser/SourceProvider.h: - (JSC::UStringSourceProvider::getRange): - * runtime/FunctionPrototype.cpp: - (JSC::insertSemicolonIfNeeded): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): - * runtime/JSONObject.cpp: - (JSC::gap): - (JSC::Stringifier::indent): - (JSC::Stringifier::unindent): - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToPrecision): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::trimString): - * runtime/UString.cpp: - (JSC::UString::substringSharingImpl): - * runtime/UString.h: - * wtf/text/WTFString.cpp: - (WTF::String::substringSharingImpl): - * wtf/text/WTFString.h: - -2010-08-18 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-08-18 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-08-17 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 44146 - Remove toDouble/toUInt32 methods from UString. - - These methods all implement JavaScript language specific behaviour, and as such - are not suited to being on a generic string object. They are also inefficient - and incorrectly used, refactor & cleanup. Uses of these methods really divide - out into two cases. - - ToNumber: - Uses of toDouble from JSString and from parseFloat are implementing ecma's - ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble - should largely just be moved out to a global jsToNumber function. ToNumber is - capable of recognizing either decimal or hexadecimal numbers, but parseFloat - should only recognize decimal values. This is currently handled by testing for - hexadecimal before calling toDouble, which should unnecessary - instead we can - just split out the two parts to the grammar into separate functions. Also, - strtod recognizes a set of literals (nan, inf, and infinity - all with any - capitalization) - which are not defined by any of the specs we are implementing. - To handle this we need to perform additional work in toDouble to convert the - unsupported cases of infinities back to NaNs. Instead we should simply remove - support for this literals from strtod. This should provide a more desirable - behaviour for all clients of strtod. - - Indexed properties: - Uses of the toStrictUInt32 methods are were all converting property names to - indices, and all uses of toUInt32 were incorrect; in all cases we should have - been calling toUInt32. This error results in some incorrect behaviour in the - DOM (accessing property "0 " of a NodeList should fail; it currently does not). - Move this method onto Identifier (our canonical property name), and make it - always perform a strict conversion. Add a layout test to check NodeList does - convert indexed property names correctly. - - * JavaScriptCore.exp: - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/Identifier.cpp: - (JSC::Identifier::toUInt32): - * runtime/Identifier.h: - (JSC::Identifier::toUInt32): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::deleteProperty): - * runtime/JSArray.h: - (JSC::Identifier::toArrayIndex): - * runtime/JSByteArray.cpp: - (JSC::JSByteArray::getOwnPropertySlot): - (JSC::JSByteArray::getOwnPropertyDescriptor): - (JSC::JSByteArray::put): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::isInfinity): - (JSC::jsHexIntegerLiteral): - (JSC::jsStrDecimalLiteral): - (JSC::jsToNumber): - (JSC::parseFloat): - * runtime/JSGlobalObjectFunctions.h: - * runtime/JSString.cpp: - (JSC::JSString::getPrimitiveNumber): - (JSC::JSString::toNumber): - (JSC::JSString::getStringPropertyDescriptor): - * runtime/JSString.h: - (JSC::JSString::getStringPropertySlot): - * runtime/ObjectPrototype.cpp: - (JSC::ObjectPrototype::put): - * runtime/StringObject.cpp: - (JSC::StringObject::deleteProperty): - * runtime/UString.cpp: - * runtime/UString.h: - * wtf/dtoa.cpp: - (WTF::strtod): - -2010-08-17 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find - - Bug 44080 introuduced a couple of cases in which array bounds could be overrun. - One of these was fixed in r65493, this patch fixes the other and address the - concerns voiced in comment #6 by restructuring the loops to remove the code - dupliction without introducing an additional if check. - - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::find): - (WTF::StringImpl::findIgnoringCase): - (WTF::StringImpl::reverseFind): - (WTF::StringImpl::reverseFindIgnoringCase): - -2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com> - - Reviewed by Ariya Hidayat. - - [Qt] Move the accelerated compositing build flag to the right place - https://bugs.webkit.org/show_bug.cgi?id=43882 - - * wtf/Platform.h: - -2010-08-17 Yuta Kitamura <yutak@chromium.org> - - Reviewed by Shinichiro Hamaji. - - Avoid uninitialized memory read in StringImpl::find(). - - REGRESSION(r65468): Crashes in StringImpl::find - https://bugs.webkit.org/show_bug.cgi?id=44099 - - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::find): - -2010-08-16 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Add VectorTraits to String & DefaultHash traits to UString to unify behaviour. - - * runtime/UString.h: - (JSC::UStringHash::hash): - (JSC::UStringHash::equal): - (WTF::): - * wtf/text/WTFString.h: - (WTF::): - -2010-08-16 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Remove unnecessary includes from UString.h, add new includes as necessary. - - * profiler/CallIdentifier.h: - * profiler/ProfileNode.h: - * runtime/DateConversion.cpp: - * runtime/Identifier.h: - (JSC::IdentifierRepHash::hash): - * runtime/RegExpCache.h: - * runtime/RegExpKey.h: - * runtime/UString.cpp: - (JSC::UString::substr): - * runtime/UString.h: - * wtf/text/WTFString.h: - -2010-08-16 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig - - Bug 44080 - String find/reverseFind methods need tidying up - These methods have a couple of problems with their interface, and implementation. - - These methods take and int index, and return an int - however this is problematic - since on 64-bit string indices may have a full 32-bit range. This spills out into - surrounding code, which unsafely casts string indices from unsigned to int. Code - checking the result of these methods check for a mix of "== -1", "< 0", and - "== notFound". Clean this up by changing these methods to take an unsigned - starting index, and return a size_t. with a failed match indicated by notFound. - reverseFind also has a special meaning for the starting index argument, in that a - negative index is interpreted as an offset back from the end of the string. Remove - this functionality, in the (1!) case where it is used we should just calculate the - offset by subtracting from the string's length. - - The implementation has a few problems too. The code is not in webkit style, in - using assorted abbreviations in variable names, and implementations of similar - find methods with differing argument types were unnecessarily inconsistent. When - find is passed const char* data the string would be handled as latin1 (zero - extended to UTF-16) for all characters but the first; this is sign extended. - Case-insensitive find is broken for unicode strings; the hashing optimization is - not unicode safe, and could result in false negatives. - - Unify UString find methods to match String. - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::escapeQuotes): - * bytecompiler/NodesCodegen.cpp: - (JSC::substitute): - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExpKey.h: - (JSC::RegExpKey::getFlagsValue): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::substituteBackreferences): - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncSplit): - * runtime/UString.cpp: - * runtime/UString.h: - (JSC::UString::find): - (JSC::UString::reverseFind): - * wtf/text/AtomicString.h: - (WTF::AtomicString::find): - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::find): - (WTF::StringImpl::findCaseInsensitive): - (WTF::StringImpl::reverseFind): - (WTF::StringImpl::reverseFindCaseInsensitive): - (WTF::StringImpl::endsWith): - (WTF::StringImpl::replace): - * wtf/text/StringImpl.h: - (WTF::StringImpl::startsWith): - * wtf/text/WTFString.cpp: - (WTF::String::split): - * wtf/text/WTFString.h: - (WTF::String::find): - (WTF::String::reverseFind): - (WTF::String::findCaseInsensitive): - (WTF::String::reverseFindCaseInsensitive): - (WTF::String::contains): - (WTF::find): - (WTF::reverseFind): - -2010-08-16 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fix, do not build WebCore as a convenience library as this leads to - errors in the Win build w/export symbols and causes problems with DOM bindings - debugging in gdb. - - * wscript: - -2010-08-16 Leandro Pereira <leandro@profusion.mobi> - - [EFL] Build fix after r65366. - - * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if - they're empty. - * jsc/CMakeLists.txt: Ditto. - * wtf/CMakeLists.txt: Ditto. - -2010-08-15 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fix, don't build intermediate source in DerivedSources dir. - - * wscript: - -2010-08-14 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Kenneth Rohde Christiansen. - - [CMake] Add preprocessor detection for generator scripts - https://bugs.webkit.org/show_bug.cgi?id=43984 - - * CMakeLists.txt: + (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the + character at stop-1 rather than at stop. At this point in the code, stop represents the + index just past the end of the characters we care about, and can even be just past the end + of the entire data buffer. -2010-08-14 Patrick Gansterer <paroga@paroga.com> +2011-02-23 Geoffrey Garen <ggaren@apple.com> - Reviewed by Kenneth Rohde Christiansen. - - [CMake] Set target properties only if available - https://bugs.webkit.org/show_bug.cgi?id=43978 - - * CMakeLists.txt: - * jsc/CMakeLists.txt: - * wtf/CMakeLists.txt: - -2010-08-13 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fix, add CString to the list of forwards. - - * wtf/Forward.h: - -2010-08-13 Gavin Barraclough <barraclough@apple.com> - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-13 Gavin Barraclough <barraclough@apple.com> - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-13 Gavin Barraclough <barraclough@apple.com> - - Windows build fix - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-13 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - Switch String::/UString::ascii() to return a CString. - - * JavaScriptCore.exp: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::dumpCaller): - * jsc.cpp: - (runWithScripts): - (runInteractive): - * runtime/Identifier.h: - (JSC::Identifier::ascii): - * runtime/ScopeChain.cpp: - (JSC::ScopeChainNode::print): - * runtime/UString.cpp: - (JSC::UString::ascii): - (JSC::UString::latin1): - * runtime/UString.h: - * wtf/text/StringImpl.cpp: - (WTF::StringImpl::asciiOLD): - * wtf/text/StringImpl.h: - * wtf/text/WTFString.cpp: - (WTF::String::ascii): - (WTF::String::latin1): - * wtf/text/WTFString.h: + Reviewed by Darin Adler. + + Rolled back in r79367 with SnowLeopard Release bot crash fixed. + https://bugs.webkit.org/show_bug.cgi?id=54999 + + The crash was caused by failure to update the "nextBlock" pointer when + removing a block from the list while shrinking. The fix is to update the + "nextBlock" pointer. + + This crash was very rare because it only happened in cases where the very + first block in the heap contained no marked cells. -2010-08-13 Gabor Loki <loki@webkit.org> +2011-02-23 Dan Bernstein <mitz@apple.com> Reviewed by Gavin Barraclough. - Avoid increasing required alignment of target type warning on ARM - https://bugs.webkit.org/show_bug.cgi?id=38045 - - The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where - sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: - increases required alignment of target type warnings. - Casting the type of [pointer to Type2] object to void* bypasses the - warning. - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putShortUnchecked): - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt64Unchecked): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - * jit/JITStubs.cpp: - * pcre/pcre_compile.cpp: - (jsRegExpCompile): - * runtime/JSArray.cpp: - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::increaseVectorPrefixLength): - (JSC::JSArray::shiftCount): - (JSC::JSArray::unshiftCount): - * wtf/FastMalloc.cpp: - (WTF::PageHeapAllocator::New): - (WTF::TCMalloc_Central_FreeList::Populate): - * wtf/MD5.cpp: - (WTF::reverseBytes): - (WTF::MD5::addBytes): - (WTF::MD5::checksum): - * wtf/StdLibExtras.h: - (isPointerTypeAlignmentOkay): - (reinterpret_cast_ptr): - * wtf/Vector.h: - (WTF::VectorBuffer::inlineBuffer): - * wtf/qt/StringQt.cpp: - (WTF::String::String): - -2010-08-13 Gavin Barraclough <barraclough@apple.com> + Include frame numbers in backtraces. + https://bugs.webkit.org/show_bug.cgi?id=55060 - Reviewed by Sam Weinig - - Unify UString::UTF8String() & String::utf8() methods, - remove UString::cost() & make atArrayIndex a free function. - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpName): - (JSC::printGlobalResolveInfo): - (JSC::printStructureStubInfo): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - * jsc.cpp: - (functionPrint): - (functionDebug): - (runInteractive): - (fillBufferWithContentsOfFile): - * pcre/pcre_exec.cpp: - (Histogram::~Histogram): - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::c_str): - * profiler/Profile.cpp: - (JSC::Profile::debugPrintDataSampleStyle): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintData): - (JSC::ProfileNode::debugPrintDataSampleStyle): - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/Identifier.h: - (JSC::Identifier::toStrictUInt32): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::deleteProperty): - * runtime/JSArray.h: - (JSC::toArrayIndex): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::parseInt): - (JSC::globalFuncJSCPrint): - * runtime/JSString.h: - (JSC::RopeBuilder::JSString): - * runtime/UString.cpp: - (JSC::UString::toDouble): - (JSC::putUTF8Triple): - (JSC::UString::utf8): - * runtime/UString.h: - (JSC::UString::~UString): - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::impl): - * wtf/text/WTFString.cpp: - (WTF::String::utf8): - * wtf/text/WTFString.h: - (WTF::String::~String): - (WTF::String::swap): - (WTF::String::isNull): - (WTF::String::isEmpty): - (WTF::String::impl): - (WTF::String::length): - (WTF::String::String): - (WTF::String::isHashTableDeletedValue): + * wtf/Assertions.cpp: -2010-08-12 Zoltan Herczeg <zherczeg@webkit.org> +2011-02-23 Xan Lopez <xlopez@igalia.com> Reviewed by Gavin Barraclough. - Refactoring the fpu code generator for the ARM port - https://bugs.webkit.org/show_bug.cgi?id=43842 - - Support up to 32 double precision registers, and the - recent VFP instruction formats. This patch is mainly - a style change which keeps the current functionality. - - * assembler/ARMAssembler.h: - (JSC::ARMRegisters::): - (JSC::ARMAssembler::): - (JSC::ARMAssembler::emitInst): - (JSC::ARMAssembler::emitDoublePrecisionInst): - (JSC::ARMAssembler::emitSinglePrecisionInst): - (JSC::ARMAssembler::vadd_f64_r): - (JSC::ARMAssembler::vdiv_f64_r): - (JSC::ARMAssembler::vsub_f64_r): - (JSC::ARMAssembler::vmul_f64_r): - (JSC::ARMAssembler::vcmp_f64_r): - (JSC::ARMAssembler::vsqrt_f64_r): - (JSC::ARMAssembler::vmov_vfp_r): - (JSC::ARMAssembler::vmov_arm_r): - (JSC::ARMAssembler::vcvt_f64_s32_r): - (JSC::ARMAssembler::vcvt_s32_f64_r): - (JSC::ARMAssembler::vmrs_apsr): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::addDouble): - (JSC::MacroAssemblerARM::divDouble): - (JSC::MacroAssemblerARM::subDouble): - (JSC::MacroAssemblerARM::mulDouble): - (JSC::MacroAssemblerARM::sqrtDouble): - (JSC::MacroAssemblerARM::convertInt32ToDouble): - (JSC::MacroAssemblerARM::branchDouble): - (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - -2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65295. - http://trac.webkit.org/changeset/65295 - https://bugs.webkit.org/show_bug.cgi?id=43950 - - It broke 4 sputnik tests (Requested by Ossy on #webkit). - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpName): - (JSC::printGlobalResolveInfo): - (JSC::printStructureStubInfo): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - * jsc.cpp: - (functionPrint): - (functionDebug): - (runInteractive): - (fillBufferWithContentsOfFile): - * pcre/pcre_exec.cpp: - (Histogram::~Histogram): - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::c_str): - * profiler/Profile.cpp: - (JSC::Profile::debugPrintDataSampleStyle): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintData): - (JSC::ProfileNode::debugPrintDataSampleStyle): - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/Identifier.h: - (JSC::Identifier::Identifier): - (JSC::Identifier::toArrayIndex): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::deleteProperty): - * runtime/JSArray.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::parseInt): - (JSC::globalFuncJSCPrint): - * runtime/JSString.h: - (JSC::RopeBuilder::JSString): - * runtime/UString.cpp: - (JSC::UString::toDouble): - (JSC::UString::UTF8String): - * runtime/UString.h: - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::impl): - (JSC::UString::cost): - (JSC::UString::~UString): - (JSC::UString::toArrayIndex): - * wtf/text/WTFString.cpp: - (WTF::String::utf8): - * wtf/text/WTFString.h: - (WTF::String::String): - (WTF::String::isHashTableDeletedValue): - (WTF::String::length): - (WTF::String::operator[]): - (WTF::String::isNull): - (WTF::String::isEmpty): - (WTF::String::impl): - -2010-08-12 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-12 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig - - Unify UString::UTF8String() & String::utf8() methods, - remove UString::cost() & make atArrayIndex a free function. - - * JavaScriptCore.exp: - * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpName): - (JSC::printGlobalResolveInfo): - (JSC::printStructureStubInfo): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - * jsc.cpp: - (functionPrint): - (functionDebug): - (runInteractive): - (fillBufferWithContentsOfFile): - * pcre/pcre_exec.cpp: - (Histogram::~Histogram): - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::c_str): - * profiler/Profile.cpp: - (JSC::Profile::debugPrintDataSampleStyle): - * profiler/ProfileGenerator.cpp: - (JSC::ProfileGenerator::willExecute): - (JSC::ProfileGenerator::didExecute): - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintData): - (JSC::ProfileNode::debugPrintDataSampleStyle): - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyDescriptor): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/DateConversion.cpp: - (JSC::parseDate): - * runtime/Identifier.h: - (JSC::Identifier::toStrictUInt32): - * runtime/JSArray.cpp: - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::deleteProperty): - * runtime/JSArray.h: - (JSC::toArrayIndex): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::parseInt): - (JSC::globalFuncJSCPrint): - * runtime/JSString.h: - (JSC::RopeBuilder::JSString): - * runtime/UString.cpp: - (JSC::UString::toDouble): - (JSC::putUTF8Triple): - (JSC::UString::utf8): - * runtime/UString.h: - (JSC::UString::~UString): - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::impl): - * wtf/text/WTFString.cpp: - (WTF::String::utf8): - * wtf/text/WTFString.h: - (WTF::String::~String): - (WTF::String::swap): - (WTF::String::isNull): - (WTF::String::isEmpty): - (WTF::String::impl): - (WTF::String::length): - (WTF::String::String): - (WTF::String::isHashTableDeletedValue): - -2010-08-12 Gavin Barraclough <barraclough@apple.com> - - Eeerk! - revert accidentally committed changes in UString! - - * JavaScriptCore.exp: - * runtime/UString.cpp: - (JSC::UString::UString): - * runtime/UString.h: - -2010-08-12 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig - - Change UString constructors to match those in WTF::String. - This changes behaviour of UString((char*)0) to create null - strings, akin to UString() rather than UString::empty(). - (This matches String). Remove unused constructors from - UString, and add null-terminated UTF-16 constructor, to - match String. Move String's constructor into the .cpp to - match UString. - - * JavaScriptCore.exp: - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::calculatedFunctionName): - * runtime/RegExpKey.h: - (JSC::RegExpKey::RegExpKey): - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::createSingleCharacterString): - * runtime/UString.cpp: - (JSC::UString::UString): - * runtime/UString.h: - (JSC::UString::UString): - (JSC::UString::swap): - (JSC::UString::adopt): - (JSC::UString::operator[]): - * wtf/text/WTFString.h: - (WTF::String::String): - (WTF::String::adopt): - (WTF::String::operator[]): - -2010-08-12 David Levin <levin@chromium.org> - - Reviewed by NOBODY (build fix). - - * runtime/UString.h: Removed unneccessary #include. - -2010-08-12 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig - - Revert changes to ALWAYS_INLINEness of a couple of functions in UString. - This appears to have degraded performance. - - * runtime/UString.cpp: - (JSC::UString::ascii): - * runtime/UString.h: - (JSC::UString::length): - (JSC::UString::isEmpty): - (JSC::UString::~UString): - -2010-08-12 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Antonio Gomes. - - [Qt] Fix warnings: unknown conversion type character 'l' in format - https://bugs.webkit.org/show_bug.cgi?id=43359 - - Qt port doesn't call any printf in String::format(...), consequently - using __attribute__((format(printf,m,n))) is incorrect and causes - false positive warnings on Windows if you build with MinGW. - - Qt port calls QString::vsprintf(...) , which is platform - independent, and handles %lli, %llu and %llx on all platforms. - (http://trac.webkit.org/changeset/35712) + latest jsc for armv7 crashes in sunspider tests + https://bugs.webkit.org/show_bug.cgi?id=54667 - * wtf/text/WTFString.h: - -2010-08-12 Gabor Loki <loki@webkit.org> - - Reviewed by Geoffrey Garen. - - Fix the array subscript is above array bounds warning in ByteArray on ARM. - https://bugs.webkit.org/show_bug.cgi?id=43358 - - The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861 - - * wtf/ByteArray.cpp: - (WTF::ByteArray::create): - -2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Reviewed by Martin Robinson. - - [GTK] Use GSettings to save/restore Web Inspector settings - https://bugs.webkit.org/show_bug.cgi?id=43512 - - * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our - GSettings support. - (WTF::refGPtr): - (WTF::derefGPtr): - * wtf/gobject/GRefPtr.h: - -2010-08-12 Gabor Loki <loki@webkit.org> - - Reviewed by Simon Hausmann. - - The scratch register should be saved in YARR with ARM JIT - https://bugs.webkit.org/show_bug.cgi?id=43910 - - Reported by Jocelyn Turcotte. - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateEnter): - (JSC::Yarr::RegexGenerator::generateReturn): - -2010-08-11 Gavin Barraclough <barraclough@apple.com> - - Windows build fix. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Forward.h: - -2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn> - - Reviewed by Geoffrey Garen. - - Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date, - which means isNaN(new Date("")) should return true. - https://bugs.webkit.org/show_bug.cgi?id=43793 - Tests: fast/js/date-constructor.html - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::resetDateCache): - -2010-08-11 Gavin Barraclough <barraclough@apple.com> - - Windows & !JIT build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/RegExp.cpp: - (JSC::RegExp::match): + Update JIT offset values in ARMv7 after r78732. Fixes crashes in + SunSpider and JavaScript tests. -2010-08-11 Gavin Barraclough <barraclough@apple.com> + * jit/JIT.h: update values. - Rubber stamp by sam weinig +2011-02-23 Sheriff Bot <webkit.review.bot@gmail.com> - Touch a file to stop the bot rolling a bit change out! + Unreviewed, rolling out r79418. + http://trac.webkit.org/changeset/79418 + https://bugs.webkit.org/show_bug.cgi?id=55043 - * runtime/UString.cpp: - (JSC::UString::ascii): + "breaks shlib linux build" (Requested by morrita on #webkit). -2010-08-11 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards. - - * wtf/Forward.h: - -2010-08-11 Gavin Barraclough <barraclough@apple.com> - - Rubber stamps by Darin Adler & Sam Weinig. - - Bug 43867 - Some UString cleanup - - Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String. - Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit(). - - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClass::className): - * API/OpaqueJSString.cpp: - (OpaqueJSString::create): - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::constantName): - (JSC::idName): - (JSC::CodeBlock::registerName): - (JSC::regexpName): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecompiler/NodesCodegen.cpp: - (JSC::ResolveNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::processClauseList): - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createRegex): - * parser/ParserArena.h: - (JSC::IdentifierArena::makeNumericIdentifier): - * parser/SourceProvider.h: - (JSC::UStringSourceProvider::data): - (JSC::UStringSourceProvider::length): - * profiler/Profiler.cpp: - * runtime/Arguments.cpp: - (JSC::Arguments::getOwnPropertySlot): - (JSC::Arguments::getOwnPropertyNames): - (JSC::Arguments::put): - (JSC::Arguments::deleteProperty): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - * runtime/ExceptionHelpers.cpp: - * runtime/FunctionConstructor.cpp: - * runtime/FunctionPrototype.cpp: - (JSC::insertSemicolonIfNeeded): - * runtime/Identifier.h: - (JSC::Identifier::characters): - (JSC::Identifier::length): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::decode): - (JSC::parseInt): - (JSC::parseFloat): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - * runtime/JSNumberCell.cpp: - (JSC::JSNumberCell::toString): - * runtime/JSONObject.cpp: - (JSC::gap): - (JSC::Stringifier::appendQuotedString): - (JSC::Stringifier::appendStringifiedValue): - (JSC::Stringifier::indent): - (JSC::Stringifier::unindent): - (JSC::Walker::walk): - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): - (JSC::JSString::getIndexSlowCase): - * runtime/JSString.h: - (JSC::RopeBuilder::JSString): - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::RopeBuilder::fiberCount): - (JSC::jsSingleCharacterSubstring): - (JSC::jsNontrivialString): - (JSC::JSString::getIndex): - (JSC::jsString): - (JSC::jsStringWithFinalizer): - (JSC::jsSubstring): - (JSC::jsOwnedString): - * runtime/JSStringBuilder.h: - (JSC::JSStringBuilder::append): - * runtime/LiteralParser.h: - (JSC::LiteralParser::Lexer::Lexer): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/NumericStrings.h: - (JSC::NumericStrings::add): - (JSC::NumericStrings::lookupSmallString): - * runtime/Operations.h: - (JSC::jsString): - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::getRightContext): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncToString): - * runtime/StringBuilder.h: - (JSC::StringBuilder::append): - * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h. - (JSC::): - (JSC::sumWithOverflow): - (JSC::tryMakeString): - (JSC::makeString): - * runtime/StringObject.cpp: - (JSC::StringObject::getOwnPropertyNames): - * runtime/StringPrototype.cpp: - (JSC::substituteBackreferencesSlow): - (JSC::localeCompare): - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - (JSC::trimString): - * runtime/UString.cpp: - (JSC::UString::number): - (JSC::UString::ascii): - (JSC::UString::operator[]): - (JSC::UString::toDouble): - (JSC::UString::find): - (JSC::UString::rfind): - (JSC::UString::substr): - (JSC::operator==): - (JSC::operator<): - (JSC::operator>): - (JSC::UString::UTF8String): - * runtime/UString.h: - (JSC::UString::UString): - (JSC::UString::adopt): - (JSC::UString::length): - (JSC::UString::characters): - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::impl): - (JSC::UString::cost): - (JSC::operator==): - (JSC::operator!=): - (JSC::codePointCompare): - (JSC::UString::toArrayIndex): - (JSC::IdentifierRepHash::hash): - (WTF::): - * yarr/RegexJIT.cpp: - (JSC::Yarr::jitCompileRegex): - * yarr/RegexParser.h: - (JSC::Yarr::Parser::Parser): - -2010-08-11 Gabor Loki <loki@webkit.org> - - Qt build fix (ARMv7). - - Fix invalid conversion from int to Condition. - Add ARMv7Assembler.cpp to JavaScriptCore.pro. - - * JavaScriptCore.pro: - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::JmpSrc::JmpSrc): - -2010-08-11 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - At collection time, we frequently want to mark a cell, while checking - whether it was originally checked. Previously, this was a get - operation follwed by a set operation. Fusing the two saves - computation and gives a 0.5% sunspider speedup. - - * runtime/Collector.h: - (JSC::CollectorBitmap::getset): - (JSC::Heap::checkMarkCell): - * runtime/JSArray.h: - (JSC::MarkStack::drain): - * runtime/JSCell.h: - (JSC::MarkStack::append): - -2010-08-11 Steve Falkenburg <sfalken@apple.com> - - Reviewed by Adam Roben. - - Improve vsprops copying for Windows build - https://bugs.webkit.org/show_bug.cgi?id=41982 - - When we detect a new SDK, always copy a new set of vsprops files. - Previously, if someone updated their SDK after updating their sources, - they could end up with out-of-date vsprops files. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: - -2010-08-10 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Add leakRef and clear to all RefPtr variants - https://bugs.webkit.org/show_bug.cgi?id=42389 - - * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do - "template<...>". We should probably put this in the style guide and do it - consitently. Fixed other minor style issues. Defined many of the inlined - functions outside the class definition, to avoid style checker warnings - about multiple statements on a single line and for slightly better clarity - of the class definition itself. Renamed releaseRef to leakRef. Added a - releaseRef that calls leakRef so we don't have to rename all callers oat - once. Added a clear function. - - * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef. -n - * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do - "template<...>". Tidied up declarations and comments a bit. - Changed all uses of releaseRef to leakRef. - - * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do - "template<...>". Defined many of the inlined functions outside the class - definition, to avoid style checker warnings about multiple statements on - a single line and for slightly better clarity of the class definition itself. - Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we - don't have to rename all callers at once. Added a clear function. - -2010-08-10 Dumitru Daniliuc <dumi@chromium.org> - - Unreviewed, reverting an unintentional change to a file submitted in r65108. - - * bytecode/CodeBlock.h: - (JSC::binaryChop): + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: -2010-08-10 Gavin Barraclough <barraclough@apple.com> +2011-02-23 Patrick Gansterer <paroga@webkit.org> - Rubber stamped by Sam Weinig + Reviewed by Alexey Proskuryakov. - Bug 43817 - Remove UString::Rep - UString::Rep has for a long time been replaced by UStringImpl (Rep - remaining as a typedef). UStringImpl has since been removed too - (unified with StringImpl). Remove Rep, rename rep() to impl() and - m_rep to m_impl. Also add impl() method to Identifier, and rename - its UString member from _ustring to m_string. + Use DEFINE_STATIC_LOCAL for ignoreSetMutex in Structure.cpp + https://bugs.webkit.org/show_bug.cgi?id=54831 - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::getOwnPropertyNames): - (JSC::::staticValueGetter): - (JSC::::staticFunctionGetter): - * API/JSClassRef.cpp: - (tryCreateStringFromUTF8): - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - * API/JSClassRef.h: - * API/OpaqueJSString.cpp: - (OpaqueJSString::ustring): - * bytecode/EvalCodeCache.h: - (JSC::EvalCodeCache::get): - * bytecode/JumpTable.h: - (JSC::StringJumpTable::offsetForValue): - (JSC::StringJumpTable::ctiForValue): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::addVar): - (JSC::BytecodeGenerator::addGlobalVar): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addParameter): - (JSC::BytecodeGenerator::registerFor): - (JSC::BytecodeGenerator::willResolveToArguments): - (JSC::BytecodeGenerator::uncheckedRegisterForArguments): - (JSC::BytecodeGenerator::constRegisterFor): - (JSC::BytecodeGenerator::isLocal): - (JSC::BytecodeGenerator::isLocalConstant): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::findScopedProperty): - (JSC::keyForCharacterSwitch): - (JSC::prepareJumpTableForStringSwitch): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::processClauseList): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * parser/JSParser.cpp: - (JSC::JSParser::parseStrictObjectLiteral): - * pcre/pcre_exec.cpp: - (Histogram::add): - * profiler/CallIdentifier.h: - (JSC::CallIdentifier::Hash::hash): - * profiler/Profile.cpp: - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintDataSampleStyle): - * profiler/ProfileNode.h: - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - * runtime/Identifier.cpp: - (JSC::Identifier::equal): - (JSC::IdentifierCStringTranslator::hash): - (JSC::IdentifierCStringTranslator::equal): - (JSC::IdentifierCStringTranslator::translate): - (JSC::Identifier::add): - (JSC::IdentifierUCharBufferTranslator::hash): - (JSC::IdentifierUCharBufferTranslator::equal): - (JSC::IdentifierUCharBufferTranslator::translate): - (JSC::Identifier::addSlowCase): - * runtime/Identifier.h: - (JSC::Identifier::Identifier): - (JSC::Identifier::ustring): - (JSC::Identifier::impl): - (JSC::Identifier::data): - (JSC::Identifier::size): - (JSC::Identifier::ascii): - (JSC::Identifier::isNull): - (JSC::Identifier::isEmpty): - (JSC::Identifier::toUInt32): - (JSC::Identifier::toStrictUInt32): - (JSC::Identifier::toArrayIndex): - (JSC::Identifier::toDouble): - (JSC::Identifier::equal): - (JSC::Identifier::add): * runtime/InitializeThreading.cpp: (JSC::initializeThreadingOnce): - * runtime/InternalFunction.cpp: - (JSC::InternalFunction::displayName): - * runtime/JSFunction.cpp: - (JSC::JSFunction::displayName): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::addStaticGlobals): - * runtime/JSStaticScopeObject.h: - (JSC::JSStaticScopeObject::JSStaticScopeObject): - * runtime/JSString.h: - (JSC::): - (JSC::RopeBuilder::appendStringInConstruct): - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::jsSingleCharacterSubstring): - (JSC::jsSubstring): - * runtime/JSVariableObject.cpp: - (JSC::JSVariableObject::deleteProperty): - (JSC::JSVariableObject::symbolTableGet): - * runtime/JSVariableObject.h: - (JSC::JSVariableObject::symbolTableGet): - (JSC::JSVariableObject::symbolTablePut): - (JSC::JSVariableObject::symbolTablePutWithAttributes): - * runtime/Lookup.cpp: - (JSC::HashTable::createTable): - (JSC::HashTable::deleteTable): - * runtime/Lookup.h: - (JSC::HashEntry::initialize): - (JSC::HashEntry::setKey): - (JSC::HashEntry::key): - (JSC::HashTable::entry): - * runtime/PropertyMapHashTable.h: - (JSC::PropertyMapEntry::PropertyMapEntry): - * runtime/PropertyNameArray.cpp: - (JSC::PropertyNameArray::add): - * runtime/PropertyNameArray.h: - (JSC::PropertyNameArray::add): - (JSC::PropertyNameArray::addKnownUnique): - * runtime/RegExp.cpp: - (JSC::RegExp::match): - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::create): - * runtime/RegExpKey.h: - (JSC::RegExpKey::RegExpKey): - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::rep): - (JSC::SmallStrings::singleCharacterStringRep): - * runtime/SmallStrings.h: - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): * runtime/Structure.cpp: + (JSC::ignoreSetMutex): + (JSC::Structure::Structure): (JSC::Structure::~Structure): - (JSC::Structure::despecifyDictionaryFunction): - (JSC::Structure::addPropertyTransitionToExistingStructure): - (JSC::Structure::addPropertyTransition): - (JSC::Structure::copyPropertyTable): - (JSC::Structure::get): - (JSC::Structure::despecifyFunction): - (JSC::Structure::put): - (JSC::Structure::hasTransition): - (JSC::Structure::remove): - (JSC::Structure::checkConsistency): + (JSC::Structure::initializeThreading): * runtime/Structure.h: - (JSC::Structure::get): - (JSC::Structure::hasTransition): - * runtime/StructureTransitionTable.h: - * runtime/SymbolTable.h: - * runtime/UString.cpp: - (JSC::UString::UString): - (JSC::UString::toStrictUInt32): - (JSC::UString::substr): - * runtime/UString.h: - (JSC::UString::UString): - (JSC::UString::adopt): - (JSC::UString::data): - (JSC::UString::size): - (JSC::UString::isNull): - (JSC::UString::isEmpty): - (JSC::UString::impl): - (JSC::UString::cost): - (JSC::operator==): - (JSC::codePointCompare): - (JSC::IdentifierRepHash::hash): - (WTF::): - -2010-08-10 Gavin Barraclough <barraclough@apple.com> - - Bug 43816 - Remove UStringImpl - The class was actually removed a long time ago, replaced by StringImpl. - UStringImpl is just a typedef onto StringImpl. Remove this. - - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSString.cpp: - (JSC::JSString::resolveRope): - (JSC::JSString::replaceCharacter): - * runtime/JSString.h: - (JSC::RopeBuilder::RopeIterator::operator*): - (JSC::RopeBuilder::JSString): - (JSC::RopeBuilder::appendStringInConstruct): - (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): - (JSC::jsSingleCharacterSubstring): - (JSC::jsSubstring): - * runtime/JSStringBuilder.h: - (JSC::jsMakeNontrivialString): - * runtime/RopeImpl.cpp: - (JSC::RopeImpl::derefFibersNonRecursive): - * runtime/RopeImpl.h: - (JSC::RopeImpl::deref): - * runtime/SmallStrings.cpp: - (JSC::SmallStringsStorage::SmallStringsStorage): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncLink): - * runtime/UString.cpp: - (JSC::initializeUString): - * runtime/UString.h: - (JSC::UString::adopt): - (JSC::tryMakeString): - (JSC::makeString): - * runtime/UStringImpl.h: Removed. - -2010-08-10 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Eric Seidel. - - Make FastMalloc more portable. - https://bugs.webkit.org/show_bug.cgi?id=41790 - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_Central_FreeList::Populate): - (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): - -2010-08-10 Patrick Gansterer <paroga@paroga.com> - - Reviewed by David Levin. - - [WINCE] Buildfix for CE 6.0 - https://bugs.webkit.org/show_bug.cgi?id=43027 - - CE 6.0 doesn't define localtime in the system include files. - - * wtf/Platform.h: Include ce_time.h on all OS(WINCE). - -2010-08-10 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - Bug 43786 - Move AtomicStringHash from WebCore to WTF - Also remove deprecated string headers from WebCore/platform/text. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/text/AtomicString.h: - * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h. - -2010-08-09 Oliver Hunt <oliver@apple.com> - - Fix Qt/ARM again, this time including the other changed file. - - * jit/JIT.h: - -2010-08-09 Oliver Hunt <oliver@apple.com> - - Fix Qt/ARM - - C++ overload resolution I stab at thee - * jit/JITInlineMethods.h: - (JSC::JIT::beginUninterruptedSequence): - (JSC::JIT::endUninterruptedSequence): - -2010-08-09 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Allow an assembler/macroassembler to compact branches to more concise forms when linking - https://bugs.webkit.org/show_bug.cgi?id=43745 - - This patch makes it possible for an assembler to convert jumps into a different - (presumably more efficient) form at link time. Currently implemented in the - ARMv7 JIT as that already had logic to delay linking of jumps until the end of - compilation already. The ARMv7 JIT chooses between either a 4 byte short jump - or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does - not yet produce the most compact form possible. The general design of the linker - should make it relatively simple to introduce new branch types with little effort, - as the linker has no knowledge of the exact form of any of the branches. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/ARMv7Assembler.cpp: Added. - (JSC::): - Record jump sizes - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::LinkRecord::LinkRecord): - (JSC::ARMv7Assembler::LinkRecord::from): - (JSC::ARMv7Assembler::LinkRecord::setFrom): - (JSC::ARMv7Assembler::LinkRecord::to): - (JSC::ARMv7Assembler::LinkRecord::type): - (JSC::ARMv7Assembler::LinkRecord::linkType): - (JSC::ARMv7Assembler::LinkRecord::setLinkType): - Encapsulate LinkRecord fields so we can compress the values somewhat - - (JSC::ARMv7Assembler::JmpSrc::JmpSrc): - Need to record the jump type now - - (JSC::ARMv7Assembler::b): - (JSC::ARMv7Assembler::blx): - (JSC::ARMv7Assembler::bx): - Need to pass the jump types - - (JSC::ARMv7Assembler::executableOffsetFor): - (JSC::ARMv7Assembler::jumpSizeDelta): - (JSC::ARMv7Assembler::linkRecordSourceComparator): - (JSC::ARMv7Assembler::computeJumpType): - (JSC::ARMv7Assembler::convertJumpTo): - (JSC::ARMv7Assembler::recordLinkOffsets): - (JSC::ARMv7Assembler::jumpsToLink): - (JSC::ARMv7Assembler::link): - (JSC::ARMv7Assembler::unlinkedCode): - Helper functions for the linker - - (JSC::ARMv7Assembler::linkJump): - (JSC::ARMv7Assembler::canBeShortJump): - (JSC::ARMv7Assembler::linkLongJump): - (JSC::ARMv7Assembler::linkShortJump): - (JSC::ARMv7Assembler::linkJumpAbsolute): - Moving code around for the various jump linking functions - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::beginUninterruptedSequence): - (JSC::AbstractMacroAssembler::endUninterruptedSequence): - We have to track uninterrupted sequences in any assembler that compacts - branches as that's not something we're allowed to do in such sequences. - AbstractMacroAssembler has a nop version of these functions as it makes the - code elsewhere nicer. - - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::LinkBuffer): - (JSC::LinkBuffer::link): - (JSC::LinkBuffer::patch): - (JSC::LinkBuffer::locationOf): - (JSC::LinkBuffer::locationOfNearCall): - (JSC::LinkBuffer::returnAddressOffset): - (JSC::LinkBuffer::trampolineAt): - Updated these functions to adjust for any changed offsets in the linked code - - (JSC::LinkBuffer::applyOffset): - A helper function to deal with the now potentially moved labels - - (JSC::LinkBuffer::linkCode): - The new and mighty linker function - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7): - (JSC::MacroAssemblerARMv7::beginUninterruptedSequence): - (JSC::MacroAssemblerARMv7::endUninterruptedSequence): - (JSC::MacroAssemblerARMv7::jumpsToLink): - (JSC::MacroAssemblerARMv7::unlinkedCode): - (JSC::MacroAssemblerARMv7::computeJumpType): - (JSC::MacroAssemblerARMv7::convertJumpTo): - (JSC::MacroAssemblerARMv7::recordLinkOffsets): - (JSC::MacroAssemblerARMv7::jumpSizeDelta): - (JSC::MacroAssemblerARMv7::link): - (JSC::MacroAssemblerARMv7::jump): - (JSC::MacroAssemblerARMv7::branchMul32): - (JSC::MacroAssemblerARMv7::breakpoint): - (JSC::MacroAssemblerARMv7::nearCall): - (JSC::MacroAssemblerARMv7::call): - (JSC::MacroAssemblerARMv7::ret): - (JSC::MacroAssemblerARMv7::tailRecursiveCall): - (JSC::MacroAssemblerARMv7::executableOffsetFor): - (JSC::MacroAssemblerARMv7::inUninterruptedSequence): - (JSC::MacroAssemblerARMv7::makeJump): - (JSC::MacroAssemblerARMv7::makeBranch): - All branches need to pass on their type now - - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::returnLastBytes): - We can't know ahead of time how much space will be necessary to - hold the linked code if we're compacting branches, this new - function allows us to return the unused bytes at the end of linking - - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::compile): - The JIT class now needs to take a linker offset so that recompilation - can generate the same jumps when using branch compaction. - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emitSlow_op_mod): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - Update for new trampolineAt changes - - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): - * wtf/Platform.h: - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Qt build fix III. - - * wtf/text/WTFString.h: - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Qt build fix. - - * wtf/qt/StringQt.cpp: - -2010-08-06 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Bug 43594 - Add string forwards to Forward.h - This allows us to remove forward declarations for these classes from - WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Forward.h: - -2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64938. - http://trac.webkit.org/changeset/64938 - https://bugs.webkit.org/show_bug.cgi?id=43685 - - Did not compile on several ports (Requested by abarth on - #webkit). - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssembler.h: - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::load32): - (JSC::MacroAssemblerX86::store32): - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_mr): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/Instruction.h: - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::): - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::deref): - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::): - * jit/JIT.h: - * jit/JITMarkObjects.cpp: Removed. - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::setupPolymorphicProtoList): - * wtf/Platform.h: - -2010-08-07 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - The JIT code contains a number of direct references to GC'd objects. - When we have movable objects, these references will need to be - updated. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::int32AtLocation): - (JSC::AbstractMacroAssembler::pointerAtLocation): - (JSC::AbstractMacroAssembler::jumpTarget): - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::loadPtrWithPatch): - Normally, loadPtr will optimize when the register is eax. Since - the slightly smaller instruction changes the offsets, it messes up - our ability to repatch the code. We added this new instruction - that garuntees a constant size. - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::load32WithPatch): - Changed load32 in the same way described above. - (JSC::MacroAssemblerX86::load32): - Moved the logic to optimize laod32 from movl_mr to load32 - (JSC::MacroAssemblerX86::store32): - Moved the logic to optimize store32 from movl_rm to store32 - * assembler/X86Assembler.h: - (JSC::X86Assembler::movl_rm): - (JSC::X86Assembler::movl_mr): - (JSC::X86Assembler::int32AtLocation): - (JSC::X86Assembler::pointerAtLocation): - (JSC::X86Assembler::jumpTarget): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * bytecode/Instruction.h: - As described in StructureStubInfo.h, we needed to add additional - fields to both StructureStubInfo and - PolymorphicAccessStructureList so that we can determine the - structure of the JITed code at patch time. - (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): - (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): - * bytecode/StructureStubInfo.cpp: - (JSC::StructureStubInfo::markAggregate): - Added this function to mark the JITed code that correosponds to - this structure stub info. - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::): - * jit/JIT.h: - * jit/JITMarkObjects.cpp: Added. - (JSC::JIT::patchPrototypeStructureAddress): - (JSC::JIT::patchGetDirectOffset): - (JSC::JIT::markGetByIdProto): - (JSC::JIT::markGetByIdChain): - (JSC::JIT::markGetByIdProtoList): - (JSC::JIT::markPutByIdTransition): - (JSC::JIT::markGlobalObjectReference): - * jit/JITPropertyAccess.cpp: - Added asserts for the patch offsets. - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::setupPolymorphicProtoList): - * wtf/Platform.h: - Added ENABLE_MOVABLE_GC_OBJECTS flag - -2010-08-07 Michael Saboff <msaboff@apple.com> - - Reviewed by Geoffrey Garen. - - Revert JSArray to point to the beginning of the contained ArrayStorage - struct. This is described in - https://bugs.webkit.org/show_bug.cgi?id=43526. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::~JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::getNewVectorLength): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::increaseVectorPrefixLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::shiftCount): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::subclassData): - (JSC::JSArray::setSubclassData): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::length): - (JSC::JSArray::canGetIndex): - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - -2010-08-07 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator - https://bugs.webkit.org/show_bug.cgi?id=43399 - - m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR). - - * runtime/JSGlobalData.h: - -2010-08-07 Patrick Roland Gansterer <paroga@paroga.com> - - Reviewed by Eric Seidel. - - [Qt] Enable JIT on WinCE - https://bugs.webkit.org/show_bug.cgi?id=43303 - - Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm. - - * DerivedSources.pro: - -2010-08-07 Dan Bernstein <mitz@apple.com> - - Reviewed by Anders Carlsson. - - Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef - from SimpleFontData to FontPlatformData. - https://bugs.webkit.org/show_bug.cgi?id=43674 - - * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h. - -2010-08-07 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Eric Seidel. - - Bitmap.h has no default constructor - https://bugs.webkit.org/show_bug.cgi?id=43619 - - Without a constructor, the initial bits of the Bitmap class - are undefinied. If only a few, or zero bits are 0, the memory - area provided by AlignedMemoryAllocator can be easly exhausted. - - Csaba Osztrogonác helped to find this bug. - - * wtf/Bitmap.h: - (WTF::::Bitmap): - -2010-08-06 Rafael Antognolli <antognolli@profusion.mobi> - - [EFL] Build fix. - - * CMakeLists.txt: add runtime/CGHandle.cpp. - -2010-08-06 Jessie Berlin <jberlin@apple.com> - - Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. - Unreviewed. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Forward.h: - -2010-08-06 Jessie Berlin <jberlin@apple.com> - - Windows Build Fix (continued). Unreviewed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-06 Jessie Berlin <jberlin@apple.com> - - Windows Build Fix. Unreviewed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - Add GCHandle.h and GCHandle.cpp. - -2010-08-06 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - https://bugs.webkit.org/show_bug.cgi?id=43207 - - WeakGCPtr's should instead of directly pointing to the GC'd object - should be directed to an array of pointers that can be updated for - movable objects. - - * Android.mk: - * GNUmakefile.am: - * JavaScriptCore.exp: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/Collector.cpp: - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::updateWeakGCHandles): - (JSC::WeakGCHandlePool::update): - (JSC::Heap::addWeakGCHandle): - (JSC::Heap::markRoots): - * runtime/Collector.h: - (JSC::Heap::weakGCHandlePool): - * runtime/GCHandle.cpp: Added. - (JSC::WeakGCHandle::pool): - (JSC::WeakGCHandlePool::WeakGCHandlePool): - (JSC::WeakGCHandlePool::allocate): - (JSC::WeakGCHandlePool::free): - (JSC::WeakGCHandlePool::operator new): - * runtime/GCHandle.h: Added. - (JSC::WeakGCHandle::isValidPtr): - (JSC::WeakGCHandle::isPtr): - (JSC::WeakGCHandle::isNext): - (JSC::WeakGCHandle::invalidate): - (JSC::WeakGCHandle::get): - (JSC::WeakGCHandle::set): - (JSC::WeakGCHandle::getNextInFreeList): - (JSC::WeakGCHandle::setNextInFreeList): - (JSC::WeakGCHandlePool::isFull): - * runtime/WeakGCPtr.h: - (JSC::WeakGCPtr::WeakGCPtr): - (JSC::WeakGCPtr::~WeakGCPtr): - (JSC::WeakGCPtr::get): - (JSC::WeakGCPtr::clear): - (JSC::WeakGCPtr::assign): - (JSC::get): - -2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> - - Reviewed by Antonio Gomes. - - [Qt] Fix warnings about difference in symbol visiblity on Mac OS X - - * jsc.pro: - -2010-08-06 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Darin Adler. - - Refactor identifier parsing in lexer - https://bugs.webkit.org/show_bug.cgi?id=41845 - - The code is refactored to avoid gotos. The new code - has the same performance as the old one. - - SunSpider --parse-only: no change (from 34.0ms to 33.6ms) - SunSpider: no change (from 523.2ms to 523.5ms) - - * parser/Lexer.cpp: - (JSC::Lexer::parseIdent): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-08-06 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - The ARM JIT does not support JSValue32_64 with RVCT - https://bugs.webkit.org/show_bug.cgi?id=43411 - - JSValue32_64 is enabled for RVCT by default. - - * create_jit_stubs: - * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::ctiVMThrowTrampoline): - (JSC::ctiOpThrowNotCaught): - * wtf/Platform.h: - -2010-08-05 Chao-ying Fu <fu@mips.com> +2011-02-23 Patrick Gansterer <paroga@webkit.org> Reviewed by Darin Adler. - Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS - https://bugs.webkit.org/show_bug.cgi?id=43514 - - MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that - RenderArena::allocate() can return 8-byte aligned memory to avoid - exceptions on sdc1/ldc1. - - * wtf/Platform.h: - -2010-08-05 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Bug 43594 - Add string forwards to Forward.h - This allows us to remove forward declarations for these classes from - WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/Forward.h: - -2010-08-05 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Mark Rowe. - - Fixed leak seen on buildbot. + Rename PLATFORM(CF) to USE(CF) + https://bugs.webkit.org/show_bug.cgi?id=53540 + * runtime/DatePrototype.cpp: * runtime/GCActivityCallbackCF.cpp: - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr, - since anything less would be uncivilized. - -2010-08-05 Andy Estes <aestes@apple.com> - - Reviewed by David Kilzer. - - Rename iOS-related OS and PLATFORM macros. - https://bugs.webkit.org/show_bug.cgi?id=43493 - - Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to - WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to - WTF_PLATFORM_IOS_SIMULATOR. - - * jit/ExecutableAllocator.h: - * jit/JITStubs.cpp: - * profiler/ProfilerServer.mm: - (-[ProfilerServer init]): - * wtf/FastMalloc.cpp: - (WTF::TCMallocStats::): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * wtf/CurrentTime.cpp: * wtf/Platform.h: + * wtf/text/AtomicString.h: + * wtf/text/StringImpl.h: + (WTF::StringImpl::computeHash): + * wtf/text/WTFString.h: * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault): -2010-08-05 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=43464 - - Currently, the global object is being embedded in the JavaScriptCore - bytecode, however since the global object is the same for all opcodes - in a code block, we can have the global object just be a member of the - associated code block. - - Additionally, I added an assert inside of emitOpcode that verifies - that the last generated opcode was of the correct length. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::derefStructures): - (JSC::CodeBlock::markAggregate): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::globalObject): - (JSC::GlobalCodeBlock::GlobalCodeBlock): - (JSC::ProgramCodeBlock::ProgramCodeBlock): - (JSC::EvalCodeBlock::EvalCodeBlock): - (JSC::FunctionCodeBlock::FunctionCodeBlock): - * bytecode/Opcode.h: - (JSC::opcodeLength): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitOpcode): - Added an assert to check that the last generated opcode is the - correct length. - (JSC::BytecodeGenerator::rewindBinaryOp): - Changed the last opcode to op_end since the length will no longer - be correct. - (JSC::BytecodeGenerator::rewindUnaryOp): - Changed the last opcode to op_end since the length will no longer - be correct. - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitGetScopedVar): - (JSC::BytecodeGenerator::emitPutScopedVar): - (JSC::BytecodeGenerator::emitResolveWithBase): - * bytecompiler/BytecodeGenerator.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::resolveGlobal): - (JSC::Interpreter::resolveGlobalDynamic): - (JSC::Interpreter::privateExecute): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_resolve_global_dynamic): - (JSC::JIT::emitSlow_op_resolve_global_dynamic): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - * jit/JITStubs.cpp: - (JSC::cti_op_resolve_global): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - -2010-08-05 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 43185 - Switch RegisterFile over to use PageAllocation - - Remove platform-specific memory allocation code. - - * interpreter/RegisterFile.cpp: - (JSC::RegisterFile::~RegisterFile): - (JSC::RegisterFile::releaseExcessCapacity): - * interpreter/RegisterFile.h: - (JSC::RegisterFile::RegisterFile): - (JSC::RegisterFile::grow): - (JSC::RegisterFile::checkAllocatedOkay): - * wtf/PageAllocation.cpp: - (WTF::PageAllocation::lastError): - * wtf/PageAllocation.h: - (WTF::PageAllocation::allocate): - (WTF::PageAllocation::allocateAt): - (WTF::PageAllocation::allocateAligned): - (WTF::PageAllocation::pageSize): - (WTF::PageAllocation::isPageAligned): - (WTF::PageAllocation::isPowerOfTwo): - * wtf/PageReservation.h: - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::reserve): - (WTF::PageReservation::reserveAt): - -2010-08-05 Michael Saboff <msaboff@apple.com> - - Reviewed by Darin Adler. - - Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array - content aren't properly initialized as part of unshift. +2011-02-23 Fumitoshi Ukai <ukai@chromium.org> - * runtime/JSArray.cpp: - (JSC::JSArray::unshiftCount): - -2010-08-05 Jian Li <jianli@chromium.org> - - Reviewed by David Levin. + Unreviewed build fix for Windows. - Unify blob related feature defines to ENABLE(BLOB). - https://bugs.webkit.org/show_bug.cgi?id=43081 + WebSocket uses insecure random numbers + https://bugs.webkit.org/show_bug.cgi?id=54714 - * Configurations/FeatureDefines.xcconfig: - -2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Rubber-stamped by Xan Lopez. - - Remove GHashTable left-overs. GHashTable is ref-counted, and is - correctly supported by GRefPtr. - - * wtf/gobject/GOwnPtr.h: - -2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> - - Unreviewed. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export WTF::cryptographicallyRandomNumber() - Typo fix that makes distcheck happy. +2011-02-23 Fumitoshi Ukai <ukai@chromium.org> - * GNUmakefile.am: - -2010-08-03 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Oliver Hunt and Beth Dakin. - - https://bugs.webkit.org/show_bug.cgi?id=43461 - Invalid NaN parsing - - * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a - non-standard NaN representation, since our NaN encoding assumes that all - true NaNs have the standard bit pattern. - - * API/JSValueRef.cpp: - (JSValueMakeNumber): Don't allow an API client to accidentally specify - a non-standard NaN either. - -2010-08-04 Gavin Barraclough <barraclough@apple.com> - - Windows build fix part II. + Reviewed by Adam Barth. - * wtf/PageReservation.h: - (WTF::PageReservation::systemReserve): + WebSocket uses insecure random numbers + https://bugs.webkit.org/show_bug.cgi?id=54714 -2010-08-04 Gavin Barraclough <barraclough@apple.com> + * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber() - Windows build fix. +2011-02-22 Adam Barth <abarth@webkit.org> - * wtf/PageReservation.h: - (WTF::PageReservation::systemReserve): + Reviewed by Ojan Vafai. -2010-08-04 Gavin Barraclough <barraclough@apple.com> + Add missing files to JavaScriptCore.gypi + https://bugs.webkit.org/show_bug.cgi?id=55020 - Build fix - add new header to !Mac projects. + gypi files are supposed to list every file under the sun. This patch + adds some missing files and sorts the rest. - * GNUmakefile.am: * JavaScriptCore.gypi: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2010-08-04 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation. - - The PageAllocation class has a number of issues: - * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate - blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in - behaviour. - * In order for PageAllocation to work correctly on WinCE we should be decommitting memory - before deallocating. In order to simplify understanding the expected state at deallocate, - split behaviour out into PageAllocation and PageReservation classes. Require that all - memory be decommitted before calling deallocate on a PageReservation, add asserts to - enforce this. - * add many missing asserts. - * inline more functions. - * remove ability to create sub-PageAllocations from an existing PageAllocations object - - this presented an interface that would allow sub regions to be deallocated, which would - not have provided expected behaviour. - * remove writable/executable arguments to commit, this value can be cached at the point - the memory is reserved. - * remove writable/executable arguments to allocateAligned, protection other than RW is not - supported. - * add missing checks for overflow & failed allocation to mmap path through allocateAligned. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::intializePageSize): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::Allocation::Allocation): - (JSC::ExecutablePool::Allocation::base): - (JSC::ExecutablePool::Allocation::size): - (JSC::ExecutablePool::Allocation::operator!): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::coalesceFreeSpace): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::allocInternal): - * runtime/AlignedMemoryAllocator.h: - (JSC::::allocate): - (JSC::::AlignedMemoryAllocator): - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - * runtime/Collector.h: - * wtf/PageAllocation.cpp: - * wtf/PageAllocation.h: - (WTF::PageAllocation::operator!): - (WTF::PageAllocation::allocate): - (WTF::PageAllocation::allocateAt): - (WTF::PageAllocation::allocateAligned): - (WTF::PageAllocation::deallocate): - (WTF::PageAllocation::pageSize): - (WTF::PageAllocation::systemAllocate): - (WTF::PageAllocation::systemAllocateAt): - (WTF::PageAllocation::systemAllocateAligned): - (WTF::PageAllocation::systemDeallocate): - (WTF::PageAllocation::systemPageSize): - * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h. - (WTF::PageReservation::PageReservation): - (WTF::PageReservation::commit): - (WTF::PageReservation::decommit): - (WTF::PageReservation::reserve): - (WTF::PageReservation::reserveAt): - (WTF::PageReservation::deallocate): - (WTF::PageReservation::systemCommit): - (WTF::PageReservation::systemDecommit): - (WTF::PageReservation::systemReserve): - (WTF::PageReservation::systemReserveAt): - * wtf/Platform.h: - -2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64655. - http://trac.webkit.org/changeset/64655 - https://bugs.webkit.org/show_bug.cgi?id=43496 - - JavaScriptCore references patch seems to have caused - regressions in QT and GTK builds (Requested by nlawrence on - #webkit). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::markAggregate): - * runtime/Collector.cpp: - (JSC::Heap::markConservatively): - * runtime/JSCell.h: - (JSC::JSValue::asCell): - (JSC::MarkStack::append): - * 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::): - (JSC::JSValue::JSValue): - (JSC::JSValue::asCell): - * runtime/MarkStack.h: - * runtime/NativeErrorConstructor.cpp: - * runtime/NativeErrorConstructor.h: - * runtime/Structure.h: - (JSC::Structure::storedPrototype): - -2010-08-04 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - Enable JSVALUE64 for CPU(PPC64). - Basic browsing seems to work. - - * wtf/Platform.h: - -2010-08-04 Nathan Lawrence <nlawrence@apple.com> - - 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-03 Nathan Lawrence <nlawrence@apple.com> +2011-02-22 Sheriff Bot <webkit.review.bot@gmail.com> - Reviewed by Oliver Hunt. + Unreviewed, rolling out r79367. + http://trac.webkit.org/changeset/79367 + https://bugs.webkit.org/show_bug.cgi?id=55012 - Tightened up some get_by_id_chain* code generation - https://bugs.webkit.org/show_bug.cgi?id=40935 - - This is in the style of - https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to - call accessor functions when it was not necessary to directly access - the private variables. - - * jit/JIT.h: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::testPrototype): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2010-08-03 Adam Roben <aroben@apple.com> - - Turn on PLATFORM_STRATEGIES on Windows - - Fixes <http://webkit.org/b/43431>. - - Reviewed by Anders Carlsson. - - * wtf/Platform.h: - -2010-08-04 Gabor Loki <loki@webkit.org> - - Reviewed by Geoffrey Garen. - - Enable JSValue32_64 for GCC on ARM by default - https://bugs.webkit.org/show_bug.cgi?id=43410 - - * wtf/Platform.h: - -2010-08-03 Gavin Barraclough <barraclough@apple.com> - - Speculative windows build fix. - - * wtf/Bitmap.h: - -2010-08-03 Gavin Barraclough <barraclough@apple.com> - - Build fix following r64624. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * wtf/PageAllocation.h: - -2010-08-03 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Gavin Barraclough. - - https://bugs.webkit.org/show_bug.cgi?id=43269 - - Added new allocateAligned methods to PageAllocation. In order to - prevent a regress in performance, the function needs to be inlined. - - Additionally, I ported the symbian block allocator to use - PageAllocation and added a new WTF::Bitmap class to support this. + all layout tests are crashing on Snow Leopard (Requested by + rniwa on #webkit). * GNUmakefile.am: * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/AlignedMemoryAllocator.h: Added. - (JSC::AlignedMemory::deallocate): - (JSC::AlignedMemory::base): - (JSC::AlignedMemory::AlignedMemory): - (JSC::AlignedMemoryAllocator::destroy): - (JSC::AlignedMemoryAllocator::allocate): - (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator): - (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator): - (JSC::AlignedMemoryAllocator::free): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::destroy): - (JSC::Heap::allocateBlock): - (JSC::Heap::freeBlock): - (JSC::Heap::freeBlocks): - (JSC::Heap::allocate): - (JSC::Heap::shrinkBlocks): - (JSC::Heap::markConservatively): - (JSC::Heap::clearMarkBits): - (JSC::Heap::markedCells): - * runtime/Collector.h: + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + * runtime/MarkedBlock.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::freeBlock): + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::shrink): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: (JSC::CollectorHeap::collectorBlock): - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::operator*): - (JSC::LiveObjectIterator::operator++): - (JSC::DeadObjectIterator::operator++): - * wtf/Bitmap.h: Added. - (WTF::Bitmap::get): - (WTF::Bitmap::set): - (WTF::Bitmap::clear): - (WTF::Bitmap::clearAll): - (WTF::Bitmap::advanceToNextFreeBit): - (WTF::Bitmap::count): - (WTF::Bitmap::isEmpty): - (WTF::Bitmap::isFull): - * wtf/PageAllocation.h: - (WTF::PageAllocation::operator UnspecifiedBoolType): - (WTF::PageAllocation::allocateAligned): - (WTF::PageAllocation::reserveAligned): - * wtf/Platform.h: - * wtf/symbian: Removed. - * wtf/symbian/BlockAllocatorSymbian.cpp: Removed. - * wtf/symbian/BlockAllocatorSymbian.h: Removed. - -2010-08-03 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code - was using the wrong "length" value to move array contents when adding - space to the beginning of an array for an unshift() or similar - operation. Instead of using m_vectorLength, the length of the - allocated JSValue array, the code was using m_length, the declared - length of the array. These two values do not need to match. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::increaseVectorPrefixLength): - -2010-08-03 Chao-ying Fu <fu@mips.com> - - Reviewed by Gavin Barraclough. - - Fix following https://bugs.webkit.org/show_bug.cgi?id=43089 - (accidentally inverted a compiler version check). - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - -2010-08-03 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Gavin Barraclough. - - Implement DEFINE_STUB_FUNCTION for WinCE. - https://bugs.webkit.org/show_bug.cgi?id=34953 - - * jit/JITStubs.cpp: - (JSC::): - (JSC::DEFINE_STUB_FUNCTION): - -2010-08-02 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43390 - Do not CRASH if we run out of room for jit code. - - Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated. - The assemblers should pass this through without trying to use it in executableCopy. - Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this. - - Change the JIT to throw an exception if allocation fails. - Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path). - Change YARR JIT to fallback to PCRE - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::executableCopy): - * assembler/LinkBuffer.h: - (JSC::LinkBuffer::allocationSuccessful): - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::executableCopy): - * assembler/X86Assembler.h: - (JSC::X86Assembler::executableCopy): - * bytecode/StructureStubInfo.h: - (JSC::StructureStubInfo::initGetByIdProto): - (JSC::StructureStubInfo::initGetByIdChain): - (JSC::StructureStubInfo::initGetByIdSelfList): - (JSC::StructureStubInfo::initGetByIdProtoList): - (JSC::StructureStubInfo::initPutByIdTransition): - * jit/ExecutableAllocator.cpp: - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::allocInternal): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::JIT::compileGetByIdProto): - (JSC::JIT::compileGetByIdSelfList): - (JSC::JIT::compileGetByIdProtoList): - (JSC::JIT::compileGetByIdChainList): - (JSC::JIT::compileGetByIdChain): - (JSC::JIT::compilePutByIdTransition): - (JSC::JIT::compilePatchGetArrayLength): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::stringGetByValStubGenerator): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - (JSC::setupPolymorphicProtoList): - * jit/JITStubs.h: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::finalize): - * runtime/ExceptionHelpers.cpp: - (JSC::createOutOfMemoryError): - * runtime/ExceptionHelpers.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::compile): + * wtf/CMakeLists.txt: + * wtf/DoublyLinkedList.h: Removed. -2010-08-03 Geoffrey Garen <ggaren@apple.com> +2011-02-22 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. - Fixed a crash seen on the GTK 64bit buildbot. - - When JSArray is allocated for the vptr stealing hack, it's not allocated - in the heap, so the JSArray constructor can't safely call Heap::heap(). - - Since this was subtle enough to confuse smart people, I've changed JSArray - to have an explicit vptr stealing constructor. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - * runtime/JSArray.h: - (JSC::JSArray::): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::storeVPtrs): - -2010-08-03 Alex Milowski <alex@milowski.com> - - Reviewed by Beth Dakin. - - Changed the ENABLE_MATHML value to enable MathML by default. - - * Configurations/FeatureDefines.xcconfig: - -2010-08-03 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Change to keep returned pointer from malloc family functions to - quiet memory leak detect. The pointer is saved in the new m_allocBase - member of the ArrayStorage structure. This fixes the issue found in - https://bugs.webkit.org/show_bug.cgi?id=43229. - - As part of this change, we use m_allocBase when reallocating and - freeing the memory associated with ArrayStorage. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::~JSArray): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::increaseVectorPrefixLength): - * runtime/JSArray.h: - -2010-08-03 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Mark Rowe. - - https://bugs.webkit.org/show_bug.cgi?id=43444 - PLATFORM(CF) is false on Windows in JavaScriptCore - - Moved some PLATFORM(WIN) #defines down into JavaScriptCore. - - * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited - from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h - just #undefined that later. - -2010-08-03 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since - PLATFORM(CF) is not defined on Windows. + Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1) + https://bugs.webkit.org/show_bug.cgi?id=54999 - We'll need to enable the GC activity callback some other way, but this - change should get the build back to normal. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - - * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error - in the future with an explicit error message. - -2010-08-03 Geoffrey Garen <ggaren@apple.com> - - Try to fix Windows build: update .def file. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-08-03 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=41318 - GC should reclaim garbage even when new objects are not being allocated rapidly - - Added a callback in JavaScriptCore that gets triggered after an - allocation causes the heap to reset. This is useful for adding a - timer that will trigger garbage collection after the "last" allocation. - - Also needed was to add lock and unlock methods to JSLock that needed - only a JSGlobalData object versus an ExecState object. + SunSpider reports no change. - * CMakeLists.txt: * GNUmakefile.am: - * JavaScriptCore.exp: * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_put_by_val): - * runtime/Collector.cpp: - (JSC::Heap::Heap): - (JSC::Heap::reset): - (JSC::Heap::setActivityCallback): - * runtime/Collector.h: - * runtime/GCActivityCallback.cpp: Added. - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::operator()): - * runtime/GCActivityCallback.h: Added. - (JSC::GCActivityCallback::~GCActivityCallback): - (JSC::GCActivityCallback::operator()): - (JSC::GCActivityCallback::GCActivityCallback): - (JSC::DefaultGCActivityCallback::create): - * runtime/GCActivityCallbackCF.cpp: Added. - (JSC::DefaultGCActivityCallbackPlatformData::trigger): - (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): - (JSC::DefaultGCActivityCallback::operator()): - * runtime/JSLock.cpp: - (JSC::JSLock::JSLock): - * runtime/JSLock.h: - -2010-08-02 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp - - * wscript: - -2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - - Reviewed by Simon Hausmann. - - [QT] build fix for symbian - https://bugs.webkit.org/show_bug.cgi?id=43234 - - 1) wrong order of passing param's - 2) static_cast complains on symbian so using reinterpret_cast - - No new tests added. Just a build fix for qt symbian - - * wtf/PageAllocation.cpp: - (WTF::PageAllocation::commit): - (WTF::PageAllocation::decommit): - (WTF::PageAllocation::reserve): - -2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Simon Fraser. - - Enabling view modes to all platforms - https://bugs.webkit.org/show_bug.cgi?id=37505 - - Removing ENABLE_WIDGETS_10_SUPPORT flag. - - As view mode media feature is not part of widget 1.0 specification - any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use - of this flag was related to view mode media feature implementation in Qt. - - * wtf/Platform.h: - -2010-07-30 Andy Estes <aestes@apple.com> - - Reviewed by David Kilzer. - - Add Xcode support for compiling WebKit against iOS SDKs. - https://bugs.webkit.org/show_bug.cgi?id=42796 - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - * Configurations/FeatureDefines.xcconfig: - -2010-07-30 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Davin Levin. - - Added a yield() function. - https://bugs.webkit.org/show_bug.cgi?id=42843 - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - (WTF::yield): - * wtf/ThreadingWin.cpp: - (WTF::yield): - * wtf/gtk/ThreadingGtk.cpp: - (WTF::yield): - * wtf/qt/ThreadingQt.cpp: - (WTF::yield): - -2010-07-30 Rafael Antognolli <antognolli@profusion.mobi> - - Reviewed by Antonio Gomes. - - [EFL] Add library version and soname to EFL generated libraries and binary. - https://bugs.webkit.org/show_bug.cgi?id=43212 - - Add version and soname to libjavascriptcore.so and libwtf.so in case of - linking as shared libraries, and version to jsc executable. - - * CMakeLists.txt: - * jsc/CMakeLists.txt: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: So many build systems, so little time. * wtf/CMakeLists.txt: -2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - - Reviewed by Simon Hausmann. - - [QT] build fix for symbian - https://bugs.webkit.org/show_bug.cgi?id=43234 - - * wtf/PageAllocation.h: - (WTF::PageAllocation::PageAllocation): - -2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64313. - http://trac.webkit.org/changeset/64313 - https://bugs.webkit.org/show_bug.cgi?id=43233 - - Some Chromium bots are not happy with it for some unknown - reason. (Requested by dumi on #webkit). - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - * wtf/ThreadingWin.cpp: - * wtf/gtk/ThreadingGtk.cpp: - * wtf/qt/ThreadingQt.cpp: - -2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64302. - http://trac.webkit.org/changeset/64302 - https://bugs.webkit.org/show_bug.cgi?id=43223 - - Assertion is bogus (Requested by olliej on #webkit). - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putShortUnchecked): - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt64Unchecked): - * jit/JITStubs.cpp: - * pcre/pcre_compile.cpp: - (jsRegExpCompile): - * wtf/FastMalloc.cpp: - (WTF::PageHeapAllocator::New): - (WTF::TCMalloc_Central_FreeList::Populate): - * wtf/MD5.cpp: - (WTF::reverseBytes): - (WTF::MD5::addBytes): - (WTF::MD5::checksum): - * wtf/StdLibExtras.h: - * wtf/Vector.h: - (WTF::VectorBuffer::inlineBuffer): - * wtf/qt/StringQt.cpp: - (WebCore::String::String): - -2010-07-29 Michael Saboff <msaboff@apple.com> + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::setPrev): + (JSC::MarkedBlock::setNext): + (JSC::MarkedBlock::prev): + (JSC::MarkedBlock::next): Added linked list data members and accessors. - Reviewed by Gavin Barraclough. + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): + (JSC::MarkedSpace::allocateBlock): Stop using vector, since it doesn't exist anymore. - Changed the handling for removing and adding elements at the front - of an array. The code now keeps a bias that indicates the amount of - JSValue sized holes are prior to the ArrayStorage block. This means - that shift operations are now memmove's of the header part of - the ArrayStorage and unshift operations are similar, but may require a - realloc first to create the space. Similar operations are performed - for special cases of splice and slice. - Also optimized the new Array(size) case so that we don't allocate and - initialize array elements until the JS code starts using elements. - The array growth code is slightly more aggressive for initial growth - based on size growth of any previous array. - - * Configurations/JavaScriptCore.xcconfig: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::~JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::getNewVectorLength): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::increaseVectorPrefixLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::shiftCount): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::subclassData): - (JSC::JSArray::setSubclassData): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::length): - (JSC::JSArray::canGetIndex): - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::arrayStorage): - (JSC::JSArray::setArrayStorage): - (JSC::JSArray::markChildrenDirect): + (JSC::MarkedSpace::freeBlocks): New helper function for updating relevant + data structures when freeing blocks. -2010-07-29 Michael Saboff <msaboff@apple.com> + (JSC::MarkedSpace::allocate): Updated for nextBlock being a pointer and + not a vector index. - Reviewed by Darin Adler. + (JSC::MarkedSpace::shrink): Construct a temporary list of empties and + then free them, to avoid modifying our hash table while iterating it. + This wasn't a concern before because we were using indirect array + indexing, not direct pointer indexing. - Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes. + (JSC::MarkedSpace::reset): Updated for nextBlock being a pointer and + not a vector index. - * runtime/Collector.h: + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::CollectorHeap): Changed data type from vector to linked list. -2010-07-28 Dumitru Daniliuc <dumi@chromium.org> + * wtf/DoublyLinkedList.h: Added. New linked list class. + (WTF::::DoublyLinkedList): + (WTF::::isEmpty): + (WTF::::head): + (WTF::::append): + (WTF::::remove): - Reviewed by David Levin. +2011-02-22 Gavin Barraclough <barraclough@apple.com> - Added a yield() function. - https://bugs.webkit.org/show_bug.cgi?id=42843 + Windows build fix. - * JavaScriptCore.exp: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/Threading.h: - * wtf/ThreadingPthreads.cpp: - (WTF::yield): - * wtf/ThreadingWin.cpp: - (WTF::yield): - * wtf/gtk/ThreadingGtk.cpp: - (WTF::yield): - * wtf/qt/ThreadingQt.cpp: - (WTF::yield): - -2010-07-29 Michael Saboff <msaboff@apple.com> - - Reviewed by Oliver Hunt. - - Fixed issue where RegExp greedy jit code loops when no input is - consumed. Changed the code to only loop if some input was consumed, - but fall through if we successfully match an alternative that - doesn't consume any input. - https://bugs.webkit.org/show_bug.cgi?id=42664 - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - -2010-07-29 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Avoid increasing required alignment of target type warning on ARM - https://bugs.webkit.org/show_bug.cgi?id=38045 - - The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where - sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: - increases required alignment of target type warnings. - Casting the type of [pointer to Type2] object to void* bypasses the - warning. - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::executableCopy): - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::putShortUnchecked): - (JSC::AssemblerBuffer::putIntUnchecked): - (JSC::AssemblerBuffer::putInt64Unchecked): - * jit/JITStubs.cpp: - * pcre/pcre_compile.cpp: - (jsRegExpCompile): - * wtf/FastMalloc.cpp: - (WTF::PageHeapAllocator::New): - (WTF::TCMalloc_Central_FreeList::Populate): - * wtf/MD5.cpp: - (WTF::reverseBytes): - (WTF::MD5::addBytes): - (WTF::MD5::checksum): - * wtf/StdLibExtras.h: - (reinterpret_cast_ptr): - * wtf/Vector.h: - (WTF::VectorBuffer::inlineBuffer): - * wtf/qt/StringQt.cpp: - (WebCore::String::String): - -2010-07-29 Martin Robinson <mrobinson@igalia.com> - - Unreviewed build fix. - - Include a missing header in the source list to fix 'make dist.' - - * GNUmakefile.am: Include missing header. - -2010-07-28 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Darin Adler. - - Bug 43162 - Add support for MADV_FREE to PageAllocation. - - * wtf/PageAllocation.cpp: - (WTF::PageAllocation::commit): - (WTF::PageAllocation::decommit): - -2010-07-27 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Ojan Vafai. - - Add FILE_SYSTEM build flag for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=42915 - - * Configurations/FeatureDefines.xcconfig: - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Temporarily rolling out http://trac.webkit.org/changeset/64177, - this seems to give QT ARM/Win a headache (specifically, looks - like structure layour differs, objects get too large - - "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:" - "error: size of array 'dummyclass_fits_in_cell' is negative"). - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - * runtime/JSArray.cpp: - (JSC::increasedVectorLength): - (JSC::JSArray::JSArray): - (JSC::JSArray::~JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::subclassData): - (JSC::JSArray::setSubclassData): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::length): - (JSC::JSArray::canGetIndex): - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::markChildrenDirect): - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Speculative build fix for Chromium/Win - - * wtf/Platform.h: - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo. - - * wtf/Platform.h: - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O - - * wtf/Platform.h: - -2010-07-27 Michael Saboff <msaboff@apple.com> - - Reviewed by Gavin Barraclough. - - Changed the handling for removing and adding elements at the front - of an array. The code now keeps a bias that indicates the amount of - JSValue sized holes are prior to the ArrayStorage block. This means - that shift operations are now memmove's of the header part of - the ArrayStorage and unshift operations are similar, but may require a - realloc first to create the space. Similar operations are performed - for special cases of splice and slice. - Also optimized the new Array(size) case so that we don't allocate and - initialize array elements until the JS code starts using elements. - The array growth code is slightly more aggressive for initial growth - based on size growth of any previous array. - - * Configurations/JavaScriptCore.xcconfig: - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): - (JSC::JSArray::~JSArray): - (JSC::JSArray::getOwnPropertySlot): - (JSC::JSArray::getOwnPropertyDescriptor): - (JSC::JSArray::put): - (JSC::JSArray::putSlowCase): - (JSC::JSArray::deleteProperty): - (JSC::JSArray::getOwnPropertyNames): - (JSC::JSArray::getNewVectorLength): - (JSC::JSArray::increaseVectorLength): - (JSC::JSArray::increaseVectorPrefixLength): - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::shiftCount): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sort): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToRegisters): - (JSC::JSArray::compactForSorting): - (JSC::JSArray::subclassData): - (JSC::JSArray::setSubclassData): - (JSC::JSArray::checkConsistency): - * runtime/JSArray.h: - (JSC::JSArray::length): - (JSC::JSArray::canGetIndex): - (JSC::JSArray::getIndex): - (JSC::JSArray::setIndex): - (JSC::JSArray::uncheckedSetIndex): - (JSC::JSArray::arrayStorage): - (JSC::JSArray::setArrayStorage): - (JSC::JSArray::markChildrenDirect): - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43089 - Cleanup JIT related switched in Platform.h - - The code the enable to JIT checks every permutation of platform & OS individually, but - now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should - be cleaner to just enable by default on these platforms, and explicitly disable on configs - that don't aren't supported. - - Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this - confusing since enabling this "optimization" would be possible, but would be a regression - on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler - technologies applicable to all platforms, and make a more optional behaviour like this a - "USE". - - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): - * jit/JIT.h: - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_mod): - (JSC::JIT::emitSlow_op_mod): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * wtf/Platform.h: - -2010-07-27 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on - https://bugs.webkit.org/show_bug.cgi?id=43084 - - This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no - change in behavior, that's all controlled by ENABLE() macros that are currently off. - - * wtf/Platform.h: - -2010-07-23 Helder Correia <heldercorreia@codeaurora.org> - - Reviewed by Darin Adler. - - Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are - failing. For canvas image data manipulation, the values passed should - be truncated and wrapped. Also fix the canvas-ImageData-behaviour test - to expect wrapping rather than clamping, and add some new checkings. - https://bugs.webkit.org/show_bug.cgi?id=40272 - - * runtime/JSByteArray.h: - (JSC::JSByteArray::setIndex): - (JSC::JSByteArray::JSByteArray): - -2010-07-27 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 42621 - Add a bump allocator for the YARR interpreter - - The regex engine requires lifo allocation, however currently uses the general purpose - malloc/free memory allocation. A simple bump pointer allocator should provide a lower - overhead allocation solution. - - When using YARR interpreter, 15% progression on v8-regex. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * runtime/JSGlobalData.h: - * runtime/RegExp.cpp: - (JSC::RegExp::compile): - * wtf/BumpPointerAllocator.h: Added. - (WTF::BumpPointerPool::ensureCapacity): - (WTF::BumpPointerPool::alloc): - (WTF::BumpPointerPool::dealloc): - (WTF::BumpPointerPool::operator new): - (WTF::BumpPointerPool::BumpPointerPool): - (WTF::BumpPointerPool::create): - (WTF::BumpPointerPool::shrink): - (WTF::BumpPointerPool::destroy): - (WTF::BumpPointerPool::ensureCapacityCrossPool): - (WTF::BumpPointerPool::deallocCrossPool): - (WTF::BumpPointerAllocator::BumpPointerAllocator): - (WTF::BumpPointerAllocator::~BumpPointerAllocator): - (WTF::BumpPointerAllocator::startAllocator): - (WTF::BumpPointerAllocator::stopAllocator): - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::Interpreter::allocDisjunctionContext): - (JSC::Yarr::Interpreter::freeDisjunctionContext): - (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): - (JSC::Yarr::Interpreter::interpret): - (JSC::Yarr::Interpreter::Interpreter): - (JSC::Yarr::ByteCompiler::compile): - (JSC::Yarr::byteCompileRegex): - * yarr/RegexInterpreter.h: - (JSC::Yarr::BytecodePattern::BytecodePattern): - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Windows build fix from Chromium/GTK build fix! - - * wtf/PageAllocation.cpp: - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Chromium/GTK build fix - - * wtf/PageAllocation.cpp: - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Build fix for !Mac platforms. - - * Android.mk: - * CMakeLists.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43009 - Abstract out page allocation from executable allocators - - It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. - - In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. - I think this will match current behaviour for the next client we will want to port across (RegisterFile & - Collector). - - * CMakeListsEfl.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::isValid): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/ExecutableAllocatorPosix.cpp: Removed. - * jit/ExecutableAllocatorSymbian.cpp: Removed. - * jit/ExecutableAllocatorWin.cpp: Removed. - * wscript: - * wtf/PageAllocator.cpp: Added. - (WTF::protection): - (WTF::PageAllocation::commit): - (WTF::PageAllocation::decommit): - (WTF::PageAllocator::allocate): - (WTF::PageAllocator::reserve): - (WTF::PageAllocator::deallocate): - (WTF::PageAllocator::pagesize): - * wtf/PageAllocator.h: Added. - (WTF::PageAllocation::PageAllocation): - (WTF::PageAllocation::base): - (WTF::PageAllocation::size): - (WTF::PageAllocation::chunk): - (WTF::PageAllocation::operator!): - (WTF::PageAllocator::): - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry! - - * CMakeListsEfl.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::reprotectRegion): - (JSC::ExecutableAllocator::cacheFlush): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/ExecutableAllocatorPosix.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::isValid): - * jit/ExecutableAllocatorSymbian.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::isValid): - * jit/ExecutableAllocatorWin.cpp: Added. - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::isValid): - * wscript: - * wtf/PageAllocation.cpp: Removed. - * wtf/PageAllocation.h: Removed. - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - Speculative !debug build fix II. +2011-02-22 Gavin Barraclough <barraclough@apple.com> - * wtf/PageAllocation.h: - (WTF::PageAllocation::PageAllocation): - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Speculative !debug build fix. - - * wtf/PageAllocation.h: - (WTF::PageAllocation::PageAllocation): - -2010-07-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43009 - Abstract out page allocation from executable allocators - - It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. - - In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. - I think this will match current behaviour for the next client we will want to port across (RegisterFile & - Collector). - - * CMakeListsEfl.txt: - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::intializePageSize): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - (JSC::ExecutableAllocator::isValid): - * jit/ExecutableAllocator.h: - (JSC::ExecutablePool::ExecutablePool): - (JSC::ExecutablePool::poolAllocate): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::release): - (JSC::FixedVMPoolAllocator::reuse): - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::FixedVMPoolAllocator::isWithinVMPool): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/ExecutableAllocatorPosix.cpp: Removed. - * jit/ExecutableAllocatorSymbian.cpp: Removed. - * jit/ExecutableAllocatorWin.cpp: Removed. - * wscript: - * wtf/PageAllocator.cpp: Added. - (WTF::protection): - (WTF::PageAllocation::commit): - (WTF::PageAllocation::decommit): - (WTF::PageAllocator::allocate): - (WTF::PageAllocator::reserve): - (WTF::PageAllocator::deallocate): - (WTF::PageAllocator::pagesize): - * wtf/PageAllocator.h: Added. - (WTF::PageAllocation::PageAllocation): - (WTF::PageAllocation::base): - (WTF::PageAllocation::size): - (WTF::PageAllocation::chunk): - (WTF::PageAllocation::operator!): - (WTF::PageAllocator::): - -2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() - - This ensures that long-running JavaScript (for example due to a modal alert() dialog), - will not trigger a deferred load after only 500ms (the default tokenizer delay) while - still giving a reasonable timeout (10 seconds) to prevent deadlock. - - https://bugs.webkit.org/show_bug.cgi?id=29381 - - * runtime/TimeoutChecker.h: Add getter for the timeout interval - -2010-07-25 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Kent Tamura. - - [WINCE] Buildfix for JSC in release mode - https://bugs.webkit.org/show_bug.cgi?id=42934 - - * jsc.cpp: Don't use __try on WinCE. - -2010-07-24 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. - - [MSVC] Ensure 4 byte alignment on ARM - https://bugs.webkit.org/show_bug.cgi?id=42935 - - * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame. - -2010-07-24 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. - - [WINCE] Cleanup defines in Platform.h - https://bugs.webkit.org/show_bug.cgi?id=42933 - - * wtf/Platform.h: - -2010-07-23 Rafael Antognolli <antognolli@profusion.mobi> - - Reviewed by Antonio Gomes. - - [EFL] Cleanup glib support (make it optional) - https://bugs.webkit.org/show_bug.cgi?id=42480 - - Remove gobject/GRefPtr.cpp if not using soup/glib. - - * wtf/CMakeListsEfl.txt: - -2010-07-23 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Adam Roben. - - [WINCE] Implement TCSpinLock. - https://bugs.webkit.org/show_bug.cgi?id=41792 - - Implement the SpinLock with InterlockedExchange from the Windows API. - - * wtf/TCSpinLock.h: - (TCMalloc_SpinLock::Lock): - (TCMalloc_SpinLock::Unlock): - (TCMalloc_SpinLock::IsHeld): - (TCMalloc_SpinLock::Init): - (TCMalloc_SlowLock): - -2010-07-22 Csaba Osztrogonác <ossy@webkit.org> - - Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build. - - * jit/JITStubs.cpp: - * jit/JITStubs.h: - -2010-07-22 Gavin Barraclough <barraclough@apple.com> - - Eeeep! r63947 hosed all non-x86 builds! + Reviewed by Sam Weinig. - * jit/JITStubs.h: + Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table -2010-07-22 Gavin Barraclough <barraclough@apple.com> + The Structure class keeps a table of transitions to derived Structure types. Since + this table commonly contains a single entry we employ an optimization where instead + of holding a map, we may hold a pointer directly to a single instance of the mapped + type. We use an additional bit of data to flag whether the pointer is currently + pointing to a table of transitions, or a singleton transition. Previously we had + commonly used a pattern of storing data in the low bits of pointers, but had moved + away from this since it causes false leaks to be reported by the leaks tool. However + in this case, the entries in the map are weak links - this pointer will never be + responsible for keeping an object alive. As such we can use this approach provided + that the bit is set when a table is not in use (otherwise the table would appear to + be leaked). - Reviewed by Oliver Hunt. + Additionally, the transition table currently allows two entries to exist for a given + key - one specialized to a particular value, and one not specialized. This is + unnecessary, wasteful, and a little inconsistent. (If you create an entry for a + specialized value, then a non-specialized entry, both will exist. If you create an + entry for a non-specialized value, then try to create a specialized entry, only a + non-specialized form will be allowed.) - Bug 42818 - [Qt] REGRESSION(63348): jsc is broken - Speculative fix, need fastcall conventions on Qt/Win. + This shows a small progression on v8. - * jit/JITStubs.cpp: - * jit/JITStubs.h: + * JavaScriptCore.exp: + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + * runtime/Structure.cpp: + (JSC::StructureTransitionTable::contains): + (JSC::StructureTransitionTable::get): + (JSC::StructureTransitionTable::remove): + (JSC::StructureTransitionTable::add): + (JSC::Structure::dumpStatistics): + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + * runtime/Structure.h: + (JSC::Structure::get): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTable::Hash::hash): + (JSC::StructureTransitionTable::Hash::equal): + (JSC::StructureTransitionTable::HashTraits::emptyValue): + (JSC::StructureTransitionTable::HashTraits::constructDeletedValue): + (JSC::StructureTransitionTable::HashTraits::isDeletedValue): + (JSC::StructureTransitionTable::StructureTransitionTable): + (JSC::StructureTransitionTable::~StructureTransitionTable): + (JSC::StructureTransitionTable::isUsingSingleSlot): + (JSC::StructureTransitionTable::map): + (JSC::StructureTransitionTable::setMap): + (JSC::StructureTransitionTable::singleTransition): + (JSC::StructureTransitionTable::setSingleTransition): + +2011-02-22 Andras Becsi <abecsi@webkit.org> -2010-07-22 Oliver Hunt <oliver@apple.com> + Reviewed by Laszlo Gombos. - Reviewed by Gavin Barraclough. + [Qt] Redesign the build system + https://bugs.webkit.org/show_bug.cgi?id=51339 - Do more constant folding - https://bugs.webkit.org/show_bug.cgi?id=42867 + Part 2. - Constant fold a few more operations. SunSpider says this is - a win but I suspect that's just code motion at play. + Build WebCore as a static library, compile the WebKit API and WebKit2 API + in a final step and link to WebKit2, WebCore and JSC libraries to fix + linking issues resulting from stripped away symbols. - * parser/ASTBuilder.h: - (JSC::ASTBuilder::makeModNode): - (JSC::ASTBuilder::makeURightShiftNode): - (JSC::ASTBuilder::makeBitOrNode): - (JSC::ASTBuilder::makeBitAndNode): - (JSC::ASTBuilder::makeBitXOrNode): - (JSC::ASTBuilder::makeBinaryNode): + * JavaScriptCore.pri: Remove the workaround. -2010-07-22 Kent Hansen <kent.hansen@nokia.com> +2011-02-21 Adam Roben <aroben@apple.com> - Reviewed by Kent Tamura. + Fix linker warning on Windows - Error properties of the Global Object are missing the DontEnum attribute - https://bugs.webkit.org/show_bug.cgi?id=28771 + r79135 tried to export JSObject::s_info by adding it to JavaScriptCore.def. This is the + obvious way (since it's how we export functions), but unfortunately it doesn't work correct. + r79222 made us export it the right way (using the JS_EXPORTDATA macro), but forgot to remove + it from JavaScriptCore.def. This caused us to get linker warnings about exporting the symbol + multiple times. - Add the attributes to become spec compliant. + Rubber-stamped by Anders Carlsson. - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSObject::s_info. -2010-07-20 Steve Falkenburg <sfalken@apple.com> +2011-02-21 Brian Weinstein <bweinstein@apple.com> Reviewed by Adam Roben. - WebKit on Windows should build optionally with an unversioned ICU DLL - https://bugs.webkit.org/show_bug.cgi?id=42722 - <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU - - Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh. - Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API - should be namespaced with the current ICU version number. Proper value is determined - by checking for the presence of libicuuc.lib, the unversioned copy of ICU. - - To get the proper value for U_DISABLE_RENAMING into all source files, we force - the include of ICUVersion.h (our generated header) via the compiler options. - - Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib) - we copy the ICU lib to an intermediate location under obj with a common name. This - allows us to link properly with either without adding a new build configuration. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - Copy ICU libs into a common location with a common name. - Add additional library search path to pick up icu lib. - Change ICU library filename specified to linker. - Add forced include of ICUVersion.h. - * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h - * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h. - * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: - Copy ICU libs into a common location with a common name. - Add additional library search path to pick up icu lib. - Change ICU library filename specified to linker. - Add forced include of ICUVersion.h. - * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: - Copy ICU libs into a common location with a common name. - Add additional library search path to pick up icu lib. - Change ICU library filename specified to linker. - Add forced include of ICUVersion.h. - -2010-07-20 Steve Falkenburg <sfalken@apple.com> - - Re-save vsprops files after no-op edits in Visual Studio - to fix manual edit issues. - -2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - - Reviewed by Steve Block. - - Need to be able to configure Geolocation policy regarding user permissions - https://bugs.webkit.org/show_bug.cgi?id=42068 - - If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy - by default + WebResourceCacheManager should be responsible for managing the CFURLCache as well + as the WebCore memory cache. + https://bugs.webkit.org/show_bug.cgi?id=54886 + Part of <rdar://problem/8971738> - * wtf/Platform.h: - -2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63742. - http://trac.webkit.org/changeset/63742 - https://bugs.webkit.org/show_bug.cgi?id=42641 - - Broke Leopard Intel build. (Requested by bbandix on #webkit). - - * wtf/Platform.h: - -2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> - - Reviewed by Steve Block. - - Need to be able to configure Geolocation policy regarding user permissions - https://bugs.webkit.org/show_bug.cgi?id=42068 - - If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy - by default + Add a new use flag for using the CFURLCache. * wtf/Platform.h: - -2010-07-19 Dirk Schulze <krit@webkit.org> - - Reviewed by Nikolas Zimmermann. - - SVG CleanUp of SVGPathData parsing - https://bugs.webkit.org/show_bug.cgi?id=41410 - - Added piOverTwo to MathExtras. - - * wtf/MathExtras.h: - -2010-07-19 Mike Moretti <mike.moretti@nokia.com> - - Reviewed by Laszlo Gombos. - - [Symbian] Build fix after r63404. - - Implement isValid() function for the Symbian executable allocator. - - * jit/ExecutableAllocatorSymbian.cpp: - (JSC::ExecutableAllocator::isValid): - -2010-07-19 Chris Marrin <cmarrin@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=42118 - Disable WebGL on Leopard for now. - - LayoutTests fail on some graphics hardware on Leopard because one of the features we use, - GL_ARB_framebuffer_object, is not universally available in Leopard like it is in - SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a - software OpenGL driver on machines without this support. - - * Configurations/FeatureDefines.xcconfig: - -2010-07-16 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Use OwnPtr for CodeBlock objects - https://bugs.webkit.org/show_bug.cgi?id=42490 - - * runtime/Executable.cpp: - (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline. - Eliminated the code that used to initialize the raw pointer since it's now - an OwnPtr. - (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here. - (JSC::ProgramExecutable::ProgramExecutable): Ditto. - (JSC::ProgramExecutable::~ProgramExecutable): Ditto. - (JSC::FunctionExecutable::FunctionExecutable): Ditto. - (JSC::FunctionExecutable::~FunctionExecutable): Ditto. - (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get. - (JSC::ProgramExecutable::compileInternal): Ditto. - (JSC::FunctionExecutable::compileForCallInternal): Ditto. - (JSC::FunctionExecutable::compileForConstructInternal): Ditto. - (JSC::FunctionExecutable::recompile): Use clear instead of delete followed - by assignment of 0. - - * runtime/Executable.h: Moved constructors to the cpp file and changed - raw pointers to OwnPtr. - -2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi> - - Reviewed by Kenneth Rohde Christiansen. - - [EFL] Fix build on 64-bit systems. According to - JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which - needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build - system. - https://bugs.webkit.org/show_bug.cgi?id=42559 - - * CMakeListsEfl.txt: add missing file for x86_64. - -2010-07-16 Leandro Pereira <leandro@profusion.mobi> - - [EFL] Unreviewed build system cleanup. - - Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from - root CMakeLists.txt to the platform CMakeLists.txt. - - * CMakeLists.txt: - * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp. - -2010-07-16 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - ES5 allows use of reserved words as IdentifierName - https://bugs.webkit.org/show_bug.cgi?id=42471 - - Modify the lexer to allow us to avoid identifying reserved - words in those contexts where they are valid identifiers, and - we know it's safe. Additionally tag the reserved word tokens - so we can easily identify them in those cases where we can't - guarantee that we've skipped reserved word identification. - * parser/JSParser.cpp: - (JSC::JSParser::next): - (JSC::JSParser::parseProperty): - (JSC::JSParser::parseMemberExpression): - * parser/JSParser.h: - (JSC::): - * parser/Lexer.cpp: - (JSC::Lexer::lex): - * parser/Lexer.h: - (JSC::Lexer::): - -2010-07-16 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - clang++ build fixes for JavaScriptCore and WebCore - https://bugs.webkit.org/show_bug.cgi?id=42478 - - * runtime/RegExpKey.h: - (JSC::operator==): - Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL. - -2010-07-16 Anders Carlsson <andersca@apple.com> - - Reviewed by David Levin. - - Really add WARN_UNUSED_RESULT to leakRef - https://bugs.webkit.org/show_bug.cgi?id=42464 - - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::): - (WTF::NonNullPassRefPtr::): - Put the WARN_UNUSED_RESULT attribute at the right place. - - * wtf/RetainPtr.h: - (WTF::RetainPtr::releaseRef): - Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need - to be fixed first. - -2010-07-15 Victor Wang <victorw@chromium.org> - - Reviewed by David Levin. - - [Chromium] Disable c4291 for chromium windows multi dll build. - - https://bugs.webkit.org/show_bug.cgi?id=42177 - - * JavaScriptCore.gyp/JavaScriptCore.gyp: - -2010-07-15 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Maciej Stachowiak. - - Crash entering mail.yahoo.com - https://bugs.webkit.org/show_bug.cgi?id=42394 - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the - identifier we're resolving is not a local variable, registerFor returns - NULL. - - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I - noticed this while working on it: No need to NULL-check returnNode, - since an early return has already done so. - -2010-07-15 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Oliver Hunt. - - [GTK] Simplify the distribution step - https://bugs.webkit.org/show_bug.cgi?id=42414 - - * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead - of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list. - Refer to create_hash_table and create_regexp_tables directly, as is the - behavior with other code generation scripts. - -2010-07-15 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Fix dumping of op_put_by_id. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printPutByIdOp): - -2010-07-15 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Darin Adler. - - Refactoring some parts of the lexer - https://bugs.webkit.org/show_bug.cgi?id=41845 - - This patch is a precursor of refactoring the identifier - parsing, which currently slows down the lexer, and not - ready for landing. This patch contains those sources, - which does not slow down the lexer (mainly style changes). - - SunSpider: no change (529.4ms to 528.7ms) - --parse-only: no change (31.0ms to 31.2ms) - - * parser/Lexer.cpp: - (JSC::isIdentStart): using typesOfASCIICharacters to determine - whether the current character is in identifier start - (JSC::isIdentPart): using typesOfASCIICharacters to determine - whether the current character is in identifier part - (JSC::Lexer::parseString): style fix - (JSC::Lexer::lex): removing the else after the main which - which reduces code duplication - -2010-07-15 Mark Rowe <mrowe@apple.com> - - Update the sorting in the Xcode project files. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-07-14 Oliver Hunt <oliver@apple.com> +2011-02-21 Xan Lopez <xlopez@igalia.com> Reviewed by Gavin Barraclough. - Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails - https://bugs.webkit.org/show_bug.cgi?id=42310 - - Add some null checks to deal with the Fixed VM allocator failing - to get the requested executable region, delay the creation of the - JITStubs in JSGlobalData until after we know whether we're using - the JIT. + Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp + https://bugs.webkit.org/show_bug.cgi?id=54901 - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::ExecutableAllocator): - (JSC::ExecutableAllocator::poolForSize): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::alloc): - (JSC::FixedVMPoolAllocator::free): - (JSC::FixedVMPoolAllocator::isValid): - (JSC::ExecutableAllocator::isValid): - (JSC::ExecutablePool::systemAlloc): - (JSC::ExecutablePool::systemRelease): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutableAllocator::isValid): - * jit/ExecutableAllocatorWin.cpp: - (JSC::ExecutableAllocator::isValid): - * jit/JIT.cpp: - (JSC::JIT::linkCall): - (JSC::JIT::linkConstruct): - * jit/JIT.h: - (JSC::JIT::compileCTIMachineTrampolines): - (JSC::JIT::compileCTINativeCall): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_mod): - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emit_op_mod): - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): + * jit/JIT.h: swap actual and expected values in message, they were + reversed. * jit/JITCall32_64.cpp: - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): - (JSC::JITThunks::tryCacheGetByID): - (JSC::JITThunks::hostFunctionStub): - * jit/ThunkGenerators.cpp: - (JSC::charCodeAtThunkGenerator): - (JSC::charAtThunkGenerator): - (JSC::fromCharCodeThunkGenerator): - (JSC::sqrtThunkGenerator): - (JSC::powThunkGenerator): - * runtime/Executable.h: - (JSC::NativeExecutable::create): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::getHostFunction): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::getCTIStub): - * yarr/RegexJIT.cpp: - (JSC::Yarr::jitCompileRegex): - -2010-07-14 Gavin Barraclough <barraclough@apple.com> - - Speculative Qt/Windows build fix. - - * jit/JITStubs.h: - -2010-07-14 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - https://bugs.webkit.org/show_bug.cgi?id=42280 - JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it! - - * jit/JIT.h: - * jit/JITInlineMethods.h: - (JSC::JIT::restoreArgumentReferenceForTrampoline): - * jit/JITStubs.cpp: - * jit/JITStubs.h: - * wtf/Platform.h: - -2010-07-14 Oliver Hunt <oliver@apple.com> - - RS=Geoff Garen. - - Guard the CF path of interpreter vs. jit selection with PLATFORM(CF) - - This allows the code to work on windows as well. Also unifies the - environment variable with the preference name. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - -2010-07-14 Oliver Hunt <oliver@apple.com> - - Reviewed by Don Melton. - - Crash when trying to enable JIT and Interpreter in a single build. - - CFPreferences code added at the last minute failed to account for - the preference not being present and then attempted to CFRelease - a null value. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - -2010-07-14 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Darin Adler. - - Change indentations in the lexer - https://bugs.webkit.org/show_bug.cgi?id=41845 - - This patch fixes an old, indentation error comes from kjs, - as webkit has a different style rule for switches, and change - the indentation of the main switch, which is a temporary - style error. This change makes easier to see the behavioural - changes in the follow-up patch. - - No behavioural changes. - - * parser/Lexer.cpp: - (JSC::singleEscape): - (JSC::Lexer::lex): - -2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63262. - http://trac.webkit.org/changeset/63262 - https://bugs.webkit.org/show_bug.cgi?id=42229 - - broke Windows compile (Requested by bweinstein on #webkit). - - * API/tests/testapi.c: - (assertEqualsAsCharactersPtr): - (main): - * testapi.pro: Removed. - -2010-07-13 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - ES5 requires BOMs to be treated as whitespace - https://bugs.webkit.org/show_bug.cgi?id=42218 - - Add BOM character to the Lexer's definition of whitespace, - and remove the logic that dealt with stripping BOMs and - caching the cleaned string. - - * parser/Lexer.h: - (JSC::Lexer::isWhiteSpace): - * parser/SourceProvider.h: - (JSC::UStringSourceProvider::create): - (JSC::UStringSourceProvider::UStringSourceProvider): - * wtf/text/StringImpl.h: - -2010-07-13 Andreas Kling <andreas.kling@nokia.com> - - Reviewed by Darin Adler. - - Avoid slow-path for put() in Array.splice() - https://bugs.webkit.org/show_bug.cgi?id=41920 - - Defer creation of the returned array until its final size is known - to avoid growing it while adding elements. - - * runtime/JSArray.cpp: - (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old) - and CreateCompact (which should only be used when constructing arrays whose - size and contents are known at the time of creation.) - (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact - initialization mode. (Only applies to non-empty arrays.) - (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone) - * runtime/JSArray.h: - (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact - arrays. Does no bounds or other sanity checking. - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray. - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor. - * runtime/JSGlobalObject.h: - (JSC::constructEmptyArray): Pass CreateInitialized to ctor. - * runtime/RegExpConstructor.cpp: - (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor. - -2010-07-13 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 42207 - Clean up interface to compile executables, always check for exceptions - - Presently interface to compile executable is inconsistent between eval/program and - function code, and is error prone in allowing a caller to byte compile without JIT - compiling an executable (we rely on all executables with codeblocks having JIT code). - Unify on an interface where all compilation is performed by a single compile (with - ForCall|ForConstruct variants) method, and make all clients check for errors. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * parser/Parser.h: - (JSC::Parser::isFunctionBodyNode): - (JSC::Parser::parse): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/ExceptionHelpers.cpp: - (JSC::createStackOverflowError): - * runtime/ExceptionHelpers.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::compileInternal): - (JSC::ProgramExecutable::checkSyntax): - (JSC::ProgramExecutable::compileInternal): - (JSC::FunctionExecutable::compileForCallInternal): - (JSC::FunctionExecutable::compileForConstructInternal): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - (JSC::FunctionExecutable::fromGlobalCode): - * runtime/Executable.h: - (JSC::EvalExecutable::compile): - (JSC::EvalExecutable::generatedBytecode): - (JSC::EvalExecutable::generatedJITCode): - (JSC::ProgramExecutable::compile): - (JSC::ProgramExecutable::generatedBytecode): - (JSC::ProgramExecutable::generatedJITCode): - (JSC::FunctionExecutable::generatedBytecode): - (JSC::FunctionExecutable::compileForCall): - (JSC::FunctionExecutable::compileForConstruct): - (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): - * runtime/JSActivation.cpp: - (JSC::JSActivation::argumentsGetter): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::canUseJIT): - -2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - - Reviewed by Oliver Hunt. - - testapi.c depends on the Core Foundation. - https://bugs.webkit.org/show_bug.cgi?id=40058 - - Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it - to compile in Qt environments. - - All tests should work except for the JSStringCreateWithCharacters() function, - because its tests depend on Core Foundation specific functions. - - * API/tests/testapi.c: - (testJSStringRefCF): moved CoreFoundation specific tests to this function. - (main): The moves plus some minor tweaks. - * testapi.pro: Added. - -2010-07-13 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 42182 - Change how numeric compare functions are detected - - There are three problems with the current mechanism: - * It requires that a function executable be bytecode compiled without - being JIT generated (in order to copy the bytecode from the numeric - compare function). This is a problem since we have an invariant when - running with the JIT that functions are never bytecode compiled without - also being JIT generated (after checking the codeblock we assume the - function has JIT code). To help maintain this invariant - * This implementation will prevent us from experimenting with alternate - compilation paths which do not compile via bytecode. - * It doesn't work. Functions passing more than two arguments will match - if they are comparing their last two arguments, not the first two. - Generally the mapping back from bytecode to semantics may be more - complex then initially expected. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::setIsNumericCompareFunction): - (JSC::BytecodeGenerator::argumentNumberFor): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::BlockNode::singleStatement): - (JSC::FunctionBodyNode::emitBytecode): - * parser/Nodes.h: - (JSC::ExpressionNode::isSubtract): - (JSC::BinaryOpNode::lhs): - (JSC::BinaryOpNode::rhs): - (JSC::SubNode::isSubtract): - (JSC::ReturnNode::value): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - -2010-07-12 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*) - https://bugs.webkit.org/show_bug.cgi?id=41763 - - There are two parts to this patch, the first is to fix the actual - problem. When calling copyStringWithoutBOMs on a string we know - to contain BOMs we return a value indicating that there are no - BOMs. - - The second part of this fix is simply to harden the path that - led to a crash when parsing failed. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - Harden compilation stubs against parser failure. - * parser/Lexer.cpp: - (JSC::Lexer::sourceCode): - Add assertions to ensure that subranges into a source provider - are always actually braces. Hopefully this should catch similar - failures in future. These assertions fire on existing tests - without this fix. - * runtime/Executable.h: - (JSC::FunctionExecutable::tryJitCodeForCall): - (JSC::FunctionExecutable::tryJitCodeForConstruct): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::copyStringWithoutBOMs): - Make copyStringWithBOMs do the right thing. - -2010-07-13 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Fix the constant encoding in data transfer instructions on ARM - https://bugs.webkit.org/show_bug.cgi?id=42166 - - The getImm function is designed to produce modified immediate constant - for data processing instructions. It should not be used to encode - any constant for data transfer. In the current situation there is no - way to use any immediate constant for data transfer. So, the moveImm - function is the desired method to pass the offset value to the data - transfer instructions. - - Reported by Jacob Bramley. - - * assembler/ARMAssembler.cpp: - (JSC::ARMAssembler::dataTransfer32): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::call32): - -2010-07-09 Darin Adler <darin@apple.com> - - Reviewed by Geoffrey Garen. - - String to number coercion is not spec compliant - https://bugs.webkit.org/show_bug.cgi?id=31349 - - ToNumber should ignore NBSP (\u00a0) - https://bugs.webkit.org/show_bug.cgi?id=25490 - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseIntOverflow): Added a version that works on UChar. - * runtime/JSGlobalObjectFunctions.h: Ditto. - - * runtime/UString.cpp: - (JSC::isInfinity): Added helper functions. - (JSC::UString::toDouble): Use isStrWhiteSpace instead of - isSASCIISpace to define what we should skip. Got rid of the - code that used CString and UTF8String, instead processing the - UChar of the string directly, except for when we call strtod. - For strtod, use our own home-grown conversion function that - does not try to do any UTF-16 processing. Tidied up the logic - a bit as well. - -2010-07-12 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] make dist is broken because of missing headers and other miscellaneous reasons - https://bugs.webkit.org/show_bug.cgi?id=42107 - - * GNUmakefile.am: Add missing header to the sources list. - -2010-07-12 Adam Roben <aroben@apple.com> - - Stop generating stripped symbols for Release builds - - It turns out we can strip the symbols after-the-fact using PDBCopy. - - Fixes <http://webkit.org/b/42085>. - - Reviewed by Steve Falkenburg. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - Removed the pre-link event, which just created the public\sym - directory. - -2010-07-12 Anders Carlsson <andersca@apple.com> - - Reviewed by Dan Bernstein. - - Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions - https://bugs.webkit.org/show_bug.cgi?id=42086 - - * wtf/OwnPtr.h: - * wtf/PassOwnPtr.h: - * wtf/PassRefPtr.h: - (WTF::PassRefPtr::releaseRef): - (WTF::NonNullPassRefPtr::leakRef): - (WTF::NonNullPassRefPtr::releaseRef): - * wtf/RetainPtr.h: - (WTF::RetainPtr::releaseRef): - -2010-07-10 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled - https://bugs.webkit.org/show_bug.cgi?id=42039 - - Separate the existence of computed goto support in the compiler - from whether or not we are using the interpreter. All the current - HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like - the option of using it elsewhere. The interpreter now uses - ENABLE(COMPUTED_GOTO_INTERPRETER) - - * bytecode/Instruction.h: - (JSC::Instruction::Instruction): - * bytecode/Opcode.h: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::isOpcode): - (JSC::Interpreter::privateExecute): - * interpreter/Interpreter.h: - (JSC::Interpreter::getOpcode): - (JSC::Interpreter::getOpcodeID): - * wtf/Platform.h: - -2010-07-10 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Remove switches from inner expression loops in the parser - https://bugs.webkit.org/show_bug.cgi?id=42035 - - Use bitmasks and flags on the token types to identify unary and - binary operators, rather than switching on the token type to - identify them. - - * parser/JSParser.cpp: - (JSC::isUnaryOp): - (JSC::JSParser::isBinaryOperator): - * parser/JSParser.h: - (JSC::): - -2010-07-09 Leon Clarke <leonclarke@google.com> - - Reviewed by Adam Barth. - - add support for link prefetching - https://bugs.webkit.org/show_bug.cgi?id=3652 - - * Configurations/FeatureDefines.xcconfig: - -2010-07-09 Oliver Hunt <oliver@apple.com> - - Reviewed by Darin Adler. - - Tidy up lexer token ids - https://bugs.webkit.org/show_bug.cgi?id=42014 - - Stop using character literals to identify single character tokens - and instead use symbolic names for all tokens. - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::makeBinaryNode): - * parser/JSParser.cpp: - (JSC::JSParser::consume): - (JSC::JSParser::match): - (JSC::JSParser::autoSemiColon): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::allowAutomaticSemicolon): - (JSC::JSParser::parseDoWhileStatement): - (JSC::JSParser::parseWhileStatement): - (JSC::JSParser::parseVarDeclarationList): - (JSC::JSParser::parseConstDeclarationList): - (JSC::JSParser::parseForStatement): - (JSC::JSParser::parseReturnStatement): - (JSC::JSParser::parseWithStatement): - (JSC::JSParser::parseSwitchStatement): - (JSC::JSParser::parseSwitchClauses): - (JSC::JSParser::parseSwitchDefaultClause): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseDebuggerStatement): - (JSC::JSParser::parseStatement): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseExpressionOrLabelStatement): - (JSC::JSParser::parseIfStatement): - (JSC::JSParser::parseExpression): - (JSC::JSParser::parseAssignmentExpression): - (JSC::JSParser::parseConditionalExpression): - (JSC::isUnaryOp): - (JSC::JSParser::isBinaryOperator): - (JSC::JSParser::parseBinaryExpression): - (JSC::JSParser::parseProperty): - (JSC::JSParser::parseObjectLiteral): - (JSC::JSParser::parseStrictObjectLiteral): - (JSC::JSParser::parseArrayLiteral): - (JSC::JSParser::parsePrimaryExpression): - (JSC::JSParser::parseArguments): - (JSC::JSParser::parseMemberExpression): - (JSC::JSParser::parseUnaryExpression): - * parser/JSParser.h: - (JSC::): - * parser/Lexer.cpp: - (JSC::): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-07-09 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 42015 - Enable JSValue32_64 on ARMv7 - - * Configurations/JavaScriptCore.xcconfig: - * jit/JIT.h: - * jit/JITStubs.cpp: - * wtf/Platform.h: - -2010-07-09 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Assertion failure in String::utf8() for certain invalid UTF16 inputs - https://bugs.webkit.org/show_bug.cgi?id=41983 - - * wtf/text/WTFString.cpp: - (WebCore::String::utf8): - - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8. - -2010-07-09 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Remove a couple of excess writes from the lexer - https://bugs.webkit.org/show_bug.cgi?id=41981 - - Remove a couple of fields from JSTokenInfo, and rename the remaining ones - to something more accurate - - * parser/JSParser.cpp: - (JSC::JSParser::next): - (JSC::JSParser::tokenStart): - (JSC::JSParser::tokenLine): - (JSC::JSParser::tokenEnd): - * parser/JSParser.h: - (JSC::JSTokenInfo::JSTokenInfo): - * parser/Lexer.cpp: - (JSC::Lexer::lex): - -2010-07-08 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Property declarations in an object literal should not consider the prototype chain when being added to the new object - https://bugs.webkit.org/show_bug.cgi?id=41929 - - To fix this all we need to do is ensure that all new properties are - added with putDirect rather than a fully generic call to put. This - is safe as an object literal is by definition going to produce a - completely normal object. - - Rather than duplicating all the put_by_id logic we add an additional - flag to op_put_by_id to indicate it should be using putDirect. In - the interpreter this adds a runtime branch, but in the jit this is - essentially free as the branch is taken at compile time. This does - actually improve object literal creation time even in the interpreter - as we no longer need to walk the prototype chain to verify that the - cached put is safe. - - We still emit normal put_by_id code when emitting __proto__ as we want - to get the correct handling for changing the prototype. - - Sunspider claims this is a 0.7% speedup which is conceivably real due - to the performance improvement in object literals, but I suspect its - really just the result of code motion. - - * bytecode/Opcode.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitPutById): - (JSC::BytecodeGenerator::emitDirectPutById): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::PropertyListNode::emitBytecode): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.h: - (JSC::JIT::compilePutByIdTransition): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of + a simple ASSERT. * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emitSlow_op_put_by_id): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchPutByIdReplace): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSObject.h: - (JSC::JSObject::putDirect): - (JSC::JSValue::putDirect): - * runtime/JSValue.h: - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - String.prototype methods should CheckObjectCoercible (test this is not null or undefined). - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::trimString): - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Date.prototype.toJSON takes one argument, report this correctly. - - * runtime/DatePrototype.cpp: - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - RegExp's prototype should be an object of type RegExp. - - * runtime/RegExpPrototype.cpp: - (JSC::RegExpPrototype::RegExpPrototype): - * runtime/RegExpPrototype.h: - -2010-07-08 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - JavaScript parser violates ECMA automatic semicolon insertion rule - https://bugs.webkit.org/show_bug.cgi?id=41844 - - Remove (very) old and bogus logic that automatically inserted a semicolon - at the end of a script's source. - - * parser/Lexer.cpp: - (JSC::Lexer::lex): - -2010-07-08 Oliver Hunt <oliver@apple.com> - - Reviewed by Anders Carlson. - - Tidy up the lexer - - Remove some of the old yacc/lex-isms still present in the lexer - - * parser/JSParser.h: - (JSC::): - * parser/Lexer.cpp: - (JSC::Lexer::parseString): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-07-08 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Make object-literal parsing conformant with the spec. - https://bugs.webkit.org/show_bug.cgi?id=41892 - - Bring our parsing of object literals into conformance with the ES5 spec. - Basically disallow conflicting accessor vs. normal property definitions - The bulk of this patch is just fiddling to maintain performance. - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createGetterOrSetterProperty): - (JSC::ASTBuilder::createProperty): - (JSC::ASTBuilder::getName): - (JSC::ASTBuilder::getType): - * parser/JSParser.cpp: - (JSC::jsParse): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProperty): - (JSC::JSParser::parseObjectLiteral): - (JSC::JSParser::parseStrictObjectLiteral): - * parser/JSParser.h: - * parser/Lexer.cpp: - (JSC::Lexer::clear): - * parser/Lexer.h: - (JSC::Lexer::currentOffset): - (JSC::Lexer::setOffset): - Add logic to allow us to roll the lexer back in the input stream. - * parser/Nodes.h: - (JSC::PropertyNode::): - (JSC::PropertyNode::type): - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/SourceProvider.h: - (JSC::SourceProvider::SourceProvider): - (JSC::SourceProvider::isValid): - (JSC::SourceProvider::setValid): - SourceProvider now records whether the input text - has already been validated. - * parser/SyntaxChecker.h: - (JSC::SyntaxChecker::SyntaxChecker): - (JSC::SyntaxChecker::Property::Property): - (JSC::SyntaxChecker::Property::operator!): - (JSC::SyntaxChecker::createProperty): - (JSC::SyntaxChecker::createPropertyList): - (JSC::SyntaxChecker::createGetterOrSetterProperty): - The SyntaxChecker mode now needs to maintain a bit more information - to ensure that we can validate object literals correctly. - -2010-07-08 Darin Adler <darin@apple.com> - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::sharedInstance): Fix typo. - -2010-07-08 Darin Adler <darin@apple.com> - - Reviewed by Oliver Hunt. - - Fix assertion seen on the Leopard buildbot. - The single shared instance of JSGlobalData was not being - adopted after creation. - - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef. - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - BOMs are whitespace. - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::isStrWhiteSpace): - -2010-07-08 Martin Robinson <mrobinson@igalia.com> - - Unreviewed. - - Try fix the GTK+ build by touching this file. - - * jit/ExecutableAllocatorFixedVMPool.cpp: - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - GTK build fix take two. - - * GNUmakefile.am: - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - GTK build fix. - - * GNUmakefile.am: - -2010-07-08 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. + (JSC::JIT::emit_op_method_check): ditto. + (JSC::JIT::compileGetByIdHotPath): ditto. + (JSC::JIT::compileGetByIdSlowCase): ditto. + (JSC::JIT::emit_op_put_by_id): ditto. - https://bugs.webkit.org/show_bug.cgi?id=41641 +2011-02-21 Gavin Barraclough <barraclough@apple.com> - Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms - other than x86-64 (this may be useful on 32-bit platforms, too). + Ruber stamped by Sam Weinig - Simplify ifdefs by dividing into thwo broad allocation strategies - (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). - - Rename constant used in the code to have names descriptive of their purpose, - rather than their specific value on a given platform. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::reprotectRegion): - (JSC::ExecutableAllocator::cacheFlush): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::free): - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - * jit/ExecutableAllocatorWin.cpp: - * wtf/Platform.h: - -2010-07-08 Xan Lopez <xlopez@igalia.com> - - Reviewed by Gustavo Noronha. - - Silence a few noisy build rules. - - * GNUmakefile.am: - -2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r62765. - http://trac.webkit.org/changeset/62765 - https://bugs.webkit.org/show_bug.cgi?id=41840 - - All jscore and layout tests crash on Qt bot (Requested by Ossy - on #webkit). - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): - (WTF::TCMalloc_PageHeap::signalScavenger): - (WTF::TCMalloc_PageHeap::scavengerThread): - -2010-07-08 Andreas Kling <andreas.kling@nokia.com> - - Reviewed by Oliver Hunt. + Bug 54899 - Math.LOG10E should be 0.4342944819032518 + This value is quoted in section 15.8.1.5 of the spec. - Interpreter: Crash in op_load_varargs on 64-bit - https://bugs.webkit.org/show_bug.cgi?id=41795 - - Added missing cast of argCount to int32_t in op_load_varargs. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-07-08 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Geoffrey Garen. - - Make FastMalloc more portable. - https://bugs.webkit.org/show_bug.cgi?id=41790 - - Use WTF::Mutex instead of pthread_mutex_t and - replace pthread_cond_t with WTF::ThreadCondition. - - * wtf/FastMalloc.cpp: - (WTF::TCMalloc_PageHeap::initializeScavenger): - (WTF::TCMalloc_PageHeap::signalScavenger): - (WTF::TCMalloc_PageHeap::scavengerThread): - -2010-07-08 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. - - Remove needless #include <fcntl.h> from TCSystemAlloc.cpp. - https://bugs.webkit.org/show_bug.cgi?id=41777 - - * wtf/TCSystemAlloc.cpp: - -2010-07-07 Darin Adler <darin@apple.com> - - Fixed build in configurations like PowerPC. - - * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h. - * runtime/RegExpObject.cpp: Ditto. - * wtf/SizeLimits.cpp: Changed compile time assertion to work - even on platforms where two bool members do not end up taking - the same size as one int member! - -2010-07-07 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Lazy mode of parser allows invalid syntax in object literals. - https://bugs.webkit.org/show_bug.cgi?id=41809 - - Make the parser itself validate getter and setter syntax rather - than offloading it to the AST builder. - - * parser/ASTBuilder.h: - (JSC::ASTBuilder::createGetterOrSetterProperty): - * parser/JSParser.cpp: - (JSC::JSParser::parseProperty): - -2010-07-07 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Adam Roben. - - Revert r62689. - https://bugs.webkit.org/show_bug.cgi?id=41804 - - * runtime/Collector.cpp: - (JSC::Heap::freeBlocks): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): -2010-07-07 Adam Barth <abarth@webkit.org> +2011-02-21 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. - Add reverseFind to Vector and deploy in HTML5 parser - https://bugs.webkit.org/show_bug.cgi?id=41778 + Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy. - This method seems generally useful. I'm slightly surprised we don't - have it already. + The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance + containing a pointer to its parent class. These links should reflect the inheritance + hierarchy of C++ classes below JSObject. For the large part it does, but in some cases + entries in the C++ hierarchy are skipped over. This presently likely doesn't matter, + since intervening C++ classes may not have ClassInfo - but would be a potential bug + were ClassInfo were to be added. - * wtf/Vector.h: - (WTF::::reverseFind): - -2010-07-07 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Turn on adoptRef assertion for RefCounted - https://bugs.webkit.org/show_bug.cgi?id=41547 - - * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other - WTF headers should use "" includes; consistent in most WTF headers. - Added a call to relaxAdoptionRequirement. - - * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED. - Added relaxAdoptionRequirement. - -2010-07-07 Anders Carlsson <andersca@apple.com> - - Try to fix the Windows build. - - * runtime/Collector.cpp: - (JSC::Heap::freeBlocks): - -2010-07-07 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - More OwnPtr work - https://bugs.webkit.org/show_bug.cgi?id=41727 - - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr. + * API/JSCallbackConstructor.cpp: + * API/JSCallbackFunction.cpp: * API/JSCallbackObjectFunctions.h: - (JSC::JSCallbackObject::JSCallbackObject): Ditto. - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): Ditto. - * bytecode/CodeBlock.h: - (JSC::CodeBlock::createRareDataIfNecessary): Ditto. - * parser/Nodes.cpp: - (JSC::ScopeNode::ScopeNode): Ditto. - * parser/ParserArena.cpp: - (JSC::ParserArena::ParserArena): Ditto. * runtime/Arguments.h: - (JSC::Arguments::Arguments): Ditto. - * runtime/Executable.cpp: - (JSC::EvalExecutable::compile): Ditto. - (JSC::ProgramExecutable::compile): Ditto. - (JSC::FunctionExecutable::compileForCall): Ditto. - (JSC::FunctionExecutable::compileForConstruct): Ditto. - (JSC::FunctionExecutable::reparseExceptionInfo): Ditto. - (JSC::EvalExecutable::reparseExceptionInfo): Ditto. + * runtime/ArrayPrototype.cpp: + * runtime/BooleanObject.cpp: + * runtime/DateInstance.cpp: + * runtime/DatePrototype.cpp: + * runtime/ErrorInstance.cpp: + * runtime/InternalFunction.cpp: + * runtime/JSActivation.cpp: * runtime/JSArray.cpp: - (JSC::JSArray::sort): Ditto. + * runtime/JSFunction.cpp: + * runtime/JSONObject.cpp: + * runtime/JSObject.h: + * runtime/JSZombie.h: + * runtime/MathObject.cpp: + * runtime/NativeErrorConstructor.cpp: + * runtime/NumberConstructor.cpp: + * runtime/NumberObject.cpp: * runtime/RegExpConstructor.cpp: - (JSC::RegExpConstructor::RegExpConstructor): Ditto. * runtime/RegExpObject.cpp: - (JSC::RegExpObject::RegExpObject): Ditto. - * runtime/SmallStrings.cpp: - (JSC::SmallStrings::createSingleCharacterString): Ditto. - (JSC::SmallStrings::singleCharacterStringRep): Ditto. - - * wtf/unicode/icu/CollatorICU.cpp: - (WTF::Collator::userDefault): Use adoptPtr. - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto. - (JSC::Yarr::ByteCompiler::compile): Ditto. - (JSC::Yarr::ByteCompiler::regexBegin): Ditto. - (JSC::Yarr::byteCompileRegex): Ditto. - * yarr/RegexInterpreter.h: - (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto. - -2010-07-07 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Make clear set the pointer to 0 before deletion - https://bugs.webkit.org/show_bug.cgi?id=41727 - - * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new - value before deleting the old one, including in the set function and the - clear function. This required changing safeDelete. - * wtf/OwnPtr.h: Ditto. Also removed some extra null checks. - * wtf/PassOwnPtr.h: Ditto. - - * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new - value before deref'ing the old one in the clear function. Also added a - leakRef function for NonNullPassRefPtr. - * wtf/RefPtr.h: Ditto. - - * wtf/gobject/GOwnPtr.h: More of the same. - * wtf/gobject/GRefPtr.h: Ditto. - -2010-07-07 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Oliver Hunt. - - Refactored string parsing inside the lexer - https://bugs.webkit.org/show_bug.cgi?id=41606 - - Does not use goto. Although the last sunspider - parse-only tests yields 1.044x speedup, I think the - patch can have a slight improvement at most. - - * parser/Lexer.cpp: - (JSC::singleEscape): - (JSC::Lexer::parseString): - (JSC::Lexer::lex): - * parser/Lexer.h: - -2010-07-06 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Make it possible to have both the JIT and Interpreter available in a single build - https://bugs.webkit.org/show_bug.cgi?id=41722 - - Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible - to have both JIT and INTERPRETER enabled at the same time. This doesn't add - support for mix mode execution, but it does allow a single build to contain all - the code needed to use either the interpreter or the jit. - - If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment - variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter. - - This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER), - or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif - #if ENABLE(INTERPRETER), etc. There are also a few functions that need to be - renamed to resolve return type ambiguity. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::~CodeBlock): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - * interpreter/CallFrame.h: - (JSC::ExecState::returnVPC): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::unwindCallFrame): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::privateExecute): - (JSC::Interpreter::retrieveLastCaller): - * interpreter/Interpreter.h: - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): - * runtime/Executable.cpp: - (JSC::EvalExecutable::generateJITCode): - (JSC::ProgramExecutable::generateJITCode): - (JSC::FunctionExecutable::generateJITCodeForCall): - (JSC::FunctionExecutable::generateJITCodeForConstruct): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): - * runtime/JSFunction.cpp: - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::canUseJIT): - * wtf/Platform.h: - -2010-07-06 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr - https://bugs.webkit.org/show_bug.cgi?id=41320 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment - instead of set since the result of reparseExceptionInfo is now a - PassOwnPtr. - - * bytecode/CodeBlock.h: Change extractExceptionInfo to return a - PassOwnPtr instead of a raw pointer. - - * runtime/Executable.cpp: - (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr. - (JSC::EvalExecutable::reparseExceptionInfo): Ditto. - (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was - in the header before, but it's better to not have it there to reduce - header dependencies. Return a PassOwnPtr. - - * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr, - and put it in the private sections of classes other than the base class. - - * wtf/MessageQueue.h: - (WTF::MessageQueue::append): Use leakPtr instead of release. - (WTF::MessageQueue::appendAndCheckEmpty): Ditto. - (WTF::MessageQueue::prepend): Ditto. - - * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return - a PassOwnPtr rather than a raw pointer. Added a leakPtr function that - returns a raw pointer. Put the constructor that takes a raw pointer and - the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the - new adoptPtr function from PassOwnPtr.h. - - * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function - to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr. - Put the constructor and assignment operators that take a raw pointer - into a section guarded by LOOSE_PASS_OWN_PTR. - -2010-07-06 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler - - Update comment in StringExtras.h to be more accurate. - - * wtf/StringExtras.h: - -2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com> + * runtime/StringObject.cpp: + * runtime/StringPrototype.cpp: - Unreviewed, rolling out r62511. - http://trac.webkit.org/changeset/62511 - https://bugs.webkit.org/show_bug.cgi?id=41686 +2011-02-21 Adam Roben <aroben@apple.com> - Breaks Linux/64bit compilation (Requested by xan_ on #webkit). + Export JSObject::s_info from JavaScriptCore.dll - * jit/ExecutableAllocator.cpp: - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::free): - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorPosix.cpp: - (JSC::ExecutableAllocator::reprotectRegion): - (JSC::ExecutableAllocator::cacheFlush): - * jit/ExecutableAllocatorSymbian.cpp: - * jit/ExecutableAllocatorWin.cpp: - * wtf/Platform.h: + This matches what we do for all other ClassInfo objects that WebCore needs access to. -2010-07-05 Gavin Barraclough <barraclough@apple.com> + Fixes <http://webkit.org/b/54881> REGRESSION (r79132): Lots of tests crashing in + JSCell::inherits on Windows Reviewed by Sam Weinig. - https://bugs.webkit.org/show_bug.cgi?id=41641 - - Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms - other than x86-64 (this may be useful on 32-bit platforms, too). - - Simplify ifdefs by dividing into thwo broad allocation strategies - (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). - - Rename constant used in the code to have names descriptive of their purpose, - rather than their specific value on a given platform. - - * jit/ExecutableAllocator.cpp: - (JSC::ExecutableAllocator::reprotectRegion): - (JSC::ExecutableAllocator::cacheFlush): - * jit/ExecutableAllocatorFixedVMPool.cpp: - (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): - (JSC::FixedVMPoolAllocator::free): - (JSC::ExecutablePool::systemAlloc): - * jit/ExecutableAllocatorPosix.cpp: - * jit/ExecutableAllocatorSymbian.cpp: - * jit/ExecutableAllocatorWin.cpp: - * wtf/Platform.h: - -2010-07-05 Steve Block <steveblock@google.com> - - Reviewed by Darin Adler. - - ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h - https://bugs.webkit.org/show_bug.cgi?id=41594 - - * wtf/ThreadingPthreads.cpp: - -2010-07-04 Mark Rowe <mrowe@apple.com> - - Build fix after r62456. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent - warnings about comparisons between signed and unsigned types, and attempts to call an overload - of std::min that doesn't exist. - -2010-07-02 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=41553 - Make StringExtras.h versions of snprintf and vsnprintf match the unix versions. - - - MSVC does not ensure the buffers are null terminated as the unix versions do. - - * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes. - * runtime/UString.cpp: Clean up includes. - (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong. - * wtf/StringExtras.h: - (snprintf): Ensure null termination of buffer. - (vsnprintf): Ditto. - -2010-07-03 Yong Li <yoli@rim.com> - - Reviewed by Darin Adler. - - Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in - the interpreter as well as the JIT. - - https://bugs.webkit.org/show_bug.cgi?id=41351 - rdar://problem/8142141 - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): Fix signed integer overflow problem - in op_load_varargs handling. 0xFFFFFFFF was read as -1. - -2010-06-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Dumitru Daniliuc. - - Support for keys and in-memory storage for IndexedDB - https://bugs.webkit.org/show_bug.cgi?id=41252 - - Set the role to Private. - - * JavaScriptCore.xcodeproj/project.pbxproj: - -2010-07-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Move BOM handling out of the lexer and parser - https://bugs.webkit.org/show_bug.cgi?id=41539 - - Doing the BOM stripping in the lexer meant that we could - end up having to strip the BOMs from a source multiple times. - To deal with this we now require all strings provided by - a SourceProvider to already have had the BOMs stripped. - This also simplifies some of the lexer logic. - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): - (JSC::Lexer::sourceCode): - * parser/SourceProvider.h: - (JSC::SourceProvider::SourceProvider): - (JSC::UStringSourceProvider::create): - (JSC::UStringSourceProvider::getRange): - (JSC::UStringSourceProvider::UStringSourceProvider): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::copyStringWithoutBOMs): - -2010-07-03 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Kent Tamura. - - [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar. - https://bugs.webkit.org/show_bug.cgi?id=41411 - - * wtf/unicode/wince/UnicodeWince.cpp: - (WTF::Unicode::isAlphanumeric): - * wtf/unicode/wince/UnicodeWince.h: - (WTF::Unicode::isArabicChar): - -2010-07-03 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log. - https://bugs.webkit.org/show_bug.cgi?id=41524 - - Print "WebKit CRASH" before crashing. - - * wtf/Assertions.h: - -2010-07-02 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken - - This method tried to repatch a LDR (T2) into an ADD (T3) - but it only - repatches the first instruction word. The layout of the fields in the - second word is different, and also needs repatching. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::repatchLoadPtrToLEA): - -2010-07-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Clamp the number of arguments supported by function.apply - https://bugs.webkit.org/show_bug.cgi?id=41351 - <rdar://problem/8142141> - - Add clamping logic to function.apply similar to that - enforced by firefox. We have a smaller clamp than - firefox as our calling convention means that stack - usage is proportional to argument count -- the firefox - limit is larger than you could actually call. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Arguments.h: - (JSC::Arguments::): - -2010-07-02 Chao-ying Fu <fu@mips.com> - - Reviewed by Oliver Hunt. - - Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS - https://bugs.webkit.org/show_bug.cgi?id=40179 - - Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL. - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * wtf/Platform.h: - -2010-07-02 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 41552 - Clean up ARMv7 vfp code generation - Emit separate opcode individually, remove magic numbers. - - Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned). - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::vadd_F64): - (JSC::ARMv7Assembler::vcmp_F64): - (JSC::ARMv7Assembler::vcvt_F64_S32): - (JSC::ARMv7Assembler::vcvtr_S32_F64): - (JSC::ARMv7Assembler::vdiv_F64): - (JSC::ARMv7Assembler::vldr): - (JSC::ARMv7Assembler::vmov_F64_0): - (JSC::ARMv7Assembler::vmov): - (JSC::ARMv7Assembler::vmrs): - (JSC::ARMv7Assembler::vmul_F64): - (JSC::ARMv7Assembler::vstr): - (JSC::ARMv7Assembler::vsub_F64): - (JSC::ARMv7Assembler::VFPOperand::VFPOperand): - (JSC::ARMv7Assembler::VFPOperand::bits1): - (JSC::ARMv7Assembler::VFPOperand::bits4): - (JSC::ARMv7Assembler::vcvtOp): - (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp): - (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::branchDouble): - * runtime/JSImmediate.h: - (JSC::JSValue::isCell): - -2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r62410. - http://trac.webkit.org/changeset/62410 - https://bugs.webkit.org/show_bug.cgi?id=41549 - - accursed last minute changes (Requested by olliej on #webkit). - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): - (JSC::Lexer::copyCodeWithoutBOMs): - (JSC::Lexer::sourceCode): - * parser/SourceProvider.h: - (JSC::): - (JSC::SourceProvider::SourceProvider): - (JSC::SourceProvider::hasBOMs): - (JSC::UStringSourceProvider::create): - (JSC::UStringSourceProvider::getRange): - (JSC::UStringSourceProvider::UStringSourceProvider): - * wtf/text/StringImpl.h: - -2010-07-02 Sam Weinig <sam@webkit.org> - - Reviewed by Geoffrey Garen. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=41548 - Use snprintf instead of sprintf everywhere in JavaScriptCore - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::globalFuncEscape): - * runtime/UString.cpp: - (JSC::UString::from): - -2010-07-02 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Move BOM handling out of the lexer and parser - https://bugs.webkit.org/show_bug.cgi?id=41539 - - Doing the BOM stripping in the lexer meant that we could - end up having to strip the BOMs from a source multiple times. - To deal with this we now require all strings provided by - a SourceProvider to already have had the BOMs stripped. - This also simplifies some of the lexer logic. - - * parser/Lexer.cpp: - (JSC::Lexer::setCode): - (JSC::Lexer::sourceCode): - * parser/SourceProvider.h: - (JSC::SourceProvider::SourceProvider): - (JSC::UStringSourceProvider::create): - (JSC::UStringSourceProvider::getRange): - (JSC::UStringSourceProvider::UStringSourceProvider): - * wtf/text/StringImpl.h: - (WebCore::StringImpl::copyStringWithoutBOMs): - -2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu> - - Reviewed by Oliver Hunt. - - [ Updated after rollout. ] - - Merged RegExp constructor and RegExp::create methods. - Both functions are called with three parameters and check whether - flags (the third param) is given or not. - Avoid extra hash lookups in RegExpCache::create by passing a pre-computed - iterator parameter. - https://bugs.webkit.org/show_bug.cgi?id=41055 - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpCache.h: - -2010-07-02 Martin Robinson <mrobinson@igalia.com> - - Unreviewed. Build fix for GTK+. - - Build Lexer.lut.h with the rest of the .lut.h files. Later these should - all probably be moved to DerivedSources. - - * GNUmakefile.am: - -2010-06-23 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Gustavo Noronha Silva. - - [GTK] Separate DerivedSources per-project - https://bugs.webkit.org/show_bug.cgi?id=41109 - - Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore. - - * GNUmakefile.am: - -2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Oliver Hunt. - - The alternativeFrameLocation value is wrong in the emitDisjunction function in - case of PatternTerm::TypeParentheticalAssertion. This value needs to be - computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc - memory corruption in some cases. - Layout test added for checking of TypeParentheticalAssertion case. - https://bugs.webkit.org/show_bug.cgi?id=41458 - - * yarr/RegexInterpreter.cpp: - (JSC::Yarr::ByteCompiler::emitDisjunction): - -2010-07-01 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Add a FixedArray template to encapsulate fixed length arrays - https://bugs.webkit.org/show_bug.cgi?id=41506 - - This new type is used in place of fixed length C arrays so - that debug builds can guard against attempts to go beyond - the end of the array. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/Opcode.cpp: - (JSC::OpcodeStats::~OpcodeStats): - * pcre/pcre_compile.cpp: - (calculateCompiledPatternLength): - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - (JSC::Heap::allocate): - * runtime/Collector.h: - (JSC::CollectorBitmap::clearAll): - * runtime/CollectorHeapIterator.h: - (JSC::CollectorHeapIterator::operator*): - * runtime/DateInstanceCache.h: - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): - * runtime/JSString.h: - (JSC::RopeBuilder::JSStringFinalizerStruct::): - * runtime/NumericStrings.h: - * runtime/RegExpCache.h: - * runtime/SmallStrings.h: - (JSC::SmallStrings::singleCharacterStrings): - * wtf/AVLTree.h: - * wtf/FixedArray.h: Added. - (WTF::FixedArray::operator[]): - (WTF::FixedArray::data): - -2010-07-01 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Oliver Hunt. - - Improve the main lexer switch by mapping input characters to their type - https://bugs.webkit.org/show_bug.cgi?id=41459 - - Sunsipder: no change (from 532.9ms to 531.5ms) - SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms) - - * parser/Lexer.cpp: - (JSC::): - (JSC::Lexer::lex): - -2010-07-01 Sam Weinig <sam@webkit.org> - - Rubber-stamped by Ander Carlsson. - - Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard. - - * wtf/Platform.h: - -2010-07-01 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 41490 - Add missing operations to MacroAssemblerARMv7 - Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed. - - * assembler/ARMv7Assembler.h: - (JSC::ARMRegisters::): - (JSC::ARMRegisters::asSingle): - (JSC::ARMRegisters::asDouble): - (JSC::VFPImmediate::VFPImmediate): - (JSC::VFPImmediate::isValid): - (JSC::VFPImmediate::value): - (JSC::ARMv7Assembler::singleRegisterMask): - (JSC::ARMv7Assembler::doubleRegisterMask): - (JSC::ARMv7Assembler::): - (JSC::ARMv7Assembler::add_S): - (JSC::ARMv7Assembler::neg): - (JSC::ARMv7Assembler::orr_S): - (JSC::ARMv7Assembler::sub): - (JSC::ARMv7Assembler::sub_S): - (JSC::ARMv7Assembler::vadd_F64): - (JSC::ARMv7Assembler::vcmp_F64): - (JSC::ARMv7Assembler::vcvt_F64_S32): - (JSC::ARMv7Assembler::vcvtr_S32_F64): - (JSC::ARMv7Assembler::vdiv_F64): - (JSC::ARMv7Assembler::vldr): - (JSC::ARMv7Assembler::vmov_F64_0): - (JSC::ARMv7Assembler::vmov): - (JSC::ARMv7Assembler::vmul_F64): - (JSC::ARMv7Assembler::vstr): - (JSC::ARMv7Assembler::vsub_F64): - (JSC::ARMv7Assembler::vcvt): - (JSC::ARMv7Assembler::vmem): - * assembler/AbstractMacroAssembler.h: - * assembler/MacroAssemblerARM.h: - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle): - (JSC::MacroAssemblerARMv7::neg32): - (JSC::MacroAssemblerARMv7::loadDouble): - (JSC::MacroAssemblerARMv7::divDouble): - (JSC::MacroAssemblerARMv7::convertInt32ToDouble): - (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32): - (JSC::MacroAssemblerARMv7::zeroDouble): - (JSC::MacroAssemblerARMv7::branchOr32): - (JSC::MacroAssemblerARMv7::set32): - (JSC::MacroAssemblerARMv7::set8): - * assembler/MacroAssemblerMIPS.h: - * assembler/MacroAssemblerX86Common.h: - -2010-07-01 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoff Garen. - - Improve reentrancy logic in polymorphic cache stubs - <https://bugs.webkit.org/show_bug.cgi?id=41482> - <rdar://problem/8094380> - - Make the polymorphic cache stubs handle reentrancy - better. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC::getPolymorphicAccessStructureListSlot): - -2010-07-01 Antti Koivisto <koivisto@iki.fi> - - Revert accidental commit. - - * runtime/Collector.cpp: - (JSC::Heap::allocateBlock): - -2010-06-30 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Add assertion, off by default, for when you forget to do adoptRef - https://bugs.webkit.org/show_bug.cgi?id=41422 - - * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted - function, called on the pointer by adoptRef, with an empty inline - default version, meant to be overloaded. Unified the inlining - with a macro named REF_DEREF_INLINE to make it clearer what's - going on in the refIfNotNull/derefIfNotNull functions. Renamed - releaseRef to leakRef, but left the old name in for compatibility - for now. - - * wtf/RefCounted.h: Added code to require adoption and assert if - you don't call adoptRef. For now, it is turned off because of the - LOOSE_REF_COUNTED define in this header. Later we can turn it on - once we get everything working without asserting. - -2010-06-29 Michael Saboff <msaboff@apple.com> - - Reviewed by Darin Adler. - - Bug 41238 - RegExp performance slow on Dromaeo benchmark - - Other javascript engines appear to cache prior results of regular - expression operations. - - Suggest adding some sort of caching mechanism to regular expression - processing. + * runtime/JSObject.h: Added JS_EXPORTDATA to s_info. - Added a single entry cache of match() results to RegExp class. +2011-02-21 Kristian Amlie <kristian.amlie@nokia.com> - Also added performance improvements to UString == operator. - First check the impls for equality. Then get the length of - each of the non-null impls. Next check the sizes for equality. - Then check the data for the case of different impls that point - to the same data (most likely due to substrings from the beginning of - another string). Lastly we check the underlying data for equality. - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::match): - * runtime/RegExp.h: - * runtime/UString.h: - (JSC::operator==): - -2010-06-29 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - WTF::HashSet iterators are quasi-mutable. Changing the value through - dereferencing an iterator will not change the behavior of methods like - contains or find, but will change the behavior of iterating. - - * wtf/HashSet.h: - (WTF::::begin): - (WTF::::end): - (WTF::::find): - (WTF::::remove): - * wtf/HashTable.h: - -2010-06-29 Martin Robinson <mrobinson@igalia.com> - - Reviewed by Xan Lopez. - - [GTK] Clean up the source lists in the GNUMakefile.am files - https://bugs.webkit.org/show_bug.cgi?id=41229 - - Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate - the source lists. - - * GNUmakefile.am: - -2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Fix QtScript build after QScriptValuePrivate ctor changes - https://bugs.webkit.org/show_bug.cgi?id=41307 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::prototype): - * qt/benchmarks/qscriptengine/qscriptengine.pro: - -2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] QScriptEngine API should contain a newArray function - https://bugs.webkit.org/show_bug.cgi?id=39115 - - * qt/api/qscriptengine.cpp: - (QScriptEngine::newArray): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::newArray): - * qt/api/qscriptengine_p.h: - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::newArray): - -2010-06-28 Xan Lopez <xlopez@igalia.com> - - Reviewed by Gustavo Noronha. - - Install jsc as jsc-X where X is the major API version to allow - parallel installation of both GTK+ 2.x and 3.x versions. - - * GNUmakefile.am: - -2010-06-28 John Gregg <johnnyg@google.com> - - Reviewed by Kent Tamura. - - add ENABLE_DIRECTORY_UPLOAD build support - https://bugs.webkit.org/show_bug.cgi?id=41100 - - * Configurations/FeatureDefines.xcconfig: - -2010-06-28 Xan Lopez <xlopez@igalia.com> - - Revert to build jsc, since the tests expect this. - - * GNUmakefile.am: - -2010-06-28 Zoltan Herczeg <zherczeg@webkit.org> - - Reviewed by Oliver Hunt. - - Only one character lookahead should be enough for the lexer - https://bugs.webkit.org/show_bug.cgi?id=41213 - - The lexer had 4 character lookahead before, which required - a complex shifting mechanism. This can be improved by using - only one character lookahead for most decisions, and a - peek() function as a fallback when it is absolutely necessary. - - * parser/Lexer.cpp: - (JSC::Lexer::currentCharacter): - (JSC::Lexer::currentOffset): - (JSC::Lexer::setCode): - (JSC::Lexer::shift): - (JSC::Lexer::peek): - (JSC::Lexer::getUnicodeCharacter): - (JSC::Lexer::shiftLineTerminator): - (JSC::Lexer::lastTokenWasRestrKeyword): - (JSC::Lexer::lex): - (JSC::Lexer::scanRegExp): - (JSC::Lexer::skipRegExp): - * parser/Lexer.h: - -2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> - - Unreviewed build fix. - - [EFL] Build fix for latest version of Ecore library. - Ecore recently changed return type of callbacks from int to Eina_Bool. - - * wtf/efl/MainThreadEfl.cpp: - (WTF::timeoutFired): Return Eina_Bool instead of int. - -2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] QScriptValue should have API for accessing object properties - https://bugs.webkit.org/show_bug.cgi?id=40903 - - Make possible to access properties inside QScriptValues. While this - still doesn't support the ResolveLocal parameter, it is already useful - for testing the API. - - The tests from upstream QtScript weren't imported since most of them - depend on the setProperty() function as well. A simple test was created. - - * qt/api/qscriptvalue.cpp: - (QScriptValue::property): - * qt/api/qscriptvalue.h: - (QScriptValue::): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::property): - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - (tst_QScriptValue::propertySimple): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - -2010-06-28 Xan Lopez <xlopez@igalia.com> - - Reviewed by Gustavo Noronha. - - [GTK] Add support for GTK+3 - https://bugs.webkit.org/show_bug.cgi?id=41253 - - Suffix jsc with the API version of the library, so that - libwebkitgtk 1.x and 3.x can install jsc. - - * GNUmakefile.am: - -2010-06-27 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Turn ENABLE(SINGLE_THREADED) on. - https://bugs.webkit.org/show_bug.cgi?id=41135 - - Brew MP does not support preemptive multi-threading. - Disable threading for Brew MP. - - * wtf/Platform.h: - -2010-06-26 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Dimitri Glazkov. - - Add an ENABLE_WEB_TIMING option for enabling Web Timing support. - https://bugs.webkit.org/show_bug.cgi?id=38924 - - * Configurations/FeatureDefines.xcconfig: - -2010-06-25 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - We assume in testapi.c that the value aHeapRef refers to will not be - moved. When we have movable objects, this will not be the case. - - * API/tests/testapi.c: - (main): - -2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r61924. - http://trac.webkit.org/changeset/61924 - https://bugs.webkit.org/show_bug.cgi?id=41240 - - It was rolled out, but cq+ wasn't removed (Requested by Ossy_ - on #webkit). - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - * runtime/RegExp.h: - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpCache.h: - -2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. - - Merge RegExp constructor and RegExp::create methods into one. - Both of function are called with tree parameters and check whether - flags (the third param) is given or not. - Simplify hash lookups in RegExpCache::create with giving them an extra - iterator parameter. - https://bugs.webkit.org/show_bug.cgi?id=41055 - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpCache.h: - -2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Introduce QtScript benchmarks. - - The QtScript performance should be tested regularly. The patch introduces - micro benchmarks for existing API. - - [Qt] Performance of the QtScript API is not tested. - https://bugs.webkit.org/show_bug.cgi?id=40911 - - * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri. - * qt/benchmarks/benchmarks.pro: Added. - * qt/benchmarks/qscriptengine/qscriptengine.pro: Added. - * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added. - (tst_QScriptEngine::checkSyntax_data): - (tst_QScriptEngine::checkSyntax): - (tst_QScriptEngine::constructor): - (tst_QScriptEngine::evaluateString_data): - (tst_QScriptEngine::evaluateString): - (tst_QScriptEngine::evaluateProgram_data): - (tst_QScriptEngine::evaluateProgram): - (tst_QScriptEngine::newObject): - (tst_QScriptEngine::nullValue): - (tst_QScriptEngine::undefinedValue): - (tst_QScriptEngine::globalObject): - (tst_QScriptEngine::toStringHandle): - * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added. - * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added. - (tst_QScriptValue::tst_QScriptValue): - (tst_QScriptValue::~tst_QScriptValue): - (tst_QScriptValue::values_data): - (tst_QScriptValue::ctorBool): - (tst_QScriptValue::ctorReal): - (tst_QScriptValue::ctorNumber): - (tst_QScriptValue::ctorQString): - (tst_QScriptValue::ctorCString): - (tst_QScriptValue::ctorSpecial): - (tst_QScriptValue::ctorQScriptValue): - (tst_QScriptValue::isValid_data): - (tst_QScriptValue::isValid): - (tst_QScriptValue::isBool_data): - (tst_QScriptValue::isBool): - (tst_QScriptValue::isNumber_data): - (tst_QScriptValue::isNumber): - (tst_QScriptValue::isFunction_data): - (tst_QScriptValue::isFunction): - (tst_QScriptValue::isNull_data): - (tst_QScriptValue::isNull): - (tst_QScriptValue::isString_data): - (tst_QScriptValue::isString): - (tst_QScriptValue::isUndefined_data): - (tst_QScriptValue::isUndefined): - (tst_QScriptValue::isObject_data): - (tst_QScriptValue::isObject): - (tst_QScriptValue::isError_data): - (tst_QScriptValue::isError): - (tst_QScriptValue::toString_data): - (tst_QScriptValue::toString): - (tst_QScriptValue::toNumber_data): - (tst_QScriptValue::toNumber): - (tst_QScriptValue::toBool_data): - (tst_QScriptValue::toBool): - (tst_QScriptValue::toInteger_data): - (tst_QScriptValue::toInteger): - (tst_QScriptValue::toInt32_data): - (tst_QScriptValue::toInt32): - (tst_QScriptValue::toUInt32_data): - (tst_QScriptValue::toUInt32): - (tst_QScriptValue::toUInt16_data): - (tst_QScriptValue::toUInt16): - (tst_QScriptValue::toObject_data): - (tst_QScriptValue::toObject): - (tst_QScriptValue::equals_data): - (tst_QScriptValue::equals): - (tst_QScriptValue::strictlyEquals_data): - (tst_QScriptValue::strictlyEquals): - (tst_QScriptValue::instanceOf_data): - (tst_QScriptValue::instanceOf): - -2010-06-25 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Remove old js parser - https://bugs.webkit.org/show_bug.cgi?id=41222 - - Remove the old yacc parser, this also solves the tiger problem. Which - was a conflict between yacc generated token values and those in the - custom parser - - * Android.mk: - * CMakeLists.txt: - * DerivedSources.make: - * DerivedSources.pro: - * GNUmakefile.am: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * parser/Grammar.y: Removed. - * parser/JSParser.cpp: - * parser/JSParser.h: - * parser/Lexer.cpp: - * parser/NodeConstructors.h: - (JSC::Node::Node): - * parser/Parser.cpp: - (JSC::Parser::parse): - * wtf/Platform.h: - -2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - New QtScript API; setPrototype() and prototype(). - - This patch implements QScriptValue's prototype accessors. - - [Qt] QScriptValue should have accessors to a prototype. - https://bugs.webkit.org/show_bug.cgi?id=39356 - - * qt/api/qscriptvalue.cpp: - (QScriptValue::prototype): - (QScriptValue::setPrototype): - * qt/api/qscriptvalue.h: - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::prototype): - (QScriptValuePrivate::setPrototype): - * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: - (tst_QScriptValue::getSetPrototype): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - -2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> - - Reviewed by Kenneth Rohde Christiansen. - - [CMake] Add option to enable JIT. - JIT is disabled by default, but now it's possible to enable it through - an option to CMake: -DENABLE_JIT will enable it. - https://bugs.webkit.org/show_bug.cgi?id=40936 - - * CMakeLists.txt: Add missing files and re-sort. - -2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> - - Reviewed by Gustavo Noronha Silva. - - [CMake] Remove unused variable in EFL build system. It was previously - being used to set the flags of each port but it was superseded by - other flags. - https://bugs.webkit.org/show_bug.cgi?id=40931 - - * jsc/CMakeLists.txt: - -2010-06-25 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoffrey Garen. - - Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on - sunspider. - - * assembler/AssemblerBuffer.h: - (JSC::AssemblerBuffer::AssemblerBuffer): - -2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r61842. - http://trac.webkit.org/changeset/61842 - https://bugs.webkit.org/show_bug.cgi?id=41208 - - It broke Windows build (Requested by Ossy_ on #webkit). - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.h: Removed. - * wtf/win/OwnPtrWin.h: Removed. - -2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r61833. - http://trac.webkit.org/changeset/61833 - https://bugs.webkit.org/show_bug.cgi?id=41205 - - It broke Leopard and GTK (Requested by Ossy_ on #webkit). - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - (JSC::RegExp::create): - * runtime/RegExp.h: - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpCache.h: - -2010-06-25 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Adam Barth. - - Change OwnPtrCommon to include platform-specific headers - https://bugs.webkit.org/show_bug.cgi?id=40279 - - Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. - Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.h: Added. - * wtf/win/OwnPtrWin.h: Added. - -2010-06-25 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Darin Adler. - - Add the possibility for a head and footer section to create_jit_stubs. - https://bugs.webkit.org/show_bug.cgi?id=36050 - - * create_jit_stubs: - -2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. - - Merge RegExp constructor and RegExp::create methods into one. - Both of function are called with tree parameters and check whether - flags (the third param) is given or not. - Simplify hash lookups in RegExpCache::create with giving them an extra - iterator parameter. - https://bugs.webkit.org/show_bug.cgi?id=41055 - - * runtime/RegExp.cpp: - (JSC::RegExp::RegExp): - * runtime/RegExp.h: - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - * runtime/RegExpCache.h: - -2010-06-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64 - https://bugs.webkit.org/show_bug.cgi?id=41193 - - I noticed a use of '+ 4' in some of the 32_64 code paths and realised there - were a few places where endianness was being hardcoded. This patch fixes - the errors i could find through code inspection. - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_resolve_global): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::patchGetByIdSelf): - (JSC::JIT::patchPutByIdReplace): - -2010-06-24 Oliver Hunt <oliver@apple.com> - - Build fix - - Temporarily get the tiger bot working again by disabling the - new JS parser. GCC on tiger is miscompiling the parser and - I don't have access to a tiger machine right now. - - * wtf/Platform.h: - - 2010-06-21 Nathan Lawrence <nlawrence@apple.com> - - Reviewed by Geoff Garen. - - https://bugs.webkit.org/show_bug.cgi?id=40128 - Fixed broken debug functionality. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - Fixed to work with updated call frame. - * runtime/JSImmediate.h: - (JSC::JSValue::isCell): - Added assert for aligned cell. - * runtime/JSValue.cpp: - (JSC::JSValue::description): - Fixed to work with current JSValue implementation. - * runtime/JSZombie.cpp: - (JSC::JSZombie::leakedZombieStructure): - JSombies compile again. - -2010-06-24 Leandro Pereira <leandro@profusion.mobi> - - Unreviewed build fix. - - * CMakeLists.txt: Add JSParser.cpp. - -2010-06-24 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Single character string replacement may replace too many characters - https://bugs.webkit.org/show_bug.cgi?id=41138 - <rdar://problem/8097496> - - Simple fix to stop the rope path of single character replacement - once the first replacement occurs. - - * runtime/JSString.cpp: - (JSC::JSString::replaceCharacter): - -2010-06-24 Gabor Loki <loki@webkit.org> - - Reviewed by Gavin Barraclough. - - Fix the length of instruction stream controlled by constant pool - https://bugs.webkit.org/show_bug.cgi?id=40293 - - The initial/maximum length of instruction stream (m_maxDistance) should - be set when the first constant arrives to the constant pool. Otherwise - the constant pool could be placed into an uninterrupted sequence. - - * assembler/AssemblerBufferWithConstantPool.h: - (JSC::): + Reviewed by Andreas Kling. -2010-06-24 Oliver Hunt <oliver@apple.com> + Switched to compiler based detection, where the error actually is. - Reviewed by Gavin Barraclough. + It is not the platform that needs the workaround, it is the compiler. - We assume bytecodeOffset will always return a value > 1, - so we adjust the failure case to return 1 instead of 0. + QtWebKit fails to compile on Windows XP with msvc-2008 + https://bugs.webkit.org/show_bug.cgi?id=54746 * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - -2010-06-23 Oliver Hunt <oliver@apple.com> - - Reviewed by Gavin Barraclough. - - Custom-written JavaScript parser - https://bugs.webkit.org/show_bug.cgi?id=34019 - - Implement a recursive descent parser similar to that used by V8 and - SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests. - - The parser consists of a JSParser class that uses a TreeBuilder to actually - build the AST. There are currently two builders -- the ASTBuilder and - SyntaxChecker which separate the job of building an AST for code generation - and simply checking syntactic correctness. - - There's still some less than ideal code remaining in the parser to allow - us to retain the existing lexing code with minimal changes. We'll tidy - this up at a later date. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * parser/ASTBuilder.h: Added. - (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo): - (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo): - (JSC::ASTBuilder::ASTBuilder): - (JSC::ASTBuilder::createSourceElements): - (JSC::ASTBuilder::varDeclarations): - (JSC::ASTBuilder::funcDeclarations): - (JSC::ASTBuilder::features): - (JSC::ASTBuilder::numConstants): - (JSC::ASTBuilder::appendToComma): - (JSC::ASTBuilder::createCommaExpr): - (JSC::ASTBuilder::createLogicalNot): - (JSC::ASTBuilder::createUnaryPlus): - (JSC::ASTBuilder::createVoid): - (JSC::ASTBuilder::thisExpr): - (JSC::ASTBuilder::createResolve): - (JSC::ASTBuilder::createObjectLiteral): - (JSC::ASTBuilder::createArray): - (JSC::ASTBuilder::createNumberExpr): - (JSC::ASTBuilder::createString): - (JSC::ASTBuilder::createBoolean): - (JSC::ASTBuilder::createNull): - (JSC::ASTBuilder::createBracketAccess): - (JSC::ASTBuilder::createDotAccess): - (JSC::ASTBuilder::createRegex): - (JSC::ASTBuilder::createNewExpr): - (JSC::ASTBuilder::createConditionalExpr): - (JSC::ASTBuilder::createAssignResolve): - (JSC::ASTBuilder::createFunctionExpr): - (JSC::ASTBuilder::createFunctionBody): - (JSC::ASTBuilder::createGetterOrSetterProperty): - (JSC::ASTBuilder::createArguments): - (JSC::ASTBuilder::createArgumentsList): - (JSC::ASTBuilder::createProperty): - (JSC::ASTBuilder::createPropertyList): - (JSC::ASTBuilder::createElementList): - (JSC::ASTBuilder::createFormalParameterList): - (JSC::ASTBuilder::createClause): - (JSC::ASTBuilder::createClauseList): - (JSC::ASTBuilder::setUsesArguments): - (JSC::ASTBuilder::createFuncDeclStatement): - (JSC::ASTBuilder::createBlockStatement): - (JSC::ASTBuilder::createExprStatement): - (JSC::ASTBuilder::createIfStatement): - (JSC::ASTBuilder::createForLoop): - (JSC::ASTBuilder::createForInLoop): - (JSC::ASTBuilder::createEmptyStatement): - (JSC::ASTBuilder::createVarStatement): - (JSC::ASTBuilder::createReturnStatement): - (JSC::ASTBuilder::createBreakStatement): - (JSC::ASTBuilder::createContinueStatement): - (JSC::ASTBuilder::createTryStatement): - (JSC::ASTBuilder::createSwitchStatement): - (JSC::ASTBuilder::createWhileStatement): - (JSC::ASTBuilder::createDoWhileStatement): - (JSC::ASTBuilder::createLabelStatement): - (JSC::ASTBuilder::createWithStatement): - (JSC::ASTBuilder::createThrowStatement): - (JSC::ASTBuilder::createDebugger): - (JSC::ASTBuilder::createConstStatement): - (JSC::ASTBuilder::appendConstDecl): - (JSC::ASTBuilder::appendStatement): - (JSC::ASTBuilder::addVar): - (JSC::ASTBuilder::combineCommaNodes): - (JSC::ASTBuilder::evalCount): - (JSC::ASTBuilder::appendBinaryExpressionInfo): - (JSC::ASTBuilder::operatorStackPop): - (JSC::ASTBuilder::operatorStackHasHigherPrecedence): - (JSC::ASTBuilder::getFromOperandStack): - (JSC::ASTBuilder::shrinkOperandStackBy): - (JSC::ASTBuilder::appendBinaryOperation): - (JSC::ASTBuilder::operatorStackAppend): - (JSC::ASTBuilder::popOperandStack): - (JSC::ASTBuilder::appendUnaryToken): - (JSC::ASTBuilder::unaryTokenStackLastType): - (JSC::ASTBuilder::unaryTokenStackLastStart): - (JSC::ASTBuilder::unaryTokenStackRemoveLast): - (JSC::ASTBuilder::assignmentStackAppend): - (JSC::ASTBuilder::createAssignment): - (JSC::ASTBuilder::Scope::Scope): - (JSC::ASTBuilder::setExceptionLocation): - (JSC::ASTBuilder::incConstants): - (JSC::ASTBuilder::usesThis): - (JSC::ASTBuilder::usesCatch): - (JSC::ASTBuilder::usesClosures): - (JSC::ASTBuilder::usesArguments): - (JSC::ASTBuilder::usesAssignment): - (JSC::ASTBuilder::usesWith): - (JSC::ASTBuilder::usesEval): - (JSC::ASTBuilder::createNumber): - (JSC::ASTBuilder::makeTypeOfNode): - (JSC::ASTBuilder::makeDeleteNode): - (JSC::ASTBuilder::makeNegateNode): - (JSC::ASTBuilder::makeBitwiseNotNode): - (JSC::ASTBuilder::makeMultNode): - (JSC::ASTBuilder::makeDivNode): - (JSC::ASTBuilder::makeAddNode): - (JSC::ASTBuilder::makeSubNode): - (JSC::ASTBuilder::makeLeftShiftNode): - (JSC::ASTBuilder::makeRightShiftNode): - (JSC::ASTBuilder::makeFunctionCallNode): - (JSC::ASTBuilder::makeBinaryNode): - (JSC::ASTBuilder::makeAssignNode): - (JSC::ASTBuilder::makePrefixNode): - (JSC::ASTBuilder::makePostfixNode): - * parser/JSParser.cpp: Added. - (JSC::JSParser::AllowInOverride::AllowInOverride): - (JSC::JSParser::AllowInOverride::~AllowInOverride): - (JSC::JSParser::token): - (JSC::JSParser::next): - (JSC::JSParser::consume): - (JSC::JSParser::match): - (JSC::JSParser::tokenStart): - (JSC::JSParser::tokenLine): - (JSC::JSParser::tokenEnd): - (JSC::JSParser::): - (JSC::JSParser::autoSemiColon): - (JSC::JSParser::canRecurse): - (JSC::JSParser::lastTokenEnd): - (JSC::jsParse): - (JSC::JSParser::JSParser): - (JSC::JSParser::parseProgram): - (JSC::JSParser::allowAutomaticSemicolon): - (JSC::JSParser::parseSourceElements): - (JSC::JSParser::parseVarDeclaration): - (JSC::JSParser::parseConstDeclaration): - (JSC::JSParser::parseDoWhileStatement): - (JSC::JSParser::parseWhileStatement): - (JSC::JSParser::parseVarDeclarationList): - (JSC::JSParser::parseConstDeclarationList): - (JSC::JSParser::parseForStatement): - (JSC::JSParser::parseBreakStatement): - (JSC::JSParser::parseContinueStatement): - (JSC::JSParser::parseReturnStatement): - (JSC::JSParser::parseThrowStatement): - (JSC::JSParser::parseWithStatement): - (JSC::JSParser::parseSwitchStatement): - (JSC::JSParser::parseSwitchClauses): - (JSC::JSParser::parseSwitchDefaultClause): - (JSC::JSParser::parseTryStatement): - (JSC::JSParser::parseDebuggerStatement): - (JSC::JSParser::parseBlockStatement): - (JSC::JSParser::parseStatement): - (JSC::JSParser::parseFormalParameters): - (JSC::JSParser::parseFunctionBody): - (JSC::JSParser::parseFunctionInfo): - (JSC::JSParser::parseFunctionDeclaration): - (JSC::JSParser::parseExpressionOrLabelStatement): - (JSC::JSParser::parseExpressionStatement): - (JSC::JSParser::parseIfStatement): - (JSC::JSParser::parseExpression): - (JSC::JSParser::parseAssignmentExpression): - (JSC::JSParser::parseConditionalExpression): - (JSC::isUnaryOp): - (JSC::JSParser::isBinaryOperator): - (JSC::JSParser::parseBinaryExpression): - (JSC::JSParser::parseProperty): - (JSC::JSParser::parseObjectLiteral): - (JSC::JSParser::parseArrayLiteral): - (JSC::JSParser::parsePrimaryExpression): - (JSC::JSParser::parseArguments): - (JSC::JSParser::parseMemberExpression): - (JSC::JSParser::parseUnaryExpression): - * parser/JSParser.h: Added. - (JSC::): - (JSC::JSTokenInfo::JSTokenInfo): - * parser/Lexer.cpp: - (JSC::Lexer::lex): - * parser/Lexer.h: - (JSC::Lexer::setLastLineNumber): - (JSC::Lexer::lastLineNumber): - * parser/NodeConstructors.h: - (JSC::Node::Node): - * parser/Parser.cpp: - (JSC::Parser::parse): - * parser/SyntaxChecker.h: Added. - (JSC::SyntaxChecker::SyntaxChecker): - (JSC::SyntaxChecker::createSourceElements): - (JSC::SyntaxChecker::makeFunctionCallNode): - (JSC::SyntaxChecker::appendToComma): - (JSC::SyntaxChecker::createCommaExpr): - (JSC::SyntaxChecker::makeAssignNode): - (JSC::SyntaxChecker::makePrefixNode): - (JSC::SyntaxChecker::makePostfixNode): - (JSC::SyntaxChecker::makeTypeOfNode): - (JSC::SyntaxChecker::makeDeleteNode): - (JSC::SyntaxChecker::makeNegateNode): - (JSC::SyntaxChecker::makeBitwiseNotNode): - (JSC::SyntaxChecker::createLogicalNot): - (JSC::SyntaxChecker::createUnaryPlus): - (JSC::SyntaxChecker::createVoid): - (JSC::SyntaxChecker::thisExpr): - (JSC::SyntaxChecker::createResolve): - (JSC::SyntaxChecker::createObjectLiteral): - (JSC::SyntaxChecker::createArray): - (JSC::SyntaxChecker::createNumberExpr): - (JSC::SyntaxChecker::createString): - (JSC::SyntaxChecker::createBoolean): - (JSC::SyntaxChecker::createNull): - (JSC::SyntaxChecker::createBracketAccess): - (JSC::SyntaxChecker::createDotAccess): - (JSC::SyntaxChecker::createRegex): - (JSC::SyntaxChecker::createNewExpr): - (JSC::SyntaxChecker::createConditionalExpr): - (JSC::SyntaxChecker::createAssignResolve): - (JSC::SyntaxChecker::createFunctionExpr): - (JSC::SyntaxChecker::createFunctionBody): - (JSC::SyntaxChecker::createArguments): - (JSC::SyntaxChecker::createArgumentsList): - (JSC::SyntaxChecker::createProperty): - (JSC::SyntaxChecker::createPropertyList): - (JSC::SyntaxChecker::createElementList): - (JSC::SyntaxChecker::createFormalParameterList): - (JSC::SyntaxChecker::createClause): - (JSC::SyntaxChecker::createClauseList): - (JSC::SyntaxChecker::setUsesArguments): - (JSC::SyntaxChecker::createFuncDeclStatement): - (JSC::SyntaxChecker::createBlockStatement): - (JSC::SyntaxChecker::createExprStatement): - (JSC::SyntaxChecker::createIfStatement): - (JSC::SyntaxChecker::createForLoop): - (JSC::SyntaxChecker::createForInLoop): - (JSC::SyntaxChecker::createEmptyStatement): - (JSC::SyntaxChecker::createVarStatement): - (JSC::SyntaxChecker::createReturnStatement): - (JSC::SyntaxChecker::createBreakStatement): - (JSC::SyntaxChecker::createContinueStatement): - (JSC::SyntaxChecker::createTryStatement): - (JSC::SyntaxChecker::createSwitchStatement): - (JSC::SyntaxChecker::createWhileStatement): - (JSC::SyntaxChecker::createWithStatement): - (JSC::SyntaxChecker::createDoWhileStatement): - (JSC::SyntaxChecker::createLabelStatement): - (JSC::SyntaxChecker::createThrowStatement): - (JSC::SyntaxChecker::createDebugger): - (JSC::SyntaxChecker::createConstStatement): - (JSC::SyntaxChecker::appendConstDecl): - (JSC::SyntaxChecker::createGetterOrSetterProperty): - (JSC::SyntaxChecker::appendStatement): - (JSC::SyntaxChecker::addVar): - (JSC::SyntaxChecker::combineCommaNodes): - (JSC::SyntaxChecker::evalCount): - (JSC::SyntaxChecker::appendBinaryExpressionInfo): - (JSC::SyntaxChecker::operatorStackPop): - * runtime/JSGlobalData.h: - * wtf/Platform.h: - * wtf/ThreadSpecific.h: - (WTF::T): - -2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - Optimization of the QScriptValuePrivate. - - Patch change only internals of the QScriptValuePrivate. - Most of the QScriptValuePrivate's attributes were moved - into an union. - - [Qt] Optimization of the QScriptVAluePrivate. - https://bugs.webkit.org/show_bug.cgi?id=40415 - - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::globalObject): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::): - (QScriptValuePrivate::~QScriptValuePrivate): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::toObject): - (QScriptValuePrivate::equals): - (QScriptValuePrivate::strictlyEquals): - (QScriptValuePrivate::assignEngine): - (QScriptValuePrivate::operator JSValueRef): - (QScriptValuePrivate::operator JSObjectRef): - (QScriptValuePrivate::refinedJSValue): + * runtime/RegExpObject.h: -2010-06-23 Kwang Yul Seo <skyul@company100.net> +2011-02-20 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. - [GTK] Implement ThreadSpecific with glib - https://bugs.webkit.org/show_bug.cgi?id=39829 - - Implement ThreadSpecific with glib's GStaticPrivate. - This patch makes it possible to build GTK port without pthread. - - * wtf/ThreadSpecific.h: - (WTF::::ThreadSpecific): - (WTF::::~ThreadSpecific): - (WTF::::get): - (WTF::::set): - (WTF::::destroy): + https://bugs.webkit.org/show_bug.cgi?id=54839 + Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction. -2010-06-23 Leandro Pereira <leandro@profusion.mobi> + Historically, Native functions used to be represented by PrototypeFunctions, however + since introducing call optimizations to the JIT this has used JSFunctions for host + calls too. At the point this change was made, the interpreter continued to use + PrototypeFunctions, however since fallback from the JIT to interpreter was introduced + the interpreter has had to be able to run using host functions represented using + JSFunctions - leading to an unnecessary and redundant divergence in behaviour between + interpreter only builds, and situations where the JIT has fallen back to interpreting. - Unreviewed build fix. + NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction + for wrappers for host functions, and as such can also be removed. - * CMakeLists.txt: Add runtime/RegExpCache.cpp. + GlobalEvalFunction is a redundant wrapper that happens to be derived from + PrototypeFunction. It existed to hold a reference to the global object - but since all + functions how derive from JSObjectWithGlobalObject, this no longer requires an + additional class to provide this functionality. -2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. - - Adding regular expression caching to JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=38142 - - The cache is based on Round Robin eviction policy, and - can cache at most 256 character long regular expressions, - and at most 256 of them. These values can be changed at compile time. - - * GNUmakefile.am: - * JavaScriptCore.gypi: - * JavaScriptCore.pro: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.JSVALUE32_64only.exp: + * JavaScriptCore.JSVALUE64only.exp: * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecompiler/NodesCodegen.cpp: - (JSC::RegExpNode::emitBytecode): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::~JSGlobalData): - * runtime/JSGlobalData.h: - (JSC::JSGlobalData::regExpCache): - * runtime/RegExpCache.cpp: Added. - (JSC::RegExpCache::lookupOrCreate): - (JSC::RegExpCache::create): - (JSC::RegExpCache::RegExpCache): - * runtime/RegExpCache.h: Added. - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpKey.h: Added. - (JSC::RegExpKey::RegExpKey): - (JSC::RegExpKey::getFlagsValue): - (WTF::operator==): - (WTF::): - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncCompile): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - -2010-06-22 Gabor Loki <loki@webkit.org> - - Reviewed by Geoffrey Garen. + Removed symbols / references to files. - Add native call support for ARM and Thumb-2 JIT. - https://bugs.webkit.org/show_bug.cgi?id=40231 - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * wtf/Platform.h: + * runtime/GlobalEvalFunction.cpp: Removed. + * runtime/GlobalEvalFunction.h: Removed. + * runtime/NativeFunctionWrapper.h: Removed. + * runtime/PrototypeFunction.cpp: Removed. + * runtime/PrototypeFunction.h: Removed. + Removed. -2010-06-21 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Make JSC more resilient in the face of parse failures - https://bugs.webkit.org/show_bug.cgi?id=40951 - - A number of recent bugs have occurred due to issues like miscounting - BOMs, etc which lead to interesting crashes later on. Adding this - logic hardens JSC in the face of these errors, and has no impact on - performance (32bit jit actually gets 0.7% faster but I put that down - to cache effects). - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - (JSC::CodeBlock::lineNumberForBytecodeOffset): - (JSC::CodeBlock::expressionRangeForBytecodeOffset): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::bytecodeOffset): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::privateExecute): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/ArrayPrototype.cpp: - (JSC::isNumericCompareFunction): * runtime/Executable.cpp: - (JSC::FunctionExecutable::compileForCall): - (JSC::FunctionExecutable::compileForConstruct): - (JSC::FunctionExecutable::generateJITCodeForCall): - (JSC::FunctionExecutable::generateJITCodeForConstruct): - (JSC::FunctionExecutable::reparseExceptionInfo): - (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::NativeExecutable::~NativeExecutable): * runtime/Executable.h: - (JSC::FunctionExecutable::bytecodeForCall): - (JSC::FunctionExecutable::bytecodeForConstruct): + (JSC::NativeExecutable::create): + (JSC::NativeExecutable::NativeExecutable): + (JSC::JSFunction::nativeFunction): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getCallData): + * runtime/JSFunction.h: * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::numericCompareFunction): - -2010-06-21 John Sullivan <sullivan@apple.com> - - Reviewed by Adam Roben. - - RetainPtr can't be used in HashMaps or HashSets - <https://bugs.webkit.org/show_bug.cgi?id=40938> - - Added hashing knowledge similar to that in COMPtr.h. - - * wtf/RetainPtr.h: - (WTF::RetainPtr::RetainPtr): - New function, copied from COMPtr.h but for the type change. - (WTF::RetainPtr::isHashTableDeletedValue): - Ditto. - (WTF::RetainPtr::hashTableDeletedValue): - Ditto. - Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change. - The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h) - rather than the COMPtr implementation. - -2010-06-19 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Need to ensure that we grow the RegisterFile when creating a callframe for host code - https://bugs.webkit.org/show_bug.cgi?id=40858 - <rdar://problem/8108986> - - In the past the use of the callframe in hostcode was much more - limited. Now that we expect the callframe to always be valid - we need to grow the RegisterFile so that this is actually the - case. In this particular case the problem was failing to grow - the registerfile could lead to a callframe that extended beyond - RegisterFiler::end(), so vm re-entry would clobber the callframe - other scenarios could also lead to badness. - - I was unable to construct a simple testcase to trigger badness, - and any such testcase would be so dependent on exact vm stack - layout that it would be unlikely to work as a testcase following - any callframe or register allocation changes anyway. - - Thankfully the new assertion I added should help to catch these - failures in future, and triggers on a couple of tests currently. - - * interpreter/CallFrame.cpp: - (JSC::CallFrame::registerFile): - * interpreter/CallFrame.h: - (JSC::ExecState::init): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - -2010-06-21 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Speech Input Patch 0: Added compilation argument to conditionally compile pending patches. - https://bugs.webkit.org/show_bug.cgi?id=40878 - - * Configurations/FeatureDefines.xcconfig: - -2010-06-21 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Kent Tamura. - - [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1 - https://bugs.webkit.org/show_bug.cgi?id=40653 - - Currently, other ports do not use global new/delete operator overloading - when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable - "global fastMalloc new" because the default new/delete causes crash on device. - We need to replace them with Brew MP's MALLOC/FREE. - - * wtf/FastMalloc.h: - -2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Work around a build problem with libjscore on Symbian. - https://bugs.webkit.org/show_bug.cgi?id=40840 - - Sbsv2 sometimes have problems with debug/release configuration - determination causing QtWebKit in release to try linking with the debug - JavaScriptCore static library. This patch limit the jscore/jscored - r58306 fix necessary for mac builds only to the mac platform to prevent the - different name problem. - - The real fix would be to fix qmake or the toolchain, this patch might - help meanwhile. - - * JavaScriptCore.pri: - -2010-06-21 Patrick Gansterer <paroga@paroga.com> - - Reviewed by Kent Tamura. - - Buildfix after r61338. - https://bugs.webkit.org/show_bug.cgi?id=40888 - - roundUpAllocationSize is needed in RegisterFile.h. - - * jit/ExecutableAllocator.h: - -2010-06-19 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - Include <string.h> in StringExtras.h - https://bugs.webkit.org/show_bug.cgi?id=40808 - - Without string.h, RVCT 2.2 can't compile StringExtras.h. - It can't find strlen and strncmp. - - * wtf/StringExtras.h: - -2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Don't use __attribute__((may_alias)) with the Intel compiler, - as it doesn't understand it. - - * wtf/Vector.h: - -2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Fix compilation with the Intel C++ compiler (11.1.072). - - Like RVCT, label pointers must be void*, not const void*. - - * bytecode/Opcode.h: - -2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Add the WTF_COMPILER_INTEL for when the Intel compiler is used - for building. Usually, the Intel compiler masquerades as - another compiler in the system and gets away with it, but some - times specific fixes are required (such as when using language - extensions). - - * wtf/Platform.h: - -2010-06-18 Oliver Hunt <oliver@apple.com> - - Reviewed by Geoffrey Garen. - - Incorrect handling of multiple BOMs scattered through a file. - https://bugs.webkit.org/show_bug.cgi?id=40865 - - When determining the offset of open and close braces in a source - with BOMs we were finishing our count early as we failed to account - for BOMs prior to the open/close brace positions effecting those - positions. - - * parser/Lexer.cpp: - (JSC::Lexer::sourceCode): - -2010-06-17 Oliver Hunt <oliver@apple.com> - - Reviewed by Sam Weinig. - - Don't throw away exception information for functions that use exceptions - https://bugs.webkit.org/show_bug.cgi?id=40786 - - Simple patch to stop JSC from throwing away the exception information - of a function that uses "exceptiony" features like try and throw. This - is a speed up for catching expressions but it's difficult to quantify as - the old cost of reparsing is amortised over all exceptions caught in the - effected function. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::emitCatch): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitThrow): - -2010-06-18 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Add PlatformStrategies and PluginStrategy classes. - https://bugs.webkit.org/show_bug.cgi?id=40850 - - * wtf/Platform.h: - -2010-06-18 Leandro Pereira <leandro@profusion.mobi> - - [EFL] Unreviewed build fix. - - * wtf/CMakeLists.txt: Add MD5.cpp. - -2010-06-17 Shu Chang <chang.shu@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - [Qt] Fix the link error on symbian with ENABLE_JIT=0. - 1. Add "#if ENABLE(JIT)" in the header file; - 2. Put feature enable/disable logic to a common.pri so - that both JavaScriptCore.pri and WebCore.pri can share. - - https://bugs.webkit.org/show_bug.cgi?id=40780 - - * JavaScriptCore.pri: - * jit/ExecutableAllocator.h: - -2010-06-17 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Use adoptRef and create functions in more code paths - https://bugs.webkit.org/show_bug.cgi?id=40760 - - * API/JSClassRef.h: Removed unneeded include of RefCounted.h. - * API/JSWeakObjectMapRefPrivate.cpp: Ditto. - - * bytecode/CodeBlock.h: - (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the - SharedSymbolTable::create function instead of calling new directly. - - * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable - class and made the constructor private. - -2010-06-17 Mark Brand <mabrand@mabrand.nl> - - Reviewed by Simon Hausmann. - - [Qt] use "win32-g++*" scope to match all MinGW makespecs - - The scope "win32-g++" comes from the name of the makespec. However, it - is frequently used to check for MinGW. This works fine as long as - win32-g++ is the only makespec for MinGW. Now we need the wildcard - to cover "win32-g++-cross" as well. - - * JavaScriptCore.pro: - -2010-06-16 Darin Adler <darin@apple.com> - - Reviewed by David Levin. - - Deploy adoptRef in more places, including all HTML and MathML elements - https://bugs.webkit.org/show_bug.cgi?id=39941 - - * wtf/ThreadSafeShared.h: Made the constructor protected and removed the - unneeded support for initial reference counts other than 1. - -2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu> - - Reviewed by Geoffrey Garen. - - Store matchBegin directly in the array of output instead of the stack. - https://bugs.webkit.org/show_bug.cgi?id=38988 - - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::generateDisjunction): - (JSC::Yarr::RegexGenerator::generate): - -2010-06-15 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Make JavaScriptCore build with clang++. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutVirtualRegister): - Explicitly cast to an int. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::compileRegex): - Return 0 instead of false. - -2010-06-15 Adam Roben <aroben@apple.com> - - Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds - - Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>. - - Reviewed by Sam Weinig. - - * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of - JavaScriptCore's DerivedSources directory to - AppleInternal/Sources/JavaScriptCore. - -2010-06-15 Gabor Loki <loki@webkit.org> - - Rubber-stamped by Eric Seidel. - - Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM - https://bugs.webkit.org/show_bug.cgi?id=40423 - - Using OBJECT_OFFSETOF macro instead of objectof to bypass access to - non-static data member warning. - - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - -2010-06-11 Eric Seidel <eric@webkit.org> - - Reviewed by Adam Barth. - - Rename the rest of the *Tokenizer classes to *DocumentParser - https://bugs.webkit.org/show_bug.cgi?id=40507 - - * wtf/Platform.h: - - fixed a comment to match new names. - -2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Explicit conversions from QtScript types to JSC opaque types were removed. - https://bugs.webkit.org/show_bug.cgi?id=40412 - - Conversion between a JSC C types and a QtScript private types, takes - main part of the source code. In most cases a mapping between the types - is one to one. New cast operators were added to simplify the code. - - The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef. - The QScriptEnginePrivate could be casted to the JSGlobalContext. - The QScriptProgramPrivate could be casted to the JSStringRef. - - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::evaluate): - (QScriptEnginePrivate::newObject): - (QScriptEnginePrivate::globalObject): - * qt/api/qscriptengine_p.h: - (QScriptEnginePrivate::operator JSGlobalContextRef): - * qt/api/qscriptprogram_p.h: - (QScriptProgramPrivate::operator JSStringRef): - * qt/api/qscriptsyntaxcheckresult.cpp: - (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate): - (QScriptSyntaxCheckResultPrivate::errorMessage): - (QScriptSyntaxCheckResultPrivate::errorLineNumber): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::~QScriptValuePrivate): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::isBool): - (QScriptValuePrivate::isNumber): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isString): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::isFunction): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::toObject): - (QScriptValuePrivate::equals): - (QScriptValuePrivate::strictlyEquals): - (QScriptValuePrivate::instanceOf): - (QScriptValuePrivate::call): - (QScriptValuePrivate::operator JSValueRef): - (QScriptValuePrivate::operator JSObjectRef): - (QScriptValuePrivate::setValue): - (QScriptValuePrivate::inherits): - (QScriptValuePrivate::refinedJSValue): - -2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Implement the simple text code path. - https://bugs.webkit.org/show_bug.cgi?id=40077 - - Remove the FONT_FAST_PATH macro and use the Qt's - fast text implementation instead of the one of WebKit. - - The Qt::TextBypassShaping flag is used to tell Qt to - only use the glyph advances. - - Qt 4.7 is needed to get this flag thus the complex path is always - used if QtWebKit is compiled against an earlier version. - - Contrary to the WebKit's implementation, the complex code path - is taken if the text is RightToLeft, justified or is formatted - with non-zero letter or word spacing. - - * wtf/Platform.h: - -2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Kenneth Rohde Christiansen. - - add codePointCompare to JavaScriptCore.exp - https://bugs.webkit.org/show_bug.cgi?id=40426 - - * JavaScriptCore.exp: - -2010-06-10 Oliver Hunt <oliver@apple.com> - - Reviewed by Maciej Stachowiak. - - Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode - https://bugs.webkit.org/show_bug.cgi?id=40367 - - If we're in the slow case of right shift we must write the type tag as - the only reason we hit this code path is because we know we're working - with a double. eg. we are guaranteed that the tag cannot be reused. - - * jit/JITArithmetic32_64.cpp: - (JSC::JIT::emitRightShiftSlowCase): - -2010-06-10 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - Remove weakRandomNumber - https://bugs.webkit.org/show_bug.cgi?id=40291 - - weakRandomNumber is used nowhere. Currently, WeakRandom is used instead. - - * wtf/RandomNumber.cpp: - * wtf/RandomNumber.h: - -2010-06-09 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Brady Eidson. - - Export StringImpl::ascii(). It might be not very useful, but it's a public function. - - * JavaScriptCore.exp: - -2010-06-09 Leandro Pereira <leandro@profusion.mobi> - - Reviewed by Adam Treat. - - [EFL] Allow building core libraries as shared objects to speed up - linking time on machines with small amounts of memory. - http://webkit.org/b/39899 - - * CMakeLists.txt: If building with shared core, install the lib. - * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically. - * wtf/CMakeLists.txt: If building with shared core, install the lib. - -2010-06-09 Gabor Loki <loki@webkit.org> - - Reviewed by David Levin. - - Remove some unused variable warnings from JITOpcodes - https://bugs.webkit.org/show_bug.cgi?id=40298 - - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): - -2010-05-18 Yuzo Fujishima <yuzo@google.com> - - Reviewed by Shinichiro Hamaji. - - Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText - Add U16_LENGTH that is needed to implement CSS character serialization. - https://bugs.webkit.org/show_bug.cgi?id=34529 - - * wtf/unicode/qt4/UnicodeQt4.h: - * wtf/unicode/wince/UnicodeWince.h: - -2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60830. - http://trac.webkit.org/changeset/60830 - https://bugs.webkit.org/show_bug.cgi?id=40305 - - Broke the Windows build (Requested by abarth on #webkit). - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.h: Removed. - * wtf/win/OwnPtrWin.h: Removed. - -2010-06-08 MORITA Hajime <morrita@google.com> - - Unreviewed. An attempt to fix test break. - - * Configurations/FeatureDefines.xcconfig: - -2010-06-08 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Adam Barth. - - Change OwnPtrCommon to include platform-specific headers - https://bugs.webkit.org/show_bug.cgi?id=40279 - - Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. - Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. - - * JavaScriptCore.vcproj/WTF/WTF.vcproj: - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.h: Added. - * wtf/win/OwnPtrWin.h: Added. - -2010-06-07 MORITA Hajime <morrita@google.com> - - Reviewed by Kent Tamura. - - https://bugs.webkit.org/show_bug.cgi?id=40219 - [Mac] ENABLE_METER_TAG should be enabled - - Added ENABLE_METER_TAG. - - * Configurations/FeatureDefines.xcconfig: - -2010-06-07 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Add more types to OwnPtr - https://bugs.webkit.org/show_bug.cgi?id=39667 - - Add ISSL and ISocket to the list of OwnPtr-ed type. - - * wtf/OwnPtrCommon.h: - * wtf/brew/OwnPtrBrew.cpp: - (WTF::deleteOwnedPtr): - -2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com> - - Reviewed by Simon Hausmann. - - [Qt] Crash when compiling on Snow Leopard and running on Leopard - https://bugs.webkit.org/show_bug.cgi?id=31403 - - Disable the use of pthread_setname_np and other symbols - when targetting Leopard. - - Use the defines TARGETING_XX instead of BUILDING_ON_XX - for features that cannot be used before Snow Leopard. - - * wtf/Platform.h: - -2010-06-07 Gabor Loki <loki@webkit.org> - - Reviewed by NOBODY (JSVALUE32_64 build fix). - - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): - -2010-06-06 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (windows build fix pt 2). - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-06-06 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (windows build fix pt 1). - - * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-06-06 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 40214 - Clean up error construction / throwing in JSC. - - The one egregious insanity here is that creating an error requires - a VM-entry-esqe-host call (the string argument is wrapped as a JS - object & pushed on the RegisterFile, then unwrapped back to a - UString). Changing this also means you only require a global - object, not an ExecState, to create an error. - - The methods to create error objects are also parameterized - requiring a switch on the type, which can be made cleaner and - faster by moving to a separate method per error type. Code to add - divot information to error had been duplicated, and is coalesced - back into a single function. - - Convenience methods added to create & throw type & syntax error - with a default error message, since this is a common case. - - Also, errors are currently thrown either using - "throwError(exec, error)" or "exec->setException(error)" - unify - on the former, since this is more commonly used. Add - "throwVMError(exec, error)" equivalents, as a convenience for - cases where the result was being wrapped in "JSValue::encode(...)". + (JSC::JSGlobalData::getHostFunction): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::getCTIStub): + Added interpreter-friendly constructors for NativeExecutables. - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnPropertySlot): - (JSC::::put): - (JSC::::deleteProperty): - (JSC::::construct): - (JSC::::hasInstance): - (JSC::::call): - (JSC::::toNumber): - (JSC::::toString): - (JSC::::staticValueGetter): - (JSC::::staticFunctionGetter): - (JSC::::callbackGetter): - * API/JSObjectRef.cpp: - (JSObjectMakeError): - * JavaScriptCore.exp: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitNewError): - (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): - * bytecompiler/BytecodeGenerator.h: - * bytecompiler/NodesCodegen.cpp: - (JSC::ThrowableExpressionData::emitThrowError): - (JSC::RegExpNode::emitBytecode): - (JSC::PostfixErrorNode::emitBytecode): - (JSC::PrefixErrorNode::emitBytecode): - (JSC::AssignErrorNode::emitBytecode): - (JSC::ForInNode::emitBytecode): - (JSC::ContinueNode::emitBytecode): - (JSC::BreakNode::emitBytecode): - (JSC::ReturnNode::emitBytecode): - (JSC::LabelNode::emitBytecode): - * interpreter/CallFrame.h: * interpreter/Interpreter.cpp: - (JSC::Interpreter::throwException): - (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): * jsc.cpp: - (functionRun): - (functionLoad): - (functionCheckSyntax): - * parser/Nodes.h: * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - (JSC::dateProtoFuncToJSON): - * runtime/Error.cpp: - (JSC::createError): - (JSC::createEvalError): - (JSC::createRangeError): - (JSC::createReferenceError): - (JSC::createSyntaxError): - (JSC::createTypeError): - (JSC::createURIError): - (JSC::addErrorSourceInfo): - (JSC::addErrorDivotInfo): - (JSC::addErrorInfo): - (JSC::hasErrorInfo): - (JSC::throwError): - (JSC::throwTypeError): - (JSC::throwSyntaxError): - * runtime/Error.h: - (JSC::throwVMError): - (JSC::throwVMTypeError): - * runtime/ErrorConstructor.cpp: - (JSC::constructWithErrorConstructor): - (JSC::callErrorConstructor): - * runtime/ErrorConstructor.h: - * runtime/ErrorInstance.cpp: - (JSC::ErrorInstance::ErrorInstance): - (JSC::ErrorInstance::create): - * runtime/ErrorInstance.h: + * runtime/BooleanPrototype.h: + * runtime/CallData.h: + * runtime/DateConstructor.cpp: + * runtime/DateConstructor.h: * runtime/ErrorPrototype.cpp: - (JSC::ErrorPrototype::ErrorPrototype): - * runtime/ExceptionHelpers.cpp: - (JSC::createStackOverflowError): - (JSC::createUndefinedVariableError): - (JSC::createInvalidParamError): - (JSC::createNotAConstructorError): - (JSC::createNotAFunctionError): - (JSC::createNotAnObjectError): - (JSC::throwOutOfMemoryError): - * runtime/ExceptionHelpers.h: - * runtime/Executable.cpp: - (JSC::EvalExecutable::compile): - (JSC::ProgramExecutable::checkSyntax): - (JSC::ProgramExecutable::compile): - * runtime/FunctionConstructor.cpp: - (JSC::constructFunction): + * runtime/ErrorPrototype.h: * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/Identifier.cpp: - (JSC::Identifier::from): - * runtime/Identifier.h: - * runtime/JSArray.cpp: - (JSC::JSArray::put): - * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): + * runtime/FunctionPrototype.h: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObject.h: * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - * runtime/JSONObject.cpp: - (JSC::Stringifier::appendStringifiedValue): - (JSC::Walker::walk): - (JSC::JSONProtoFuncParse): - (JSC::JSONProtoFuncStringify): - * runtime/JSObject.cpp: - (JSC::throwSetterError): - (JSC::JSObject::put): - (JSC::JSObject::putWithAttributes): - (JSC::JSObject::defaultValue): - (JSC::JSObject::hasInstance): - (JSC::JSObject::defineOwnProperty): - * runtime/JSObject.h: - * runtime/JSValue.cpp: - (JSC::JSValue::toObjectSlowCase): - (JSC::JSValue::synthesizeObject): - (JSC::JSValue::synthesizePrototype): - * runtime/NativeErrorConstructor.cpp: - (JSC::constructWithNativeErrorConstructor): - (JSC::callNativeErrorConstructor): - * runtime/NativeErrorConstructor.h: + * runtime/Lookup.cpp: * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): + * runtime/NumberPrototype.h: * runtime/ObjectConstructor.cpp: - (JSC::objectConstructorGetPrototypeOf): - (JSC::objectConstructorGetOwnPropertyDescriptor): - (JSC::objectConstructorGetOwnPropertyNames): - (JSC::objectConstructorKeys): - (JSC::toPropertyDescriptor): - (JSC::objectConstructorDefineProperty): - (JSC::objectConstructorDefineProperties): - (JSC::objectConstructorCreate): + * runtime/ObjectConstructor.h: * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - * runtime/RegExpConstructor.cpp: - (JSC::constructRegExp): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::match): + * runtime/ObjectPrototype.h: * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncToString): - -2010-06-05 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Eric Seidel. - - [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx - https://bugs.webkit.org/show_bug.cgi?id=39710 - - Build fix for BREW MP. - - * wtf/MathExtras.h: - -2010-06-04 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Adler. - - HTML5 parser should be within 1% of old parser performance - https://bugs.webkit.org/show_bug.cgi?id=40172 - - Fix cast in this operator= to allow for assignment between vectors with - different inline capacities (as clearly intended by its author). - - * wtf/Vector.h: - (WTF::::operator): - -2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - New QtScript API; QScriptValue::instanceOf. - - New function create an easy way to check value's prototype hierarchy. - - [Qt] QScriptValue should have an instanceOf method - https://bugs.webkit.org/show_bug.cgi?id=40120 - - * qt/api/qscriptvalue.cpp: - (QScriptValue::instanceOf): - * qt/api/qscriptvalue.h: - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::instanceOf): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: - (tst_QScriptValue::instanceOf_initData): - (tst_QScriptValue::instanceOf_makeData): - (tst_QScriptValue::instanceOf_test): - -2010-06-04 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (interpreter build fix). - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): + * runtime/RegExpPrototype.h: + * runtime/SmallStrings.h: + * runtime/StringConstructor.cpp: + * runtime/StringConstructor.h: + Removed use of redundant classes. -2010-06-04 Mark Rowe <mrowe@apple.com> +2011-02-19 Laszlo Gombos <laszlo.1.gombos@nokia.com> - Silence some warnings seen on the build bot. + Unreviewed build fix for Symbian. - * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline. - * JavaScriptCore.JSVALUE32only.exp: Ditto. - * JavaScriptCore.JSVALUE64only.exp: Ditto. - * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't - complain about not knowing how to compile them. + [Symbian] Revert the removal of linking + against hal after r79126. -2010-06-04 Gavin Barraclough <barraclough@apple.com> + Dependency on the hal library can not be removed + as it is still used (e.g. in MarkStackSymbian.cpp). - Reviewed by Oliver Hunt. + * JavaScriptCore.pri: - Bug 40187 - Change function signature of NativeConstructor to match NativeFunction +2011-02-19 Gavin Barraclough <barraclough@apple.com> - Mostly for consistency, but constructor & args arguments are redundant, - and this will help if we wish to be able to JIT calls to more constructors. + Interpreter build fix. - * API/JSCallbackConstructor.cpp: - (JSC::constructJSCallback): - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::construct): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::executeConstruct): - * interpreter/Interpreter.h: - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): * runtime/ArrayConstructor.cpp: - (JSC::constructWithArrayConstructor): - * runtime/BooleanConstructor.cpp: - (JSC::constructWithBooleanConstructor): - * runtime/ConstructData.cpp: - (JSC::construct): - * runtime/ConstructData.h: + * runtime/BooleanPrototype.cpp: * runtime/DateConstructor.cpp: - (JSC::constructWithDateConstructor): - * runtime/Error.cpp: - (JSC::constructNativeError): - (JSC::Error::create): - * runtime/ErrorConstructor.cpp: - (JSC::constructWithErrorConstructor): - * runtime/FunctionConstructor.cpp: - (JSC::constructWithFunctionConstructor): - * runtime/NativeErrorConstructor.cpp: - (JSC::constructWithNativeErrorConstructor): - * runtime/NativeErrorConstructor.h: - (JSC::NativeErrorConstructor::errorStructure): - * runtime/NumberConstructor.cpp: - (JSC::constructWithNumberConstructor): + * runtime/ErrorPrototype.cpp: + * runtime/FunctionPrototype.cpp: + * runtime/Lookup.cpp: + * runtime/NumberPrototype.cpp: * runtime/ObjectConstructor.cpp: - (JSC::constructWithObjectConstructor): - * runtime/RegExpConstructor.cpp: - (JSC::constructWithRegExpConstructor): + * runtime/ObjectPrototype.cpp: + * runtime/RegExpPrototype.cpp: * runtime/StringConstructor.cpp: - (JSC::constructWithStringConstructor): -2010-06-04 Tony Gentilcore <tonyg@chromium.org> +2011-02-19 Gavin Barraclough <barraclough@apple.com> - Reviewed by Adam Barth. - - Add a takeFirst() method to Deque and use it where appropriate. - https://bugs.webkit.org/show_bug.cgi?id=40089 - - * wtf/Deque.h: - (WTF::::takeFirst): - * wtf/MainThread.cpp: - (WTF::dispatchFunctionsFromMainThread): - * wtf/MessageQueue.h: - (WTF::::tryGetMessage): - -2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Remove a QEXPECT_FAIL flag from an autotest. - - Test tst_QScriptEngine::globalObject pass after 36600 bug - fix have been applied. - - [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed. - https://bugs.webkit.org/show_bug.cgi?id=40114 - - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::globalObject): - -2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - Fix QScriptValue::equals. - - Handling for a few edge cases were added. Now comparison between - NaN, an invalid objects should works as supposed. + Build fix!! - [Qt] QScriptValue::equals problems - https://bugs.webkit.org/show_bug.cgi?id=40110 - - * qt/api/qscriptvalue.cpp: - (QScriptValue::equals): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::equals): - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: - (tst_QScriptValue::equals_initData): - (tst_QScriptValue::equals_makeData): - (tst_QScriptValue::equals_test): - -2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> - - Reviewed by Kenneth Rohde Christiansen. - - New states in QScriptValuePrivate. - - The CSpecial state was divided into CNull and CUndefined. It simplify - the QScriptValue code by avoiding a few "cast" and "if". - Moreover the MSVS compiler didn't like casting between a double and an - enum which is avoided now. - - [Qt] The QScriptValuePrivate::CSpecial is too generic. - https://bugs.webkit.org/show_bug.cgi?id=40067 - - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::): - (QScriptValuePrivate::QScriptValuePrivate): - (QScriptValuePrivate::isNull): - (QScriptValuePrivate::isUndefined): - (QScriptValuePrivate::toString): - (QScriptValuePrivate::toNumber): - (QScriptValuePrivate::toBool): - (QScriptValuePrivate::toObject): - (QScriptValuePrivate::assignEngine): - (QScriptValuePrivate::isNumberBased): - -2010-06-03 Gavin Barraclough <barraclough@apple.com> + * JavaScriptCore.exp: - Reviewed by NOBODY (Qt build fix). +2011-02-19 Gavin Barraclough <barraclough@apple.com> - * wtf/Platform.h: + Windows build fix!! -2010-06-03 Gavin Barraclough <barraclough@apple.com> + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Reviewed by Mark Rowe. +2011-02-19 Gavin Barraclough <barraclough@apple.com> - Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms - This was fixed in bug #40094. + Windows build fix! * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * wtf/Platform.h: -2010-06-03 Gavin Barraclough <barraclough@apple.com> +2011-02-19 Gavin Barraclough <barraclough@apple.com> - Reviewed by NOBODY (Interpreter build fix). + Build fix! - * JavaScriptCore.JSVALUE32_64only.exp: - * JavaScriptCore.JSVALUE32only.exp: - * JavaScriptCore.JSVALUE64only.exp: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - -2010-06-03 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (windows build fix II). + * JavaScriptCore.exp: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: +2011-02-18 Gavin Barraclough <barraclough@apple.com> -2010-06-03 Gavin Barraclough <barraclough@apple.com> + Reviewed by Sam Weinig. - Reviewed by NOBODY (windows build fix). + Bug 54786 - Devirtualize JSCell::classInfo() - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Instead of making a virtual function call, add a pointer to the ClassInfo + onto Structure. -2010-06-02 Gavin Barraclough <barraclough@apple.com> + This removes a virtual function call, and paves the way towards removing all + the createStructure methods, and StructureFlags/AnonymousSlotCount properties + (these should be able to move onto ClassInfo). - Reviewed by Oliver Hunt. + Calls to Structure::create must now pass a pointer to the ClassInfo for the + structure. All objects now have a ClassInfo pointer, non-object cell types + still do not. - Bug 40094 - The return type of NativeFunction should be EncodedJSValue - On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not. + Changes are most mechanical, involving three steps: + * Remove virtual classInfo() methods. + * Add &s_info parameter to calls to Structure::create. + * Rename ClassInfo static members on classes from 'info' to 's_info', + for consistency. + * API/JSCallbackConstructor.cpp: + * API/JSCallbackConstructor.h: * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): * API/JSCallbackFunction.h: + * API/JSCallbackObject.cpp: * API/JSCallbackObject.h: * API/JSCallbackObjectFunctions.h: - (JSC::::call): + * API/JSObjectRef.cpp: + * API/JSValueRef.cpp: + * API/JSWeakObjectMapRefPrivate.cpp: * JavaScriptCore.exp: + * debugger/Debugger.cpp: + * debugger/DebuggerActivation.h: + * debugger/DebuggerCallFrame.cpp: * interpreter/Interpreter.cpp: - (JSC::Interpreter::executeCall): + * jit/JITCall32_64.cpp: + * jit/JITOpcodes.cpp: * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionCheckSyntax): - (functionSetSamplingFlags): - (functionClearSamplingFlags): - (functionReadline): - (functionQuit): + * profiler/Profiler.cpp: + * runtime/Arguments.cpp: + * runtime/Arguments.h: * runtime/ArrayConstructor.cpp: - (JSC::callArrayConstructor): - (JSC::arrayConstructorIsArray): * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::callBooleanConstructor): + * runtime/ArrayPrototype.h: + * runtime/BooleanObject.cpp: + * runtime/BooleanObject.h: * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/CallData.h: * runtime/DateConstructor.cpp: - (JSC::callDate): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): + * runtime/DateInstance.cpp: + * runtime/DateInstance.h: * runtime/DatePrototype.cpp: - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - (JSC::dateProtoFuncToJSON): - * runtime/ErrorConstructor.cpp: - (JSC::callErrorConstructor): + * runtime/DatePrototype.h: + * runtime/ErrorInstance.cpp: + * runtime/ErrorInstance.h: * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/FunctionConstructor.cpp: - (JSC::callFunctionConstructor): * runtime/FunctionPrototype.cpp: - (JSC::callFunctionPrototype): - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): + * runtime/FunctionPrototype.h: + * runtime/GetterSetter.h: + * runtime/GlobalEvalFunction.h: + * runtime/InternalFunction.cpp: + * runtime/InternalFunction.h: + * runtime/JSAPIValueWrapper.h: + * runtime/JSActivation.cpp: + * runtime/JSActivation.h: + * runtime/JSArray.cpp: + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + * runtime/JSByteArray.h: + * runtime/JSCell.cpp: * runtime/JSCell.h: - (JSC::getCallData): - (JSC::getConstructData): * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): * runtime/JSFunction.h: - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncDecodeURI): - (JSC::globalFuncDecodeURIComponent): - (JSC::globalFuncEncodeURI): - (JSC::globalFuncEncodeURIComponent): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSGlobalObjectFunctions.h: + * runtime/JSGlobalData.cpp: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObject.h: + * runtime/JSNotAnObject.h: * runtime/JSONObject.cpp: - (JSC::JSONProtoFuncParse): - (JSC::JSONProtoFuncStringify): + * runtime/JSONObject.h: * runtime/JSObject.cpp: - (JSC::callDefaultValueFunction): - * runtime/JSValue.h: + * runtime/JSObject.h: + * runtime/JSObjectWithGlobalObject.h: + * runtime/JSPropertyNameIterator.h: + * runtime/JSStaticScopeObject.h: + * runtime/JSString.h: + * runtime/JSVariableObject.h: + * runtime/JSWrapperObject.h: + * runtime/JSZombie.cpp: + * runtime/JSZombie.h: + * runtime/Lookup.cpp: * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): + * runtime/MathObject.h: * runtime/NativeErrorConstructor.cpp: - (JSC::callNativeErrorConstructor): + * runtime/NativeErrorConstructor.h: * runtime/NumberConstructor.cpp: - (JSC::callNumberConstructor): + * runtime/NumberConstructor.h: + * runtime/NumberObject.cpp: + * runtime/NumberObject.h: * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): * runtime/ObjectConstructor.cpp: - (JSC::callObjectConstructor): - (JSC::objectConstructorGetPrototypeOf): - (JSC::objectConstructorGetOwnPropertyDescriptor): - (JSC::objectConstructorGetOwnPropertyNames): - (JSC::objectConstructorKeys): - (JSC::toPropertyDescriptor): - (JSC::objectConstructorDefineProperty): - (JSC::objectConstructorDefineProperties): - (JSC::objectConstructorCreate): * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/ObjectPrototype.h: * runtime/RegExpConstructor.cpp: - (JSC::callRegExpConstructor): + * runtime/RegExpConstructor.h: * runtime/RegExpObject.cpp: - (JSC::callRegExpObject): + * runtime/RegExpObject.h: * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): + * runtime/ScopeChain.cpp: * runtime/StringConstructor.cpp: - (JSC::stringFromCharCode): - (JSC::callStringConstructor): + * runtime/StringObject.cpp: + * runtime/StringObject.h: + * runtime/StringObjectThatMasqueradesAsUndefined.h: * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - (JSC::stringProtoFuncTrim): - (JSC::stringProtoFuncTrimLeft): - (JSC::stringProtoFuncTrimRight): - -2010-06-02 Mark Rowe <mrowe@apple.com> - - Reviewed by Gavin Barraclough. - - Add value-representation specific sections to the mac export file. + * runtime/StringPrototype.h: + * runtime/Structure.cpp: + * runtime/Structure.h: - * Configurations/JavaScriptCore.xcconfig: - * DerivedSources.make: - * JavaScriptCore.JSVALUE32_64only.exp: Added. - * JavaScriptCore.JSVALUE32only.exp: Added. - * JavaScriptCore.JSVALUE64only.exp: Added. - * JavaScriptCore.xcodeproj/project.pbxproj: +2011-02-19 David Kilzer <ddkilzer@apple.com> -2010-06-02 Mark Rowe <mrowe@apple.com> + <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc - Reviewed by Gavin Barraclough. + Reviewed by Dan Bernstein. - <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE. + * Configurations/Base.xcconfig: Added + JAVASCRIPTCORE_FRAMEWORKS_DIR variable. + * Configurations/JavaScriptCore.xcconfig: Used + JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH. + * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH + for Production configuration of jsc target. + (Copy Into Framework): Removed old build phase. + (Fix Framework Reference): Renamed build phase to "Copy Into + Framework". Added "set -x" call to make the script print the + commands it is running. Added code to exit early for Production + builds since this was never intended for them. Added code to + copy jsc into the JavaScriptCore.framework/Resources directory. + +2011-02-19 Siddharth Mathur <siddharth.mathur@nokia.com> - * pcre/pcre_exec.cpp: - (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good - reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug. + Reviewed by Laszlo Gombos. -2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + [Symbian] OSAllocator implementation for Symbian OS. + Manages both data and code region requests. V8 and Sunspider tested + OK with interpreter. Not tested with JSC JIT yet as it has unrelated + failures. Also no thread safety yet. + https://bugs.webkit.org/show_bug.cgi?id=51128 - Reviewed by Kenneth Rohde Christiansen. + * JavaScriptCore.pri: removed HAL linkage + * wtf/Bitmap.h: + (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty + * wtf/OSAllocator.h: + (WTF::OSAllocator::decommitAndRelease): decommit explicitly + * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface + (WTF::allocateCodeChunk): utility for code chunks + (WTF::deallocateCodeChunk): utility for code chunks + (WTF::dataAllocatorInstance): getter for data allocator instance + (WTF::OSAllocator::reserveUncommitted): + (WTF::OSAllocator::releaseDecommitted): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::decommit): + (WTF::OSAllocator::reserveAndCommit): + (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests + to one underlying Symbian chunk + (WTF::PageAllocatorSymbian::~PageAllocatorSymbian): + (WTF::PageAllocatorSymbian::reserve): + (WTF::PageAllocatorSymbian::release): + (WTF::PageAllocatorSymbian::commit): + (WTF::PageAllocatorSymbian::decommit): + (WTF::PageAllocatorSymbian::contains): + * wtf/PageAllocatorSymbian.h: Added. + (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk + (WTF::SymbianChunk::~SymbianChunk): + (WTF::SymbianChunk::contains): + +2011-02-19 Yong Li <yoli@rim.com> - Fix the QScriptValue::strictlyEquals function. + Reviewed by Eric Seidel. - Handling for a few edge cases was added. + https://bugs.webkit.org/show_bug.cgi?id=54687 + When being built with armcc, "int" bit fields are treated as + unsigned integers, which will fail the comparisons like "m_offset == -1". + Using "signed" fixes the problem. - New autotest that covers the QScriptValue::strictlyEquals function. + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: - [Qt] QScriptValue::strictlyEquals is broken - https://bugs.webkit.org/show_bug.cgi?id=36600 +2011-02-18 Geoffrey Garen <ggaren@apple.com> - * qt/api/qscriptvalue.cpp: - (QScriptValue::strictlyEquals): - * qt/api/qscriptvalue_p.h: - (QScriptValuePrivate::strictlyEquals): - * qt/tests/qscriptvalue/qscriptvalue.pro: - * qt/tests/qscriptvalue/tst_qscriptvalue.h: - * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added. - (tst_QScriptValue::strictlyEquals_initData): - (tst_QScriptValue::strictlyEquals_makeData): - (tst_QScriptValue::strictlyEquals_test): + Reviewed by Sam Weinig. -2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + Made MarkedSpace block iteration size-class agnostic + https://bugs.webkit.org/show_bug.cgi?id=54792 + + SunSpider reports no change. - Reviewed by Kenneth Rohde Christiansen. + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::clearMarks): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::objectCount): + (JSC::MarkedSpace::size): + (JSC::MarkedSpace::capacity): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::forEach): Iterate blocks in hashing order instead of + size class list order. This is a much simpler convention in a world + of many different size classes. - New function QScriptEngine::newObject. +2011-02-18 Kristian Amlie <kristian.amlie@nokia.com> - The function creates a object of class Object and returns it - as a QScriptValue. + Reviewed by Andreas Kling. - [Qt] QScriptEngine API should contain a newObject function - https://bugs.webkit.org/show_bug.cgi?id=39114 + Added friend exception to Qt platform, which also compiles Windows. - * qt/api/qscriptengine.cpp: - (QScriptEngine::newObject): - * qt/api/qscriptengine.h: - * qt/api/qscriptengine_p.cpp: - (QScriptEnginePrivate::newObject): - * qt/api/qscriptengine_p.h: - * qt/tests/qscriptengine/tst_qscriptengine.cpp: - (tst_QScriptEngine::newObject): + QtWebKit fails to compile on Windows XP with msvc-2008 + https://bugs.webkit.org/show_bug.cgi?id=54746 -2010-06-02 Gabor Loki <loki@webkit.org> + * bytecode/CodeBlock.h: + * runtime/RegExpObject.h: - Reviewed by Gavin Barraclough. - https://bugs.webkit.org/show_bug.cgi?id=40011 +2011-02-18 Geoffrey Garen <ggaren@apple.com> - Thumb-2 build fix: The offset parameter of ldrh should be encoded as an - imm12 immediate constant in load16. If it is not fit in the instruction - a temporary register has to be used. + (Rolled back in r79022 with crash fixed.) - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::load16): + Reviewed by Sam Weinig. -2010-06-02 Sterling Swigart <sswigart@google.com> + Use hashing instead of linear search in the conservative pointer test + https://bugs.webkit.org/show_bug.cgi?id=54767 + + SunSpider reports no change. - Reviewed by David Levin. + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): No need to explicitly clear the blocks array, + since freeBlock removes items for us. - Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. - https://bugs.webkit.org/show_bug.cgi?id=39906 + (JSC::MarkedSpace::freeBlock): Fixed a typo that always removed the last + block from the block set instead of the block being freed. Changed to + remove a block from our data structures before deallocating it, since + this is slightly cleaner. - * Configurations/FeatureDefines.xcconfig: + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::contains): Variable-sized objects will use more, + smaller blocks, so it's important for the contains check not to be O(n) + in the number of blocks. -2010-06-01 Gavin Barraclough <barraclough@apple.com> +2011-02-18 chris reiss <christopher.reiss@nokia.com> - Reviewed by Sam Weinig. + Reviewed by Andreas Kling. - Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together + REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN + https://bugs.webkit.org/show_bug.cgi?id=49989 - This is a useful stepping stone towards reversing argument order. + updated test fast/js/script-tests/date-parse-test.js - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::addParameter): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallEval): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::CallArguments::thisRegister): - (JSC::CallArguments::argumentRegister): - (JSC::CallArguments::callFrame): - (JSC::CallArguments::count): - (JSC::BytecodeGenerator::shouldEmitProfileHooks): - * bytecompiler/NodesCodegen.cpp: - (JSC::NewExprNode::emitBytecode): - (JSC::CallArguments::CallArguments): - (JSC::EvalFunctionCallNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - -2010-06-01 Yong Li <yoli@rim.com> + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): - Reviewed by Darin Adler. +2011-02-18 Sheriff Bot <webkit.review.bot@gmail.com> - Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex. - https://bugs.webkit.org/show_bug.cgi?id=39893 + Unreviewed, rolling out r79022. + http://trac.webkit.org/changeset/79022 + https://bugs.webkit.org/show_bug.cgi?id=54775 - * wtf/ThreadingPthreads.cpp: - (WTF::Mutex::Mutex): + It broke the whole world (Requested by Ossy on #webkit). -2010-06-01 Kwang Yul Seo <skyul@company100.net> + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::contains): - Reviewed by Xan Lopez. +2011-02-18 Yael Aharon <yael.aharon@nokia.com> - [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap - https://bugs.webkit.org/show_bug.cgi?id=39831 + Reviewed by Dave Hyatt. - Use DEFINE_STATIC_LOCAL for static local variables. + Add support for dir=auto + https://bugs.webkit.org/show_bug.cgi?id=50916 - * wtf/gtk/ThreadingGtk.cpp: - (WTF::threadMapMutex): - (WTF::threadMap): - (WTF::identifierByGthreadHandle): + Change defaultWritingDirection() to return if the writing direction + was determined from a letter with strong directionality or not. -2010-06-01 Kent Tamura <tkent@chromium.org> + * JavaScriptCore.exp: + * JavaScriptCore.order: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::defaultWritingDirection): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.h: + (WTF::String::defaultWritingDirection): - Reviewed by Shinichiro Hamaji. +2011-02-18 Geoffrey Garen <ggaren@apple.com> - Fix style errors of dtoa - https://bugs.webkit.org/show_bug.cgi?id=39972 + Reviewed by Sam Weinig. - Fix all errors reported by check-webkit-style. + Use hashing instead of linear search in the conservative pointer test + https://bugs.webkit.org/show_bug.cgi?id=54767 + + SunSpider reports no change. - * wtf/dtoa.cpp: - * wtf/dtoa.h: + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::contains): Variable-sized objects will use more, + smaller blocks, so it's important for the contains check not to be O(n) + in the number of blocks. -2010-05-30 Darin Adler <darin@apple.com> +2011-02-18 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. - * wtf/OwnArrayPtr.h: - (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr. - At some point someone fixed the "asserts when assigning to 0 and the pointer is - already 0" issue in OwnPtr but forgot to do it here. - -2010-05-29 Geoffrey Garen <ggaren@apple.com> - - Windows build fix: Updated exported symbols. + Tightened some usage accounting code in MarkedSpace + https://bugs.webkit.org/show_bug.cgi?id=54761 - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2010-05-29 Geoffrey Garen <ggaren@apple.com> - - Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I - can figure out why it's crashing. - - * wtf/Platform.h: + SunSpider reports no change. -2010-05-29 Geoffrey Garen <ggaren@apple.com> + * runtime/Heap.cpp: + (JSC::Heap::Heap): Initialize the marked space high water mark on + construction, instead of relying on some implicit subtleties to make + not initializing it work out OK. - Fixed Windows crash seen on buildbot. + * runtime/Heap.h: Fixed up includes. - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first - argument in ecx. + * runtime/MarkedBlock.h: Made firstAtom() static so clients can call it + even without having allocated a block. -2010-05-28 Geoffrey Garen <ggaren@apple.com> + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): Don't pre-allocate a block, since this + would be prohibitively expensive with multiple size classes. - Windows build fix: Updated exported symbols. + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::freeBlock): Track allocated blocks in a hash set, + since linear search in the contains check will be prohibitively + expensive once we're using lots of smaller blocks. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + (JSC::MarkedSpace::allocate): Don't assume that we always have a block + allocated, since we don't anymore. (See above.) -2010-05-28 Geoffrey Garen <ggaren@apple.com> + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: Updated for changes mentioned above. - Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL - is disabled. +2011-02-17 Geoffrey Garen <ggaren@apple.com> - * runtime/Lookup.cpp: - (JSC::setUpStaticFunctionSlot): - * runtime/Lookup.h: - * wtf/Platform.h: + Reviewed by Sam Weinig. -2010-05-28 Geoffrey Garen <ggaren@apple.com> + Made object allocation secretly variable-sized (Shhhh!) + https://bugs.webkit.org/show_bug.cgi?id=54721 + + SunSpider reports no change. + + Internally, MarkedBlock now makes variable-sized allocations, even + though MarkedSpace doesn't take advantage of this yet. - Windows build fix: Updated exported symbols. + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): No need to ASSERT that allocations are + fixed-sized. - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/MarkedBlock.h: Shrunk the atom size so we can allocate things + that are not multiples of 64 bytes. -2010-05-28 Geoffrey Garen <ggaren@apple.com> +2011-02-17 Geoffrey Garen <ggaren@apple.com> - Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. + Reviewed by Sam Weinig. - Simplified the host calling convention. - - 22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host - function calls. - - No change on SunSpider. - - All JS calls (but not constructs, yet) now go through the normal JS - calling convention via the RegisterFile. As a result, the host calling - convention, which used to be this - - JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&) - - is now this - - JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*) - - Callee, 'this', and argument access all hapen relative to the ExecState*, - which is a pointer into the RegisterFile. - - This patch comes in two parts. + Fixed some math errors when when using variable-sized cells + https://bugs.webkit.org/show_bug.cgi?id=54717 - PART ONE: Functional code changes. + SunSpider reports no change. - * wtf/Platform.h: Disabled optimized calls on platforms I didn't test. - We can re-enable once we verify that host calls on these platforms are - correct. - - * debugger/DebuggerCallFrame.cpp: - (JSC::DebuggerCallFrame::functionName): - (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to - ExecState::callee(). - - (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue(). + Computer Science Barbie says, "Math is not so hard afterall!" - * interpreter/CallFrame.cpp: - * interpreter/CallFrame.h: - (JSC::ExecState::callee): - (JSC::ExecState::scopeChain): - (JSC::ExecState::init): Changed callee() to be JSObject* instead of - JSFunction* -- now, it might be some other callable host object. - - (JSC::ExecState::hostThisRegister): - (JSC::ExecState::hostThisValue): - (JSC::ExecState::argumentCount): - (JSC::ExecState::argumentCountIncludingThis): - (JSC::ExecState::argument): - (JSC::ExecState::setArgumentCountIncludingThis): - (JSC::ExecState::setCallee): Added convenient accessors for arguments - from within a host function. Removed thisValue() because it was too - tempting to use incorrectly, and it only had one or two clients, anyway. - - * interpreter/Interpreter.cpp: - (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue(). + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the + minimum number of atoms required for a cell, since rounding down + will get you splinched. - (JSC::Interpreter::throwException): Be sure to shrink the register file - before invoking the exception handler, to reduce the chances that the - handler will re-throw in the case of stack overflow. (Re-throwing is now - more likely than it used to be, since standardizing the calling convention - implicitly added stack overflow checks to some places where they used to be missing.) + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests + because m_endAtom is actually a fuzzy end -- iterating from firstAtom() + may not hit m_endAtom exactly. - (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope. - Updated for CallFrame::init API change. +2011-02-17 Geoffrey Garen <ggaren@apple.com> - (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope. - Updated for CallFrame::init API change. Added support for calling a host - function. + Reviewed by Sam Weinig. - (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope. - Updated for CallFrame::init API change. + A little more abstraction for MarkedSpace::contains + https://bugs.webkit.org/show_bug.cgi?id=54715 - (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::contains): Added a contains function, so MarkedSpace + doesn't have to know how MarkedBlock tracks containment internally. - (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change. - Added some explicit JSValue(JSObject*) initialization, since relaxing - the JSFunction* restriction on callee has made register types more ambiguous. - Removed toThisObject() conversion, since all callees do it themselves now. - Updated host function call for new host function signature. Updated for - change to ExecState::argumentCount() API. + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::contains): Call through to MarkedBlock to figure out + if a cell that seems to be in a block is valid. - * interpreter/Register.h: - (JSC::Register::): - (JSC::Register::operator=): - (JSC::Register::function): Changed callee() to be JSObject* instead of - JSFunction* -- now, it might be some other callable host object. +2011-02-17 Geoffrey Garen <ggaren@apple.com> - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that - set up the arguments to host functions -- all but one of the arguments - are gone now. This is the actual optimization. + Reviewed by Sam Weinig. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API - changes noted above. Removed toThisObject() conversion, since all callees - do it themselves now. + Removed the invariant that the last cell in a block is always marked + https://bugs.webkit.org/show_bug.cgi?id=54713 - * runtime/ArgList.h: - (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a - temporary shim for converting from ExecState* to ArgList where it's still - necessary. - - * runtime/Arguments.h: - (JSC::Arguments::getArgumentsData): - (JSC::Arguments::Arguments): Updated for ExecState and Register API - changes noted above. - - * runtime/CallData.cpp: - (JSC::call): Changed call always to call Interpreter::executeCall, even - for host functions. This ensures that the normal calling convention is - set up in the RegsiterFile when calling from C++ to host function. - - * runtime/CallData.h: Changed host function signature as described above. - - * runtime/ConstructData.cpp: - (JSC::construct): Moved JSFunction::construct code here so I could nix - JSFunction::call and JSFunction::call. We want a JSFunction-agnostic - way to call and construct, so that everything works naturally for non- - JSFunction objects. - - * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): - * runtime/JSFunction.h: Updated for ExecState and Register API changes - noted above. Nixed JSFunction::call and JSFunction::construct, noted above. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::init): Ditto. - - PART TWO: Global search and replace. + SunSpider reports no change. - In the areas below, I used global search-and-replace to change - (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*) - args.size() => exec->argumentCount() - args.at(i) => exec->argument(i) + This adds one branch to allocation, but simplifies the mark invariant, + especially in a world of variable-sized cells. Now, it really is true + that any cell whose mark bit is set is a valid, live cell whose + constructor has run and whose destructor has not run. - * API/JSCallbackFunction.cpp: - (JSC::JSCallbackFunction::call): - * API/JSCallbackFunction.h: - * API/JSCallbackObject.h: - * API/JSCallbackObjectFunctions.h: - (JSC::::call): - * JavaScriptCore.exp: - * jsc.cpp: - (functionPrint): - (functionDebug): - (functionGC): - (functionVersion): - (functionRun): - (functionLoad): - (functionCheckSyntax): - (functionSetSamplingFlags): - (functionClearSamplingFlags): - (functionReadline): - (functionQuit): - * runtime/ArrayConstructor.cpp: - (JSC::callArrayConstructor): - (JSC::arrayConstructorIsArray): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncToString): - (JSC::arrayProtoFuncToLocaleString): - (JSC::arrayProtoFuncJoin): - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncPop): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncReverse): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSort): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - (JSC::arrayProtoFuncEvery): - (JSC::arrayProtoFuncForEach): - (JSC::arrayProtoFuncSome): - (JSC::arrayProtoFuncReduce): - (JSC::arrayProtoFuncReduceRight): - (JSC::arrayProtoFuncIndexOf): - (JSC::arrayProtoFuncLastIndexOf): - * runtime/BooleanConstructor.cpp: - (JSC::callBooleanConstructor): - * runtime/BooleanPrototype.cpp: - (JSC::booleanProtoFuncToString): - (JSC::booleanProtoFuncValueOf): - * runtime/DateConstructor.cpp: - (JSC::callDate): - (JSC::dateParse): - (JSC::dateNow): - (JSC::dateUTC): - * runtime/DatePrototype.cpp: - (JSC::formatLocaleDate): - (JSC::fillStructuresUsingTimeArgs): - (JSC::fillStructuresUsingDateArgs): - (JSC::dateProtoFuncToString): - (JSC::dateProtoFuncToUTCString): - (JSC::dateProtoFuncToISOString): - (JSC::dateProtoFuncToDateString): - (JSC::dateProtoFuncToTimeString): - (JSC::dateProtoFuncToLocaleString): - (JSC::dateProtoFuncToLocaleDateString): - (JSC::dateProtoFuncToLocaleTimeString): - (JSC::dateProtoFuncGetTime): - (JSC::dateProtoFuncGetFullYear): - (JSC::dateProtoFuncGetUTCFullYear): - (JSC::dateProtoFuncToGMTString): - (JSC::dateProtoFuncGetMonth): - (JSC::dateProtoFuncGetUTCMonth): - (JSC::dateProtoFuncGetDate): - (JSC::dateProtoFuncGetUTCDate): - (JSC::dateProtoFuncGetDay): - (JSC::dateProtoFuncGetUTCDay): - (JSC::dateProtoFuncGetHours): - (JSC::dateProtoFuncGetUTCHours): - (JSC::dateProtoFuncGetMinutes): - (JSC::dateProtoFuncGetUTCMinutes): - (JSC::dateProtoFuncGetSeconds): - (JSC::dateProtoFuncGetUTCSeconds): - (JSC::dateProtoFuncGetMilliSeconds): - (JSC::dateProtoFuncGetUTCMilliseconds): - (JSC::dateProtoFuncGetTimezoneOffset): - (JSC::dateProtoFuncSetTime): - (JSC::setNewValueFromTimeArgs): - (JSC::setNewValueFromDateArgs): - (JSC::dateProtoFuncSetMilliSeconds): - (JSC::dateProtoFuncSetUTCMilliseconds): - (JSC::dateProtoFuncSetSeconds): - (JSC::dateProtoFuncSetUTCSeconds): - (JSC::dateProtoFuncSetMinutes): - (JSC::dateProtoFuncSetUTCMinutes): - (JSC::dateProtoFuncSetHours): - (JSC::dateProtoFuncSetUTCHours): - (JSC::dateProtoFuncSetDate): - (JSC::dateProtoFuncSetUTCDate): - (JSC::dateProtoFuncSetMonth): - (JSC::dateProtoFuncSetUTCMonth): - (JSC::dateProtoFuncSetFullYear): - (JSC::dateProtoFuncSetUTCFullYear): - (JSC::dateProtoFuncSetYear): - (JSC::dateProtoFuncGetYear): - (JSC::dateProtoFuncToJSON): - * runtime/ErrorConstructor.cpp: - (JSC::callErrorConstructor): - * runtime/ErrorPrototype.cpp: - (JSC::errorProtoFuncToString): - * runtime/FunctionConstructor.cpp: - (JSC::callFunctionConstructor): - * runtime/FunctionPrototype.cpp: - (JSC::callFunctionPrototype): - (JSC::functionProtoFuncToString): - (JSC::functionProtoFuncApply): - (JSC::functionProtoFuncCall): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): - (JSC::decode): - (JSC::globalFuncEval): - (JSC::globalFuncParseInt): - (JSC::globalFuncParseFloat): - (JSC::globalFuncIsNaN): - (JSC::globalFuncIsFinite): - (JSC::globalFuncDecodeURI): - (JSC::globalFuncDecodeURIComponent): - (JSC::globalFuncEncodeURI): - (JSC::globalFuncEncodeURIComponent): - (JSC::globalFuncEscape): - (JSC::globalFuncUnescape): - (JSC::globalFuncJSCPrint): - * runtime/JSGlobalObjectFunctions.h: - * runtime/JSONObject.cpp: - (JSC::JSONProtoFuncParse): - (JSC::JSONProtoFuncStringify): - * runtime/JSString.h: - * runtime/MathObject.cpp: - (JSC::mathProtoFuncAbs): - (JSC::mathProtoFuncACos): - (JSC::mathProtoFuncASin): - (JSC::mathProtoFuncATan): - (JSC::mathProtoFuncATan2): - (JSC::mathProtoFuncCeil): - (JSC::mathProtoFuncCos): - (JSC::mathProtoFuncExp): - (JSC::mathProtoFuncFloor): - (JSC::mathProtoFuncLog): - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - (JSC::mathProtoFuncPow): - (JSC::mathProtoFuncRandom): - (JSC::mathProtoFuncRound): - (JSC::mathProtoFuncSin): - (JSC::mathProtoFuncSqrt): - (JSC::mathProtoFuncTan): - * runtime/NativeErrorConstructor.cpp: - (JSC::callNativeErrorConstructor): - * runtime/NumberConstructor.cpp: - (JSC::callNumberConstructor): - * runtime/NumberPrototype.cpp: - (JSC::numberProtoFuncToString): - (JSC::numberProtoFuncToLocaleString): - (JSC::numberProtoFuncValueOf): - (JSC::numberProtoFuncToFixed): - (JSC::numberProtoFuncToExponential): - (JSC::numberProtoFuncToPrecision): - * runtime/ObjectConstructor.cpp: - (JSC::callObjectConstructor): - (JSC::objectConstructorGetPrototypeOf): - (JSC::objectConstructorGetOwnPropertyDescriptor): - (JSC::objectConstructorGetOwnPropertyNames): - (JSC::objectConstructorKeys): - (JSC::objectConstructorDefineProperty): - (JSC::objectConstructorDefineProperties): - (JSC::objectConstructorCreate): - * runtime/ObjectPrototype.cpp: - (JSC::objectProtoFuncValueOf): - (JSC::objectProtoFuncHasOwnProperty): - (JSC::objectProtoFuncIsPrototypeOf): - (JSC::objectProtoFuncDefineGetter): - (JSC::objectProtoFuncDefineSetter): - (JSC::objectProtoFuncLookupGetter): - (JSC::objectProtoFuncLookupSetter): - (JSC::objectProtoFuncPropertyIsEnumerable): - (JSC::objectProtoFuncToLocaleString): - (JSC::objectProtoFuncToString): - * runtime/ObjectPrototype.h: - * runtime/Operations.h: - (JSC::jsString): - * runtime/RegExpConstructor.cpp: - (JSC::callRegExpConstructor): - * runtime/RegExpObject.cpp: - (JSC::RegExpObject::test): - (JSC::RegExpObject::exec): - (JSC::callRegExpObject): - (JSC::RegExpObject::match): - * runtime/RegExpObject.h: - * runtime/RegExpPrototype.cpp: - (JSC::regExpProtoFuncTest): - (JSC::regExpProtoFuncExec): - (JSC::regExpProtoFuncCompile): - (JSC::regExpProtoFuncToString): - * runtime/StringConstructor.cpp: - (JSC::stringFromCharCodeSlowCase): - (JSC::stringFromCharCode): - (JSC::callStringConstructor): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncReplace): - (JSC::stringProtoFuncToString): - (JSC::stringProtoFuncCharAt): - (JSC::stringProtoFuncCharCodeAt): - (JSC::stringProtoFuncConcat): - (JSC::stringProtoFuncIndexOf): - (JSC::stringProtoFuncLastIndexOf): - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSearch): - (JSC::stringProtoFuncSlice): - (JSC::stringProtoFuncSplit): - (JSC::stringProtoFuncSubstr): - (JSC::stringProtoFuncSubstring): - (JSC::stringProtoFuncToLowerCase): - (JSC::stringProtoFuncToUpperCase): - (JSC::stringProtoFuncLocaleCompare): - (JSC::stringProtoFuncBig): - (JSC::stringProtoFuncSmall): - (JSC::stringProtoFuncBlink): - (JSC::stringProtoFuncBold): - (JSC::stringProtoFuncFixed): - (JSC::stringProtoFuncItalics): - (JSC::stringProtoFuncStrike): - (JSC::stringProtoFuncSub): - (JSC::stringProtoFuncSup): - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - (JSC::stringProtoFuncTrim): - (JSC::stringProtoFuncTrimLeft): - (JSC::stringProtoFuncTrimRight): - -2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while + since we can no longer rely on a set mark bit to break out of this loop + before it reaches the end of the block. - Reviewed by Geoffrey Garen. + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::isEmpty): + (JSC::MarkedBlock::clearMarks): + (JSC::MarkedBlock::markCount): + (JSC::MarkedBlock::forEach): No need to set a special last mark bit. - Fix the JSObjectSetPrototype function. +2011-02-17 Sheriff Bot <webkit.review.bot@gmail.com> - A cycle in a prototype chain can cause an application hang or - even crash. - A check for a prototype chain cycles was added to - the JSObjectSetPrototype. + Unreviewed, rolling out r78856 and r78907. + http://trac.webkit.org/changeset/78856 + http://trac.webkit.org/changeset/78907 + https://bugs.webkit.org/show_bug.cgi?id=54705 - JSObjectSetPrototype doesn't check for cycle in prototype chain. - https://bugs.webkit.org/show_bug.cgi?id=39360 + These seem to break tests on 32-bit builds. (Requested by + aroben on #webkit). - * API/JSObjectRef.cpp: - (JSObjectSetPrototype): - * API/tests/testapi.c: - (assertTrue): - (checkForCycleInPrototypeChain): - (main): - * runtime/JSObject.cpp: - (JSC::JSObject::put): + * JavaScriptCore.xcodeproj/project.pbxproj: + * collector/handles/Global.h: + (JSC::Global::internalSet): + * collector/handles/Handle.h: + (JSC::HandleTypes::getFromSlot): + (JSC::HandleTypes::toJSValue): + (JSC::HandleTypes::validateUpcast): + (JSC::HandleConverter::operator->): + (JSC::HandleConverter::operator*): + (JSC::Handle::Handle): + (JSC::Handle::get): + * runtime/JSArray.cpp: + (JSC::JSArray::sortNumeric): * runtime/JSObject.h: - (JSC::JSObject::setPrototypeWithCycleCheck): - -2010-05-28 Chao-ying Fu <fu@mips.com> - - Reviewed by Eric Seidel. - - Fix MIPS JIT DoubleGreaterThanOrEqual Operands - https://bugs.webkit.org/show_bug.cgi?id=39504 - - Swapped two operands of left and right for DoubleGreaterThanOrEqual. - This patch fixed two layout tests as follows. - fast/js/comparison-operators-greater.html - fast/js/comparison-operators-less.html - - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::branchDouble): + (JSC::JSObject::inlineGetOwnPropertySlot): + * runtime/SlotAccessor.h: Removed. + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::get): + (JSC::WeakGCPtr::internalSet): + * runtime/WriteBarrier.h: + (JSC::DeprecatedPtr::DeprecatedPtr): + (JSC::DeprecatedPtr::get): + (JSC::DeprecatedPtr::operator*): + (JSC::DeprecatedPtr::operator->): + (JSC::DeprecatedPtr::slot): + (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): + (JSC::DeprecatedPtr::operator!): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::get): + (JSC::WriteBarrierBase::operator*): + (JSC::WriteBarrierBase::operator->): + (JSC::WriteBarrierBase::clear): + (JSC::WriteBarrierBase::slot): + (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): + (JSC::WriteBarrierBase::operator!): + (JSC::WriteBarrierBase::setWithoutWriteBarrier): + (JSC::WriteBarrier::WriteBarrier): -2010-05-28 Gavin Barraclough <barraclough@apple.com> +2011-02-17 Csaba Osztrogonác <ossy@webkit.org> - Reviewed by Geoff Garen. + Unreviewed. - Move jit compilation from linking thunks into cti_vm_lazyLink methods. + [Qt] Buildfix. - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): + * wtf/RetainPtr.h: Add missing PLATFORM(CF) guard. -2010-05-28 Gavin Barraclough <barraclough@apple.com> +2011-02-17 Geoffrey Garen <ggaren@apple.com> - Reviewed by Sam Weinig. + Reviewed by Oliver Hunt. - Bug 39898 - Move arity check into callee. + Made MarkedBlock variable-sized + https://bugs.webkit.org/show_bug.cgi?id=54692 - We can reduce the size of the virtual call trampolines by moving the arity check - into the callee functions. As a following step we will be able to remove the - check for native function / codeblocks by performing translation in a lazy stub. + SunSpider reports no change. - * interpreter/CallFrame.h: - (JSC::ExecState::init): - (JSC::ExecState::setReturnPC): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - (JSC::JIT::linkCall): - (JSC::JIT::linkConstruct): - * jit/JIT.h: - (JSC::JIT::compile): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::generateJITCodeForCall): - (JSC::FunctionExecutable::generateJITCodeForConstruct): - (JSC::FunctionExecutable::reparseExceptionInfo): - * runtime/Executable.h: - (JSC::NativeExecutable::NativeExecutable): - (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck): - (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): - -2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Darin Adler. - - UTF-16 code points compare() for String objects - https://bugs.webkit.org/show_bug.cgi?id=39701 - - Moving compare() implementation from UString to StringImpl for it to be shared - with String. Adding overloaded free functions codePointCompare() in StringImpl - and WTFString. Renaming function compare in UString to codePointCompare to be - consistent. + Each MarkedBlock is now composed of a set of fixed-sized atoms, with one + mark bit per atom. A given cell may be composed of one or more atoms. + + * runtime/Heap.cpp: + (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace, + bubbling it up from MarkedBlock, since MarkedBlock now supports variable- + sizedness. - * runtime/JSArray.cpp: - (JSC::compareByStringPairForQSort): - * runtime/UString.cpp: - * runtime/UString.h: - (JSC::codePointCompare): - * wtf/text/StringImpl.cpp: - (WebCore::codePointCompare): - * wtf/text/StringImpl.h: - * wtf/text/WTFString.cpp: - (WebCore::codePointCompare): - * wtf/text/WTFString.h: + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and + (implicit) one constants -- these quantities are not constant anymore. + Updated for switch from cell to atom. -2010-05-26 Darin Adler <darin@apple.com> + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::create): + (JSC::MarkedBlock::destroy): + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::firstAtom): + (JSC::MarkedBlock::atoms): + (JSC::MarkedBlock::isAtomAligned): + (JSC::MarkedBlock::blockFor): + (JSC::MarkedBlock::isEmpty): + (JSC::MarkedBlock::clearMarks): + (JSC::MarkedBlock::size): + (JSC::MarkedBlock::capacity): + (JSC::MarkedBlock::atomNumber): + (JSC::MarkedBlock::isMarked): + (JSC::MarkedBlock::testAndSetMarked): + (JSC::MarkedBlock::setMarked): + (JSC::MarkedBlock::forEach): Same as above. Also removed use of CELL_SIZE + and BLOCK_SIZE, and switched away from calling arbitrary pointers cells. - Reviewed by Kent Tamura. + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::CollectorHeap): + (JSC::MarkedSpace::contains): Updated for renames. Made fixed-sizedness + a property of MarkedSpace. - Null characters handled incorrectly in ToNumber conversion - https://bugs.webkit.org/show_bug.cgi?id=38088 +2011-02-17 Oliver Hunt <oliver@apple.com> - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): Changed code to use UTF8String().data() instead of - ascii() to fix the thread safety issue. Code path is covered by existing - tests in run-javascriptcore-tests. - (JSC::parseFloat): Moved comment to UString::toDouble since the issue - affects all clients, not just parseFloat. Specifically, this also affects - standard JavaScript numeric conversion, ToNumber. + Attempt to fix windows build - * runtime/UString.cpp: - (JSC::UString::toDouble): Added a comment about incorrect space skipping. - Changed trailing junk check to use the length of the CString instead of - checking for a null character. Also got rid of a little unneeded logic - in the case where we tolerate trailing junk. + * runtime/WriteBarrier.h: -2010-05-27 Nathan Lawrence <nlawrence@apple.com> +2011-02-17 Oliver Hunt <oliver@apple.com> Reviewed by Geoffrey Garen. - Search for the new allocation one word at a time. Improves - performance on SunSpider by approximately 1%. - http://bugs.webkit.org/show_bug.cgi?id=39758 - - * runtime/Collector.cpp: - (JSC::Heap::allocate): - * runtime/Collector.h: - (JSC::CollectorBitmap::advanceToNextPossibleFreeCell): + Refactor WriteBarrier and DeprecatedPtr to have less code duplication. + https://bugs.webkit.org/show_bug.cgi?id=54608 -2010-05-27 Kevin Ollivier <kevino@theolliviers.com> - - [wx] Build fixes for Windows after recent changes. - - * wscript: - -2010-05-27 Gustavo Noronha Silva <gns@gnome.org> - - More build fixage for make dist. - - * GNUmakefile.am: - -2010-05-27 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - RVCT does not have strnstr. - https://bugs.webkit.org/show_bug.cgi?id=39719 - - Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr. - - * wtf/StringExtras.h: - -2010-05-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. + Make use of the tricks used for Handle, et al to avoid duplicating all + of the logic for DeprecatedPtr and WriteBarrier simply to support known + vs. unknown types. - Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. - (relanding r60267) - - If the last item in a main disjunction is a quantified set of parentheses, - this is easier to code generate for than the general case for quantified - parentheses. This is because we never need to backtrack into the parentheses - - the first match will be the final and accepted match. - - This patch also somewhat reverts a recent change to when fallback to PCRE - occurs. At the minute the compiler is tracking on patterns which will - require JIT fallback. This is handy from a performance perspective (it saves - the failed attempt at JIT compilation), but it means introducing knowledge - of the JITs capabilities into the other layers of the regex compilers. For - the specific feature of back-references, add a flag tracking their presence - on the pattern, and make these expressions fallback without attempting to - JIT. For parentheses, return to detecting which cases are have or have not - been handled during JIT compilation. - - 18% progression on tagcloud, ~1.5% overall on sunspidey. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): - (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::RegexGenerator::shouldFallBack): - (JSC::Yarr::jitCompileRegex): - * yarr/RegexPattern.h: - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-05-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by NOBODY (revert). - - Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::TermGenerationState::term): - (JSC::Yarr::RegexGenerator::generateParenthesesSingle): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::jitCompileRegex): - * yarr/RegexPattern.h: - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-05-26 Gustavo Noronha Silva <gns@gnome.org> - - Build fixes for make distcheck. - - * GNUmakefile.am: - -2010-05-26 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. - - If the last item in a main disjunction is a quantified set of parentheses, - this is easier to code generate for than the general case for quantified - parentheses. This is because we never need to backtrack into the parentheses - - the first match will be the final and accepted match. - - This patch also somewhat reverts a recent change to when fallback to PCRE - occurs. At the minute the compiler is tracking on patterns which will - require JIT fallback. This is handy from a performance perspective (it saves - the failed attempt at JIT compilation), but it means introducing knowledge - of the JITs capabilities into the other layers of the regex compilers. For - the specific feature of back-references, add a flag tracking their presence - on the pattern, and make these expressions fallback without attempting to - JIT. For parentheses, return to detecting which cases are have or have not - been handled during JIT compilation. - - 18% progression on tagcloud, ~1.5% overall on sunspidey. - - * yarr/RegexCompiler.cpp: - (JSC::Yarr::RegexPatternConstructor::atomBackReference): - (JSC::Yarr::RegexPatternConstructor::quantifyAtom): - * yarr/RegexJIT.cpp: - (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): - (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): - (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): - (JSC::Yarr::RegexGenerator::generateTerm): - (JSC::Yarr::RegexGenerator::RegexGenerator): - (JSC::Yarr::RegexGenerator::shouldFallBack): - (JSC::Yarr::jitCompileRegex): - * yarr/RegexPattern.h: - (JSC::Yarr::RegexPattern::RegexPattern): - (JSC::Yarr::RegexPattern::reset): - -2010-05-26 Geoffrey Garen <ggaren@apple.com> - - Reviewed by Sam Weinig. - - Fixed a crash seen on the Leopard bot, caused by merge. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe, - since it's no longer passed to us as an argument. + * JavaScriptCore.xcodeproj/project.pbxproj: + * collector/handles/Global.h: + (JSC::Global::internalSet): + * collector/handles/Handle.h: + (JSC::Handle::Handle): + (JSC::Handle::get): + * runtime/JSArray.cpp: + (JSC::JSArray::sortNumeric): + * runtime/JSObject.h: + (JSC::JSObject::inlineGetOwnPropertySlot): + * runtime/SlotAccessor.h: Added. + (JSC::SlotTypes::getFromBaseType): + (JSC::SlotTypes::convertToBaseType): + (JSC::SlotTypes::getFromSlot): + (JSC::SlotTypes::toJSValue): + (JSC::SlotTypes::validateUpcast): + (JSC::SlotAccessor::operator->): + (JSC::SlotAccessor::operator*): + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::get): + (JSC::WeakGCPtr::internalSet): + * runtime/WriteBarrier.h: + (JSC::DeprecatedPtr::DeprecatedPtr): + (JSC::DeprecatedPtr::get): + (JSC::DeprecatedPtr::slot): + (JSC::DeprecatedPtr::operator=): + (JSC::WriteBarrierTranslator::convertToStorage): + (JSC::WriteBarrierTranslator::convertFromStorage): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::get): + (JSC::WriteBarrierBase::clear): + (JSC::WriteBarrierBase::slot): + (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): + (JSC::WriteBarrierBase::operator!): + (JSC::WriteBarrierBase::setWithoutWriteBarrier): + (JSC::WriteBarrier::WriteBarrier): -2010-05-25 Geoffrey Garen <ggaren@apple.com> +2011-02-17 Kevin Ollivier <kevino@theolliviers.com> - Fixed build failure caused by merge. + [wx] Revert incorrect blind fix and restore previous working code. - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this - function no longer returns a pair. + * wtf/wx/StringWx.cpp: + (WTF::String::String): -2010-05-25 Geoffrey Garen <ggaren@apple.com> +2011-02-16 Geoffrey Garen <ggaren@apple.com> - Reviewed by Oliver Hunt. + Reviewed by Maciej Stachowiak. - <rdar://problem/8020221> + Intermittent crashes beneath MarkStack::drain + https://bugs.webkit.org/show_bug.cgi?id=54614 + <rdar://problem/8971070> - Fixed a crash seen on Windows when calling a function with too many - arguments. - - SunSpider reports no change. - - No test because the ASSERT I added fires in existing tests. - - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too - many arguments have been provided, since the caller only allocated enough - registerFile space for the arguments it provided, not enough for the extra - copy of arguments we're going to need. - -2010-05-25 Kwang Yul Seo <skyul@company100.net> - - Reviewed by Darin Adler. - - Build fix for JSFunction - https://bugs.webkit.org/show_bug.cgi?id=39658 - - MSVC can't compile one of JSFunction constructors when JIT is disabled. - "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. - Add ENABLE(JIT) guard to the constructor. - - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - * runtime/JSFunction.h: + The crashes were caused by a GC happening after the global object's + property table had grown (due to compilation), but before the properties + had been fully initialized by program execution. -2010-05-24 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - - Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call. - - Presently, as soon as op-call strays off the hot path we set up a set of values on - the stack to be passed as arguments to cti functions, in case any should be called. - - Instead, hoist the setup of the callframe to happen slightly sooner, and make the - cti functions to compile & check arity read these values from the callframe. This - allows up to remove the deprecated methods to manually set up cti arguments, rather - than using JITStubCall.h. - - * interpreter/CallFrame.h: - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITCall32_64.cpp: - (JSC::JIT::compileOpCallInitializeCallFrame): - (JSC::JIT::compileOpCallVarargs): - (JSC::JIT::compileOpCallVarargsSlowCase): - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITInlineMethods.h: - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC::): - -2010-05-24 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Sam Weinig. - Relanding r60075. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): - * bytecode/CodeBlock.h: - * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitGetByIdExceptionInfo): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::privateExecute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - * jit/JITCall.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITCall32_64.cpp: - (JSC::JIT::compileOpCall): - (JSC::JIT::compileOpCallSlowCase): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_convert_this): - (JSC::JIT::emit_op_get_callee): - (JSC::JIT::emit_op_create_this): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_get_callee): - (JSC::JIT::emit_op_create_this): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC::JITThunks::hostFunctionStub): - * jit/JITStubs.h: - (JSC::JITThunks::ctiNativeConstruct): - (JSC::): - * runtime/ExceptionHelpers.cpp: - (JSC::createNotAnObjectError): - * runtime/Executable.h: - (JSC::NativeExecutable::create): - (JSC::NativeExecutable::NativeExecutable): - * runtime/JSFunction.cpp: - (JSC::callHostFunctionAsConstructor): - * runtime/JSFunction.h: - * wtf/Platform.h: + (JSC::BytecodeGenerator::BytecodeGenerator): Explicitly resize the global + object's register storage immediately, without waiting for program + execution to do it for us. This ensures that the global object's count + of global variables is consistent with the size of its global variable + storage at all times, and it ensures that all global variables are + properly initialized from the get-go. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::resizeRegisters): + * runtime/JSGlobalObject.h: Added a helper function for growing the + global object's register storage, and initializing new registers. -== Rolled over to ChangeLog-2010-05-24 == +== Rolled over to ChangeLog-2011-02-16 == diff --git a/Source/JavaScriptCore/ChangeLog-2011-02-16 b/Source/JavaScriptCore/ChangeLog-2011-02-16 new file mode 100644 index 0000000..9f81b2b --- /dev/null +++ b/Source/JavaScriptCore/ChangeLog-2011-02-16 @@ -0,0 +1,24628 @@ +2011-02-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage. + + Currently JSObject is both directly instantiated for regular JS objects, and + derived to implement subtypes. A consequence of this is that we need to ensure + that sufficient space from the cell is left unused and available for any data + members that will be introduced by subclasses of JSObject. By restructuring + the internal storage array out of JSObject we can increase the size in the + internal storage for regular objects. + + Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as + much additional capacity as is currently available to allow for data members + in subclasses. JSFinalObject utilizes all available space for internal storage, + and only allows construction through JSFinalObject::create(). + + The additional storage made available in the JSObject means that we need no + longer rely on a union of the internal storage with a pointer to storage that + is only valid for external storage. This means we can go back to always having + a valid pointer to property storage, regardless of whether this is internal or + external. This simplifies some cases of access to the array from C code, and + significantly simplifies JIT access, since repatching no longer needs to be + able to change between a load of the storage pointer / a LEA of the internal + storage. + + * API/JSObjectRef.cpp: + (JSObjectMake): + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::repatchPointer): + * assembler/MIPSAssembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + * assembler/MacroAssemblerMIPS.h: + * assembler/MacroAssemblerX86.h: + * assembler/MacroAssemblerX86_64.h: + * assembler/RepatchBuffer.h: + * assembler/X86Assembler.h: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + * debugger/DebuggerActivation.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_resolve_global): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_global): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::emit_op_get_by_pname): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorInstance.h: + * runtime/ExceptionHelpers.cpp: + (JSC::InterruptedExecutionError::InterruptedExecutionError): + (JSC::TerminatedExecutionError::TerminatedExecutionError): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSByteArray.h: + (JSC::JSByteArray::JSByteArray): + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalObject.h: + (JSC::constructEmptyObject): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::JSNotAnObject): + * runtime/JSObject.cpp: + (JSC::JSObject::createInheritorID): + (JSC::JSObject::allocatePropertyStorage): + * runtime/JSObject.h: + (JSC::JSObject::propertyStorage): + (JSC::JSNonFinalObject::JSNonFinalObject): + (JSC::JSNonFinalObject::createStructure): + (JSC::JSFinalObject::create): + (JSC::JSFinalObject::createStructure): + (JSC::JSFinalObject::JSFinalObject): + (JSC::JSObject::offsetOfInlineStorage): + (JSC::constructEmptyObject): + (JSC::createEmptyObjectStructure): + (JSC::JSObject::JSObject): + (JSC::JSObject::~JSObject): + (JSC::Structure::isUsingInlineStorage): + * runtime/JSObjectWithGlobalObject.cpp: + (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): + * runtime/JSObjectWithGlobalObject.h: + (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): + * runtime/JSTypeInfo.h: + (JSC::TypeInfo::TypeInfo): + (JSC::TypeInfo::isVanilla): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::JSVariableObject): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::JSWrapperObject): + * runtime/ObjectConstructor.cpp: + (JSC::constructObject): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + * runtime/ObjectPrototype.h: + * runtime/StrictEvalActivation.cpp: + (JSC::StrictEvalActivation::StrictEvalActivation): + * runtime/StrictEvalActivation.h: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::growPropertyStorageCapacity): + +2011-02-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Incorrect handling of global writes in dynamic contexts + https://bugs.webkit.org/show_bug.cgi?id=49383 + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + Can't use the existing callframe to return an uncaught exception + as by definition that callframe has already been torn down. + * parser/ASTBuilder.h: + (JSC::ASTBuilder::ASTBuilder): + (JSC::ASTBuilder::varDeclarations): + (JSC::ASTBuilder::funcDeclarations): + (JSC::ASTBuilder::features): + (JSC::ASTBuilder::numConstants): + (JSC::ASTBuilder::createFuncDeclStatement): + (JSC::ASTBuilder::addVar): + (JSC::ASTBuilder::incConstants): + (JSC::ASTBuilder::usesThis): + (JSC::ASTBuilder::usesCatch): + (JSC::ASTBuilder::usesClosures): + (JSC::ASTBuilder::usesArguments): + (JSC::ASTBuilder::usesAssignment): + (JSC::ASTBuilder::usesWith): + (JSC::ASTBuilder::usesEval): + Don't need a vector of scopes in the ASTBuilder + * runtime/Operations.h: + (JSC::resolveBase): + In strict mode the optimisation that we use to skip a lookup + on the global object is incorrect and lead to us always + disallowing global writes when we needed to do a dynamic slot + lookup. Now the strict mode path actually checks for the + property. + +2011-02-15 Jon Honeycutt <jhoneycutt@apple.com> + + Windows build fix for + https://bugs.webkit.org/show_bug.cgi?id=54415 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + Remove deleted files. + +2011-02-15 Oliver Hunt <oliver@apple.com> + + Fix EFL build for + https://bugs.webkit.org/show_bug.cgi?id=54415 + + * CMakeLists.txt: + +2011-02-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough and Geoff Garen. + + Refactor handles and weak pointers to become nicer and more automatic + https://bugs.webkit.org/show_bug.cgi?id=54415 + + Move to a true handle based mechanism for GC value protection. This + also allows us to switch to a more sensible behaviour for weak pointers + in which weak pointers are automatically updated. + + This allows us to remove the old (and convoluted) that required all + objects that may be held by a weak reference to be aware of the reference + and manually clear them in their destructors. + + This also adds a few new data types to JSC that we use to efficiently + allocate and return the underlying handle storage. + + This patch is largely renaming and removing now unnecessary destructors + from objects. + + * API/JSClassRef.cpp: + (OpaqueJSClass::create): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + (OpaqueJSClass::contextData): + (OpaqueJSClass::prototype): + * API/JSClassRef.h: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.xcodeproj/project.pbxproj: + * collector/handles/Global.h: Added. + New Global handle type used to keep gc objects live, even if they're not + marked. + (JSC::Global::Global): + (JSC::Global::~Global): + (JSC::Global::set): + We can only assign directly to a global from another global. + In all other cases we need the JSGlobalData to be provided + explicitly so we use a set function. + (JSC::Global::operator=): + (JSC::Global::clear): + (JSC::Global::isHashTableDeletedValue): + (JSC::Global::internalSet): + * collector/handles/Handle.h: Added. + Root "Handle" type used for immutable handles and to provide the basic + APIs needed for pointer-like behaviour. + (JSC::HandleBase::operator!): + (JSC::HandleBase::operator UnspecifiedBoolType*): + (JSC::HandleBase::isEmpty): + (JSC::HandleBase::HandleBase): + (JSC::HandleBase::slot): + (JSC::HandleBase::invalidate): + (JSC::HandleBase::setSlot): + (JSC::HandleTypes::getFromSlot): + (JSC::HandleTypes::toJSValue): + (JSC::HandleTypes::validateUpcast): + (JSC::HandleConverter::operator->): + (JSC::HandleConverter::operator*): + (JSC::Handle::Handle): + (JSC::Handle::get): + (JSC::Handle::wrapSlot): + (JSC::operator==): + (JSC::operator!=): + * collector/handles/HandleHeap.cpp: Added. + New heap for global handles. + (JSC::HandleHeap::HandleHeap): + (JSC::HandleHeap::grow): + (JSC::HandleHeap::markStrongHandles): + (JSC::HandleHeap::updateAfterMark): + (JSC::HandleHeap::clearWeakPointers): + (JSC::HandleHeap::writeBarrier): + * collector/handles/HandleHeap.h: Added. + (JSC::HandleHeap::heapFor): + (JSC::HandleHeap::toHandle): + (JSC::HandleHeap::toNode): + (JSC::HandleHeap::allocate): + (JSC::HandleHeap::deallocate): + (JSC::HandleHeap::makeWeak): + Convert a hard handle into weak handle that does not + protect the object it points to. + (JSC::HandleHeap::makeSelfDestroying): + Converts a handle to a weak handle that will be returned + to the free list when the referenced object dies. + (JSC::HandleHeap::Node::Node): + (JSC::HandleHeap::Node::slot): + (JSC::HandleHeap::Node::handleHeap): + (JSC::HandleHeap::Node::setFinalizer): + (JSC::HandleHeap::Node::makeWeak): + (JSC::HandleHeap::Node::isWeak): + (JSC::HandleHeap::Node::makeSelfDestroying): + (JSC::HandleHeap::Node::isSelfDestroying): + (JSC::HandleHeap::Node::finalizer): + (JSC::HandleHeap::Node::setPrev): + (JSC::HandleHeap::Node::prev): + (JSC::HandleHeap::Node::setNext): + (JSC::HandleHeap::Node::next): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::Interpreter): + * interpreter/Interpreter.h: + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::globalObjectCollected): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + * runtime/GCHandle.cpp: Removed. + * runtime/GCHandle.h: Removed. + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::markRoots): + * runtime/Heap.h: + (JSC::Heap::allocateGlobalHandle): + (JSC::Heap::reportExtraMemoryCost): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::allocateGlobalHandle): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::create): + (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::createStructure): + (JSC::Structure::setEnumerationCache): + (JSC::Structure::clearEnumerationCache): + * runtime/Protect.h: + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + * runtime/Structure.h: + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtrBase::get): + (JSC::WeakGCPtrBase::clear): + (JSC::WeakGCPtrBase::operator!): + (JSC::WeakGCPtrBase::operator UnspecifiedBoolType*): + (JSC::WeakGCPtrBase::~WeakGCPtrBase): + (JSC::WeakGCPtrBase::WeakGCPtrBase): + (JSC::WeakGCPtrBase::internalSet): + (JSC::LazyWeakGCPtr::LazyWeakGCPtr): + (JSC::LazyWeakGCPtr::set): + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::operator=): + * runtime/WriteBarrier.h: + * wtf/BlockStack.h: Added. + (WTF::::BlockStack): + (WTF::::~BlockStack): + (WTF::::blocks): + (WTF::::grow): + (WTF::::shrink): + * wtf/SentinelLinkedList.h: Added. + (WTF::::SentinelLinkedList): + (WTF::::begin): + (WTF::::end): + (WTF::::push): + (WTF::::remove): + * wtf/SinglyLinkedList.h: Added. + (WTF::::SinglyLinkedList): + (WTF::::isEmpty): + (WTF::::push): + (WTF::::pop): + +2011-02-15 Pratik Solanki <psolanki@apple.com> + + Move WTF_USE_CFNETWORK to Platform.h + https://bugs.webkit.org/show_bug.cgi?id=54168 + + Reviewed by Darin Adler. + + * wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds. + +2011-02-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Moved MarkedBlock data members to the head of the block + https://bugs.webkit.org/show_bug.cgi?id=54482 + + This allows for a variable-sized tail, to accommodate oversized blocks. + + SunSpider reports no change. + + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::destroy): + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): + * runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK + calculation. This kind of error is why we want to migrate to the system + described below. + + (JSC::roundUpToMultipleOf): + (JSC::MarkedBlock::firstCell): + (JSC::MarkedBlock::cells): + (JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to + calculate cell number. The mask is no longer correct because the first + cell is not at the head of the block. + + (JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells() + accessor. We want to use sizeof(MarkedBlock) to calculate the size of the + block header, so we can't have an explicit data member to represent the block tail. + + Also replaced iteration from zero with iteration from startCell(), since + the first N cells are now occupied by the header. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::reset): Replaced iteration from zero as above. + +2011-02-15 Chris Rogers <crogers@google.com> + + Reviewed by Alexey Proskuryakov. + + Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait() + https://bugs.webkit.org/show_bug.cgi?id=54408 + + * wtf/ThreadingWin.cpp: + (WTF::PlatformCondition::timedWait): + +2011-02-15 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + Remove some dead code in ARMv7 + https://bugs.webkit.org/show_bug.cgi?id=54461 + + * assembler/ARMv7Assembler.h: remove dead code. + +2011-02-14 Geoffrey Garen <ggaren@apple.com> + + Rubber-stamped by Gavin Barraclough. + + Some MarkedBlock refactoring. + + Made cells private. + + Renamed cells => m_cells + marked => m_marks. + + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::destroy): + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::isEmpty): + (JSC::MarkedBlock::clearMarks): + (JSC::MarkedBlock::markCount): + (JSC::MarkedBlock::isMarked): + (JSC::MarkedBlock::testAndSetMarked): + (JSC::MarkedBlock::setMarked): + (JSC::MarkedBlock::forEach): + +2011-02-14 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add basic parser for Content Security Policy + https://bugs.webkit.org/show_bug.cgi?id=54379 + + Add a constructor for copying a Vector into a String. I suspect there + are a number of call sites that are doing this manually that would + benefit from being moved to this API. + + * wtf/text/WTFString.h: + (WTF::String::String): + +2011-02-14 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: use call frame column to determine execution line in source frame. + https://bugs.webkit.org/show_bug.cgi?id=54001 + + * wtf/text/TextPosition.h: + (WTF::ZeroBasedNumber::convertAsOneBasedInt): + +2011-02-13 Jeremy Moskovich <jeremy@chromium.org> + + Reviewed by Adam Barth. + + Add a compile-time option to completely disable WebArchive support. + https://bugs.webkit.org/show_bug.cgi?id=52712 + + Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code. + Ports Affected: + WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt. + This patch preserves this behavior except that it also disables support in the Chromium port. + + * wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports. + +2011-02-13 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Dan Bernstein. + + Bug 53760 - JSC fails to build with TOT Clang + https://bugs.webkit.org/show_bug.cgi?id=53760 + + Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace + benchmark; it is nothing-to-noise on everything else. + + * API/JSCallbackObject.h: Remove pointlessly overloaded method. + * API/JSCallbackObjectFunctions.h: Ditto. + * runtime/Arguments.cpp: + (JSC::Arguments::put): Change signature to match the base class. This implementation + was no longer being called by anyone. This wasn't noticed because it is merely an + optimization of the base class' implementation. + * runtime/Arguments.h: Ditto. + +2011-02-12 Adam Barth <abarth@webkit.org> + + Reviewed by Mark Rowe. + + Use /dev/urandom as the OSRandomSource on OS(DARWIN) + https://bugs.webkit.org/show_bug.cgi?id=54279 + + I'm not sure it makes much of a difference whether we use arc4random or + /dev/urandom on Mac. However, there's some aesthetic benefit to using + the same underlying API on as many platforms as reasonable. + + * config.h: + * wtf/OSRandomSource.cpp: + (WTF::cryptographicallyRandomValuesFromOS): + +2011-02-12 Adam Barth <abarth@webkit.org> + + Reviewed by Kenneth Russell. + + Enable ArrayBuffers by default + https://bugs.webkit.org/show_bug.cgi?id=54310 + + Export the required functions. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-02-11 Daniel Bates <dbates@rim.com> + + Reviewed by Geoffrey Garen. + + Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports + https://bugs.webkit.org/show_bug.cgi?id=54107 + + It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE + by the definition of ENABLE(). + + * wtf/Platform.h: + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Randomly touch some build files in the hopes of fixing the Qt build. + + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.pro: + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Garbage collection timer cycles forever, even when nothing is happening + https://bugs.webkit.org/show_bug.cgi?id=54320 + + (Rolling back in r78386 with the build fixed.) + + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make + our timer inert after forcing a GC, to avoid GC'ing repeatedly. + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Not reviewed. + + Used svn merge -r78386:78385 to roll out r78386 because it broke the build. + + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallbackPlatformData::trigger): + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Garbage collection timer cycles forever, even when nothing is happening + https://bugs.webkit.org/show_bug.cgi?id=54320 + + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make + our timer inert after forcing a GC, to avoid GC'ing repeatedly. + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Windows build: added an exported symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-02-11 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + A little more encapsulation for the heap: Removed CollectorHeapIterator + https://bugs.webkit.org/show_bug.cgi?id=54298 + + CollectorHeapIterator is a God object that knows the internals of each + of the pieces of the heap. This undermines the encapsulation I'm trying + to achieve by splitting concepts into different classes. + + As an alternative, I've given each class a forEach iteration function, + which takes a functor as an argument. Now, each class just needs to + know how to iterate the things it knows about. + + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator. + + * debugger/Debugger.cpp: + (JSC::Recompiler::Recompiler): + (JSC::Recompiler::~Recompiler): + (JSC::Recompiler::operator()): + (JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface + instead of an iterator. + + * runtime/CollectorHeapIterator.h: Removed. + + * runtime/Heap.cpp: + (JSC::TypeCounter::TypeCounter): + (JSC::TypeCounter::typeName): + (JSC::TypeCounter::operator()): + (JSC::TypeCounter::take): + (JSC::Heap::protectedObjectTypeCounts): + (JSC::Heap::objectTypeCounts): Added forEach and removed iterator. + + * runtime/Heap.h: + (JSC::Heap::forEach): + * runtime/JSGlobalData.cpp: + (JSC::Recompiler::operator()): + (JSC::JSGlobalData::recompileAllJSFunctions): + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration + for CollectorHeapIterator. Now, we can make all our data private and + change it without breaking any other classes. + + * runtime/MarkedSpace.cpp: + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::forEach): Added forEach and removed iterator. + +2011-02-11 Adam Barth <abarth@webkit.org> + + Reviewed by Andreas Kling. + + CryptographicRandomNumber has its threading ifdefs backwards + https://bugs.webkit.org/show_bug.cgi?id=54280 + + Turns out we want the mutex when thread is enabled. :) + + * wtf/CryptographicallyRandomNumber.cpp: + (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber): + (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues): + +2011-02-10 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + WebKit should have a cryptographic RNG + https://bugs.webkit.org/show_bug.cgi?id=22049 + + Teach JavaScriptCore how to export this function. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2011-02-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + A little more encapsulation for MarkedBlock: Made all constants private + so clients don't know whether allocations are fixed-sized or not + https://bugs.webkit.org/show_bug.cgi?id=54270 + + SunSpider reports no change. + + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants. + + * runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like + all other classes. + + * runtime/Heap.cpp: + (JSC::Heap::allocate): Updated for removal of HeapConstants. + (JSC::Heap::reset): Updated to use size(), instead of calculating size + on our own. + + * runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces + on special knowledge of fixed-sizery, which only MarkedBlock is supposed + to know about. + + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants. + Also changed to reset nextCell to 0 at the end of a block, since that + seems more consistent. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char. + This hard-coded size is a little wonky, but the compiler will tell us + if it's ever wrong, so I think it's OK. + + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::destroy): + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::sweep): Updated for removal of HeapConstants. + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::isEmpty): + (JSC::MarkedBlock::clearMarks): + (JSC::MarkedBlock::size): + (JSC::MarkedBlock::capacity): Made constants private to this class. + Removed HeapConstants. Added size() and capacity() functions. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::objectCount): + (JSC::MarkedSpace::size): + (JSC::MarkedSpace::capacity): + * runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of + direct knowledge of MarkedBlock internals. + +2011-02-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + A little more encapsulation for MarkedBlock: Made mark bits private + https://bugs.webkit.org/show_bug.cgi?id=54264 + + SunSpider reports no change. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + (JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients + don't need to know that marks are represented as bits. Renamed + markedCells => markCount, since clients don't need to know that blocks + are split into cells. + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::isEmpty): + (JSC::MarkedBlock::clearMarks): + (JSC::MarkedBlock::markCount): New helper functions for encapsulating + the information clients actually need. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): + (JSC::MarkedSpace::shrink): + (JSC::MarkedSpace::clearMarks): + (JSC::MarkedSpace::markCount): + (JSC::MarkedSpace::objectCount): + * runtime/MarkedSpace.h: Use new helper functions instead of accessing + MarkedBlock data directly. + +2011-02-10 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Cached JavaScript Parser Data Being Left in Memory Cache + https://bugs.webkit.org/show_bug.cgi?id=54245 + + Added clear method which removes SourceProviderCache items. + Cleaned up extraneous whitespace. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * parser/SourceProviderCache.cpp: + (JSC::SourceProviderCache::~SourceProviderCache): + (JSC::SourceProviderCache::clear): + (JSC::SourceProviderCache::byteSize): + (JSC::SourceProviderCache::add): + * parser/SourceProviderCache.h: + +2011-02-10 Joseph Pecoraro <joepeck@webkit.org> + + Follow-up fix to r78291. I should pass (int) 0, not '0' to memset. + + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change. + +2011-02-10 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by Geoffrey Garen. + + Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass + https://bugs.webkit.org/show_bug.cgi?id=54257 + + A subclass may want to specify the CFRunLoop that the Garbage Collection + will happen on. It was difficult to manipulate this in a subclass because + the current DefaultGCActivityCallback class does this in its constructor. + This patch generalizes things a bit more so that a specific run loop can + be passed in to the constructor. This makes it so all run loop management + can stay in DefaultGCActivityCallback and a subclass can specify any runloop. + + * runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can + specify the runloop GC can be scheduled on. + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors, + one that specifies the run loop and passes that on to commonConstructor and + the old constructor defaults to the current run loop. + (JSC::DefaultGCActivityCallback::commonConstructor): do normal construction, + adding the timer to the given runloop. + +2011-02-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock + https://bugs.webkit.org/show_bug.cgi?id=54253 + + SunSpider reports no change. + + * runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it + is now unused. + + * runtime/Heap.cpp: + (JSC::Heap::reset): Moved the call to shrink() here, since it seems a + little more clear for MarkedSpace's client to tell it explicitly when to + shrink. + + * runtime/JSCell.h: + (JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate. + + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and + converted to more directly iterate a MarkedBlock based on knowing its + internal structure. + + * runtime/MarkedBlock.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::sweep): + * runtime/MarkedSpace.h: Split out the code mentioned above. + +2011-02-10 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + Fix compilation error on OpenBSD + https://bugs.webkit.org/show_bug.cgi?id=53766 + + Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD. + + * wtf/Platform.h: + * wtf/StringExtras.h: Use HAVE(STRNSTR) now. + +2011-02-10 Adam Roben <aroben@apple.com> + + Print locations of assertions and logs in a way that Visual Studio understands + + With this change, double-clicking one of these locations in Visual Studio's Output Window + will focus that line of code in the editor. + + Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual + Studio's Output Window does nothing + + Reviewed by Alexey Proskuryakov. + + * wtf/Assertions.cpp: + (printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using + the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the + same format that cl.exe uses when it prints compiler errors. + +2011-02-10 Dan Bernstein <mitz@apple.com> + + LLVM Compiler build fix. + + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::create): + +2011-02-10 Peter Varga <pvarga@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Remove PCRE source from trunk + https://bugs.webkit.org/show_bug.cgi?id=54188 + + * Android.mk: + * Android.v8.wtf.mk: + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pro: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.order: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.xcodeproj/project.pbxproj: + * pcre/AUTHORS: Removed. + * pcre/COPYING: Removed. + * pcre/dftables: Removed. + * pcre/pcre.h: Removed. + * pcre/pcre.pri: Removed. + * pcre/pcre_compile.cpp: Removed. + * pcre/pcre_exec.cpp: Removed. + * pcre/pcre_internal.h: Removed. + * pcre/pcre_tables.cpp: Removed. + * pcre/pcre_ucp_searchfuncs.cpp: Removed. + * pcre/pcre_xclass.cpp: Removed. + * pcre/ucpinternal.h: Removed. + * pcre/ucptable.cpp: Removed. + * wscript: + +2011-02-10 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Add randomValuesFromOS for OS(WINDOWS) + https://bugs.webkit.org/show_bug.cgi?id=54155 + + Use CryptGenRandom for generating cryptographically secure random numbers. + This will work on WinCE and MinGW too. + + * config.h: + * wtf/OSRandomSource.cpp: + (WTF::randomValuesFromOS): + +2011-02-10 Jarred Nicholls <jarred@sencha.com> + + Reviewed by Adam Barth. + + REGRESSION(r78149): Return value of read() shouldn't be ignored. + https://bugs.webkit.org/show_bug.cgi?id=54167 + + stdio read should have its return value handled. Build error in gcc 4.4.5. + + * wtf/OSRandomSource.cpp: + (WTF::randomValuesFromOS): + +2011-02-10 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS + https://bugs.webkit.org/show_bug.cgi?id=54156 + + randomValuesFromOS generates random numbers of cryptographic quality. + Make this clear by adding "cryptographically" to the function name. + + * wtf/CryptographicallyRandomNumber.cpp: + (WTF::ARC4Stream::ARC4RandomNumberGenerator::stir): + * wtf/OSRandomSource.cpp: + (WTF::cryptographicallyRandomValuesFromOS): + * wtf/OSRandomSource.h: + +2011-02-09 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader. + + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely. + (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto. + (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto. + (WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read. + (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto. + * wtf/MallocZoneSupport.h: + (WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid. + (WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in + a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can + handle gracefully. + +2011-02-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 54164 - Optimize global_var accesses on JSVALUE64 + + Directly embed the pointer to d->registers, optimize out the load + from the variable object, as we do already in JSVALUE32_64. + + This is a ~1.5% win on sunspidey. + + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + +2011-02-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + A little more encapsulation for MarkedBlock: Made MarkedBlock responsible + for its own initialization and destruction + https://bugs.webkit.org/show_bug.cgi?id=54137 + + * runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is + now unused. + + * runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and + destruct JSCells. + + * runtime/MarkedBlock.cpp: + (JSC::MarkedBlock::create): + (JSC::MarkedBlock::destroy): + (JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction + code from MarkedSpace, updating it not to use ObjectIterator. We don't + want to use an abstract iterator since iteration will be unique to each + block in the future. + + * runtime/MarkedBlock.h: Made the consructor private and moved it into + the .cpp file because it's big now. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::freeBlock): Migrated code. + + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock + pointers instead of aligned allocations -- how MarkedBlocks are allocated + is now an implementation detail of MarkedBlock. + +2011-02-09 Adam Barth <abarth@webkit.org> + + Another attempt to fix the Qt Windows build. + + * config.h: + * wtf/OSRandomSource.cpp: + (WTF::randomValuesFromOS): + +2011-02-09 Adam Barth <abarth@webkit.org> + + Attempt to fix the Qt Windows build. + + * wtf/OSRandomSource.cpp: + (WTF::randomValuesFromOS): + +2011-02-09 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add WTF::cryptographicallyRandomNumber + https://bugs.webkit.org/show_bug.cgi?id=54083 + + Introduce a cryptographically strong random number generator to WTF. + The random number generator is based on arc4random as found in: + + http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22 + + I've changed to source to WebKit style and abstracted the operating + system interaction to OSRandomSource. We'll use this functionality to + expose a cryptographically strong random number generator to + JavaScript. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * config.h: + * wtf/CMakeLists.txt: + * wtf/CryptographicallyRandomNumber.cpp: Added. + (WTF::initMutexIfNeeded): + (WTF::init): + (WTF::addRandomData): + (WTF::stir): + (WTF::stirIfNeeded): + (WTF::getByte): + (WTF::getWord): + (WTF::cryptographicallyRandomNumber): + (WTF::cryptographicallyRandomValues): + * wtf/CryptographicallyRandomNumber.h: Added. + * wtf/OSRandomSource.cpp: Added. + (WTF::randomValuesFromOS): + * wtf/OSRandomSource.h: Added. + * wtf/wtf.pri: + +2011-02-09 Geoffrey Garen <ggaren@apple.com> + + Try to fix the build. + + * wtf/Bitmap.h: Include string.h for memset. Not sure why this started + failing now. + +2011-02-09 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + A tiny bit of encapsulation for MarkedBlock: made its heap data member private + https://bugs.webkit.org/show_bug.cgi?id=54129 + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::isCellAligned): + (JSC::MarkedBlock::MarkedBlock): + (JSC::MarkedBlock::heap): Made the heap data member private, and provided + a constructor and an accessor. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocateBlock): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::heap): Use the constructor and accessor. + +2011-02-09 Peter Varga <pvarga@webkit.org> + + Reviewed by Gavin Barraclough. + + Replace PCRE with Yarr in WebCore + https://bugs.webkit.org/show_bug.cgi?id=53496 + + * JavaScriptCore.exp: + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * create_regex_tables: + * runtime/RegExp.cpp: + * wtf/Platform.h: + * yarr/Yarr.h: + * yarr/YarrJIT.cpp: + * yarr/YarrJIT.h: + * yarr/YarrParser.h: + * yarr/YarrPattern.h: + * yarr/YarrSyntaxChecker.h: + * yarr/yarr.pri: Added. + +2011-02-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Removed some dead code from Heap + https://bugs.webkit.org/show_bug.cgi?id=54064 + + * runtime/MarkedSpace.cpp: Removed some now-unused constants and + declarations. + + (JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed + by our caller. Removed redundant typedefs. + +2011-02-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code + https://bugs.webkit.org/show_bug.cgi?id=54062 + + SunSpider reports no change. + + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::isValid): + (JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To + know if an object is live, you just need to test its mark bit. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from + CollectorHeap into MarkedSpace, since they're global state. Removed call + to memset since CollectorHeap is a true class with its own constructor now. + + (JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to + m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity(). + + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore. + + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::shrink): + (JSC::MarkedSpace::clearMarkBits): + (JSC::MarkedSpace::markedCells): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::objectCount): + (JSC::MarkedSpace::capacity): + (JSC::MarkedSpace::reset): + (JSC::MarkedSpace::primaryHeapEnd): + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::CollectorHeap): + (JSC::MarkedSpace::highWaterMark): + (JSC::MarkedSpace::setHighWaterMark): + (JSC::MarkedSpace::contains): Same as above. + +2011-02-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Give each MarkedBlock enough mark bits to cover the whole block + https://bugs.webkit.org/show_bug.cgi?id=54029 + + SunSpider reports no change. + + This simplifies access to mark bits, since any cell-aligned pointer + into a block now has a valid mark bit to test. + + * runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra + mark bits. This happens not to change its actual value. + (JSC::MarkedBlock::cellNumber): + (JSC::MarkedBlock::isMarked): + (JSC::MarkedBlock::testAndSetMarked): + (JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to + remove a cast from our caller, and to more accurately reflect the fact + that MarkedBlock is agnostic about the types pointed to by the pointers + you pass to it. + + (JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider + the null pointer to be a possible cell with a 0 (impossible) block. This + removes a null check from marking. + + * runtime/MarkedSpace.cpp: + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::contains): Simplified the contains check, and inlined + the whole thing, now that it's so simple. + +2011-02-08 Daniel Bates <dbates@rim.com> + + Rubber-stamped by Martin Robinson. + + Rename enum ProtectionSeting [sic] to ProtectionSetting. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + * jit/ExecutableAllocator.h: + +2011-02-08 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Andreas Kling. + + [Qt] Should not always define USE_SYSTEM_MALLOC + https://bugs.webkit.org/show_bug.cgi?id=54007 + + * wtf/Platform.h: + +2011-02-08 Dan Bernstein <mitz@apple.com> + + Reviewed by Maciej Stachowiak. + + LLVM Compiler build fix. + + * runtime/WriteBarrier.h: + (JSC::WriteBarrier::WriteBarrier): + +2011-02-07 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Darin Adler. + + JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray. + https://bugs.webkit.org/show_bug.cgi?id=53902 + + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*. + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::copyGlobalsFrom): Ditto. + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register* + for registerArray. + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*. + (JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register* + for registerArray. + +2011-02-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Removed some dead code from Heap + https://bugs.webkit.org/show_bug.cgi?id=53969 + + SunSpider reports no change. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::shrink): + (JSC::MarkedSpace::sweep): + * runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and + renamed shrinkBlocks to shrink, making it unconditionally shrink as + much as possible. + +2011-02-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Simplified the marked space's mark invariant + https://bugs.webkit.org/show_bug.cgi?id=53968 + + SunSpider reports no change. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): Mark objects when allocating them. This + means that, at all times other than the mark phase, an object is live + if and only if it is marked. + + (JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to + simplify testing whether an object is live. + +2011-02-07 Beth Dakin <bdakin@apple.com> + + Reviewed by Eric Seidel. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=53950 + USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in + Platform.h instead + + * wtf/Platform.h: + +2011-02-07 Darin Adler <darin@apple.com> + + Reviewed by Antti Koivisto. + + Add built-in decoder for UTF-8 for improved performance + https://bugs.webkit.org/show_bug.cgi?id=53898 + + * wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and + U8_APPEND_UNSAFE. Also fixed header. + +2011-02-07 Adam Roben <aroben@apple.com> + + Delete precompiled headers whenever any .vsprops file changes + + Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our + .vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we + give it some assistance by deleting the precompiled headers whenever any .vsprops file + changes. + + I also made some drive-by fixes while I was in the area. + + Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled + headers to be rebuilt, but should + + Reviewed by David Kilzer. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the + return code from react-to-vsprops-changes.py so we will notice when errors are introduced. + But skip the script entirely in production builds, where it is both unnecessary and can't + function correctly (due to not having the entire source tree available to it). + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + (main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was + leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file + to the new delete_if_older_than function. Added code to delete any precompiled headers older + than the newest .vsprops file. + (delete_if_older_than): Added. Code came from main. + +2011-02-07 Antti Koivisto <antti@apple.com> + + Not reviewed. + + ASSERTS_DISABLED -> ASSERT_DISABLED + + * wtf/BloomFilter.h: + +2011-02-06 Ryosuke Niwa <rniwa@webkit.org> + + Unreviewed; speculative Qt build fix. + + * JavaScriptCore.pro: + +2011-02-06 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Darin Adler. + + OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h + https://bugs.webkit.org/show_bug.cgi?id=52867 + + Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set + and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed + OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is + no point in putting deleteOwnedArrayPtr into a separate header. + + Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr + without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=. + + No tests are added since this is a refactoring. + + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): Calls adoptArrayPtr. + * GNUmakefile.am: Removed OwnArrayPtrCommon.h + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * runtime/Arguments.cpp: + (JSC::Arguments::deleteProperty): Calls adoptArrayPtr. + * runtime/Arguments.h: + (JSC::Arguments::copyRegisters): Ditto. + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto. + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::setRegisters): Calls operator= instead of set. + * runtime/StructureChain.cpp: + (JSC::StructureChain::StructureChain): Ditto. + * wtf/CMakeLists.txt: + * wtf/DateMath.h: + (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr + with a null pointer. + * wtf/OwnArrayPtr.h: + * wtf/OwnArrayPtrCommon.h: Removed. + * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h + (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h + +2011-02-06 Antti Koivisto <antti@apple.com> + + Reviewed by Maciej Stachowiak. + + Use bloom filter for descendant selector filtering + https://bugs.webkit.org/show_bug.cgi?id=53880 + + Implement a bloom filter with k=2 and 8 bit counting. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/BloomFilter.h: Added. + (WTF::BloomFilter::maximumCount): + (WTF::BloomFilter::BloomFilter): + (WTF::BloomFilter::mayContain): + (WTF::BloomFilter::add): + (WTF::BloomFilter::remove): + (WTF::BloomFilter::firstSlot): + (WTF::BloomFilter::secondSlot): + (WTF::::add): + (WTF::::remove): + (WTF::::clear): + (WTF::::likelyEmpty): + (WTF::::isClear): + +2011-02-04 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Rolled back in r77612 with ASSERT/crash fixed. + https://bugs.webkit.org/show_bug.cgi?id=53759 + + Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if + necessary. For now, the heap assumes that it always has at least one + block live. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::reset): + * runtime/Heap.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::shrinkBlocks): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::highWaterMark): + (JSC::MarkedSpace::setHighWaterMark): + +2011-02-04 David Kilzer <ddkilzer@apple.com> + + BUILD FIX: REALLY remove the last vestiges of JSVALUE32! + + <rdar://problem/8957409> Remove last vestiges of JSVALUE32 + <http://webkit.org/b/53779> + + * DerivedSources.make: Removed dependency on + JavaScriptCore.JSVALUE32.exp. + +2011-02-04 David Kilzer <ddkilzer@apple.com> + + <rdar://problem/8957409> Remove last vestiges of JSVALUE32 + <http://webkit.org/b/53779> + + Reviewed by Darin Adler. + + Support for JSVALUE32 was originaly removed in r70111. + + * Configurations/JavaScriptCore.xcconfig: Changed armv6 to use + JavaScriptCore.JSVALUE32_64.exp and ppc64 to use + JavaScriptCore.JSVALUE64.exp to match Platform.h. + * DerivedSources.make: Removed rule for + JavaScriptCore.JSVALUE32.exp. + * JavaScriptCore.JSVALUE32only.exp: Removed. + * JavaScriptCore.xcodeproj/project.pbxproj: Removed references + to JavaScriptCore.JSVALUE32only.exp. + +2011-02-04 David Kilzer <ddkilzer@apple.com> + + Use static_cast and other style cleanup in YarrInterpreter.cpp + <http://webkit.org/b/53772> + + Reviewed by John Sullivan. + + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::Interpreter::InputStream::readChecked): Use + static_cast. + (JSC::Yarr::Interpreter::InputStream::checkInput): Remove + unnecessary else block. + (JSC::Yarr::Interpreter::matchAssertionEOL): Ditto. + (JSC::Yarr::Interpreter::backtrackBackReference): Ditto. + (JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast. + +2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77625 and r77626. + http://trac.webkit.org/changeset/77625 + http://trac.webkit.org/changeset/77626 + https://bugs.webkit.org/show_bug.cgi?id=53765 + + It broke Windows builds (Requested by Ossy_ on #webkit). + + * JavaScriptCore.exp: + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * create_regex_tables: + * runtime/RegExp.cpp: + * wtf/Platform.h: + * yarr/Yarr.h: + * yarr/YarrJIT.cpp: + * yarr/YarrJIT.h: + * yarr/YarrParser.h: + * yarr/YarrPattern.h: + * yarr/YarrSyntaxChecker.h: + * yarr/yarr.pri: Removed. + +2011-02-04 Jessie Berlin <jberlin@apple.com> + + Windows build fix. Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2011-02-04 Peter Varga <pvarga@webkit.org> + + Reviewed by Gavin Barraclough. + + Replace PCRE with Yarr in WebCore + https://bugs.webkit.org/show_bug.cgi?id=53496 + + * JavaScriptCore.exp: + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * create_regex_tables: + * runtime/RegExp.cpp: + * wtf/Platform.h: + * yarr/Yarr.h: + * yarr/YarrJIT.cpp: + * yarr/YarrJIT.h: + * yarr/YarrParser.h: + * yarr/YarrPattern.h: + * yarr/YarrSyntaxChecker.h: + * yarr/yarr.pri: Added. + +2011-02-04 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed rollout two patches r77614 and r77612. + + REGRESSION: Snow Leopard Intel Release anumber of failing tests. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::reset): + * runtime/Heap.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::reset): + * runtime/MarkedSpace.h: + +2011-02-04 Geoffrey Garen <ggaren@apple.com> + + Try to fix 32bit build. + + * runtime/Heap.cpp: + (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings, + since 1.5 is double (64bit), and the result is size_t (32bit). + +2011-02-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Changed MarkedSpace to delegate grow/shrink decisions to Heap + https://bugs.webkit.org/show_bug.cgi?id=53759 + + SunSpider reports no change. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::reset): + * runtime/Heap.h: Reorganized a few data members for better cache locality. + Added a grow policy. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for + the heap to make an explicit sweep call. + + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::highWaterMark): + (JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how + many bytes to allocate before failing and giving the heap an opportunity + to collect garbage. This also means that we allocate blocks on demand, + instead of ahead of time. + +2011-02-03 James Kozianski <koz@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add navigator.registerProtocolHandler behind a flag. + https://bugs.webkit.org/show_bug.cgi?id=52609 + + * Configurations/FeatureDefines.xcconfig: + +2011-02-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Not all blocks are freed when the heap is freed (counting is hard!) + https://bugs.webkit.org/show_bug.cgi?id=53732 + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just + keep freeing block 0 until there are no blocks left. + +2011-02-03 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Mac build. + + * JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header + needs to be private, not project, so other projects can include headers + that depend on it. + +2011-02-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Start using MarkedBlock instead of CollectorBlock + https://bugs.webkit.org/show_bug.cgi?id=53693 + + SunSpider reports no change. + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::blockFor): + (JSC::MarkedBlock::setMarked): + (JSC::MarkedBlock::isCellAligned): + (JSC::MarkedBlock::isPossibleCell): Updated for const-ness. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::containsSlowCase): + (JSC::MarkedSpace::clearMarkBits): Updated for const-ness. + + * runtime/MarkedSpace.h: + (JSC::CollectorHeap::collectorBlock): + (JSC::MarkedSpace::heap): + (JSC::MarkedSpace::isMarked): + (JSC::MarkedSpace::testAndSetMarked): + (JSC::MarkedSpace::setMarked): + (JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock, + and deleted dead CollectorBlock-related code. + +2011-02-03 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Avoid strlen() in AtomicString::fromUTF8 + https://bugs.webkit.org/show_bug.cgi?id=50516 + + Add an overload to calculateStringHashFromUTF8 to get + strlen() of the input data with only one call. + + This change shows about 3% performance win on the xml-parser benchmark. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/text/AtomicString.cpp: + (WTF::AtomicString::fromUTF8): + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal): + (WTF::Unicode::calculateStringHashFromUTF8): + (WTF::Unicode::calculateStringHashAndLengthFromUTF8): + * wtf/unicode/UTF8.h: + +2011-02-02 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-02-02 Gavin Barraclough <barraclough@apple.com> + + oops, build fix! + + * wtf/Assertions.cpp: + +2011-02-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 53650 - Add a BACKTRACE macro to Assertions.h + + Add a BACKTRACE macro to Assertions.h, which will print a backtrace on + debug Mac builds, make CRASH (and thus ASSERT) automatically call this. + + * JavaScriptCore.exp: + * wtf/Assertions.cpp: + * wtf/Assertions.h: + +2011-02-02 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Improper backtrack of nested non-capturing greedy paren to prior paren + https://bugs.webkit.org/show_bug.cgi?id=53261 + + A paren that follows a non-capturing greedy paren nested within a + non-capturing fixed paren was back tracking to the last paren + processed instead of the immediately prior paren. + Refactored default backtracking of parens to prior paren to work for + both nested (within) and immediately prior (after) parens. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail): + (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState): + (JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen): + (JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen): + (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail): + (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + (JSC::Yarr::YarrGenerator::generateDisjunction): + +2011-02-02 Jeff Miller <jeffm@apple.com> + + Reviewed by Darin Adler and Steve Falkenburg. + + Add DerivedSources.make to some Visual Studio projects + https://bugs.webkit.org/show_bug.cgi?id=53607 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make. + +2011-02-02 Steve Lacey <sjl@chromium.org> + + Reviewed by Eric Carlson. + + Implement basic media statistics on media elements. + https://bugs.webkit.org/show_bug.cgi?id=53322 + + * Configurations/FeatureDefines.xcconfig: + +2011-02-02 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fixes for wxWebKit. + + * wtf/wx/StringWx.cpp: + (WTF::String::String): + +2011-02-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + A little more Heap refactoring + https://bugs.webkit.org/show_bug.cgi?id=53577 + + SunSpider reports no change. + + Split out MarkedBlock into its own file / class. + + Did the following renames: + isCellMarked => isMarked + checkMarkCell => testAndSetMarked + markCell => setMarked + cellOffset => cellNumber + collectorBlock => blockFor + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Heap.cpp: + (JSC::WeakGCHandlePool::update): + * runtime/Heap.h: + (JSC::Heap::isMarked): + (JSC::Heap::testAndSetMarked): + (JSC::Heap::setMarked): + * runtime/JSArray.h: + (JSC::MarkStack::markChildren): + (JSC::MarkStack::drain): + * runtime/JSCell.h: + (JSC::JSCell::MarkStack::internalAppend): + * runtime/MarkedBlock.cpp: Added. + * runtime/MarkedBlock.h: Added. + (JSC::MarkedBlock::blockFor): + (JSC::MarkedBlock::cellNumber): + (JSC::MarkedBlock::isMarked): + (JSC::MarkedBlock::testAndSetMarked): + (JSC::MarkedBlock::setMarked): + (JSC::MarkedBlock::isCellAligned): + (JSC::MarkedBlock::isPossibleCell): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::isMarked): + (JSC::MarkedSpace::testAndSetMarked): + (JSC::MarkedSpace::setMarked): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::isValid): + (JSC::::get): + (JSC::::take): + (JSC::::set): + +2011-02-02 Sam Weinig <sam@webkit.org> + + Fix windows clean build. + + * DerivedSources.make: + +2011-02-02 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Fix dist compilation + https://bugs.webkit.org/show_bug.cgi?id=53579 + + * GNUmakefile.am: Added WriteBarrier.h to the sources, it was + added in r77151 + +2011-02-01 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77297. + http://trac.webkit.org/changeset/77297 + https://bugs.webkit.org/show_bug.cgi?id=53538 + + caused leopard crashes (Requested by paroga on #webkit). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/text/AtomicString.cpp: + (WTF::AtomicString::fromUTF8): + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::calculateStringHashFromUTF8): + * wtf/unicode/UTF8.h: + +2011-02-01 Sam Weinig <sam@webkit.org> + + Fix Mac production builds. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2011-02-01 Sam Weinig <sam@webkit.org> + + Try to fix the windows build. + + * DerivedSources.make: + +2011-02-01 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Avoid strlen() in AtomicString::fromUTF8 + https://bugs.webkit.org/show_bug.cgi?id=50516 + + Add an overload to calculateStringHashFromUTF8 to get + strlen() of the input data with only one call. + + This change shows about 3% performance win on the xml-parser benchmark. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/text/AtomicString.cpp: + (WTF::AtomicString::fromUTF8): + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal): + (WTF::Unicode::calculateStringHashFromUTF8): + (WTF::Unicode::calculateStringHashAndLengthFromUTF8): + * wtf/unicode/UTF8.h: + +2011-02-01 Sam Weinig <sam@webkit.org> + + Reviewed by Beth Dakin. + + Part 2 for <rdar://problem/8492788> + Adopt WKScrollbarPainterController + + Use header detection to define scrollbar painting controller #define. + + * DerivedSources.make: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2011-02-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Refactor JSGlobalObject-related tear-down + https://bugs.webkit.org/show_bug.cgi?id=53478 + + While investigating crashes caused by r77082, I noticed some strange + destructor-time behaviors. This patch makes them less strange. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code + blocks on the Heap, instead of on independent global objects. The heap + is guaranteed to outlast any GC-owned data structure. The heap is also + a natural place to store objects that needs out-of-band marking, since + the heap is responsible for marking all roots. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + (JSC::Heap::globalObjectCount): + (JSC::Heap::protectedGlobalObjectCount): + * runtime/Heap.h: + (JSC::Heap::codeBlocks): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::init): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map + owned by JSGlobalData, instead of an instrusive circular linked list. + This is simpler, and it avoids destructor-time access between garbage + collected objects, which is hard to get right. + + (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing + everything down. Otherwise, weak data structures will incorrectly report + that objects pending destruction are still alive. + +2011-02-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit + bot; loading trac pages; typing in search field + https://bugs.webkit.org/show_bug.cgi?id=53519 + + The crashes were all caused by failure to run an object's destructor. + + * runtime/CollectorHeapIterator.h: + (JSC::ObjectIterator::ObjectIterator): Don't skip forward upon + construction. The iterator class used to do that when it was designed + for prior-to-beginning initialization. I forgot to remove this line + of code when I changed the iterator to normal initialization. + + Skipping forward upon construction was causing the heap to skip running + the destructor for the very first object in a block when destroying the + block. This usually did not crash, since block destruction is rare and + most objects have pretty trivial destructors. However, in the rare case + when the heap would destroy a block whose first object was a global + object or a DOM node, BOOM. + +2011-01-31 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Update JSObject storage for new marking API + https://bugs.webkit.org/show_bug.cgi?id=53467 + + JSObject no longer uses EncodedJSValue for its property storage. + This produces a stream of mechanical changes to PropertySlot and + anonymous storage APIs. + + * JavaScriptCore.exp: + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::ArrayPrototype): + * runtime/BooleanConstructor.cpp: + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanObject.cpp: + (JSC::BooleanObject::BooleanObject): + * runtime/BooleanObject.h: + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::DatePrototype::DatePrototype): + * runtime/JSActivation.cpp: + (JSC::JSActivation::getOwnPropertySlot): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObject): + * runtime/JSObject.cpp: + (JSC::JSObject::fillGetterPropertySlot): + * runtime/JSObject.h: + (JSC::JSObject::getDirectLocation): + (JSC::JSObject::offsetForLocation): + (JSC::JSObject::putAnonymousValue): + (JSC::JSObject::clearAnonymousValue): + (JSC::JSObject::getAnonymousValue): + (JSC::JSObject::putThisToAnonymousValue): + (JSC::JSObject::locationForOffset): + (JSC::JSObject::inlineGetOwnPropertySlot): + * runtime/JSObjectWithGlobalObject.cpp: + (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::JSWrapperObject): + (JSC::JSWrapperObject::setInternalValue): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/NumberConstructor.cpp: + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::NumberObject::NumberObject): + (JSC::constructNumber): + * runtime/NumberObject.h: + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/PropertySlot.h: + (JSC::PropertySlot::getValue): + (JSC::PropertySlot::setValue): + (JSC::PropertySlot::setRegisterSlot): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::setWithoutWriteBarrier): + +2011-02-01 Daniel Bates <dbates@rim.com> + + Reviewed by Antonio Gomes. + + Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937) + https://bugs.webkit.org/show_bug.cgi?id=53506 + + Currently, use of the Mersenne Twister pseudorandom number generator + is hardcoded to the Windows CE port. With the passing of bug #53253, + we can generalize support for this PRNG to all ports that use srand(3) + and rand(3), including Windows CE. + + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + +2011-02-01 Dave Tapuska <dtapuska@rim.com> + + Reviewed by Gavin Barraclough. + + MacroAssemblerARM would generate code that did 32bit loads + on addresses that were not aligned. More specifically it would + generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower. + The intended instruction really is ldrb r8,[r1, #7]; ensure we + call load8 instead of load32. + + https://bugs.webkit.org/show_bug.cgi?id=46095 + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::set32Test32): + (JSC::MacroAssemblerARM::set32Test8): + +2011-02-01 Darin Fisher <darin@chromium.org> + + Reviewed by Eric Seidel. + + Fix some Visual Studio compiler warnings. + https://bugs.webkit.org/show_bug.cgi?id=53476 + + * wtf/MathExtras.h: + (clampToInteger): + (clampToPositiveInteger): + * wtf/ThreadingWin.cpp: + (WTF::absoluteTimeToWaitTimeoutInterval): + +2011-01-31 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Bogus callframe during stack unwinding + https://bugs.webkit.org/show_bug.cgi?id=53454 + + Trying to access a callframe's globalData after destroying its + ScopeChain is not a good thing. While we could access the + globalData directly through the (known valid) scopechain we're + holding on to, it feels fragile. Instead we push the valid + ScopeChain onto the callframe again to ensure that the callframe + itself remains valid. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + +2011-01-31 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Potentially Unsafe HashSet of RuntimeObject* in RootObject definition + https://bugs.webkit.org/show_bug.cgi?id=53271 + + Reapplying this change again. + Changed isValid() to use .get() as a result of change r77151. + + Added new isValid() methods to check if a contained object in + a WeakGCMap is valid when using an unchecked iterator. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::isValid): + +2011-01-31 Oliver Hunt <oliver@apple.com> + + Convert markstack to a slot visitor API + https://bugs.webkit.org/show_bug.cgi?id=53219 + + rolling r77098, r77099, r77100, r77109, and + r77111 back in, along with a few more Qt fix attempts. + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrivateProperty): + * API/JSWeakObjectMapRefInternal.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::findScopedProperty): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::execute): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::setActivation): + (JSC::Arguments::Arguments): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + * runtime/ConservativeSet.h: + (JSC::ConservativeSet::~ConservativeSet): + (JSC::ConservativeSet::mark): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::getter): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setter): + (JSC::GetterSetter::setSetter): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::cachedGlobalObject): + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::put): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::MarkStack::append): + (JSC::JSCell::MarkStack::internalAppend): + (JSC::JSCell::MarkStack::deprecatedAppend): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::regExpConstructor): + (JSC::JSGlobalObject::errorConstructor): + (JSC::JSGlobalObject::evalErrorConstructor): + (JSC::JSGlobalObject::rangeErrorConstructor): + (JSC::JSGlobalObject::referenceErrorConstructor): + (JSC::JSGlobalObject::syntaxErrorConstructor): + (JSC::JSGlobalObject::typeErrorConstructor): + (JSC::JSGlobalObject::URIErrorConstructor): + (JSC::JSGlobalObject::evalFunction): + (JSC::JSGlobalObject::objectPrototype): + (JSC::JSGlobalObject::functionPrototype): + (JSC::JSGlobalObject::arrayPrototype): + (JSC::JSGlobalObject::booleanPrototype): + (JSC::JSGlobalObject::stringPrototype): + (JSC::JSGlobalObject::numberPrototype): + (JSC::JSGlobalObject::datePrototype): + (JSC::JSGlobalObject::regExpPrototype): + (JSC::JSGlobalObject::methodCallDummy): + (JSC::Structure::prototypeForLookup): + (JSC::constructArray): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + (JSC::Stringifier::Holder::objectSlot): + (JSC::Stringifier::markAggregate): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::callReviver): + (JSC::Walker::walk): + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::putUndefinedAtDirectOffset): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSValue::putDirect): + (JSC::JSObject::allocatePropertyStorageInline): + (JSC::JSObject::markChildrenDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::get): + * runtime/JSPropertyNameIterator.h: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSString.cpp: + (JSC::StringObject::create): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStack): + (JSC::MarkStack::deprecatedAppendValues): + (JSC::MarkStack::appendValues): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + (JSC::resolveBase): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChain::top): + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::storedPrototype): + (JSC::Structure::storedPrototypeSlot): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::uncheckedGetSlot): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): + * runtime/WriteBarrier.h: Added. + (JSC::DeprecatedPtr::DeprecatedPtr): + (JSC::DeprecatedPtr::get): + (JSC::DeprecatedPtr::operator*): + (JSC::DeprecatedPtr::operator->): + (JSC::DeprecatedPtr::slot): + (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): + (JSC::DeprecatedPtr::operator!): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::get): + (JSC::WriteBarrierBase::operator*): + (JSC::WriteBarrierBase::operator->): + (JSC::WriteBarrierBase::clear): + (JSC::WriteBarrierBase::slot): + (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): + (JSC::WriteBarrierBase::operator!): + (JSC::WriteBarrier::WriteBarrier): + (JSC::operator==): + +2011-01-31 Dan Winship <danw@gnome.org> + + Reviewed by Gustavo Noronha Silva. + + wss (websockets ssl) support for gtk via new gio TLS support + https://bugs.webkit.org/show_bug.cgi?id=50344 + + Add a GPollableOutputStream typedef for TLS WebSockets support + + * wtf/gobject/GTypedefs.h: + +2011-01-31 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=53352 + Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH(). + + The FixedVMPoolAllocator currently uses a best fix policy - + switch to first fit, this is less prone to external fragmentation. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::AllocationTableSizeClass::AllocationTableSizeClass): + (JSC::AllocationTableSizeClass::blockSize): + (JSC::AllocationTableSizeClass::blockCount): + (JSC::AllocationTableSizeClass::blockAlignment): + (JSC::AllocationTableSizeClass::size): + (JSC::AllocationTableLeaf::AllocationTableLeaf): + (JSC::AllocationTableLeaf::~AllocationTableLeaf): + (JSC::AllocationTableLeaf::allocate): + (JSC::AllocationTableLeaf::free): + (JSC::AllocationTableLeaf::isEmpty): + (JSC::AllocationTableLeaf::isFull): + (JSC::AllocationTableLeaf::size): + (JSC::AllocationTableLeaf::classForSize): + (JSC::AllocationTableLeaf::dump): + (JSC::LazyAllocationTable::LazyAllocationTable): + (JSC::LazyAllocationTable::~LazyAllocationTable): + (JSC::LazyAllocationTable::allocate): + (JSC::LazyAllocationTable::free): + (JSC::LazyAllocationTable::isEmpty): + (JSC::LazyAllocationTable::isFull): + (JSC::LazyAllocationTable::size): + (JSC::LazyAllocationTable::dump): + (JSC::LazyAllocationTable::classForSize): + (JSC::AllocationTableDirectory::AllocationTableDirectory): + (JSC::AllocationTableDirectory::~AllocationTableDirectory): + (JSC::AllocationTableDirectory::allocate): + (JSC::AllocationTableDirectory::free): + (JSC::AllocationTableDirectory::isEmpty): + (JSC::AllocationTableDirectory::isFull): + (JSC::AllocationTableDirectory::size): + (JSC::AllocationTableDirectory::classForSize): + (JSC::AllocationTableDirectory::dump): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::allocated): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::classForSize): + (JSC::FixedVMPoolAllocator::offsetToPointer): + (JSC::FixedVMPoolAllocator::pointerToOffset): + (JSC::ExecutableAllocator::committedByteCount): + (JSC::ExecutableAllocator::isValid): + (JSC::ExecutableAllocator::underMemoryPressure): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * wtf/PageReservation.h: + (WTF::PageReservation::PageReservation): + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::committed): + +2011-01-31 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r76969. + http://trac.webkit.org/changeset/76969 + https://bugs.webkit.org/show_bug.cgi?id=53418 + + "It is causing crashes in GTK+ and Leopard bots" (Requested by + alexg__ on #webkit). + + * runtime/WeakGCMap.h: + +2011-01-30 Csaba Osztrogonác <ossy@webkit.org> + + Unreviewed, rolling out r77098, r77099, r77100, r77109, and + r77111. + http://trac.webkit.org/changeset/77098 + http://trac.webkit.org/changeset/77099 + http://trac.webkit.org/changeset/77100 + http://trac.webkit.org/changeset/77109 + http://trac.webkit.org/changeset/77111 + https://bugs.webkit.org/show_bug.cgi?id=53219 + + Qt build is broken + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrivateProperty): + * API/JSWeakObjectMapRefInternal.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::findScopedProperty): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::execute): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::setActivation): + (JSC::Arguments::Arguments): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + * runtime/ConservativeSet.h: + (JSC::ConservativeSet::~ConservativeSet): + (JSC::ConservativeSet::mark): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::getter): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setter): + (JSC::GetterSetter::setSetter): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::cachedGlobalObject): + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::put): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::JSValue::toThisObject): + (JSC::JSCell::MarkStack::append): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::regExpConstructor): + (JSC::JSGlobalObject::errorConstructor): + (JSC::JSGlobalObject::evalErrorConstructor): + (JSC::JSGlobalObject::rangeErrorConstructor): + (JSC::JSGlobalObject::referenceErrorConstructor): + (JSC::JSGlobalObject::syntaxErrorConstructor): + (JSC::JSGlobalObject::typeErrorConstructor): + (JSC::JSGlobalObject::URIErrorConstructor): + (JSC::JSGlobalObject::evalFunction): + (JSC::JSGlobalObject::objectPrototype): + (JSC::JSGlobalObject::functionPrototype): + (JSC::JSGlobalObject::arrayPrototype): + (JSC::JSGlobalObject::booleanPrototype): + (JSC::JSGlobalObject::stringPrototype): + (JSC::JSGlobalObject::numberPrototype): + (JSC::JSGlobalObject::datePrototype): + (JSC::JSGlobalObject::regExpPrototype): + (JSC::JSGlobalObject::methodCallDummy): + (JSC::Structure::prototypeForLookup): + (JSC::constructArray): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + (JSC::Stringifier::markAggregate): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::callReviver): + (JSC::Walker::walk): + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSValue::putDirect): + (JSC::JSObject::allocatePropertyStorageInline): + (JSC::JSObject::markChildrenDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::get): + * runtime/JSPropertyNameIterator.h: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSString.cpp: + (JSC::StringObject::create): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MarkStack.h: + (JSC::MarkStack::appendValues): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + (JSC::resolveBase): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChain::top): + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::storedPrototype): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::isValid): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): + * runtime/WriteBarrier.h: Removed. + +2011-01-30 Simon Fraser <simon.fraser@apple.com> + + Build fix the build fix. I assume Oliver meant m_cell, not m_value. + + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::clear): + +2011-01-30 Oliver Hunt <oliver@apple.com> + + More Qt build fixes + + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::clear): + +2011-01-30 Oliver Hunt <oliver@apple.com> + + Convert markstack to a slot visitor API + https://bugs.webkit.org/show_bug.cgi?id=53219 + + rolling r77006 and r77020 back in. + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrivateProperty): + * API/JSWeakObjectMapRefInternal.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::findScopedProperty): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::execute): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::setActivation): + (JSC::Arguments::Arguments): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + * runtime/ConservativeSet.h: + (JSC::ConservativeSet::~ConservativeSet): + (JSC::ConservativeSet::mark): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::getter): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setter): + (JSC::GetterSetter::setSetter): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::cachedGlobalObject): + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::put): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::MarkStack::append): + (JSC::JSCell::MarkStack::internalAppend): + (JSC::JSCell::MarkStack::deprecatedAppend): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::regExpConstructor): + (JSC::JSGlobalObject::errorConstructor): + (JSC::JSGlobalObject::evalErrorConstructor): + (JSC::JSGlobalObject::rangeErrorConstructor): + (JSC::JSGlobalObject::referenceErrorConstructor): + (JSC::JSGlobalObject::syntaxErrorConstructor): + (JSC::JSGlobalObject::typeErrorConstructor): + (JSC::JSGlobalObject::URIErrorConstructor): + (JSC::JSGlobalObject::evalFunction): + (JSC::JSGlobalObject::objectPrototype): + (JSC::JSGlobalObject::functionPrototype): + (JSC::JSGlobalObject::arrayPrototype): + (JSC::JSGlobalObject::booleanPrototype): + (JSC::JSGlobalObject::stringPrototype): + (JSC::JSGlobalObject::numberPrototype): + (JSC::JSGlobalObject::datePrototype): + (JSC::JSGlobalObject::regExpPrototype): + (JSC::JSGlobalObject::methodCallDummy): + (JSC::Structure::prototypeForLookup): + (JSC::constructArray): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + (JSC::Stringifier::Holder::objectSlot): + (JSC::Stringifier::markAggregate): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::callReviver): + (JSC::Walker::walk): + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::putUndefinedAtDirectOffset): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSValue::putDirect): + (JSC::JSObject::allocatePropertyStorageInline): + (JSC::JSObject::markChildrenDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::get): + * runtime/JSPropertyNameIterator.h: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSString.cpp: + (JSC::StringObject::create): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStack): + (JSC::MarkStack::deprecatedAppendValues): + (JSC::MarkStack::appendValues): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + (JSC::resolveBase): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChain::top): + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::storedPrototype): + (JSC::Structure::storedPrototypeSlot): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::uncheckedGetSlot): + (JSC::WeakGCMap::isValid): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): + * runtime/WriteBarrier.h: Added. + (JSC::DeprecatedPtr::DeprecatedPtr): + (JSC::DeprecatedPtr::get): + (JSC::DeprecatedPtr::operator*): + (JSC::DeprecatedPtr::operator->): + (JSC::DeprecatedPtr::slot): + (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): + (JSC::DeprecatedPtr::operator!): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::get): + (JSC::WriteBarrierBase::operator*): + (JSC::WriteBarrierBase::operator->): + (JSC::WriteBarrierBase::slot): + (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): + (JSC::WriteBarrierBase::operator!): + (JSC::WriteBarrier::WriteBarrier): + (JSC::operator==): + +2011-01-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Filter all Heap collection through a common reset function, in + preparation for adding features triggered by collection. + https://bugs.webkit.org/show_bug.cgi?id=53396 + + SunSpider reports no change. + + * runtime/Heap.cpp: + (JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost + limit, just call collectAllGarbage() instead of rolling our own special + way of resetting the heap. In theory, this may be slower in some cases, + but it also fixes cases of pathological heap growth that we've seen, + where the only objects being allocated are temporary and huge + (<rdar://problem/8885843>). + + (JSC::Heap::allocate): + (JSC::Heap::collectAllGarbage): Use the shared reset function. + + (JSC::Heap::reset): + * runtime/Heap.h: Carved a new shared reset function out of the old + collectAllGarbage. + +2011-01-30 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77025. + http://trac.webkit.org/changeset/77025 + https://bugs.webkit.org/show_bug.cgi?id=53401 + + It made js1_5/Regress/regress-159334.js fail on 64 bit Linux + (Requested by Ossy on #webkit). + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FreeListEntry::FreeListEntry): + (JSC::AVLTreeAbstractorForFreeList::get_less): + (JSC::AVLTreeAbstractorForFreeList::set_less): + (JSC::AVLTreeAbstractorForFreeList::get_greater): + (JSC::AVLTreeAbstractorForFreeList::set_greater): + (JSC::AVLTreeAbstractorForFreeList::get_balance_factor): + (JSC::AVLTreeAbstractorForFreeList::set_balance_factor): + (JSC::AVLTreeAbstractorForFreeList::null): + (JSC::AVLTreeAbstractorForFreeList::compare_key_key): + (JSC::AVLTreeAbstractorForFreeList::compare_key_node): + (JSC::AVLTreeAbstractorForFreeList::compare_node_node): + (JSC::reverseSortFreeListEntriesByPointer): + (JSC::reverseSortCommonSizedAllocations): + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::addToFreeList): + (JSC::FixedVMPoolAllocator::coalesceFreeSpace): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::allocInternal): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::FixedVMPoolAllocator::addToCommittedByteCount): + (JSC::ExecutableAllocator::committedByteCount): + (JSC::maybeModifyVMPoolSize): + (JSC::ExecutableAllocator::isValid): + (JSC::ExecutableAllocator::underMemoryPressure): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * wtf/PageReservation.h: + (WTF::PageReservation::PageReservation): + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + +2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn> + + Reviewed by Daniel Bates. + + Code style issue in JavaScriptCore/wtf/CurrentTime.h + https://bugs.webkit.org/show_bug.cgi?id=53394 + + According to rule #3 at http://webkit.org/coding/coding-style.html, + This patch fix style issue in CurrentTime.h. + + No functionality change, no new tests. + + * wtf/CurrentTime.h: + (WTF::currentTimeMS): + (WTF::getLocalTime): + +2011-01-30 Benjamin Poulain <ikipou@gmail.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] JavaScriptCore does not link on Mac if building WebKit 2 + https://bugs.webkit.org/show_bug.cgi?id=53377 + + The option "-whole-archive" is not availabe with the libtool of Mac OS X, + instead, we can use "-all_load" on Mac. + + * JavaScriptCore.pri: + +2011-01-29 Geoffrey Garen <ggaren@apple.com> + + Sorry Leopard bot -- I committed a change by accident. + + * JavaScriptCore.exp: You may have your symbols back now. + +2011-01-29 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Simplified Heap iteration + https://bugs.webkit.org/show_bug.cgi?id=53393 + + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::isValid): + (JSC::CollectorHeapIterator::isLive): + (JSC::CollectorHeapIterator::advance): Removed "max" argument to + advance because it's a constant. + (JSC::LiveObjectIterator::LiveObjectIterator): + (JSC::LiveObjectIterator::operator++): + (JSC::DeadObjectIterator::DeadObjectIterator): + (JSC::DeadObjectIterator::operator++): + (JSC::ObjectIterator::ObjectIterator): + (JSC::ObjectIterator::operator++): Factored out common checks into + two helper functions -- isValid() for "Am I past the end?" and isLive() + for "Is the cell I'm pointing to live?". + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::freeBlock): + (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap + to the end, to avoid making sweep subtly reliant on internal Heap state. + (JSC::MarkedSpace::primaryHeapBegin): + (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where + iteration begins. + +2011-01-29 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Cameron Zwarich. + + Simplified heap destruction + https://bugs.webkit.org/show_bug.cgi?id=53392 + + * JavaScriptCore.exp: + * runtime/Heap.cpp: + (JSC::Heap::destroy): + * runtime/Heap.h: + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::destroy): + * runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected + cells last -- the difficult contortions required to do so just don't seem + justified. We make no guarantees about GC protection after the client + throws away JSGlobalData, and it doesn't seem like any meaningful + guarantee is even possible. + +2011-01-29 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Switched heap to use the Bitmap class and removed CollectorBitmap + https://bugs.webkit.org/show_bug.cgi?id=53391 + + SunSpider says 1.005x as fast. Seems like a fluke. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::allocate): Updated for rename and returning a value + rather than taking a value by reference. + + * runtime/MarkedSpace.h: Code reuse is good. + + * wtf/Bitmap.h: + (WTF::::testAndSet): Added, since this is the one thing Bitmap was missing + which CollectorBitmap had. (Renamed from the less conventional "getset".) + + (WTF::::nextPossiblyUnset): Renamed and changed to return a value for + clarity. It's all the same with inlining. + +2011-01-28 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Some more Heap cleanup. + https://bugs.webkit.org/show_bug.cgi?id=53357 + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols. + + * runtime/Heap.cpp: + (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to + reportExtraMemoryCostSlowCase to match our naming conventions. + + (JSC::Heap::capacity): Renamed size to capacity because this function + returns the capacity of the heap, including unused portions. + + * runtime/Heap.h: + (JSC::Heap::globalData): + (JSC::Heap::markedSpace): + (JSC::Heap::machineStackMarker): + (JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file. + Moved ctor and dtor to the beginning of the class definition. Grouped + functions by purpose. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::capacity): Renamed size to capacity because this + function returns the capacity of the heap, including unused portions. + + * runtime/MarkedSpace.h: Removed statistics and the Statistics class because + the same information can be gotten just by calling size() and capacity(). + + * runtime/MemoryStatistics.cpp: + * runtime/MemoryStatistics.h: Ditto. + +2011-01-29 Daniel Bates <dbates@rim.com> + + Reviewed by Eric Seidel. + + Move wince/mt19937ar.c to ThirdParty and make it a policy choice + https://bugs.webkit.org/show_bug.cgi?id=53253 + + Make inclusion of MT19937 a policy decision. + + Currently, we hardcoded to use MT19937 when building for + Windows CE. Instead, we should make this a policy decision + with the Windows CE port using this by default. + + * JavaScriptCore.pri: Append Source/ThirdParty to the end + of the list include directories. + * wtf/CMakeLists.txt: Ditto. + * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when + building for Windows CE. + * wtf/RandomNumber.cpp: + (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE). + +2011-01-29 Cameron Zwarich <zwarich@apple.com> + + Reviewed by David Kilzer. + + Bug 53374 - Remove uses of unsafe string functions in debugging code + https://bugs.webkit.org/show_bug.cgi?id=53374 + + * runtime/RegExp.cpp: + (JSC::RegExp::printTraceData): + +2011-01-29 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Oliver Hunt. + + JavaScriptCoreUseJIT environment variable broken + https://bugs.webkit.org/show_bug.cgi?id=53372 + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned + by getenv() rather than just doing a NULL check on the return value. + +2011-01-29 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Move CharacterNames.h into WTF directory + https://bugs.webkit.org/show_bug.cgi?id=49618 + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/CMakeLists.txt: + * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h. + * wtf/unicode/UTF8.cpp: + +2011-01-28 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Gavin Barraclough. + + Add various clampToInt() methods to MathExtras.h + https://bugs.webkit.org/show_bug.cgi?id=52910 + + Add functions for clamping doubles and floats to valid int + ranges, for signed and positive integers. + + * wtf/MathExtras.h: + (clampToInteger): + (clampToPositiveInteger): + +2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77006 and r77020. + http://trac.webkit.org/changeset/77006 + http://trac.webkit.org/changeset/77020 + https://bugs.webkit.org/show_bug.cgi?id=53360 + + "Broke Windows tests" (Requested by rniwa on #webkit). + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrivateProperty): + * API/JSWeakObjectMapRefInternal.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::findScopedProperty): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::execute): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::setActivation): + (JSC::Arguments::Arguments): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + * runtime/ConservativeSet.h: + (JSC::ConservativeSet::~ConservativeSet): + (JSC::ConservativeSet::mark): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::getter): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setter): + (JSC::GetterSetter::setSetter): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::cachedGlobalObject): + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::put): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::JSValue::toThisObject): + (JSC::JSCell::MarkStack::append): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::regExpConstructor): + (JSC::JSGlobalObject::errorConstructor): + (JSC::JSGlobalObject::evalErrorConstructor): + (JSC::JSGlobalObject::rangeErrorConstructor): + (JSC::JSGlobalObject::referenceErrorConstructor): + (JSC::JSGlobalObject::syntaxErrorConstructor): + (JSC::JSGlobalObject::typeErrorConstructor): + (JSC::JSGlobalObject::URIErrorConstructor): + (JSC::JSGlobalObject::evalFunction): + (JSC::JSGlobalObject::objectPrototype): + (JSC::JSGlobalObject::functionPrototype): + (JSC::JSGlobalObject::arrayPrototype): + (JSC::JSGlobalObject::booleanPrototype): + (JSC::JSGlobalObject::stringPrototype): + (JSC::JSGlobalObject::numberPrototype): + (JSC::JSGlobalObject::datePrototype): + (JSC::JSGlobalObject::regExpPrototype): + (JSC::JSGlobalObject::methodCallDummy): + (JSC::Structure::prototypeForLookup): + (JSC::constructArray): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + (JSC::Stringifier::markAggregate): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::callReviver): + (JSC::Walker::walk): + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSValue::putDirect): + (JSC::JSObject::allocatePropertyStorageInline): + (JSC::JSObject::markChildrenDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::get): + * runtime/JSPropertyNameIterator.h: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSString.cpp: + (JSC::StringObject::create): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MarkStack.h: + (JSC::MarkStack::appendValues): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + (JSC::resolveBase): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChain::top): + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::storedPrototype): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::isValid): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): + * runtime/WriteBarrier.h: Removed. + +2011-01-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=53352 + Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH(). + + The FixedVMPoolAllocator currently uses a best fix policy - + switch to first fit, this is less prone to external fragmentation. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::AllocationTableSizeClass::AllocationTableSizeClass): + (JSC::AllocationTableSizeClass::blockSize): + (JSC::AllocationTableSizeClass::blockCount): + (JSC::AllocationTableSizeClass::blockAlignment): + (JSC::AllocationTableSizeClass::size): + (JSC::AllocationTableLeaf::AllocationTableLeaf): + (JSC::AllocationTableLeaf::~AllocationTableLeaf): + (JSC::AllocationTableLeaf::allocate): + (JSC::AllocationTableLeaf::free): + (JSC::AllocationTableLeaf::isEmpty): + (JSC::AllocationTableLeaf::isFull): + (JSC::AllocationTableLeaf::size): + (JSC::AllocationTableLeaf::classForSize): + (JSC::AllocationTableLeaf::dump): + (JSC::LazyAllocationTable::LazyAllocationTable): + (JSC::LazyAllocationTable::~LazyAllocationTable): + (JSC::LazyAllocationTable::allocate): + (JSC::LazyAllocationTable::free): + (JSC::LazyAllocationTable::isEmpty): + (JSC::LazyAllocationTable::isFull): + (JSC::LazyAllocationTable::size): + (JSC::LazyAllocationTable::dump): + (JSC::LazyAllocationTable::classForSize): + (JSC::AllocationTableDirectory::AllocationTableDirectory): + (JSC::AllocationTableDirectory::~AllocationTableDirectory): + (JSC::AllocationTableDirectory::allocate): + (JSC::AllocationTableDirectory::free): + (JSC::AllocationTableDirectory::isEmpty): + (JSC::AllocationTableDirectory::isFull): + (JSC::AllocationTableDirectory::size): + (JSC::AllocationTableDirectory::classForSize): + (JSC::AllocationTableDirectory::dump): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::allocated): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::classForSize): + (JSC::FixedVMPoolAllocator::offsetToPointer): + (JSC::FixedVMPoolAllocator::pointerToOffset): + (JSC::ExecutableAllocator::committedByteCount): + (JSC::ExecutableAllocator::isValid): + (JSC::ExecutableAllocator::underMemoryPressure): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * wtf/PageReservation.h: + (WTF::PageReservation::PageReservation): + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::committed): + +2011-01-27 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Convert markstack to a slot visitor API + https://bugs.webkit.org/show_bug.cgi?id=53219 + + Move the MarkStack over to a slot based marking API. + + In order to avoiding aliasing concerns there are two new types + that need to be used when holding on to JSValues and JSCell that + need to be marked: WriteBarrier and DeprecatedPtr. WriteBarrier + is expected to be used for any JSValue or Cell that's lifetime and + marking is controlled by another GC object. DeprecatedPtr is used + for any value that we need to rework ownership for. + + The change over to this model has produced a large amount of + code changes, but they are mostly mechanical (forwarding JSGlobalData, + etc). + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeConstructor): + (JSObjectSetPrivateProperty): + * API/JSWeakObjectMapRefInternal.h: + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + (JSC::BytecodeGenerator::findScopedProperty): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::execute): + (JSC::Interpreter::privateExecute): + * interpreter/Register.h: + (JSC::Register::jsValueSlot): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + * runtime/Arguments.h: + (JSC::Arguments::setActivation): + (JSC::Arguments::Arguments): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + * runtime/ConservativeSet.h: + (JSC::ConservativeSet::mark): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::getter): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setter): + (JSC::GetterSetter::setSetter): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::GlobalEvalFunction): + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::cachedGlobalObject): + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::put): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::MarkStack::append): + (JSC::JSCell::MarkStack::appendCell): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::getOwnPropertySlot): + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::regExpConstructor): + (JSC::JSGlobalObject::errorConstructor): + (JSC::JSGlobalObject::evalErrorConstructor): + (JSC::JSGlobalObject::rangeErrorConstructor): + (JSC::JSGlobalObject::referenceErrorConstructor): + (JSC::JSGlobalObject::syntaxErrorConstructor): + (JSC::JSGlobalObject::typeErrorConstructor): + (JSC::JSGlobalObject::URIErrorConstructor): + (JSC::JSGlobalObject::evalFunction): + (JSC::JSGlobalObject::objectPrototype): + (JSC::JSGlobalObject::functionPrototype): + (JSC::JSGlobalObject::arrayPrototype): + (JSC::JSGlobalObject::booleanPrototype): + (JSC::JSGlobalObject::stringPrototype): + (JSC::JSGlobalObject::numberPrototype): + (JSC::JSGlobalObject::datePrototype): + (JSC::JSGlobalObject::regExpPrototype): + (JSC::JSGlobalObject::methodCallDummy): + (JSC::constructArray): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::object): + (JSC::Stringifier::Holder::objectSlot): + (JSC::Stringifier::markAggregate): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::callReviver): + (JSC::Walker::walk): + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + (JSC::JSObject::putDirectOffset): + (JSC::JSObject::putUndefinedAtDirectOffset): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectWithoutTransition): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSValue::putDirect): + (JSC::JSObject::allocatePropertyStorageInline): + (JSC::JSObject::markChildrenDirect): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSString.cpp: + (JSC::StringObject::create): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::lookupPut): + * runtime/MarkStack.h: + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::NativeErrorPrototype): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + (JSC::resolveBase): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::~ScopeChainNode): + (JSC::ScopeChainIterator::operator*): + (JSC::ScopeChainIterator::operator->): + (JSC::ScopeChain::top): + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + * runtime/Structure.cpp: + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::storedPrototypeSlot): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::uncheckedGetSlot): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): + * runtime/WriteBarrier.h: Added. + (JSC::DeprecatedPtr::DeprecatedPtr): + (JSC::DeprecatedPtr::get): + (JSC::DeprecatedPtr::operator*): + (JSC::DeprecatedPtr::operator->): + (JSC::DeprecatedPtr::slot): + (JSC::DeprecatedPtr::operator UnspecifiedBoolType*): + (JSC::DeprecatedPtr::operator!): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::get): + (JSC::WriteBarrierBase::operator*): + (JSC::WriteBarrierBase::operator->): + (JSC::WriteBarrierBase::slot): + (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): + (JSC::WriteBarrierBase::operator!): + (JSC::WriteBarrier::WriteBarrier): + (JSC::operator==): + +2011-01-28 Adam Roben <aroben@apple.com> + + Chromium build fix after r76967 + + * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other + similar macros in this file. + +2011-01-28 Michael Saboff <msaboff@apple.com> + + Potentially Unsafe HashSet of RuntimeObject* in RootObject definition + https://bugs.webkit.org/show_bug.cgi?id=53271 + + Reapplying this this change. No change from prior patch in + JavaScriptCore. + + Added new isValid() methods to check if a contained object in + a WeakGCMap is valid when using an unchecked iterator. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::isValid): + +2011-01-27 Adam Roben <aroben@apple.com> + + Extract code to convert a WTF absolute time to a Win32 wait interval into a separate + function + + Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a + Win32 event + + Reviewed by Dave Hyatt. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function. + + * wtf/ThreadingPrimitives.h: Declare the new function. + + * wtf/ThreadingWin.cpp: + (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait + interval from here... + (WTF::absoluteTimeToWaitTimeoutInterval): ...to here. + +2011-01-28 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + Add basic rubber banding support + <rdar://problem/8219429> + https://bugs.webkit.org/show_bug.cgi?id=53277 + + * wtf/Platform.h: Add ENABLE for rubber banding. + +2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r76893. + http://trac.webkit.org/changeset/76893 + https://bugs.webkit.org/show_bug.cgi?id=53287 + + It made some tests crash on GTK and Qt debug bots (Requested + by Ossy on #webkit). + + * runtime/WeakGCMap.h: + +2011-01-27 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add WTFString method to compare equality with Vector<UChar> + https://bugs.webkit.org/show_bug.cgi?id=53266 + + I'm planning to use this method in the new XSS filter implementation, + but it seems generally useful. + + * wtf/text/StringImpl.h: + (WTF::equalIgnoringNullity): + * wtf/text/WTFString.h: + (WTF::equalIgnoringNullity): + +2011-01-27 Michael Saboff <msaboff@apple.com> + + Potentially Unsafe HashSet of RuntimeObject* in RootObject definition + https://bugs.webkit.org/show_bug.cgi?id=53271 + + Added new isValid() methods to check if a contained object in + a WeakGCMap is valid when using an unchecked iterator. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::isValid): + +2011-01-26 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + Add events to represent the start/end of a gesture scroll + https://bugs.webkit.org/show_bug.cgi?id=53215 + + * wtf/Platform.h: Add ENABLE for gesture events. + +2011-01-26 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt][Symbian] Fix --minimal build + https://bugs.webkit.org/show_bug.cgi?id=52839 + + Move definition of USE_SYSTEM_MALLOC out of pri file. + Put it in platform.h instead. + + * wtf/Platform.h: + * wtf/TCSystemAlloc.cpp: + * wtf/wtf.pri: + +2011-01-26 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + [WINCE] Add JIT support to build system + https://bugs.webkit.org/show_bug.cgi?id=53079 + + * CMakeListsWinCE.txt: + +2011-01-25 Adam Roben <aroben@apple.com> + + Windows Production build fix + + Reviewed by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start + of the file so that ConfigurationBuildDir takes that into account. Also set it the right way + (by redefining the macro) rather than the wrong way (by modifying the environment variable). + +2011-01-25 Steve Falkenburg <sfalken@apple.com> + + Rubber-stamped by Adam Roben. + + Windows production build fix. + Use correct environment variable escaping + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2011-01-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + JSON.stringify processing time exponentially grows with size of object + https://bugs.webkit.org/show_bug.cgi?id=51922 + + Remove last use of reserveCapacity from JSON stringification, as it results + in appalling append behaviour when there are a large number of property names + and nothing else. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + +2011-01-25 Antti Koivisto <antti@apple.com> + + Not reviewed. + + Try to fix windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-01-25 Antti Koivisto <antti@apple.com> + + Reviewed by Oliver Hunt. + + REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector() + https://bugs.webkit.org/show_bug.cgi?id=53061 + + Cache did not know about the subclass so failed to fully delete the items. + Got rid of the subclass and moved the classes to separate files. + + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * parser/JSParser.cpp: + (JSC::JSParser::Scope::saveFunctionInfo): + (JSC::JSParser::Scope::restoreFunctionInfo): + (JSC::JSParser::findCachedFunctionInfo): + (JSC::JSParser::parseFunctionInfo): + * parser/SourceProvider.h: + * parser/SourceProviderCache.cpp: Added. + (JSC::SourceProviderCache::~SourceProviderCache): + (JSC::SourceProviderCache::byteSize): + * parser/SourceProviderCache.h: Added. + (JSC::SourceProviderCache::SourceProviderCache): + (JSC::SourceProviderCache::add): + (JSC::SourceProviderCache::get): + * parser/SourceProviderCacheItem.h: Added. + (JSC::SourceProviderCacheItem::SourceProviderCacheItem): + (JSC::SourceProviderCacheItem::approximateByteSize): + (JSC::SourceProviderCacheItem::closeBraceToken): + +2011-01-25 Marcilio Mendonca <mamendonca@rim.com> + + Reviewed by Darin Adler. + + Bug 53087: Refactoring: replaced a hanging "else" with a "return" + statement + https://bugs.webkit.org/show_bug.cgi?id=53087. + + Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M + with a "return" so that the code is more readable and less error pro + (e.g., "else" doesn't use braces so adding extra lines to the else + block won't have any effect; even worse, code still compiles + successfully. + + * wtf/Assertions.cpp: + +2011-01-24 Chris Marrin <cmarrin@apple.com> + + Reviewed by Eric Seidel. + + Change ENABLE_3D_CANVAS to ENABLE_WEBGL + https://bugs.webkit.org/show_bug.cgi?id=53041 + + * Configurations/FeatureDefines.xcconfig: + +2011-01-25 Adam Roben <aroben@apple.com> + + Windows Production build fix + + * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set". + +2011-01-25 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Eric Seidel. + + Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2) + https://bugs.webkit.org/show_bug.cgi?id=52949 + + * jit/JITStubs.cpp: + +2011-01-24 Adam Roben <aroben@apple.com> + + Windows Production build fix + + * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source. + +2011-01-24 Peter Varga <pvarga@webkit.org> + + Reviewed by Oliver Hunt. + + Optimize regex patterns which contain empty alternatives + https://bugs.webkit.org/show_bug.cgi?id=51395 + + Eliminate the empty alternatives from the regex pattern and convert it to do + the matching in an easier way. + + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): + +2011-01-24 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt] Move project files into Source + https://bugs.webkit.org/show_bug.cgi?id=52891 + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + * jsc.pro: + +2011-01-23 Mark Rowe <mrowe@apple.com> + + Follow-up to r76477. + + Fix the scripts that detect problematic code such as static initializers + and destructors, weak vtables, inappropriate files in the framework wrappers, + and public headers including private headers. These had all been broken + since the projects were moved in to the Source directory as the paths to the + scripts were not updated at that time. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2011-01-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Use WTF::StringHasher in WebCore + https://bugs.webkit.org/show_bug.cgi?id=52934 + + Add an additional function to calculate the hash + of data with a runtimedependent size. + + * wtf/StringHasher.h: + (WTF::StringHasher::createBlobHash): + +2011-01-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Fix comment in String::ascii() + https://bugs.webkit.org/show_bug.cgi?id=52980 + + * wtf/text/WTFString.cpp: + (WTF::String::ascii): + +2011-01-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Add String::containsOnlyLatin1() + https://bugs.webkit.org/show_bug.cgi?id=52979 + + * wtf/text/WTFString.h: + (WTF::String::containsOnlyLatin1): + (WTF::charactersAreAllLatin1): + +2011-01-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Oliver Hunt. + + Remove obsolete JSVALUE32 code + https://bugs.webkit.org/show_bug.cgi?id=52948 + + r70111 removed support for JSVALUE32. + ARM, MIPS and X86 support JSVALUE32_64 only. + + * jit/JITStubs.cpp: + +2011-01-22 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Dan Bernstein. + + ASSERT running run-webkit-tests --threaded. + https://bugs.webkit.org/show_bug.cgi?id=52971 + + SunSpider and v8 report no change. + + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + (JSC::ConservativeSet::add): + * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and + the growth policy to 2X, to make SunSpider and v8 happy. + (JSC::ConservativeSet::ConservativeSet): + (JSC::ConservativeSet::~ConservativeSet): + (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc. + Malloc is forbidden during a multi-threaded mark phase because it can + cause deadlock. + +2011-01-22 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Geoffrey Garen. + + Rubber-stamped by Maciej Stachowiak. + + A few of Maciej's review suggestions for my last patch. + https://bugs.webkit.org/show_bug.cgi?id=52946 + + SunSpider reports no change. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems. + + * runtime/ConservativeSet.cpp: Added. + (JSC::isPointerAligned): + (JSC::ConservativeSet::add): + * runtime/ConservativeSet.h: Added. + (JSC::ConservativeSet::ConservativeSet): + (JSC::ConservativeSet::mark): Split ConservativeSet out into its own + file, and moved the conservative check into ConservativeSet::add, making + ConservativeSet's responsibility clearer. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + * runtime/MachineStackMarker.cpp: + (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): + (JSC::MachineStackMarker::markOtherThreadConservatively): + * runtime/MachineStackMarker.h: + * runtime/MarkStack.h: Updated for changes above. + +2011-01-22 Patrick Gansterer <paroga@webkit.org> + + Unreviewed WinCE build fix for r76430. + + * runtime/MachineStackMarker.cpp: + (JSC::swapIfBackwards): + +2011-01-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Beth Dakin. + + Reorganized MarkedSpace, making many of its functions private. + + * runtime/JSCell.h: + (JSC::JSCell::Heap::heap): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::globalData): + (JSC::MarkedSpace::heap): + +2011-01-21 Geoffrey Garen <ggaren@apple.com> + + Try to fix build: moved helper function out of #ifdef. + + * runtime/MachineStackMarker.cpp: + (JSC::swapIfBackwards): + +2011-01-21 Geoffrey Garen <ggaren@apple.com> + + Rubber-stamped by Maciej Stachowiak. + + A few of Maciej's review suggestions for my last patch. + https://bugs.webkit.org/show_bug.cgi?id=52946 + + SunSpider reports no change. + + * runtime/MachineStackMarker.cpp: + (JSC::swapIfBackwards): Added a helper function for handling platforms + where the stack can grow in any direction. + + (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): + (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper + function. + + (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to. + + (JSC::MachineStackMarker::markConservatively): Changed to use a more + standard looping idiom, and to use the helper function above. + + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to. + +2011-01-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Cleaned up some conservative marking code. + https://bugs.webkit.org/show_bug.cgi?id=52946 + + SunSpider reports no change. + + * interpreter/RegisterFile.h: No need for a special marking function, + since we already expose a start() and end(). + + * runtime/Heap.cpp: + (JSC::Heap::registerFile): + (JSC::Heap::markRoots): + * runtime/Heap.h: + (JSC::Heap::contains): Migrated markConservatively() to the machine stack + marker class. Now, Heap just provides a contains() function, which the + machine stack marker uses for checking whether a pointer points into the heap. + + * runtime/MachineStackMarker.cpp: + (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): + (JSC::MachineStackMarker::markOtherThreadConservatively): + (JSC::isPointerAligned): + (JSC::MachineStackMarker::markConservatively): + * runtime/MachineStackMarker.h: Move the conservative marking code here. + + * runtime/MarkStack.h: + (JSC::ConservativeSet::add): + (JSC::ConservativeSet::mark): Changed to using a vector instead of hash + set. Vector seems to be a bit faster, and it generates smaller code. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::containsSlowCase): + * runtime/MarkedSpace.h: + (JSC::MarkedSpace::isCellAligned): + (JSC::MarkedSpace::isPossibleCell): + (JSC::MarkedSpace::contains): Kept the code for determining whether a + pointer pointed into marked space, and moved the code for marking + a set of conservative pointers into the machine stack marker. + + * wtf/HashSet.h: + (WTF::::add): Added two missing inlines that I noticed while testing + vector vs hash set. + +2011-01-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access + control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool". + + * wtf/PageAllocation.h: + (WTF::PageAllocation::operator bool): + * wtf/PageReservation.h: + (WTF::PageReservation::operator bool): + +2011-01-21 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + [RegexFuzz] Hang with forward assertion + https://bugs.webkit.org/show_bug.cgi?id=52825 + <rdar://problem/8894332> + + The backtrackTo label from the first term in a list of terms is + being overwritten by processing of subsequent terms. Changed + copyBacktrackToLabel() to check for an existing bcaktrackTo label + before copying and renamed it to propagateBacktrackToLabel() since + it no longer copies. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + +2011-01-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Moved the mark stack from global data to the heap, since it pertains + to the heap, and not the virtual machine as a whole. + https://bugs.webkit.org/show_bug.cgi?id=52930 + + SunSpider reports no change. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::markRoots): + * runtime/Heap.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + +2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu> + + Reviewed by Darin Adler. + + REGRESSION(r76177): All JavaScriptCore tests fail on ARM + https://bugs.webkit.org/show_bug.cgi?id=52814 + + Get the approximateByteSize value before releasing the OwnPtr. + + * parser/JSParser.cpp: + (JSC::JSParser::parseFunctionInfo): + +2011-01-21 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + Remove unnecessary <stdio.h> include + https://bugs.webkit.org/show_bug.cgi?id=52884 + + * jit/JIT.cpp: remove unnecessary include. + +2011-01-20 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Maciej Stachowiak. + + Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr. + + * wtf/OwnArrayPtr.h: + +2011-01-20 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Oliver Hunt. + + [WINCE] Remove obsolete JSVALUE32 code + https://bugs.webkit.org/show_bug.cgi?id=52450 + + Remove the "offset hack" in create_jit_stubs, since we + only support JSVALUE32_64 in the meantime. + + * create_jit_stubs: Removed offset argument + * jit/JITStubs.cpp: + +2011-01-20 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + When marking conservatively, guard against reviving dead objects. + https://bugs.webkit.org/show_bug.cgi?id=52840 + + SunSpider and v8 say no change. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API. + + * runtime/Heap.cpp: + (JSC::Heap::recordExtraCost): No need to guard against conservative + marking reviving dead objects anymore, since the conservative marking + mechanism guards against this now. + + (JSC::Heap::markConservatively): + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a + marking function. We want to establish a separation of concerns between + visiting roots and draining the mark stack. + + (JSC::Heap::markRoots): Gather the set of conservative references before + clearning mark bits, because conservative marking now uses the mark bits + to determine if a reference is valid, and avoid reviving dead objects. + + (JSC::Heap::collectAllGarbage): No need to guard against conservative + marking reviving dead objects anymore, since the conservative marking + mechanism guards against this now. + + * runtime/Heap.h: Updated to use the ConservativeSet API. + + * runtime/MachineStackMarker.cpp: + (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): + (JSC::MachineStackMarker::markCurrentThreadConservatively): + (JSC::MachineStackMarker::markOtherThreadConservatively): + (JSC::MachineStackMarker::markMachineStackConservatively): + * runtime/MachineStackMarker.h: Ditto. + + * runtime/MarkStack.h: + (JSC::ConservativeSet::add): + (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the + set of conservative references. This is different from MarkStack, since + we don't mark the set until it is completely gathered. + + * runtime/MarkedSpace.cpp: + (JSC::MarkedSpace::freeBlock): + (JSC::MarkedSpace::resizeBlocks): + (JSC::MarkedSpace::markConservatively): + * runtime/MarkedSpace.h: When marking conservatively, guard against + reviving dead objects. + +2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com> + + Reviewed by Geoffrey Garen. + + [Symbian] Fix StackBounds::initialize() + https://bugs.webkit.org/show_bug.cgi?id=52842 + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit + +2011-01-20 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773) + https://bugs.webkit.org/show_bug.cgi?id=52773 + + Fixed case where an existing DataLabelPtr is overwritten. The + replacing DataLabelPtr is now resolved immediately in + linkDataLabelToBacktrackIfExists(). Cleanup - eliminated bool + return value for the routine as it was never used. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): + +2011-01-20 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt][WK2] WebKit2 enabled build fails to link + + Work around undefined reference linking issues until the buildsystem gets redesigned. + These issues first occured in minimal builds (see BUG 50519). + + * JavaScriptCore.pri: link as whole-archive for WebKit2 builds + +2011-01-20 Zoltan Horvath <zoltan@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Refactoring of the custom allocation framework + https://bugs.webkit.org/show_bug.cgi?id=49897 + + Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589). + The modification replaces Noncopyable and FastAllocBase classes and these inherits with their + equivalent macro implementation at the necessary places. + + * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro. + +2011-01-20 Mark Rowe <mrowe@apple.com> + + Reviewed by Maciej Stachowiak. + + Follow-up to r75766 / <rdar://problem/5469576>. + + We were failing to initialize the key, causing all sorts of unexpected behavior. + + * wtf/FastMalloc.cpp: + (WTF::setThreadHeap): + (WTF::TCMalloc_ThreadCache::GetThreadHeap): + (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized. + +2011-01-18 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Rolled back in r76078, with crash fixed. + https://bugs.webkit.org/show_bug.cgi?id=52668 + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::markChildren): Account for the fact that the global + object moves its variables into and out of the register file. While out + of the register file, the symbol table's size is not an accurate count + for the size of the register array, since the BytecodeGenerator might + be compiling, adding items to the symbol table. + +2011-01-18 Darin Adler <darin@apple.com> + + Reviewed by Geoffrey Garen. + + Stack overflow when converting an Error object to string + https://bugs.webkit.org/show_bug.cgi?id=46410 + + * Android.mk: Added StringRecursionChecker.cpp and + StringRecursionChecker.h. + * CMakeLists.txt: Ditto. + * GNUmakefile.am: Ditto. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.pro: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead + of the older hand-written code to do the same thing. + (JSC::arrayProtoFuncToLocaleString): Ditto. + (JSC::arrayProtoFuncJoin): Ditto. + + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): Use StringRecursionChecker. + + * runtime/JSGlobalData.h: Renamed arrayVisitedElements to + stringRecursionCheckVisitedObjects. + + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): Use StringRecursionChecker. + + * runtime/StringRecursionChecker.cpp: Added. + * runtime/StringRecursionChecker.h: Added. + +2011-01-19 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Remove non-spec support for callable RegExp + https://bugs.webkit.org/show_bug.cgi?id=28285 + + Remove support for callable regexps. If it breaks sites we can + just roll this out. + + * runtime/RegExpObject.cpp: + * runtime/RegExpObject.h: + * tests/mozilla/expected.html: update results. + +2011-01-19 Antti Koivisto <antti@apple.com> + + Reviewed by Oliver Hunt. + + Cache function offsets to speed up javascript parsing + https://bugs.webkit.org/show_bug.cgi?id=52622 + + Use cache to save function offsets and some other info. + This avoids quite a bit of work when reparsing the source. + + * parser/ASTBuilder.h: + * parser/JSParser.cpp: + (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo): + (JSC::JSParser::CachedFunctionInfo::approximateByteSize): + (JSC::JSParser::CachedFunctionInfo::closeBraceToken): + (JSC::JSParser::Scope::copyCapturedVariablesToVector): + (JSC::JSParser::Scope::saveFunctionInfo): + (JSC::JSParser::Scope::restoreFunctionInfo): + (JSC::JSParser::findCachedFunctionInfo): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseFunctionInfo): + * parser/Lexer.h: + (JSC::Lexer::setOffset): + (JSC::Lexer::setLineNumber): + (JSC::Lexer::sourceProvider): + * parser/SourceProvider.h: + (JSC::SourceProviderCache::SourceProviderCache): + (JSC::SourceProviderCache::~SourceProviderCache): + (JSC::SourceProviderCache::byteSize): + (JSC::SourceProviderCache::add): + (JSC::SourceProviderCache::get): + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::~SourceProvider): + (JSC::SourceProvider::cache): + (JSC::SourceProvider::notifyCacheSizeChanged): + (JSC::SourceProvider::cacheSizeChanged): + * parser/SyntaxChecker.h: + +2011-01-19 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Follow-up to r75766 / <rdar://problem/5469576>. + + * DerivedSources.make: Evaluate the SDKROOT variable correctly. + +2011-01-19 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion + https://bugs.webkit.org/show_bug.cgi?id=52672 + + Rather than coming up with a somewhat convoluted mechanism to ensure that + developers can override the global objects prototype with a function named + __proto__ and expect it to work, we just disallow it at the syntax level. + + * parser/JSParser.cpp: + (JSC::JSParser::parseFunctionInfo): + +2011-01-19 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8882994> Regression: Simple nested backtrack hangs + https://bugs.webkit.org/show_bug.cgi?id=52675 + + The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540 + broke simple backtracking in some cases. Reworked that change to + link both jumps and labels. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel): + (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + +2011-01-19 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: [JSC] scripts have incorrect starting line (always 1). + https://bugs.webkit.org/show_bug.cgi?id=52721 + + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * debugger/Debugger.h: + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SourceCode.h: + (JSC::SourceCode::SourceCode): + * parser/SourceProvider.h: + (JSC::SourceProvider::startPosition): + +2011-01-19 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Laszlo Gombos and Tor Arne Vestbø. + + [Qt] Remove unnecessary "../Source" from paths + after moving source files into Source is finished. + + * JavaScriptCore.pri: + +2011-01-19 Benjamin Kalman <kalman@chromium.org> + + Reviewed by Darin Adler. + + Don't return void from void function String::split + https://bugs.webkit.org/show_bug.cgi?id=52684 + + * wtf/text/WTFString.cpp: + (WTF::String::split): + +2011-01-18 Kenneth Russell <kbr@google.com> + + Unreviewed, rolling out r76078. + http://trac.webkit.org/changeset/76078 + https://bugs.webkit.org/show_bug.cgi?id=52668 + + Caused crashes of fast/canvas/webgl/constants.html, + fast/canvas/webgl/gl-enum-tests.html, and possibly other layout + test crashes in Release mode. WebGL crashes were observed with + "run-webkit-tests fast/canvas/webgl". It was necessary to run + multiple tests to provoke the crash. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::markGlobals): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::markChildren): + +2011-01-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden + https://bugs.webkit.org/show_bug.cgi?id=52690 + + Clean up code to retrieve arguments from activation and function objects. + Remove the incorrect assertion from JSActivation's argumentsGetter. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::retrieveArguments): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + +2011-01-18 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + Removed RegisterFile::markGlobals because it was obtuse, and it + unnecessarily relied on conservative marking. + https://bugs.webkit.org/show_bug.cgi?id=52668 + + * interpreter/RegisterFile.h: Removed markGlobals. + + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): Added a comment explaning why some + JSActivations don't always mark their registers arrays. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark + the registers array directly. + +2011-01-18 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540) + https://bugs.webkit.org/show_bug.cgi?id=52540 + https://bugs.webkit.org/show_bug.cgi?id=52662 + + Directly use backtrack label with parentheses nested under a + non-capturing parentheses. Also linked current parentheses + tail code object for possible parens nested within a non-capturing + parentheses. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + +2011-01-18 Daniel Bates <dbates@rim.com> + + Reviewed by Gavin Barraclough. + + Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS + https://bugs.webkit.org/show_bug.cgi?id=52517 + + Patch by David Tapuska + + Currently, we compile code with respect to the Symbian-specific moving memory model + assumption for all ARMv5 or lower architectures. Instead, we should only compile + such code when building for Symbian OS on those architectures because this model + is Symbian-specific. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + +2011-01-18 Dimitry Andric <dim@freebsd.org> + + Reviewed by Andreas Kling. + + Fix linking JavaScriptCore on FreeBSD/amd64 + https://bugs.webkit.org/show_bug.cgi?id=52591 + + Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as + in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker + complains about the relocation type. + + * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux + and FreeBSD. + +2011-01-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Antti Koivisto. + + [jsfunfuzz] Assertion in codegen for array of NaN constants + https://bugs.webkit.org/show_bug.cgi?id=52643 + + Don't cache NaN literals in the code generator, as NaN doesn't compare + as equal to itself it causes problems when rehashing the number cache. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + +2011-01-17 Jarred Nicholls <jarred@sencha.com> + + Reviewed by Csaba Osztrogonác. + + REGRESSION(r75709): Return value of fscanf() shouldn't be ignored. + https://bugs.webkit.org/show_bug.cgi?id=52585 + + gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check + the return value to get around the gcc warning + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::maybeModifyVMPoolSize): + +2011-01-17 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + [regexfuzz] Crash running regex with lookahead + https://bugs.webkit.org/show_bug.cgi?id=52548 + + Eliminated agressive chaining of backtracks. This code was overwriting + already valid backtrack information. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks): + +2011-01-17 Tony Gentilcore <tonyg@chromium.org> + + Reviewed by Alexey Proskuryakov. + + Fix some headers with missing or misspelled #ifndef guards + https://bugs.webkit.org/show_bug.cgi?id=52545 + + * wtf/RefPtrHashMap.h: + +2011-01-17 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + Update xcodeproj svn:ignore to include xcuserdata. + + * JavaScriptCore.xcodeproj: Modified property svn:ignore. + +2011-01-16 Adam Barth <abarth@webkit.org> + + Rubber-stamped by Eric Seidel. + + Move WebKit into Source + https://bugs.webkit.org/show_bug.cgi?id=52530 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2011-01-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + [jsfunfuzz] Parser doesn't correctly validate for-loop syntax + https://bugs.webkit.org/show_bug.cgi?id=52516 + + Ensure that we always check for a semicolon after encountering + multiple declarations in the initialiser portion of a for-loop. + + * parser/JSParser.cpp: + (JSC::JSParser::parseForStatement): + +2011-01-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Strict mode restrictions on arguments and eval usage aren't complete + https://bugs.webkit.org/show_bug.cgi?id=52528 + + Fix a few bugs in strict mode where we incorrect allow mutation of + arguments and eval in the parser. + + Alas the "optimisation" used by the syntax checker for validating + binary and unary expressions was too aggressive: we do actually need + a stack for operations and operands although it needn't be as complete + as that used for the full AST builder. + + Also disallow assignment to arguments in all cases as allowing arguments + to be assignable is always an error in strict mode, regardless of context. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::BinaryExprContext::BinaryExprContext): + (JSC::ASTBuilder::UnaryExprContext::UnaryExprContext): + * parser/JSParser.cpp: + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext): + (JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext): + (JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext): + (JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + +2011-01-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Rolled back in r75886. + https://bugs.webkit.org/show_bug.cgi?id=52527 + + r75886 broke the GTK Linux bot because Linux was -- quite surprisingly -- + set up to use the constants for embedded devices. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded + constants. + +2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r75886. + http://trac.webkit.org/changeset/75886 + https://bugs.webkit.org/show_bug.cgi?id=52526 + + "Broke GTK+ 64bit" (Requested by xan_ on #webkit). + + * jit/ExecutableAllocatorFixedVMPool.cpp: + +2011-01-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/8870429> Shrink the executable pool on embedded devices + + * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB + to 16MB. + +2011-01-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Incorrect behavior changing attributes of an accessor + https://bugs.webkit.org/show_bug.cgi?id=52515 + + defineProperty doesn't correctly handle changing attributes of an accessor + property. This is because we don't pass the full descriptor to the + putDescriptor helper function, which means we have insufficient information + to do the right thing. Once that's passed the correct behavior is relatively + simple to implement. + + * runtime/JSObject.cpp: + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + +2011-01-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + [jsfunfuzz] Incorrect handling of consecutive duplicate labels + https://bugs.webkit.org/show_bug.cgi?id=52505 + + Compare StringImpl*'s instead of Identifier*'s when looking for duplicate + labels. + + * parser/JSParser.cpp: + (JSC::JSParser::parseExpressionOrLabelStatement): + +2011-01-14 Simon Fraser <simon.fraser@apple.com> + + No review. + + Initialize m_operationInProgress after r75855. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + +2011-01-14 Geoffrey Garen <ggaren@apple.com> + + Reverted accidentally committed code from my last checkin. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + +2011-01-14 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Try to fix the GTK bot. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::markRoots): Kids, remember to initialize your data members. + Knowing is half the battle. + +2011-01-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Stephanie Lewis. + + [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode + https://bugs.webkit.org/show_bug.cgi?id=52501 + + Clear the temporary character buffers used for reading escaped characters and + numbers. + + * parser/Lexer.h: + (JSC::Lexer::setOffset): + +2011-01-14 Geoffrey Garen <ggaren@apple.com> + + Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h. + + * runtime/Heap.cpp: + +2011-01-13 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Split out a MarkedSpace strategy object from Heap. + https://bugs.webkit.org/show_bug.cgi?id=52421 + + SunSpider reports no change. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool. + + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::recordExtraCost): + (JSC::Heap::allocate): + (JSC::Heap::markConservatively): + (JSC::Heap::markRoots): + (JSC::Heap::objectCount): + (JSC::Heap::statistics): + (JSC::Heap::size): + (JSC::Heap::isBusy): + (JSC::Heap::collectAllGarbage): + (JSC::Heap::primaryHeapBegin): + (JSC::Heap::primaryHeapEnd): + * runtime/Heap.h: + (JSC::Heap::globalData): + (JSC::Heap::markedSpace): + (JSC::Heap::isCellMarked): + (JSC::Heap::checkMarkCell): + (JSC::Heap::markCell): Moved all code pertaining to managing chunks of + collector memory out of this class. Heap now just delegates to MarkedSpace. + + * runtime/JSCell.h: + (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation. + + * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes. + + * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp. + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::destroy): + (JSC::MarkedSpace::allocateBlock): + (JSC::MarkedSpace::freeBlock): + (JSC::MarkedSpace::allocate): + (JSC::MarkedSpace::resizeBlocks): + (JSC::MarkedSpace::growBlocks): + (JSC::MarkedSpace::shrinkBlocks): + (JSC::MarkedSpace::markConservatively): + (JSC::MarkedSpace::clearMarkBits): + (JSC::MarkedSpace::markedCells): + (JSC::MarkedSpace::sweep): + (JSC::MarkedSpace::objectCount): + (JSC::MarkedSpace::addToStatistics): + (JSC::MarkedSpace::statistics): + (JSC::MarkedSpace::size): + (JSC::MarkedSpace::reset): + (JSC::MarkedSpace::primaryHeapBegin): + (JSC::MarkedSpace::primaryHeapEnd): + * runtime/MarkedSpace.h: Copied from runtime/Heap.h. + (JSC::MarkedSpace::globalData): + (JSC::MarkedSpace::didShrink): + (JSC::MarkedSpace::cellBlock): + (JSC::MarkedSpace::cellOffset): + (JSC::MarkedSpace::isCellMarked): + (JSC::MarkedSpace::checkMarkCell): + (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of + collector memory into this class. + + * runtime/MemoryStatistics.cpp: + (JSC::heapStatistics): + * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation. + +2011-01-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [jsfunfuzz] parser doesn't enforce continue restrictions correctly. + https://bugs.webkit.org/show_bug.cgi?id=52493 + + This patch reworks handling of break, continue and label statements + to correctly handle all the valid and invalid cases. Previously certain + errors would be missed by the parser in strict mode, but the bytecode + generator needed to handle those cases for non-strict code so nothing + failed, it simply became non-standard behaviour. + + Now that we treat break and continue errors as early faults in non-strict + mode as well that safety net has been removed so the parser bugs result in + crashes at codegen time. + + * parser/JSParser.cpp: + (JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo): + (JSC::JSParser::next): + (JSC::JSParser::nextTokenIsColon): + (JSC::JSParser::continueIsValid): + Continue is only valid in loops so we can't use breakIsValid() + (JSC::JSParser::pushLabel): + We now track whether the label is for a loop (and is therefore a + valid target for continue. + (JSC::JSParser::popLabel): + (JSC::JSParser::getLabel): + Replace hasLabel with getLabel so that we can validate the target + when parsing continue statements. + (JSC::JSParser::Scope::continueIsValid): + (JSC::JSParser::Scope::pushLabel): + (JSC::JSParser::Scope::getLabel): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::LabelInfo::LabelInfo): + (JSC::JSParser::parseExpressionOrLabelStatement): + Consecutive labels now get handled iteratively so that we can determine + whether they're valid targets for continue. + * parser/Lexer.cpp: + (JSC::Lexer::nextTokenIsColon): + * parser/Lexer.h: + (JSC::Lexer::setOffset): + +2011-01-14 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Use the Windows thread pool instead of an extra thread for FastMalloc scavenging + https://bugs.webkit.org/show_bug.cgi?id=45186 + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer(). + +2011-01-14 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Use the Windows thread pool instead of an extra thread for FastMalloc scavenging + https://bugs.webkit.org/show_bug.cgi?id=45186 + + r75819 accidentally changed the initial state of the scavenge timer. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true. + +2011-01-14 Patrick Gansterer <paroga@webkit.org> + + Unreviewed Windows Release build fix. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavengerTimerFired): + +2011-01-14 Patrick Gansterer <paroga@webkit.org> + + Unreviewed Windows Release build fix. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavengerTimerFired): + +2011-01-14 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + Use the Windows thread pool instead of an extra thread for FastMalloc scavenging + https://bugs.webkit.org/show_bug.cgi?id=45186 + + Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer(). + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::isScavengerSuspended): + (WTF::TCMalloc_PageHeap::scheduleScavenger): + (WTF::TCMalloc_PageHeap::rescheduleScavenger): + (WTF::TCMalloc_PageHeap::suspendScavenger): + (WTF::scavengerTimerFired): + (WTF::TCMalloc_PageHeap::periodicScavenge): + (WTF::TCMalloc_PageHeap::signalScavenger): + +2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Align import/export directives + https://bugs.webkit.org/show_bug.cgi?id=52208 + + * API/JSBase.h: Align import/export directives with + WebKit2/Shared/API/c/WKBase.h + +2011-01-14 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + Incorrect backtracking for nested alternatives + https://bugs.webkit.org/show_bug.cgi?id=52387 + + In the process of propigating a datalabel it wasn't getting connected + to a destination when the destination was an indirect jump. Added + code to recognize a direct backtrack destination that was an indirect + jump and added mechanism to associate DataLabelPtrs with indirect + jump entries. + Removed dead method + BacktrackDestination::linkDataLabelToHereIfExists() + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry): + (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel): + (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry): + (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable): + Changes to link indirect jumps with DataLabelPtr's. + (JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr): + (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): + Updated to handle immediate linking of indirect jumps to + DataLabelPtr. + (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to + reflect updated linkDataLabelToBacktrackIfExists(). + +2011-01-14 Pavel Podivilov <podivilov@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: provide script column offset to frontend. + https://bugs.webkit.org/show_bug.cgi?id=52377 + + * parser/SourceCode.h: + (JSC::SourceCode::SourceCode): + (JSC::SourceCode::firstColumn): + +2011-01-13 Darin Adler <darin@apple.com> + + Reviewed by Geoff Garen. + + <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available. + + * DerivedSources.make: Create a header file, HeaderDetection.h, that tells + us whether pthread_machdep.h is available. + * wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then + don't do the pthread_getspecific_function_pointer trick. + (WTF::setThreadHeap): Ditto, but set thread-specific data. + (WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set. + +2011-01-13 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gavin Barraclough. + + JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap? + https://bugs.webkit.org/show_bug.cgi?id=42756 + + The FixedVMPool Allocator does not work well on systems where + allocating very large amounts of memory upfront is not reasonable, + like Linux without overcommit enabled. As a workaround, on Linux, + default to the values used in embedded environments (in the MB + range), and only jump to the GB range if we detect at runtime that + overcommit is enabled. Should fix crashes on Linux/x86_64 with + less than 3 or 4GB of RAM. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::free): use new variables for VM pool + size and coalesce limit. + (JSC::ExecutableAllocator::isValid): swap the variables from + embedded to generic values at runtime, on linux, if overcommit is + enabled. + (JSC::ExecutableAllocator::underMemoryPressure): use new variables + for VM pool size and coalesce limit. + +2011-01-12 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + Add new Yarr.h header to the list file. + + * GNUmakefile.am: ditto. + +2011-01-12 Martin Robinson <mrobinson@igalia.com> + + Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball + https://bugs.webkit.org/show_bug.cgi?id=52299 + + * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source + files in the source list. + +2011-01-12 Peter Varga <pvarga@webkit.org> + + Reviewed by Gavin Barraclough. + + Add Yarr.h to YARR + https://bugs.webkit.org/show_bug.cgi?id=51021 + + Move other common constants and functions from YARR's different files + to Yarr.h. + Use Yarr.h header instead of including other YARR headers where it + is possible. + + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + * yarr/Yarr.h: Added. + * yarr/YarrInterpreter.cpp: + * yarr/YarrInterpreter.h: + * yarr/YarrJIT.cpp: + (JSC::Yarr::jitCompile): + (JSC::Yarr::execute): + * yarr/YarrJIT.h: + * yarr/YarrParser.h: + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPattern::compile): + (JSC::Yarr::YarrPattern::YarrPattern): + * yarr/YarrPattern.h: + +2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r75595. + http://trac.webkit.org/changeset/75595 + https://bugs.webkit.org/show_bug.cgi?id=52286 + + It broke fast/regex/pcre-test-1.html (Requested by Ossy on + #webkit). + + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + * yarr/Yarr.h: Removed. + * yarr/YarrInterpreter.cpp: + * yarr/YarrInterpreter.h: + * yarr/YarrJIT.cpp: + (JSC::Yarr::jitCompile): + * yarr/YarrJIT.h: + (JSC::Yarr::execute): + * yarr/YarrParser.h: + * yarr/YarrPattern.cpp: + (JSC::Yarr::compile): + (JSC::Yarr::YarrPattern::YarrPattern): + * yarr/YarrPattern.h: + +2011-01-12 Peter Varga <pvarga@webkit.org> + + Reviewed by Gavin Barraclough. + + Add Yarr.h to YARR + https://bugs.webkit.org/show_bug.cgi?id=51021 + + Move other common constants and functions from YARR's different files + to Yarr.h. + Use Yarr.h header instead of including other YARR headers where it + is possible. + + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + * yarr/Yarr.h: Added. + * yarr/YarrInterpreter.cpp: + * yarr/YarrInterpreter.h: + * yarr/YarrJIT.cpp: + (JSC::Yarr::jitCompile): + (JSC::Yarr::execute): + * yarr/YarrJIT.h: + * yarr/YarrParser.h: + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPattern::compile): + (JSC::Yarr::YarrPattern::YarrPattern): + * yarr/YarrPattern.h: + +2011-01-11 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Missing call to popTempSortVector() for exception case in JSArray::sort. + https://bugs.webkit.org/show_bug.cgi?id=50718 + + Fix to patch of 50718 that added pushTempSortVector() and + popTempSortVector() to JSArray::sort() to mark elements during sort. + Need to add popTempSortVector() for the return case if toString() + had an exception. + + * runtime/JSArray.cpp: + (JSC::JSArray::sort): Added popTempSortVector() + +2011-01-11 Xan Lopez <xlopez@igalia.com> + + Reviewed by Darin Adler. + + Microoptimization in ~JSString + https://bugs.webkit.org/show_bug.cgi?id=52222 + + The case where m_fibers is 0 seems to be the most common one + (almost 1/2 of the time, followed at some distance by m_fibers = 1 + in 1/4 of the cases in a typical SunSpider execution). We can save + one comparison in this common case by doing a bit of refactoring + in the JSString destructor; overall a 0.3% progression, but only + the string tests show improvement. + + * runtime/JSString.h: + (JSC::RopeBuilder::~JSString): + +2011-01-10 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + ASSERTION Failure in JSC::binaryChop + https://bugs.webkit.org/show_bug.cgi?id=25614 + + Changed JITStubs::cti_register_file_check() to use the current stack's + return PC to find the bytecode for handling the exception in the prior + frame. Also added the appropriate arrity check routine call to the + JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock. + + * jit/JIT.cpp: + (JSC::JIT::privateCompile): Changed the arrity check call location + so that it gets added to the m_calls list so that it's included in + CodeBlock::m_callReturnIndexVector. + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC. + +2011-01-10 Daniel Bates <dbates@rim.com> + + Reviewed by Martin Robinson. + + Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST() + https://bugs.webkit.org/show_bug.cgi?id=52178 + + It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and + GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we + are not compiling with GCC. + + Fixes style issues at the callsites (i.e. replace comma with comma-space in + macro function argument list). Also, makes a spelling correction in a comment. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + * wtf/Platform.h: + +2011-01-10 Geoffrey Garen <ggaren@apple.com> + + Build fix: removed some uses of nextNumber that I missed last time. + + * runtime/Heap.cpp: + (JSC::Heap::reset): + (JSC::Heap::collectAllGarbage): + +2011-01-10 Daniel Bates <dbates@rim.com> + + Reviewed by Darin Adler. + + Use __builtin_expect when compiling using RVCT in GNU mode + https://bugs.webkit.org/show_bug.cgi?id=51866 + + We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode + as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>. + + * wtf/AlwaysInline.h: + * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro + function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT + version. + +2011-01-10 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Moved Collector.* => Heap.*, since the file contains a class named "Heap". + + * API/JSCallbackObject.cpp: + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/Interpreter.cpp: + * interpreter/RegisterFile.h: + * jit/JITStubs.cpp: + * runtime/Collector.cpp: Removed. + * runtime/Collector.h: Removed. + * runtime/CollectorHeapIterator.h: + * runtime/GCActivityCallbackCF.cpp: + * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp. + * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h. + * runtime/InitializeThreading.cpp: + * runtime/JSCell.h: + * runtime/JSGlobalData.cpp: + * runtime/JSGlobalData.h: + * runtime/JSLock.cpp: + * runtime/JSNumberCell.h: + * runtime/MachineStackMarker.cpp: + * runtime/MemoryStatistics.h: + * runtime/Protect.h: + * runtime/UString.cpp: + * runtime/WeakGCMap.h: + * runtime/WeakGCPtr.h: + +2011-01-10 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gavin Barraclough. + + Remove unused isString() case in JSString::toPrimitiveString() + https://bugs.webkit.org/show_bug.cgi?id=52167 + + We never call toPrimitiveString() with strings, so remove the + check and add an ASSERT ensuring this never happens. 0.7% overall + progression in sunspider, since one of the call sites is very hot. + + * runtime/JSString.h: + (JSC::JSValue::toPrimitiveString): + +2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Rename the existing YARR files and classes + https://bugs.webkit.org/show_bug.cgi?id=51872 + + Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + (JSC::RegExp::printTraceData): + * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp. + (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext): + (JSC::Yarr::Interpreter::DisjunctionContext::operator new): + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::freeDisjunctionContext): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput): + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::InputStream::InputStream): + (JSC::Yarr::Interpreter::InputStream::next): + (JSC::Yarr::Interpreter::InputStream::rewind): + (JSC::Yarr::Interpreter::InputStream::read): + (JSC::Yarr::Interpreter::InputStream::readPair): + (JSC::Yarr::Interpreter::InputStream::readChecked): + (JSC::Yarr::Interpreter::InputStream::reread): + (JSC::Yarr::Interpreter::InputStream::prev): + (JSC::Yarr::Interpreter::InputStream::getPos): + (JSC::Yarr::Interpreter::InputStream::setPos): + (JSC::Yarr::Interpreter::InputStream::atStart): + (JSC::Yarr::Interpreter::InputStream::atEnd): + (JSC::Yarr::Interpreter::InputStream::checkInput): + (JSC::Yarr::Interpreter::InputStream::uncheckInput): + (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput): + (JSC::Yarr::Interpreter::testCharacterClass): + (JSC::Yarr::Interpreter::checkCharacter): + (JSC::Yarr::Interpreter::checkCasedCharacter): + (JSC::Yarr::Interpreter::checkCharacterClass): + (JSC::Yarr::Interpreter::tryConsumeBackReference): + (JSC::Yarr::Interpreter::matchAssertionBOL): + (JSC::Yarr::Interpreter::matchAssertionEOL): + (JSC::Yarr::Interpreter::matchAssertionWordBoundary): + (JSC::Yarr::Interpreter::backtrackPatternCharacter): + (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter): + (JSC::Yarr::Interpreter::matchCharacterClass): + (JSC::Yarr::Interpreter::backtrackCharacterClass): + (JSC::Yarr::Interpreter::matchBackReference): + (JSC::Yarr::Interpreter::backtrackBackReference): + (JSC::Yarr::Interpreter::recordParenthesesMatch): + (JSC::Yarr::Interpreter::resetMatches): + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): + (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): + (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin): + (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin): + (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd): + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::Interpreter::lookupForBeginChars): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::matchNonZeroDisjunction): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry): + (JSC::Yarr::ByteCompiler::ByteCompiler): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::ByteCompiler::checkInput): + (JSC::Yarr::ByteCompiler::assertionBOL): + (JSC::Yarr::ByteCompiler::assertionEOL): + (JSC::Yarr::ByteCompiler::assertionWordBoundary): + (JSC::Yarr::ByteCompiler::atomPatternCharacter): + (JSC::Yarr::ByteCompiler::atomCharacterClass): + (JSC::Yarr::ByteCompiler::atomBackReference): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): + (JSC::Yarr::ByteCompiler::popParenthesesStack): + (JSC::Yarr::ByteCompiler::dumpDisjunction): + (JSC::Yarr::ByteCompiler::closeAlternative): + (JSC::Yarr::ByteCompiler::closeBodyAlternative): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): + (JSC::Yarr::ByteCompiler::regexBegin): + (JSC::Yarr::ByteCompiler::regexEnd): + (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): + (JSC::Yarr::ByteCompiler::alternativeDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + (JSC::Yarr::byteCompile): + (JSC::Yarr::interpret): + * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h. + (JSC::Yarr::ByteTerm::ByteTerm): + (JSC::Yarr::ByteTerm::BOL): + (JSC::Yarr::ByteTerm::CheckInput): + (JSC::Yarr::ByteTerm::EOL): + (JSC::Yarr::ByteTerm::WordBoundary): + (JSC::Yarr::ByteTerm::BackReference): + (JSC::Yarr::ByteTerm::BodyAlternativeBegin): + (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): + (JSC::Yarr::ByteTerm::BodyAlternativeEnd): + (JSC::Yarr::ByteTerm::AlternativeBegin): + (JSC::Yarr::ByteTerm::AlternativeDisjunction): + (JSC::Yarr::ByteTerm::AlternativeEnd): + (JSC::Yarr::ByteTerm::SubpatternBegin): + (JSC::Yarr::ByteTerm::SubpatternEnd): + (JSC::Yarr::ByteTerm::invert): + (JSC::Yarr::ByteTerm::capture): + (JSC::Yarr::ByteDisjunction::ByteDisjunction): + (JSC::Yarr::BytecodePattern::BytecodePattern): + (JSC::Yarr::BytecodePattern::~BytecodePattern): + * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp. + (JSC::Yarr::YarrGenerator::optimizeAlternative): + (JSC::Yarr::YarrGenerator::matchCharacterClassRange): + (JSC::Yarr::YarrGenerator::matchCharacterClass): + (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput): + (JSC::Yarr::YarrGenerator::jumpIfAvailableInput): + (JSC::Yarr::YarrGenerator::checkInput): + (JSC::Yarr::YarrGenerator::atEndOfInput): + (JSC::Yarr::YarrGenerator::notAtEndOfInput): + (JSC::Yarr::YarrGenerator::jumpIfCharEquals): + (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals): + (JSC::Yarr::YarrGenerator::readCharacter): + (JSC::Yarr::YarrGenerator::storeToFrame): + (JSC::Yarr::YarrGenerator::storeToFrameWithPatch): + (JSC::Yarr::YarrGenerator::loadFromFrame): + (JSC::Yarr::YarrGenerator::loadFromFrameAndJump): + (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry): + (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump): + (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord): + (JSC::Yarr::YarrGenerator::GenerationState::GenerationState): + (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry): + (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable): + (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel): + (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel): + (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail): + (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail): + (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration): + (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration): + (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration): + (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration): + (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination): + (JSC::Yarr::YarrGenerator::BacktrackDestination::clear): + (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination): + (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset): + (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList): + (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget): + (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo): + (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr): + (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack): + (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset): + (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps): + (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel): + (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack): + (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists): + (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists): + (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks): + (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo): + (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState): + (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative): + (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid): + (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative): + (JSC::Yarr::YarrGenerator::TermGenerationState::alternative): + (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative): + (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm): + (JSC::Yarr::YarrGenerator::TermGenerationState::termValid): + (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm): + (JSC::Yarr::YarrGenerator::TermGenerationState::term): + (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum): + (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction): + (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail): + (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail): + (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm): + (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm): + (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset): + (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack): + (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack): + (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists): + (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): + (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump): + (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel): + (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset): + (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel): + (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks): + (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo): + (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink): + (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks): + (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps): + (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination): + (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom): + (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail): + (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks): + (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration): + (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump): + (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::YarrGenerator::generateAssertionBOL): + (JSC::Yarr::YarrGenerator::generateAssertionEOL): + (JSC::Yarr::YarrGenerator::matchAssertionWordchar): + (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary): + (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle): + (JSC::Yarr::YarrGenerator::generatePatternCharacterPair): + (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed): + (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassSingle): + (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): + (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): + (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::YarrGenerator::generateParentheticalAssertion): + (JSC::Yarr::YarrGenerator::generateTerm): + (JSC::Yarr::YarrGenerator::generateDisjunction): + (JSC::Yarr::YarrGenerator::generateEnter): + (JSC::Yarr::YarrGenerator::generateReturn): + (JSC::Yarr::YarrGenerator::YarrGenerator): + (JSC::Yarr::YarrGenerator::generate): + (JSC::Yarr::YarrGenerator::compile): + (JSC::Yarr::jitCompile): + * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h. + (JSC::Yarr::YarrCodeBlock::YarrCodeBlock): + (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock): + (JSC::Yarr::YarrCodeBlock::setFallBack): + (JSC::Yarr::YarrCodeBlock::isFallBack): + (JSC::Yarr::YarrCodeBlock::set): + (JSC::Yarr::YarrCodeBlock::execute): + (JSC::Yarr::YarrCodeBlock::getAddr): + (JSC::Yarr::execute): + * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h. + (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate): + (JSC::Yarr::Parser::CharacterClassParserDelegate::begin): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): + (JSC::Yarr::Parser::CharacterClassParserDelegate::end): + (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference): + (JSC::Yarr::Parser::Parser): + (JSC::Yarr::Parser::parseEscape): + (JSC::Yarr::Parser::parseAtomEscape): + (JSC::Yarr::Parser::parseCharacterClassEscape): + (JSC::Yarr::Parser::parseCharacterClass): + (JSC::Yarr::Parser::parseParenthesesBegin): + (JSC::Yarr::Parser::parseParenthesesEnd): + (JSC::Yarr::Parser::parseQuantifier): + (JSC::Yarr::Parser::parseTokens): + (JSC::Yarr::Parser::parse): + (JSC::Yarr::Parser::saveState): + (JSC::Yarr::Parser::restoreState): + (JSC::Yarr::Parser::atEndOfPattern): + (JSC::Yarr::Parser::peek): + (JSC::Yarr::Parser::peekIsDigit): + (JSC::Yarr::Parser::peekDigit): + (JSC::Yarr::Parser::consume): + (JSC::Yarr::Parser::consumeDigit): + (JSC::Yarr::Parser::consumeNumber): + (JSC::Yarr::Parser::consumeOctal): + (JSC::Yarr::Parser::tryConsume): + (JSC::Yarr::Parser::tryConsumeHex): + (JSC::Yarr::parse): + * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp. + (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor): + (JSC::Yarr::CharacterClassConstructor::reset): + (JSC::Yarr::CharacterClassConstructor::append): + (JSC::Yarr::CharacterClassConstructor::putChar): + (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper): + (JSC::Yarr::CharacterClassConstructor::isUnicodeLower): + (JSC::Yarr::CharacterClassConstructor::putRange): + (JSC::Yarr::CharacterClassConstructor::charClass): + (JSC::Yarr::CharacterClassConstructor::addSorted): + (JSC::Yarr::CharacterClassConstructor::addSortedRange): + (JSC::Yarr::BeginCharHelper::BeginCharHelper): + (JSC::Yarr::BeginCharHelper::addBeginChar): + (JSC::Yarr::BeginCharHelper::merge): + (JSC::Yarr::BeginCharHelper::addCharacter): + (JSC::Yarr::BeginCharHelper::linkHotTerms): + (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): + (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor): + (JSC::Yarr::YarrPatternConstructor::reset): + (JSC::Yarr::YarrPatternConstructor::assertionBOL): + (JSC::Yarr::YarrPatternConstructor::assertionEOL): + (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary): + (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter): + (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd): + (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin): + (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin): + (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): + (JSC::Yarr::YarrPatternConstructor::atomBackReference): + (JSC::Yarr::YarrPatternConstructor::copyDisjunction): + (JSC::Yarr::YarrPatternConstructor::copyTerm): + (JSC::Yarr::YarrPatternConstructor::quantifyAtom): + (JSC::Yarr::YarrPatternConstructor::disjunction): + (JSC::Yarr::YarrPatternConstructor::regexBegin): + (JSC::Yarr::YarrPatternConstructor::regexEnd): + (JSC::Yarr::YarrPatternConstructor::regexError): + (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets): + (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets): + (JSC::Yarr::YarrPatternConstructor::setupOffsets): + (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses): + (JSC::Yarr::YarrPatternConstructor::optimizeBOL): + (JSC::Yarr::YarrPatternConstructor::addBeginTerm): + (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms): + (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms): + (JSC::Yarr::YarrPatternConstructor::setupBeginChars): + (JSC::Yarr::compile): + (JSC::Yarr::YarrPattern::YarrPattern): + * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h. + (JSC::Yarr::CharacterRange::CharacterRange): + (JSC::Yarr::CharacterClassTable::create): + (JSC::Yarr::CharacterClassTable::CharacterClassTable): + (JSC::Yarr::CharacterClass::CharacterClass): + (JSC::Yarr::PatternTerm::PatternTerm): + (JSC::Yarr::PatternTerm::ForwardReference): + (JSC::Yarr::PatternTerm::BOL): + (JSC::Yarr::PatternTerm::EOL): + (JSC::Yarr::PatternTerm::WordBoundary): + (JSC::Yarr::PatternTerm::invert): + (JSC::Yarr::PatternTerm::capture): + (JSC::Yarr::PatternTerm::quantify): + (JSC::Yarr::PatternAlternative::PatternAlternative): + (JSC::Yarr::PatternAlternative::lastTerm): + (JSC::Yarr::PatternAlternative::removeLastTerm): + (JSC::Yarr::PatternAlternative::setOnceThrough): + (JSC::Yarr::PatternAlternative::onceThrough): + (JSC::Yarr::PatternDisjunction::PatternDisjunction): + (JSC::Yarr::PatternDisjunction::~PatternDisjunction): + (JSC::Yarr::PatternDisjunction::addNewAlternative): + (JSC::Yarr::TermChain::TermChain): + (JSC::Yarr::BeginChar::BeginChar): + (JSC::Yarr::YarrPattern::~YarrPattern): + (JSC::Yarr::YarrPattern::reset): + (JSC::Yarr::YarrPattern::containsIllegalBackReference): + (JSC::Yarr::YarrPattern::newlineCharacterClass): + (JSC::Yarr::YarrPattern::digitsCharacterClass): + (JSC::Yarr::YarrPattern::spacesCharacterClass): + (JSC::Yarr::YarrPattern::wordcharCharacterClass): + (JSC::Yarr::YarrPattern::nondigitsCharacterClass): + (JSC::Yarr::YarrPattern::nonspacesCharacterClass): + (JSC::Yarr::YarrPattern::nonwordcharCharacterClass): + +2011-01-10 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * parser/SyntaxChecker.h: + +2011-01-10 Dave Tapuska <dtapuska@rim.com> + + Reviewed by Gavin Barraclough. + + Add CTI ASM versions for RVCT ARM THUMB2 mode. + + https://bugs.webkit.org/show_bug.cgi?id=52154 + + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::ctiVMThrowTrampoline): + (JSC::ctiOpThrowNotCaught): + +2011-01-10 Gavin Barraclough <barraclough@apple.com> + + Qt build fix. + + * JavaScriptCore.pro: + +2011-01-10 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 52079 - Syntax errors should be early errors. + + From chapter 16 the spec: + An implementation must report most errors at the time the relevant ECMAScript language construct is + evaluated. An early error is an error that can be detected and reported prior to the evaluation of + any construct in the Program containing the error. An implementation must report early errors in a + Program prior to the first evaluation of that Program. Early errors in eval code are reported at + the time eval is called but prior to evaluation of any construct within the eval code. All errors + that are not early errors are runtime errors. + + An implementation must treat any instance of the following kinds of errors as an early error: + * Any syntax error." + + * JavaScriptCore.xcodeproj/project.pbxproj: + Added new files. + * bytecode/CodeBlock.cpp: + Removed op_throw_syntax_error. + * bytecode/Opcode.h: + Removed op_throw_syntax_error. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + If m_expressionTooDeep then throw a runtime error. + (JSC::BytecodeGenerator::BytecodeGenerator): + Initialize m_expressionTooDeep. + (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): + Sets m_expressionTooDeep. + * bytecompiler/BytecodeGenerator.h: + Added m_expressionTooDeep, removed emitThrowSyntaxError. + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + Conditions that threw syntax error are now handled during parsing; + during bytecompilation these are now just ASSERTs. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + Removed op_throw_syntax_error. + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createRegExp): + Renamed; added syntax check. + * parser/JSParser.cpp: + (JSC::JSParser::breakIsValid): + (JSC::JSParser::hasLabel): + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::setIsFunction): + (JSC::JSParser::Scope::isFunctionBoundary): + (JSC::JSParser::ScopeRef::hasContainingScope): + (JSC::JSParser::ScopeRef::containingScope): + (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef): + (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef): + (JSC::JSParser::AutoPopScopeRef::setPopped): + (JSC::JSParser::popScopeInternal): + (JSC::JSParser::popScope): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parsePrimaryExpression): + * parser/JSParser.h: + * parser/Nodes.h: + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::createRegExp): + Renamed; added syntax check. + * runtime/ExceptionHelpers.cpp: + (JSC::createOutOfMemoryError): + (JSC::throwOutOfMemoryError): + * runtime/ExceptionHelpers.h: + Broke out createOutOfMemoryError. + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + Add check for exception after bytecode generation. + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + RegExp error prefixes not included in error string. + * yarr/RegexParser.h: + (JSC::Yarr::Parser::parse): + Removed regexBegin/regexEnd/regexError. + * yarr/RegexPattern.cpp: + (JSC::Yarr::RegexPatternConstructor::regexBegin): + Removed regexEnd/regexError. + (JSC::Yarr::compileRegex): + Add call to regexBegin (no longer called from the parser). + * yarr/YarrSyntaxChecker.cpp: Added. + (JSC::Yarr::SyntaxChecker::assertionBOL): + (JSC::Yarr::SyntaxChecker::assertionEOL): + (JSC::Yarr::SyntaxChecker::assertionWordBoundary): + (JSC::Yarr::SyntaxChecker::atomPatternCharacter): + (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass): + (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin): + (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom): + (JSC::Yarr::SyntaxChecker::atomCharacterClassRange): + (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn): + (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd): + (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin): + (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin): + (JSC::Yarr::SyntaxChecker::atomParenthesesEnd): + (JSC::Yarr::SyntaxChecker::atomBackReference): + (JSC::Yarr::SyntaxChecker::quantifyAtom): + (JSC::Yarr::SyntaxChecker::disjunction): + (JSC::Yarr::checkSyntax): + * yarr/YarrSyntaxChecker.h: Added. + Check RegExp syntax. + +2011-01-10 Adam Roben <aroben@apple.com> + + Roll out r75289 + + It was causing assertion failures. See <http://webkit.org/b/52156>. + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): + +2011-01-08 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Unify string table adding in AtomicString + https://bugs.webkit.org/show_bug.cgi?id=51927 + + Move code for adding a string into a separate function. + This removes multiple occurrence of the same logic. + + * wtf/text/AtomicString.cpp: + (WTF::addToStringTable): Added. + (WTF::AtomicString::add): Use addToStringTable(). + (WTF::AtomicString::fromUTF8): Ditto. + +2011-01-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Split machine stack marking functions into their own class (MachineStackMarker) + https://bugs.webkit.org/show_bug.cgi?id=52088 + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread() + call behind an #ifdef because we shouldn't be registering threads at all + if we don't support usage on multiple threads. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects. + + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::markRoots): + * runtime/Collector.h: + (JSC::Heap::machineStackMarker): Moved code to machineStackMarker. + + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary + level of indirection, to make Heap less of a God class. + + * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h. + * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp. + (JSC::MachineStackMarker::MachineStackMarker): + (JSC::MachineStackMarker::~MachineStackMarker): + (JSC::MachineStackMarker::makeUsableFromMultipleThreads): + (JSC::MachineStackMarker::registerThread): + (JSC::MachineStackMarker::unregisterThread): + (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal): + (JSC::MachineStackMarker::markCurrentThreadConservatively): + (JSC::MachineStackMarker::markOtherThreadConservatively): + (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap. + +2011-01-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms + + Fix for win32. The base of the stack is stored in the "deallocation stack" field of the + Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block + for more information! + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): + +2011-01-07 Adam Roben <aroben@apple.com> + + Update react-to-vsprops-changes.py after r74855 + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + +2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Port scrollbar painting to GtkStyleContext + https://bugs.webkit.org/show_bug.cgi?id=52051 + + * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward + declaration. + +2011-01-07 Daniel Bates <dbates@rim.com> + + Reviewed by Martin Robinson. + + Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode + https://bugs.webkit.org/show_bug.cgi?id=52034 + + Derived from a patch by Eli Fidler. + + RVCT 4 or greater in GNU mode supports the computed goto GNU language extension + as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>. + + * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead + of hardcoding the GCC compiler. + * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000. + +2011-01-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 52035 - Unregistering DOMWrapperWorlds is unsafe + + The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's + destructor early, in order to release wrappers once we know we no longer intend to use them. + Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to + lose any state stored on them) it is not okay to deregister the world from the JSGlobalData. + A sequence of events that triggers the bug would look like this: + + (1) Create a DOMWrapperWorld. + (2) Register a timer in the world. + (3) Call unregisterWorld() on the world. + (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document. + (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've + called forgetWorld() none exists. + (6) Attempt to add a wrapper to a NULL map. + + Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::clear): + +2011-01-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + Bug 52021 - zeroDouble broken on ARMv7 + + The bug here is that zeroDouble was working incorrectly, + leading to op_loop_if_true failing - specifically in the + case where the value being checked is 0.0 encoded as a + double (rather than an integer immediate). + + Additionally this patch removes a redundant duplicate compare + in some (many) case. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::vcmp_F64): + (JSC::ARMv7Assembler::vcmpz_F64): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branchDoubleNonZero): + (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::branchDouble): + (JSC::MacroAssemblerARMv7::branchDoubleNonZero): + (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN): + (JSC::MacroAssemblerARMv7::compare32): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::branchDoubleNonZero): + (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchDoubleNonZero): + (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + +2011-01-06 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Added debug code to compare the results of JIT regexp with + interpreted regexp and displays discrepencies. This debug code is + controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and + is only valid if ENABLE_YARR_JIT is enabled. + + Fixed a discovered problem in RegExp::printTraceData, changing + m_pattern to the getter pattern(). + Also deleted an extraneous semicolon. + + Enhancement: Add Regexp Debug Compare between JIT and Interpreter + https://bugs.webkit.org/show_bug.cgi?id=51834 + + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + (JSC::RegExp::printTraceData): + * wtf/Platform.h: + +2011-01-06 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Eric Seidel. + + [WINCE] Remove JSC::g_stackBase + https://bugs.webkit.org/show_bug.cgi?id=51779 + + * wtf/StackBounds.cpp: + +2011-01-06 Joone Hur <joone.hur@collabora.co.uk> + + Reviewed by Eric Seidel. + + WML Parser should treat line/column number in a consistent way + https://bugs.webkit.org/show_bug.cgi?id=51601 + + Add the equality operators to TextPosition class. + + * wtf/text/TextPosition.h: + (WTF::TextPosition::operator==): Added. + (WTF::TextPosition::operator!=): Added. + (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base(). + (WTF::ZeroBasedNumber::operator==): Added. + (WTF::ZeroBasedNumber::operator!=): Added. + (WTF::OneBasedNumber::operator==): Added. + (WTF::OneBasedNumber::operator!=): Added. + +2011-01-06 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Gavin Barraclough. + + [WINCE] Determine stack extent + https://bugs.webkit.org/show_bug.cgi?id=26276 + + Scan the stack for writeable pages and use the limits. + + * wtf/StackBounds.cpp: + (WTF::detectGrowingDownward): + (WTF::isPageWritable): + (WTF::getLowerStackBound): + (WTF::getUpperStackBound): + (WTF::StackBounds::initialize): + +2011-01-05 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU. + +2011-01-05 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + Debug and Release builds on Windows clobber each other + https://bugs.webkit.org/show_bug.cgi?id=49185 + + Changes the structure of WebKitBuild build products directory so we + completely separate each build configuration into independent directories. + + Although we previously had per-configuration directories for obj, this change adds + per-configuration directories for bin, lib, obj, and include. Each configuration's + build products are stored within a directory inside of WebKitBuild. + + Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir), + defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName). + + For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow + for proper operation of the instrumentation/optimization scripts. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: + * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: + * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: + * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: + +2011-01-05 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build fix. + + * wtf/Encoder.h: Add <stdint.h> include for systems that + do not natively know about uint8_t, etc. + +2011-01-05 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + [CMake] Fix the usage of SOURCE_GROUP + https://bugs.webkit.org/show_bug.cgi?id=51739 + + * CMakeLists.txt: + +2011-01-05 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt][V8] Fix the build after recent changes. + + * pcre/pcre.pri: Correct the path after Source was introduced. + +2011-01-04 Steve Falkenburg <sfalken@apple.com> + + Build fix. Update path to FindSafari after source code reorganization. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: + +2011-01-04 Daniel Bates <dbates@rim.com> + + Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975> + (https://bugs.webkit.org/show_bug.cgi?id=51855). + + * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h. + (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer. + +2011-01-04 Martin Robinson <mrobinson@igalia.com> + + Try to fix the EFL build. + + * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list. + +2011-01-04 James Robinson <jamesr@chromium.org> + + Reviewed by Darin Adler. + + StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC) + https://bugs.webkit.org/show_bug.cgi?id=51881 + + The StackBounds class is only used by JavaScriptCore. + + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + * wtf/WTFThreadData.h: + (WTF::WTFThreadData::resetCurrentIdentifierTable): + +2011-01-03 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Darin Adler. + + Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr + https://bugs.webkit.org/show_bug.cgi?id=51846 + + * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr. + (JSC::ExecutableAllocator::cacheFlush): Ditto. + * wtf/PlatformRefPtr.h: Removed. + * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr. + (WTF::randomNumber): Ditto. + * wtf/brew/RefPtrBrew.h: Ditto. + (WTF::refIfNotNull): Added. + (WTF::derefIfNotNull): Added. + * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr. + (WTF::createRefPtrInstance): Modified to return a RefPtr. + * wtf/gobject/GRefPtr.cpp: + (WTF::refGPtr): Moved from PlatformRefPtr here. + (WTF::derefGPtr): Ditto. + * wtf/gobject/GRefPtr.h: Ditto. + (WTF::GRefPtr::GRefPtr): Ditto. + (WTF::GRefPtr::~GRefPtr): Ditto. + (WTF::GRefPtr::clear): Ditto. + (WTF::GRefPtr::isHashTableDeletedValue): Ditto. + (WTF::GRefPtr::get): Ditto. + (WTF::GRefPtr::operator*): Ditto. + (WTF::GRefPtr::operator->): Ditto. + (WTF::GRefPtr::operator!): Ditto. + (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto. + (WTF::GRefPtr::hashTableDeletedValue): Ditto. + (WTF::::operator): Ditto. + (WTF::::swap): Ditto. + (WTF::swap): Ditto. + (WTF::operator==): Ditto. + (WTF::operator!=): Ditto. + (WTF::static_pointer_cast): Ditto. + (WTF::const_pointer_cast): Ditto. + (WTF::getPtr): Ditto. + (WTF::adoptGRef): Ditto. + (WTF::refGPtr): Ditto. + (WTF::derefGPtr): Ditto. + +2011-01-04 Daniel Bates <dbates@rim.com> + + Reviewed by Adam Roben. + + LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails + https://bugs.webkit.org/show_bug.cgi?id=51860 + + * wtf/ThreadingWin.cpp: + (WTF::createThreadInternal): + +2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Ariya Hidayat. + + [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian + https://bugs.webkit.org/show_bug.cgi?id=31273 + + On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers + are included before platform headers. On all other platforms continue to use + INCLUDEPATH (as before). This is a continuation of r65877. + + No new tests as there is no new functionality. + + * JavaScriptCore.pri: + +2011-01-04 Darin Adler <darin@apple.com> + + Try to fix Windows build. + + * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing + of conditional includes. + (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer. + (WTF::createThreadInternal): Tweaked #if to not need separate macro. + +2011-01-04 Daniel Bates <dbates@rim.com> + + Reviewed by Adam Roben. + + Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android + https://bugs.webkit.org/show_bug.cgi?id=51855 + + Both the Apple Windows and Android ports implement a similar adapter structure, + called ThreadFunctionInvocation and ThreadData respectively, as part of + their thread creation process. Instead, we should share such an adapter + structure and remove duplicate code. + + * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h. + * wtf/ThreadFunctionInvocation.h: Added. + (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation): + * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation. + (WTF::runThreadWithRegistration): + (WTF::createThreadInternal): + * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that + it can be shared with the Android implementation of createThreadInternal(). + (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation. + +2011-01-04 Daniel Bates <dbates@rim.com> + + Reviewed by Darin Adler. + + Use __builtin_expect when compiling using RVCT in GNU mode + https://bugs.webkit.org/show_bug.cgi?id=51866 + + Derived from a patch by Dave Tapuska. + + * wtf/AlwaysInline.h: + +2011-01-03 Darin Adler <darin@apple.com> + + Reviewed by Brady Eidson. + + * wtf/Forward.h: Added Decoder and Encoder. + +2011-01-03 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2. + + Starting out with a pure virtual interface to be implemented in WK2, but we might change that later. + + * GNUmakefile.am: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/CMakeLists.txt: + + * wtf/Decoder.h: Added. + * wtf/Encoder.h: Added. + +2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed build fix. + + [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system. + + This fix is required for builds where HAVE(NULLPTR) is false + (e.g. some MSVC and Symbian builds). + + * wtf/wtf.pri: + +2011-01-02 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Simon Fraser. + + <rdar://problem/8812159> Update copyright strings + + * Info.plist: + +2011-01-02 Csaba Osztrogonác <ossy@webkit.org> + + Fix GTK+ build after r74855. + + Reviewed by Xan Lopez. + + * GNUmakefile.am: Fix include pathes. + +2011-01-02 Adam Barth <abarth@webkit.org> + + One more .. missing in the Qt build. + + * jsc.pro: + +2011-01-02 Xan Lopez <xlopez@igalia.com> + + Fix GTK+ build. + + * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so + that anyone can include its headers without adding the prefix + 'Source/'. + +2011-01-02 Carl Lobo <carllobo@gmail.com> + + Reviewed by Adam Barth. + + Fix Windows Build for non-production where VSPropsRedirectionDir is not defined. + https://bugs.webkit.org/show_bug.cgi?id=51797 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2011-01-01 Adam Barth <abarth@webkit.org> + + Fix relative include paths in an attempt to fix the Qt build. + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + +2011-01-01 Adam Barth <abarth@webkit.org> + + Another speculative build fix for GTK. + + * GNUmakefile.am: + +2011-01-01 Adam Barth <abarth@webkit.org> + + Speculative build fix for GTK. Update the paths in GNUmakefile to + include "Source". + + * GNUmakefile.am: + +2011-01-01 Adam Barth <abarth@webkit.org> + + Update relative paths in JavaScriptCore.gyp to account for the extra + level of directories. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2010-12-31 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal + https://bugs.webkit.org/show_bug.cgi?id=50517 + + This change shows about 2% performance win on the xml-parser benchmark. + + * wtf/text/AtomicString.cpp: + (WTF::HashAndUTF8CharactersTranslator::equal): + +2010-12-30 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Ariya Hidayat. + + [CMake] Add WTF_HEADERS + https://bugs.webkit.org/show_bug.cgi?id=51741 + + Add the WTF headers to show them in Visual Studio. + + * wtf/CMakeLists.txt: + * wtf/CMakeListsWinCE.txt: + +2010-12-30 Konstantin Tokarev <annulen@yandex.ru> + + Reviewed by David Kilzer. + + [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is + used + https://bugs.webkit.org/show_bug.cgi?id=51672 + + * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1 + +2010-12-30 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp + https://bugs.webkit.org/show_bug.cgi?id=51743 + + Most of the ifdefs belong to windows and not to the MSVC compiler. + + * wtf/FastMalloc.cpp: + +2010-12-29 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9. + + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + +2010-12-29 Helder Correia <helder@sencha.com> + + Reviewed by Eric Seidel. + + <VT> and <FF> are not valid JSON whitespace characters + https://bugs.webkit.org/show_bug.cgi?id=51671 + + Vertical Tab and Form Feed are not allowed white spaces by the JSON + RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar). + + Tests: ietestcenter/Javascript/15.12.1.1-0-2.html + ietestcenter/Javascript/15.12.1.1-0-3.html + + * runtime/LiteralParser.cpp: + (JSC::isJSONWhiteSpace): + (JSC::LiteralParser::Lexer::lex): + +2010-12-28 Helder Correia <helder@sencha.com> + + Reviewed by Eric Seidel. + + JSON.stringify must exist as a function taking 3 parameters + https://bugs.webkit.org/show_bug.cgi?id=51667 + + The reported function length is 1 instead. + + Test: ietestcenter/Javascript/15.12.3-0-2.html + + * runtime/JSONObject.cpp: + +2010-12-28 Helder Correia <helder@sencha.com> + + Reviewed by Sam Weinig. + + JSON.parse must exist as a function taking 2 parameters + https://bugs.webkit.org/show_bug.cgi?id=51666 + + Support for revivers was introduced in bug 26591, but the function + length has since remained unchanged. + + Test: ietestcenter/Javascript/15.12.2-0-2.html + + * runtime/JSONObject.cpp: + +2010-12-27 Jake Helfert <jake@jakeonthenet.com> + + Reviewed and reworked by Darin Adler. + + Building WebKit with Visual Studio 2010 fails due + to ambiguous assignment operator errors. + https://bugs.webkit.org/show_bug.cgi?id=51116 + + * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with + Platform.h HAVE macro, and included the Visual Studio 2010 compiler + as one of the ones that has nullptr. + * wtf/NullPtr.cpp: Updated condition to match. + + * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t) + overload if we are compiling in loose mode and the compiler has + nullptr, because assignment of 0 will otherwise encounter + ambiguitity with this overload and the overload for loose mode + that takes a raw pointer. The conditional can be removed when we + get rid of loose mode. + * wtf/PassOwnPtr.h: Ditto. + + * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload + if the compiler has nullptr, because assignment of 0 would be + ambiguous with the overload that takes a raw pointer. The conditional + can be removed if we ever decide we no longer need to support + assigning 0, but might need a way to catch that usage on older compilers. + * wtf/RefPtr.h: Ditto. + * wtf/RetainPtr.h: Ditto + + * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp, + accidentally omitted when the file was first added. + +2010-12-26 Xan Lopez <xlopez@igalia.com> + + Reviewed by Eric Seidel. + + [GTK] Add standalone target for JSC + https://bugs.webkit.org/show_bug.cgi?id=51607 + + * GNUmakefile.am: add convenience target to only build jsc and its + dependencies. + +2010-12-24 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Eric Seidel. + + [WINCE] Add CPU(MIPS) detection + https://bugs.webkit.org/show_bug.cgi?id=51342 + + WinCE usually defines MIPS and _MIPS_. + + * wtf/Platform.h: + +2010-12-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Rename RegexCompiler.cpp to RegexPattern.cpp. + Implicitly call compileRegex from RegexPattern's constructor. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + * yarr/RegexCompiler.cpp: Removed. + * yarr/RegexCompiler.h: Removed. + * yarr/RegexInterpreter.cpp: + * yarr/RegexJIT.cpp: + * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp. + (JSC::Yarr::compileRegex): + (JSC::Yarr::RegexPattern::RegexPattern): + * yarr/RegexPattern.h: + +2010-12-23 Patrick Gansterer <paroga@webkit.org> + + Unreviewed build fix for WinCE after r74360. + + Move the OS(WINDOWS) section after the OS(WINCE) section + and add missing argument to the getStackMax call. + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): + +2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed build fix. + + [Symbian] Make sure OSAllocatorSymbian builds + + This patch only addresses the build problem. + + https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full + (re)implementation of the Symbian allocator. + + * wtf/OSAllocatorSymbian.cpp: + (WTF::OSAllocator::reserveUncommitted): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + +2010-12-22 Dan Bernstein <mitz@apple.com> + + Changed WebKitTools to Tools. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: + +2010-12-22 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + Changed WebKitTools to Tools in script build phases. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-12-22 Andrei Popescu <andreip@google.com> + + Unreviewed build fix. + + Fix Chromium Linux shared library build. + [Chromium] r74431 broke the Chromium Linux shared library build + https://bugs.webkit.org/show_bug.cgi?id=51462 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + * JavaScriptCore.gypi: + +2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r74462. + http://trac.webkit.org/changeset/74462 + https://bugs.webkit.org/show_bug.cgi?id=51449 + + broke chromium win (Requested by tonyg-cr on #webkit). + + * JavaScriptCore.gypi: + +2010-12-21 Tony Gentilcore <tonyg@chromium.org> + + Unreviewed build fix. + + [chromium] Build fix after r74431 + https://bugs.webkit.org/show_bug.cgi?id=51447 + + * JavaScriptCore.gypi: + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Speculative build fix. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::underMemoryPressure): + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 26276 - Need a mechanism to determine stack extent + + This patch adds accurate stack size calculation for: + DARWIN, QNX, UNIX + We still need to fix: + WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com + https://bugs.webkit.org/show_bug.cgi?id=51443 + + The problem here is that each page uses a reasonable amount of memory, (~4Mb), + and that when miultiple pages are open we keep all JIT code for all functions + in all pages alive. + + Add a check to detect high memory pressure situations in the executable allocator + (>50% of available memory allocated), and upon a top level entry into JSC (no code + running on the stack) in this situation throw away all JIT code. + + * JavaScriptCore.exp: + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile. + * jit/ExecutableAllocator.h: + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::ExecutablePool::systemAlloc): Count allocations. + (JSC::ExecutablePool::systemRelease): Count deallocations. + (JSC::ExecutablePool::underMemoryPressure): Check memory pressure. + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool. + * jit/ExecutableAllocatorWin.cpp: + (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool. + * runtime/Executable.cpp: + (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile. + * runtime/Executable.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code. + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away. + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching + https://bugs.webkit.org/show_bug.cgi?id=51434 + + Reduce the amount of memory the RegExpCache can hold on to on iOS. + Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate + ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of + memory. Firstly, we can reduce this by simply reducing the size of the cache to 32 + entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated + from RegExp objects. This helps in two ways (1) it increases the probability that + RegExps in the cache share the same pool, and (2) it means that a RegExp can't end + up holding on to a large ExecutablePool containing a translation of JS code. + (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the + same pool, but large RegExp patterns are less common). + + * runtime/JSGlobalData.h: + * runtime/RegExpCache.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Eeeep! build fix! + + * wtf/OSAllocator.h: + (WTF::OSAllocator::decommitAndRelease): + +2010-12-21 Gavin Barraclough <barraclough@apple.com> + + Ooops, fixed typo in comment. + + * wtf/OSAllocator.h: + +2010-12-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough & Oliver Hunt. + + Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements + https://bugs.webkit.org/show_bug.cgi?id=51359 + + I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in + Heap::allocateBlock (1902752929), and some other leaks and crashes as well. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files. + + * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by + PageAllocationAligned. + + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::addWeakGCHandle): + * runtime/Collector.h: Switched from AlignedMemoryAllocator to + PageAllocationAligned. + + * runtime/GCHandle.cpp: + * runtime/GCHandle.h: Ditto. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation + functions. Supplanted by PageAllocationAligned. + + * wtf/PageAllocationAligned.cpp: Added. + (WTF::PageAllocationAligned::allocate): + (WTF::PageAllocationAligned::deallocate): + * wtf/PageAllocationAligned.h: Added. + (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform + class for doing aligned memory allocation. This class properly matches + allocation and deallocation library calls, fixing a long-standing bug + in PageAllocation. + + * wtf/Platform.h: Removed some defunction VM platform defines. + + * wtf/wtf.pri: Updated build files. + +2010-12-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com + https://bugs.webkit.org/show_bug.cgi?id=49006 + + This problem was caused by having a parameter named 'arguments'. + The fix is to treat parameters named 'arguments' as shadowing + the actual arguments property, and so logically turn the function + into one that doesn't "use" arguments. + + This required a bit of fiddling in the parser to ensure we correctly + propagate the 'feature' of shadowing is set correctly. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::createArgumentsIfNecessary): + Change assertion to an early return as we may now reference + a property named 'arguments' without being in a function that + has the ArgumentsFeature + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::declareParameter): + (JSC::JSParser::Scope::shadowsArguments): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionInfo): + * parser/Nodes.h: + (JSC::ScopeNode::usesArguments): + +2010-12-21 Daniel Bates <dbates@rim.com> + + Reviewed by Eric Seidel and Darin Adler. + + Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory. + https://bugs.webkit.org/show_bug.cgi?id=51367 + + Inspired by a patch by George Staikos. + + * wtf/DateMath.cpp: + (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now + of type OwnPtrArray<char>. + * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed. + (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone. + (JSC::GregorianDateTime::operator tm): Ditto. + (JSC::GregorianDateTime::copyFrom): Ditto. + +2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r74402. + http://trac.webkit.org/changeset/74402 + https://bugs.webkit.org/show_bug.cgi?id=51402 + + This patch broke the Windows 7 Release Layout Tests (Requested + by jessieberlin on #webkit). + + * wtf/StackBounds.cpp: + (WTF::estimateStackBound): + (WTF::StackBounds::initialize): + +2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Csaba Osztrogonác. + + Unify the name of parentheses in YARR: rename parenthesis to + parentheses. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): + +2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Set BUILDING_QT__ consistently + https://bugs.webkit.org/show_bug.cgi?id=51341 + + * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it + is already defined in WebKit.pri. + +2010-12-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 26276 - Need a mechanism to determine stack extent + + This patch adds accurate stack size calculation for: + DARWIN, WINDOWS, QNX, UNIX + We still need to fix: + SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE + + * wtf/StackBounds.cpp: + (WTF::StackBounds::initialize): + +2010-12-20 Gavin Barraclough <barraclough@apple.com> + + PPC build fix; stop using std::swap on PageAllocation/PageReservation, + this was failing on some compilers since the lack of default construction + for the m_executable/m_writable fields meant the value being swapped may + not have been fully initialized. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::deallocate): + * wtf/PageBlock.h: + * wtf/PageReservation.h: + (WTF::PageReservation::deallocate): + +2010-12-20 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + |delete name| in strict mode code should be an early error + https://bugs.webkit.org/show_bug.cgi?id=50431 + + Disallow the |delete IDENTIFIER| production in strict mode, and removed + a bunch of now unnecessary code. + + * parser/JSParser.cpp: + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::jsParse): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + +2010-12-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Olver Hunt. + + Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation + + The current implementation of recursion limit checking is not safe on smaller stacks. + Switch to using a common mechanism, shared with the parser, to check recursion limits. + + Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest + footprint on the stack, at just under 1k on x86-64. Given this, the default recursion + check (requiring 4k of available space to recurse) seems reasonable. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + * bytecompiler/NodesCodegen.cpp: + (JSC::BinaryOpNode::emitStrcat): + +2010-12-20 Tony Gentilcore <tonyg@chromium.org> + + Unreviewed build fix. + + Include pthread to fix chromium mac build (broken by r74360) + https://bugs.webkit.org/show_bug.cgi?id=51356 + + * wtf/StackBounds.cpp: + +2010-12-20 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + * GNUmakefile.am: add missing files. + +2010-12-18 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 26276 - Need a mechanism to determine stack extent + + This patch adds a class 'StackBounds', to hold information about the machine stack. + The implementation of this class broadly adheres to the current implmentation of + stack limit checking, and as such does not solve the problem of determining stack + extent, but gives us a common place to do so. + + Currently two mechanism are provided to determine the stack origin (the point the + stack is growing away from). currentThreadStackBase() in Collector provides a + more accurate determination of the stack origin, so use this to calculate + StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and + as such can be removed. Cache the StackBounds on WTFThreadData such that they + need only be determined once per thread, and for non-API contexts cache this + information in JSGlobalData, to save a thread-specific access. + + For the time being retain the estimate of stack size used by JSC's parser + (128 * sizeof(void*) * 1024), with a view to replacing this with something more + accurate in the near future. + + * parser/JSParser.cpp: + (JSC::JSParser::canRecurse): + (JSC::JSParser::JSParser): + Change to use StackBounds. + * runtime/Collector.cpp: + (JSC::Heap::registerThread): + (JSC::Heap::markCurrentThreadConservativelyInternal): + Change to use StackBounds, cached on JSGlobalData. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::stack): + Add a cached copy of StackBounds. + * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp. + (WTF::estimateStackBound): + (WTF::StackBounds::initialize): + (WTF::getStackMax): + Copy code from Collector.cpp to determine stack origin. + * wtf/StackBounds.h: Added. + (WTF::StackBounds::StackBounds): + No argument constructor; returns a null StackBounds. + (WTF::StackBounds::currentThreadStackBounds): + Returns a StackBounds object representing the stack limits + of the current thread. + (WTF::StackBounds::origin): + Returns to stack origin (the point the stack is growing away + from; the highest extent of the stack on machines where the + stack grows downwards. + (WTF::StackBounds::recursionLimit): + Returns a limit value that is 'a comfortable distance from + the end of the stack'. Our concept of this is currently 1 page + away from the end, however the default value may be tuned in + the future, and clients may override passing a larger delta; + should only be called on StackBounds object representing the + stack of the thread this method is called on (checked by + checkConsistency). + (WTF::StackBounds::recursionCheck): + Checks whether we are currently 'a comfortable distance from + the end of the stack'. Our concept of this is currently 1 page + away from the end, however the default value may be tuned in + the future, and clients may override passing a larger delta + to apply when checking, if they wish to do so. This method + should only be called on StackBounds object representing the + stack of the thread this method is called on (checked by + checkConsistency). + (WTF::StackBounds::current): + Approximate current stack position. On machines where the stack + is growing downwards this is the lowest address that might need + conservative collection. + (WTF::StackBounds::isGrowingDownward): + True for all platforms other than WINCE, which has to check. + (WTF::StackBounds::checkConsistency): + This is called in methods that shoulds only be operating on a + valid set of bounds; as such we expect m_origin != m_bounds + (i.e. stack size != zero) - we're really testing that this + object is not null (the constructor initializes both fields + to zero). Also checks that current() is within the stack's + bounds. + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + * wtf/WTFThreadData.h: + (WTF::WTFThreadData::stack): + Add the StackBounds member variable. + +2010-12-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Factored common page set management into a new PageBlock base class + https://bugs.webkit.org/show_bug.cgi?id=51285 + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + * wtf/PageAllocation.cpp: Removed. + * wtf/PageAllocation.h: + (WTF::PageAllocation::deallocate): + (WTF::PageAllocation::PageAllocation): + * wtf/PageReservation.h: + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::deallocate): + (WTF::PageReservation::PageReservation): + * wtf/wtf.pri: + +2010-12-17 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + RegExp Jit'ed expression crashes clicking link on yelp.com + https://bugs.webkit.org/show_bug.cgi?id=51284 + + When transitioning between an non-repeating beginning of line + anchored expression and the remaining refactored repeating + expression, we should not clear any residual datalabel in + state's m_backtrack. It will be resolved and cleared in subsequent + code when linkAlternativeBacktracks() is called for the repeating + alternative(s). + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::BacktrackDestination::clear): + (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack): + +2010-12-17 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Mark Rowe. + + Updated for the renaming of WebKitTools to Tools + + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: + +2010-12-17 Ariya Hidayat <ariya@sencha.com> + + Reviewed by Oliver Hunt. + + [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST + https://bugs.webkit.org/show_bug.cgi?id=51268 + + * parser/JSParser.cpp: + (JSC::JSParser::parseAssignmentExpression): + +2010-12-17 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Removed RChunk from PageAllocation/PageReservation, since it's now unused. + https://bugs.webkit.org/show_bug.cgi?id=51276 + + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): + * wtf/PageReservation.h: + (WTF::PageReservation::PageReservation): + +2010-12-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Incorrect encoding of some constants in ARMv7 JIT + https://bugs.webkit.org/show_bug.cgi?id=51273 + <rdar://problem/8650210> + + When using immediate encoding 3 we need to write the byte + that holds a duplicated value. + + * assembler/ARMv7Assembler.h: + (JSC::ARMThumbImmediate::makeEncodedImm): + +2010-12-16 Evan Martin <evan@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] useless warnings when building on Windows + https://bugs.webkit.org/show_bug.cgi?id=50985 + + Disable some compiler warnings that aren't indicative of real problems. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2010-12-16 Pratik Solanki <psolanki@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=51166 + ExecutableAllocator::cacheFlush should call sys_cache_control + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API - + sys_cache_control(kCacheFunctionPrepareForExecution,...). + +2010-12-16 Ariya Hidayat <ariya@sencha.com> + + Reviewed by Andreas Kling. + + [JSC] Const correctness in ASTBuilder and SyntaxChecker + https://bugs.webkit.org/show_bug.cgi?id=51141 + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::getName): + (JSC::ASTBuilder::getType): + (JSC::ASTBuilder::isResolve): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::operatorStackPop): + +2010-12-15 Kenneth Russell <kbr@google.com> + + Reviewed by James Robinson. + + Web Audio API: port FFTFrame to MKL + https://bugs.webkit.org/show_bug.cgi?id=50986 + + Fixed bug in log2 emulation function provided for Windows port of + Web Audio API. + + * wtf/MathExtras.h: + (log2): + +2010-12-14 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video> + + * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool. + It was previously implicitly convertible to bool on Mac via operator NSString*, + but since that always has a non-zero return value it would give unexpected results. + +2010-12-14 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Eric Seidel. + + [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported + https://bugs.webkit.org/show_bug.cgi?id=50231 + + Guard CONFIG+=link_pkgconfig with !symbian. + + * jsc.pro: + +2010-12-14 Cameron Zwarich <zwarich@apple.com> + + Not reviewed. + + Revert accidental change disabling the JIT for most platforms. + + * wtf/Platform.h: + +2010-12-13 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Eric Seidel. + + Clang fails to build the JSC interpreter + https://bugs.webkit.org/show_bug.cgi?id=51016 + + Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows + them, but it does not correctly generate the cleanup, causing a leak if the + cleanup decrements a reference count. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Put an Identifier into its own scope. + +2010-12-14 Carlos Garcia Campos <cgarcia@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Simplify context-menu handling code + https://bugs.webkit.org/show_bug.cgi?id=49658 + + * wtf/PlatformRefPtr.h: Add leakRef() + +2010-12-13 Cameron Zwarich <zwarich@apple.com> + + Reviewed by Gavin Barraclough. + + JavaScriptCore should not use "asm volatile" outside of a function + https://bugs.webkit.org/show_bug.cgi?id=50991 + + * jit/JITStubs.cpp: Remove the volatile keyword from asm statements. + +2010-12-13 Steve Falkenburg <sfalken@apple.com> + + Windows production build fix. + Try copying ICU 4.6 in addition to 4.4 and 4.2. + + * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: + +2010-12-13 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + REGRESSION: mobileme mail viewing is broken + https://bugs.webkit.org/show_bug.cgi?id=50884 + + Fixed problem where simple parenthesis (those without capture and + with a fixed count) where not propagating backtrack to labels for + nested parentheses. Also added the nesting level for the parentheses + state created in that case as well. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel): + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + +2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR + https://bugs.webkit.org/show_bug.cgi?id=49385 + + Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + * yarr/RegexPattern.h: + +2010-12-10 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting + bugs.webkit.org + https://bugs.webkit.org/show_bug.cgi?id=50816 + + First nested parentheses of the second or greater alternative + where backtracking to the prior parentheses. Changed the default + handling of initial parentheses for all alternatives to go back + to the immediate outer paren. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): + (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex): + (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail): + (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail): + (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): + (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks): + (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + +2010-12-11 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Add an overload to makeString for Vector<char> + https://bugs.webkit.org/show_bug.cgi?id=50123 + + Also cleanup StringTypeAdapter. + + * wtf/text/StringConcatenate.h: + +2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com> + + Reviewed by Eric Seidel. + + [Qt] Build fix for Symbian: don't compile POSIX memory management implementation + https://bugs.webkit.org/show_bug.cgi?id=50707 + + * wtf/wtf.pri: + +2010-12-10 Steve Falkenburg <sfalken@apple.com> + + Windows production build fix. + + Don't stop if react-to-vsprops-changes.py exits with an error, + since this will occur in production builds. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-12-10 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows. + + * wtf/Platform.h: + +2010-12-10 Martin Robinson <mrobinson@igalia.com> + + Unreviewed, rolling out r73703. + http://trac.webkit.org/changeset/73703 + https://bugs.webkit.org/show_bug.cgi?id=49658 + + This patch is causing crashes on the GTK+ bots. + + * wtf/PlatformRefPtr.h: + +2010-12-10 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Eric Seidel. + + Cleanup StringWx.cpp + https://bugs.webkit.org/show_bug.cgi?id=50525 + + Use StringImpl::createUninitialized to avoid memcpy and fix style issues. + + * wtf/wx/StringWx.cpp: + (WTF::String::String): + +2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Simplify context-menu handling code + https://bugs.webkit.org/show_bug.cgi?id=49658 + + * wtf/PlatformRefPtr.h: + +2010-12-09 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION (r73065?): A regex no longer works + https://bugs.webkit.org/show_bug.cgi?id=50570 + + Changed the handling of adjacent parentheses backtracks in two ways. + First, only outer most paren backtracks default to back tracking + to the "next character" looping code. Second, added a jump around + backtracks that fall through to the next backtrack where the + second backtrack has some greedy processing before the backtracking + from outside the parentheses code. + Also cleaned up extraneous white spce, removing white space at the + end of or that makes up a whole line. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::GenerationState::GenerationState): + (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel): + (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel): + (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): + (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail): + (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): + (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration): + (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + +2010-12-09 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Addressed the "FIXME" issues in array sort for toString() methods that + mutate the array in either size or contents. The change is to mark + the temporary array contents so that they are not garbage collected + and to make sure the array is large enough to hold the contents + of the sorted temporary vector. + https://bugs.webkit.org/show_bug.cgi?id=50718 + + * runtime/Collector.cpp: + (JSC::Heap::addTempSortVector): + (JSC::Heap::removeTempSortVector): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/Collector.h: + * runtime/JSArray.cpp: + (JSC::JSArray::sort): + * runtime/JSValue.h: + +2010-12-09 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + Changed setting of backtrack labels to not overwrite a prior + label. Where losing prior labe which then reverted back to + next character label. + https://bugs.webkit.org/show_bug.cgi?id=50579 + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel): + +2010-12-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Permit Character Class Escape in CharacterRange in Character Class. + https://bugs.webkit.org/show_bug.cgi?id=50483 + https://bugs.webkit.org/show_bug.cgi?id=50538 + https://bugs.webkit.org/show_bug.cgi?id=50654 + https://bugs.webkit.org/show_bug.cgi?id=50646 + + We recently tightened up our spec conformance in generating syntax + error in these cases, however testing in the wild has shown this + to be problematic. This reverts the previous change in allowing + class escapes (e.g. \d) in ranges in character classes ([]), but + does retain some closer conformance to the spec in only allowing + ranges that would be permitted per the grammar rules in the spec + (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range). + + * yarr/RegexParser.h: + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): + (JSC::Yarr::Parser::parse): + +2010-12-08 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Try to fix crash-on-launch seen on Windows builder. + + * wtf/OSAllocatorWin.cpp: + (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for + a bug that hasn't been fixed yet. + +2010-12-08 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file. + +2010-12-08 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def + file to remove a symbol -- the next build failure will say which symbol + to add back. + +2010-12-08 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file. + +2010-12-08 Geoffrey Garen <ggaren@apple.com> + + Try to fix GTK Linux build. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutablePool::systemAlloc): + * runtime/AlignedMemoryAllocator.h: + (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator. + +2010-12-07 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator + https://bugs.webkit.org/show_bug.cgi?id=50653 + + * JavaScriptCore.exp: Updated for new function signature. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay. + OSAllocator is now the central location for verifying that allocation succeeds. + This allowed me to remove some complicating cross-platform cruft. + + * runtime/AlignedMemoryAllocator.h: + (JSC::::allocate): Updated for code motion. + + * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to + support VM features required by clients of PageAllocation and PageReservation. + + * wtf/OSAllocatorPosix.cpp: + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing + executable memory here. + + * wtf/OSAllocatorSymbian.cpp: + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): Updated for new function signatures. + + * wtf/OSAllocatorWin.cpp: + (WTF::protection): + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::release): Updated for new function signatures. Moved + some protection-related and WINCE-related code from PageAllocation here. + + * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since + it was only used by checkAllocatedOkay, which is now gone. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::allocate): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::deallocate): + (WTF::PageAllocation::isPowerOfTwo): + (WTF::PageAllocation::systemAllocateAligned): Removed system* functions, + and replaced calls to them with calls to OSAllocator. + + * wtf/PageReservation.h: + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::reserve): + (WTF::PageReservation::deallocate): + (WTF::PageReservation::PageReservation): Ditto. Added m_writable and + m_executable because these flags are now required when committing memory. + +2010-12-08 Chris Rogers <crogers@google.com> + + Reviewed by Kenneth Russell. + + Add web audio files to mac port Xcode projects + https://bugs.webkit.org/show_bug.cgi?id=50721 + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-12-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Marking the active global object re-enters through markConservatively + https://bugs.webkit.org/show_bug.cgi?id=50711 + + draining of the MarkStack is not allowed to be re-entrant, we got away + with this simply due to the logic in MarkStack::drain implicitly handling + changes that could be triggered by the re-entry. + + Just to be safe this patch removes the re-entry through markConservatively + so we don't accidentally introduce such an issue in future. I've also + added an assertion to catch such errors. + + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): + (JSC::Heap::markCurrentThreadConservativelyInternal): + (JSC::Heap::markOtherThreadConservatively): + * runtime/JSArray.h: + (JSC::MarkStack::drain): + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStack): + +2010-12-08 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations + https://bugs.webkit.org/show_bug.cgi?id=49388 + + Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG) + which was decided was the best way to identify a build with CoreAnimation + + * wtf/Platform.h: + +2010-12-07 Anders Carlsson <andersca@apple.com> + + Build fix follow up build fix. + + * pcre/pcre_ucp_searchfuncs.cpp: + (jsc_pcre_ucp_othercase): + +2010-12-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Fix clang++ build + https://bugs.webkit.org/show_bug.cgi?id=50645 + + Explicitly cast offset to int. + + * pcre/pcre_ucp_searchfuncs.cpp: + (jsc_pcre_ucp_othercase): + +2010-12-07 Kenneth Russell <kbr@google.com> + + Reviewed by David Levin. + + Fix compilation of core web audio files on Windows + https://bugs.webkit.org/show_bug.cgi?id=50603 + + Added log2 definition to MathExtras.h on Windows platform. + + * wtf/MathExtras.h: + (log2): + +2010-12-07 Antti Koivisto <antti@apple.com> + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=50412 + http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading + + Creating a substring caused the original string be flattened if it was in the rope form. This could use + significant amount of memory by reducing buffer sharing between strings. + + Add a rope specific substring function that constructs the substring by reusing the rope fibers + instead of flattening the rope. + + No change observed in SunSpider. + + * runtime/JSString.cpp: + (JSC::JSString::substringFromRope): + * runtime/JSString.h: + (JSC::jsSubstring): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + +2010-12-06 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Simplified some ASLR-related code in PageAllocation/Reservation + https://bugs.webkit.org/show_bug.cgi?id=50599 + + Removed reserveAt, allocateAt, and friends, since they all existed to + serve one feature: ASLR for executable memory on x86_64 on Mac. Moved + ASLR code down into systemAllocate -- now, any time you allocate + executable memory on a supporting platform, the memory's location is + randomized. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller + to randomize anything. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and + beefed up executable allocation with randomization. + + * wtf/PageReservation.h: + (WTF::PageReservation::systemReserve): Removed some *At() functions. + +2010-12-06 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems + https://bugs.webkit.org/show_bug.cgi?id=50588 + + * wtf/OSAllocatorPosix.cpp: + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): Tightened up some comments. Changed + reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems. + +2010-12-06 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + [WINCE] Add build system + https://bugs.webkit.org/show_bug.cgi?id=50522 + + * CMakeListsWinCE.txt: Added. + * shell/CMakeListsWinCE.txt: Added. + * wtf/CMakeListsWinCE.txt: Added. + +2010-12-06 John Tantalo <john.tantalo@gmail.com> + + Reviewed by Geoffrey Garen. + + jsc does not ignore shebang + https://bugs.webkit.org/show_bug.cgi?id=49576 + + * jsc.cpp: + (fillBufferWithContentsOfFile): + - translate shebang into a valid JavaScript comment so the lexer ignores it + +2010-12-05 Adam Roben <aroben@apple.com> + + Windows production build fix + + Put spaces after trailing backslashes when setting + %WebKitVSPropsRedirectionDir%. According to MSDN + <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>: + + A backslash ( \ ) followed by a newline character is interpreted as + a space in the command; use a backslash at the end of a line to + continue a command onto the next line. NMAKE interprets the + backslash literally if any other character, including a space or + tab, follows the backslash. + + * JavaScriptCore.vcproj/JavaScriptCore.make: + +2010-12-04 Patrick Gansterer <paroga@webkit.org> + + Unreviewed, build fix after r69132. + + * shell/CMakeLists.txt: Fix directory name (jsc -> shell). + +2010-12-04 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow + https://bugs.webkit.org/show_bug.cgi?id=50451 + + * wtf/gobject/GTypedefs.h: add GdkWindow defines. + +2010-12-03 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Bug 50509 - set* methods on MacroAssembler are awfully named. + + Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison. + set8 compares 32-bit operands, and sets an 8-bit result based on the comparison. + setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison. + + Rename to clarify. + + set32 -> set32Compare32 + setTest32 -> set32Test32 + set8 -> set8Compare32 + setTest8 -> set32Test8 + + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::setPtr): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::set32Compare32): + (JSC::MacroAssemblerARM::set8Compare32): + (JSC::MacroAssemblerARM::set32Test32): + (JSC::MacroAssemblerARM::set32Test8): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::set32Compare32): + (JSC::MacroAssemblerARMv7::set8Compare32): + (JSC::MacroAssemblerARMv7::set32Test32): + (JSC::MacroAssemblerARMv7::set32Test8): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::set8Compare32): + (JSC::MacroAssemblerMIPS::set32Compare32): + (JSC::MacroAssemblerMIPS::set32Test8): + (JSC::MacroAssemblerMIPS::set32Test32): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::set8Compare32): + (JSC::MacroAssemblerX86Common::set32Compare32): + (JSC::MacroAssemblerX86Common::set32Test8): + (JSC::MacroAssemblerX86Common::set32Test32): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + +2010-12-03 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Incorrect logic for returning memory at the end of linking. + Reviewed by Geoff Garen. + + At the end of linking we return any space at the end of the + allocated executable region that was saved due to branch + compaction. This is currently by done by subtracting the + different from the m_freePtr in the allocation pool. This + can be incorrect if your allocation was made from a new + page that was not selected for subsequent allocations. + + This patch corrects this behaviour by verifying that the + memory being returned actually comes from the current + allocation pool. + + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::tryShrink): + +2010-12-03 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough + + Changes to significantly reduce branches to branches in JIT'ed + parentheses backtrack processing. The changes include the following: + - Taking the backtracking processing out of line and adding it as + code at the end of the JIT'ed routine. + - Allow backtracks to be direct via an indirect branch for an address + pushed onto the stack. If the use of an indirect branch is from a + conditional jump, then we emit a trampoline at the end of the + routine. + - Propogate backtracks instead of adding trampolines. Backtracks are + propogated to where they are used. This change also eliminated + trampoline branch code that aren't used. + - Added global expression state to keep track of parentheses tail + code and indirect branches. + Other changes made to support these changes. + - Split invertOrCapture flag on Patterns to two separate flags. Added + getters for these flags. Rippled these changes to both the JIT + and interpreter code. + - Split BacktrackDestination out off TermGenerationState struct. + This is done to hold references to a backtrack for later code + generation. + https://bugs.webkit.org/show_bug.cgi?id=50295 + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::JmpDst::isSet): + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::JmpDst::isSet): + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Label::isSet): + (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed): + (JSC::AbstractMacroAssembler::DataLabelPtr::used): + (JSC::AbstractMacroAssembler::JumpList::clear): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::JmpDst::isSet): + * assembler/X86Assembler.h: + (JSC::X86Assembler::JmpDst::isSet): + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin): + (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin): + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexInterpreter.h: + (JSC::Yarr::ByteTerm::ByteTerm): + (JSC::Yarr::ByteTerm::BackReference): + (JSC::Yarr::ByteTerm::invert): + (JSC::Yarr::ByteTerm::capture): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry): + (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump): + (JSC::Yarr::RegexGenerator::GenerationState::GenerationState): + (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry): + (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable): + (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail): + (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail): + (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration): + (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration): + (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration): + (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration): + (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination): + (JSC::Yarr::RegexGenerator::BacktrackDestination::clear): + (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination): + (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset): + (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList): + (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget): + (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo): + (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr): + (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack): + (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset): + (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps): + (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel): + (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack): + (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists): + (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists): + (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks): + (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo): + (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState): + (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative): + (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack): + (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack): + (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists): + (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): + (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump): + (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr): + (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset): + (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel): + (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks): + (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo): + (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink): + (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks): + (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps): + (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination): + (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom): + (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail): + (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks): + (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration): + (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::RegexGenerator::generateAssertionBOL): + (JSC::Yarr::RegexGenerator::generateAssertionEOL): + (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary): + (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle): + (JSC::Yarr::RegexGenerator::generatePatternCharacterPair): + (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed): + (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassSingle): + (JSC::Yarr::RegexGenerator::generateCharacterClassFixed): + (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy): + (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): + (JSC::Yarr::RegexGenerator::generateDisjunction): + (JSC::Yarr::RegexGenerator::compile): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::PatternTerm): + (JSC::Yarr::PatternTerm::invert): + (JSC::Yarr::PatternTerm::capture): + +2010-12-03 Chris Rogers <crogers@google.com> + + Reviewed by Kenneth Russell. + + First steps to adding web audio files to build systems + https://bugs.webkit.org/show_bug.cgi?id=49952 + + * wtf/Complex.h: + +2010-12-03 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + Move StringWx.cpp into wtf directory + https://bugs.webkit.org/show_bug.cgi?id=50060 + + * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp. + (WTF::String::String): + +2010-12-03 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + Move StringBrew.cpp into wtf directory + https://bugs.webkit.org/show_bug.cgi?id=50058 + + * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp. + (WTF::String::String): + +2010-12-03 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + Move StringHaiku.cpp into wtf directory + https://bugs.webkit.org/show_bug.cgi?id=50057 + + * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp. + (WTF::String::String): + (WTF::String::operator BString): + +2010-12-02 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build. + + * runtime/GCActivityCallback.cpp: + (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation. + +2010-12-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at + com.apple.JavaScriptCore: JSC::Heap::markRoots + 746 + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new + synchronize() function. + + * runtime/Collector.cpp: + (JSC::Heap::activityCallback): + * runtime/Collector.h: Added an activityCallback() accessor, for the + call above. + + * runtime/GCActivityCallback.h: + (JSC::GCActivityCallback::synchronize): + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): + (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're + scheduled in. If we begin/resume execution within a new run loop, reschedule + on it. This prevents a crash when using a lockless context group on + multiple threads -- the crash would happen if the GC timer scheduled on + thread A, then you continued execution on thread B, then the thread A + timer fired. + +2010-12-02 Darin Adler <darin@apple.com> + + * wtf/ASCIICType.h: Fix wrong type from last check-in. + +2010-12-02 Darin Adler <darin@apple.com> + + Try to fix certain builds (Qt Windows). + + * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete + versions of ICU, UChar32 can be a typedef for unsigned. Adding this + overload should make us compatible with these old ICUs. + +2010-12-02 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Add AtomicString::fromUTF8 + https://bugs.webkit.org/show_bug.cgi?id=45594 + + Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and + calculates the required length for the UTF16 conversation in one step. + This is then used in a specialized translator for the string table of AtomicString. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/text/AtomicString.cpp: + (WTF::CStringTranslator::equal): + (WTF::HashAndUTF8CharactersTranslator::hash): + (WTF::HashAndUTF8CharactersTranslator::equal): + (WTF::HashAndUTF8CharactersTranslator::translate): + (WTF::AtomicString::add): + (WTF::AtomicString::addSlowCase): + (WTF::AtomicString::find): + (WTF::AtomicString::fromUTF8): + * wtf/text/AtomicString.h: + * wtf/text/StringImpl.h: + * wtf/text/WTFString.h: + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::readUTF8Sequence): + (WTF::Unicode::convertUTF8ToUTF16): + (WTF::Unicode::calculateStringHashFromUTF8): + (WTF::Unicode::equalUTF16WithUTF8): + * wtf/unicode/UTF8.h: + +2010-12-02 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Added a little hardening to OSAllocator. + + * wtf/OSAllocatorPosix.cpp: + (WTF::OSAllocator::release): + * wtf/OSAllocatorWin.cpp: + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::decommit): + (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system + reports an error. + +2010-12-02 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Geoffrey Garen. + + [Qt] Make platform managing of OSAllocator better than r73106 + https://bugs.webkit.org/show_bug.cgi?id=50385 + + * wtf/OSAllocatorPosix.cpp: Remove platform specific guard. + * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard. + * wtf/OSAllocatorWin.cpp: Remove platform specific guard. + * wtf/wtf.pri: Add the correct platform specific source file instead of all of them. + +2010-12-02 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + [WINCE] Use GetTickCount() for srand() + https://bugs.webkit.org/show_bug.cgi?id=50338 + + time() is not a native function on WinCE, so use GetTickCount() instead. + + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + +2010-12-02 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] [Symbian] Reintroduce compiler optimizations for JSC + https://bugs.webkit.org/show_bug.cgi?id=50270 + + Add compiler optimization (symbian ARM target) which was lost after split from WebCore. + Tested via Sunspider and V8 - both of which show significant performance improvement. + + * JavaScriptCore.pro: + +2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Move regex parsing and fallback handling to runtime/RegExp.cpp + https://bugs.webkit.org/show_bug.cgi?id=50015 + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + (JSC::RegExp::compile): + (JSC::RegExp::match): + (JSC::RegExp::printTraceData): + * runtime/RegExp.h: + (JSC::RegExp::pattern): + * yarr/RegexInterpreter.cpp: + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::setFallBack): + (JSC::Yarr::RegexCodeBlock::isFallBack): + (JSC::Yarr::executeRegex): + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the GTK build. + + * GNUmakefile.am: Use a full path to OSAllocator*.cpp. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the EFL Linux build. + + * CMakeListsEfl.txt: Added OSAllocator to the project. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Qt build: Include all OS files for Qt's sake, and then + use #ifdefs in the files to exclude things based on OS. + + This is a pretty bad way to manage platforms -- hopefully we can + fix the Qt build system and move away from this in the future. + + * wtf/OSAllocatorPosix.cpp: + * wtf/OSAllocatorSymbian.cpp: + * wtf/OSAllocatorWin.cpp: + * wtf/wtf.pri: + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Chromium build. + + * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the GTK build. + + * GNUmakefile.am: Added OSAllocator to another project. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the GTK Linux build. + + * JavaScriptCore.gypi: Added OSAllocator to the project. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Qt Linux build. + + * wtf/OSAllocatorPosix.cpp: Use the right errno.h. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build: export some more symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Try to fix the Qt Linux build. + + * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: commit doesn't have a return value. + + * wtf/OSAllocatorWin.cpp: + (WTF::OSAllocator::commit): + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Build fix: Export some symbols. + + * JavaScriptCore.exp: + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Build fix. + + * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private + so other projects can see it. + + * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM. + +2010-12-01 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Baby step toward a cross-platform virtual memory abstraction: created + an all-static OSAllocator class and changed MarkStack to use it. + + * JavaScriptCore.exp: These functions are inlined now. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp. + + * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp. + + * runtime/MarkStack.h: + (JSC::MarkStack::allocateStack): + (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our + own platform-specific code. + + * runtime/MarkStackNone.cpp: Removed. Nothing used this. + + * runtime/MarkStackPosix.cpp: + * runtime/MarkStackSymbian.cpp: + * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since + we use the OSAllocator abstraction now. + + * wtf/OSAllocator.h: Added. + * wtf/OSAllocatorPosix.cpp: Added. + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::decommit): + (WTF::OSAllocator::release): + * wtf/OSAllocatorSymbian.cpp: Added. + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::decommit): + (WTF::OSAllocator::release): + * wtf/OSAllocatorWin.cpp: Added. + (WTF::OSAllocator::reserve): + (WTF::OSAllocator::reserveAndCommit): + (WTF::OSAllocator::commit): + (WTF::OSAllocator::decommit): + (WTF::OSAllocator::release): The new OSAllocator abstraction. + + * wtf/wtf.pri: Added OSAllocatorSymbian.cpp. + +2010-12-01 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + WinCairo build should not use link-time code generation (LTCG) + https://bugs.webkit.org/show_bug.cgi?id=50353 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +010-12-01 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + vcproj changes can't be applied cleanly by the Windows EWS bot + https://bugs.webkit.org/show_bug.cgi?id=50328 + + * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style. + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style. + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style. + +2010-12-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs + + For unmatched subpattens we previously used to set the subpattern end to -1, + but now we only set the start value. E.g. consider the following: + /a(b)?c/.exec("ac"); + Previously we would generate an internal results array of: + [ 0, 2, -1, -1 ] + Since fairly recently we have generated results of: + [ 0, 2, -1, ??? ] + (With the end index of the subpattern uninitialized). + + Update these ASSERTs to account for this. + + Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we + were checking the wrong property on the pattern term. We should have been + looking at term.parentheses.subpatternId, but instead were checking + term.subpatternId. The latter is actually only the subpatternId for + back reference terms. Rename this to backReferenceSubpatternId. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchBackReference): + (JSC::Yarr::Interpreter::backtrackBackReference): + +2010-11-30 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + Bug 50297 - \s in YARR should match BOMs. + + From section 15.10.2.12 CharacterClassEscape contains: + + The production CharacterClassEscape :: s evaluates by returning the set of characters containing the + characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions. + + Table 2 in section 7.2 contains: + + \uFEFF Byte Order Mark <BOM> + + * create_regex_tables: + Add BOM to spaces table. + +2010-11-30 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + Fixed review comments following bug #48101. + Mostly typos, plus gave quantifyInfinite a symbolic name. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): + (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy): + * yarr/RegexParser.h: + (JSC::Yarr::Parser::parseTokens): + (JSC::Yarr::parse): + +2010-11-30 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + WTF project missing build-stopping code from its pre-build event + https://bugs.webkit.org/show_bug.cgi?id=50281 + + * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: + +2010-11-30 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Cleanup UTF8.cpp + https://bugs.webkit.org/show_bug.cgi?id=49581 + + Use macros and functions instead of range values directly. + + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::inlineUTF8SequenceLength): + (WTF::Unicode::UTF8SequenceLength): + (WTF::Unicode::convertUTF16ToUTF8): + (WTF::Unicode::readUTF8Sequence): + (WTF::Unicode::convertUTF8ToUTF16): + * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro. + +2010-11-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Fixed a crash seen when using a PageAllocation to store itself. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping + it, in case unmapping m_base unmaps the PageAllocation. + + * wtf/BumpPointerAllocator.h: + (WTF::BumpPointerPool::destroy): Now this work-around isn't needed! + +2010-11-30 Xan Lopez <xlopez@igalia.com> + + Reviewed by Darin Adler. + + m_hasNonEnumerableProperties is never initialized in Structure + https://bugs.webkit.org/show_bug.cgi?id=50266 + + * runtime/Structure.cpp: + (JSC::Structure::Structure): initialize member variable. + +2010-11-29 Steve Falkenburg <sfalken@apple.com> + + Windows build fix (part 1). Use correct environment variable syntax in cmd files. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: + * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: + * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: + * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: + * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: + * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: + * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: + * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: + +2010-11-29 Dan Bernstein <mitz@apple.com> + + Reviewed by Darin Adler. + + WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API. + https://bugs.webkit.org/show_bug.cgi?id=50038 + + * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h. + +2010-11-29 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + JavaScriptCore projects on Windows should use cmd files for build events + https://bugs.webkit.org/show_bug.cgi?id=50193 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added. + * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style. + * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added. + * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added. + * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added. + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added. + * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added. + * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added. + +2010-11-29 Dai Mikurube <dmikurube@google.com> + + Reviewed by Kent Tamura. + + when empty, clicking "down" on outer-spin-button returns "max value" + https://bugs.webkit.org/show_bug.cgi?id=45491 + + It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for + date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime() + returns a struct tm, not milliseconds. + + Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all + environments. This calculation is already done in calculateUTCOffset(), and complicated. + Duplicating this complicated calculation is unreasonable because of maintainability. + To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions. + (WTF::calculateUTCOffset): + (WTF::calculateDSTOffset): + * wtf/DateMath.h: + +2010-11-29 Chris Rogers <crogers@google.com> + + Reviewed by Kenneth Russell. + + Switch web audio code to use FloatPoint3D instead of Vector3 + https://bugs.webkit.org/show_bug.cgi?id=50186 + + * wtf/Vector3.h: Removed. + +2010-11-29 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files + https://bugs.webkit.org/show_bug.cgi?id=49858 + + We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files: + - To simplify editing (editing vsprops build steps is confusing). + - For more readable diffs. + + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added. + * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added. + +2010-11-29 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Gavin Barraclough. + + Improved accuracy of command-line SunSpider. + + * jsc.cpp: + (functionRun): Changed the "run" function to run a given test in + its own global object. Previously, all tests ran in the same global + object, which created name conflicts, and made globals from previous + tests artificially survive into later tests. + + Also changed "run" to return the elapsed milliseconds when running a + given test, for slightly more accurate numbers. + + (functionCheckSyntax): Ditto on returning elapsed milliseconds. + +2010-11-29 Darin Adler <darin@apple.com> + + Reviewed by Andreas Kling. + + Remove a couple unneeded overflow checks + https://bugs.webkit.org/show_bug.cgi?id=49816 + + * wtf/text/CString.cpp: + (WTF::CString::init): Use an ASSERT instead of + an overflow check with CRASH. + +2010-11-29 Adam Roben <aroben@apple.com> + + Robustify react-to-vsprops-changes.py against changes to its location + or the location of the .vsprops files + + Suggested by John Sullivan. + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + Removed file_modification_times. + (main): Use glob.glob to find the .vsprops files and assert that we found some. + +2010-11-29 Adam Roben <aroben@apple.com> + + Touch wtf/Platform.h whenever any .vsprops file changes + + This will cause all files to be recompiled, which will make changes to + preprocessor macros (e.g., ENABLE_*) actually take effect. + + Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_* + macros are changed (because not enough files are rebuilt) + + Reviewed by John Sullivan. + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also + added some comments and logging to make it clearer what the script is + doing and why. + +2010-11-29 Adam Roben <aroben@apple.com> + + Update react-to-vsprops-changes.py after r72555 + + .vsprops files are no longer accessed relative to $WebKitLibrariesDir. + + Fixes <http://webkit.org/b/50166> REGRESSION (r72555): + react-to-vsprops-changes.py no longer works for people with a + non-default $WebKitLibrariesDir + + Reviewed by John Sullivan. + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: + (main): Always look in WebKitLibraries/win for .vsprops files, not in + $WebKitLibrariesDir. + +2010-11-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 48100 - YARR allows what seems like a bogus character-class range + + Per ECMA-262 character classes containing character ranges containing + character classes are invalid, eg: + /[\d-x]/ + /[x-\d]/ + /[\d-\d]/ + These should throw a syntax error. + + * yarr/RegexParser.h: + +2010-11-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 48101 - Yarr gives different results for /(?:a*?){2,}/ + + The test cases in the linked mozilla bug demonstrate a couple of + problems in subpattern matching. These bugs lie in the optimized + cases - for matching parentheses with a quantity count of 1, and + for matching greedy quantified parentheses at the end of a regex + (which do not backtrack). + + In both of these cases we are failing to correctly handle empty + matches. In the case of parentheses-single matches (quantity count + one) we are failing to test for empty matches at all. In the case + of terminal subpattern matches we do currently check, however there + is a subtler bug here too. In the case of an empty match we will + presently immediately fall through to the next alternative (or + complete the regex match), whereas upon a failed match we should + be backtracking into the failing alternative, to give it a chance + to match further (e.g. consider /a??b?|a/.exec("ab") - upon first + attempting to match the first alternative this will match the empty + string - since a?? is non-greedy, however rather than moving on to + the second alternative we should be re-matching the first one, at + which point the non-greedy a?? will match, and as such the result + should be "ab", not "a"). + + Terminal subpattern matching contains a second bug, too. The frame + location values in the subpattern should be being allocated with + the outer disjunction's frame (as we do for the parentheses-single + optimization). Consider the following three regexes: + /a*(?:b*)*c*/ + /a*(?:b*)c*/ + /a*(?:b*)*/ + Considering only the frame location required by the atoms a,b, and + c, (ignoring space associated with the nested subpattern) the first + regex (a normal subpattern match) requires a frame size of 2 for + the outer disjunction, (to backtrack terms a & c), with each + iteration of the subpattern requiring a frame of size 1 (in order + to backtrack b). In the case of the second regex (where the + parentheses-single optimization will kick in) the outer frame must + be set up with a frame size of 3, since the outer frame will also + be used when running the nested subpattern. We will currently only + allocate a farme of size 1 for the outer disjuntion (to contain a), + howver the frame size should be 2 (since the subpattern will be + evaluated in the outer frame). In addition to failing to allocate + frame space the frame offsets are also presently invalid - in the + case of the last regex b's frame location will be set assuming it + to be the first term in the frame, whereas in this case b lies + after the term a, and should be taking a separate frame location. + + In order to correctly allocate the frame for terminal subpattern + matches we must move this optimization back up from the JIT into + the compiler (and thus interpreter too), since this is where the + frame allocation takes place. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets): + (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses): + (JSC::Yarr::compileRegex): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchParenthesesOnceBegin): + (JSC::Yarr::Interpreter::matchParenthesesOnceEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd): + (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd): + (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::PatternTerm): + +2010-11-24 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Remove Bakefile build system files + https://bugs.webkit.org/show_bug.cgi?id=49983 + + r53757 only removed the content, but not the files. + This patch removes that empty files. + + * JavaScriptCoreSources.bkl: Removed. + * jscore.bkl: Removed. + +2010-11-24 Gabor Loki <loki@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Merge the usage of jumps and calls at ARM-JIT + https://bugs.webkit.org/show_bug.cgi?id=50008 + + Those JmpSrc objects which represent jumps (not calls) should point to + after the jump instruction. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::blx): + (JSC::ARMAssembler::loadBranchTarget): + (JSC::ARMAssembler::getAbsoluteJumpAddress): + (JSC::ARMAssembler::linkJump): + (JSC::ARMAssembler::relinkJump): + (JSC::ARMAssembler::linkCall): + (JSC::ARMAssembler::relinkCall): + (JSC::ARMAssembler::getRelocatedAddress): + (JSC::ARMAssembler::getDifferenceBetweenLabels): + (JSC::ARMAssembler::getCallReturnOffset): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::call): + +2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend + https://bugs.webkit.org/show_bug.cgi?id=48625 + + GLib methods use UTF-8 strings, so we have to convert from UTF-16 to + UTF-8 to perform the case operations and then convert back the result to + UTF-16. GLib conversion methods return a new allocated string, so we + have to memcpy the result into the destination buffer too. Using our + own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h + we don't need such memcpy, since they take an already allocated buffer + rather than returning a new one. There's another optimization for the + case when the destination buffer is not large enough. In that case, + methods should return the expected destination buffer size and are + called again with a new buffer. We can avoid the conversion to UTF-16 by + pre-calculating the required size for the destination buffer. + + * wtf/unicode/glib/UnicodeGLib.cpp: + (WTF::Unicode::getUTF16LengthFromUTF8): + (WTF::Unicode::convertCase): + (WTF::Unicode::foldCase): + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + +2010-11-23 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Sam Weinig. + + Use WTF::StringHasher directly in JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=49893 + + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + * runtime/Identifier.cpp: + (JSC::IdentifierCStringTranslator::hash): + (JSC::IdentifierUCharBufferTranslator::hash): + +2010-11-22 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Sam Weinig. + + Add WTF::FixedArray::size() + https://bugs.webkit.org/show_bug.cgi?id=49891 + + Add a method to get the size of a FixedArray. + + * wtf/FixedArray.h: + (WTF::FixedArray::size): + +2010-11-22 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Roben. + + [WINCE] Set correct preprocessor definitions + https://bugs.webkit.org/show_bug.cgi?id=49887 + + * wtf/Platform.h: + +2010-11-22 Adam Roben <aroben@apple.com> + + Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files + + Apple's Windows build allows placing header files and import libraries for WebKit's + dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the + $WebKitLibrariesDir environment variable. This is both required for production builds and + convenient for Apple-internal developer builds. Apple's production builds also require that + WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production + builds, the files are copied into that directory tree by the + WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the + copying is done by + JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make. + + This .vsprops copying is problematic in one very important case: when a developer updates + their source tree and then tries to build. Visual Studio only reads .vsprops files when a + project is first loaded. So, when Visual Studio is first opened after the .vsprops files are + updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a + build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into + $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build + will proceed with out-of-date .vsprops files, which will likely result in a build failure. + + To fix this, we now use normal relative paths to access the .vsprops files in the source + tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment + variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is + unset, so the normal relative paths are used to read the .vsprops files out of the source + tree directly. In production builds, this environment variable is set to a fake directory + that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path + is resolved. + + For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops: + + $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops + + In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the + files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds, + JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to + "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for + FeatureDefines.vsprops becomes: + + $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops + + which resolves to: + + $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops + + (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3" + actually exist since they are matched by an equal number of ".." path components.) + + Note that Visual Studio still won't pick up changes made to .vsprops files while Visual + Studio is open, but that problem hasn't seemed to cause developers many headaches so far. + + Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are + updated + + Reviewed by Dave Hyatt. + + * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that + production builds can find the .vsprops files. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the + .vsprops files. It isn't needed anymore. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops + files. + +2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + YARR JIT should fallback to YARR Interpreter instead of PCRE. + https://bugs.webkit.org/show_bug.cgi?id=46719 + + Remove the ENABLE_YARR macro and the option of matching regular + expressions with PCRE from JavaScriptCore. + + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::isFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: + +2010-11-20 Kwang Yul Seo <skyul@company100.net> + + Reviewed by David Kilzer. + + [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message + https://bugs.webkit.org/show_bug.cgi?id=49520 + + DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead. + + * wtf/Assertions.cpp: + * wtf/Assertions.h: + +2010-11-20 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Support JIT_OPTIMIZE_MOD on Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=49432 + + Rewrite the soft modulo operation into macroassembler form, and move it + to JSValue32_64 section. + Add support for soft modulo on Thumb-2 JIT also. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::clz): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::countLeadingZeros32): + (JSC::MacroAssemblerARM::relativeTableJump): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::countLeadingZeros32): + (JSC::MacroAssemblerARMv7::relativeTableJump): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::softModulo): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * wtf/Platform.h: + +2010-11-20 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured + + Reviewed by Darin Adler. + + * JavaScriptCore.exp: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::secure): Added argument that controls whether + the last character is obscured or not. Implemented behavior. + * wtf/text/StringImpl.h: + (WTF::StringImpl::LastCharacterBehavior): Added enum. + (WTF::StringImpl::secure): Updated method signature. + +2010-11-19 William Chan <willchan@chromium.org> + + Reviewed by David Levin. + + Add USE(CHROMIUM_NET) + + Indicates the use of Chromium's network stack. Chromium's network + stack performs better when it has full view of all resource requests, + so USE(CHROMIUM_NET) can be used to bypass throttles. + + https://bugs.webkit.org/show_bug.cgi?id=49778 + + * wtf/Platform.h: + +2010-11-19 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files + https://bugs.webkit.org/show_bug.cgi?id=49819 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2010-11-19 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Don't check for constant registers when we can guarantee that the register won't be in the constant pool + https://bugs.webkit.org/show_bug.cgi?id=49814 + + Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR() + when we can guarantee that the register is not referring to a constant. + This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation + logic correct when we're using a faked callframe (as in the case of the globalExec). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::createActivation): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::thisObject): + * interpreter/CallFrame.h: + (JSC::ExecState::uncheckedR): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::createExceptionScope): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + +2010-11-19 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Darin Adler. + + Normalize Cairo/CFLite project/solution configuration names + https://bugs.webkit.org/show_bug.cgi?id=49818 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2010-11-18 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Windows vcproj configuration names should be normalized across projects + https://bugs.webkit.org/show_bug.cgi?id=49776 + + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: + +2010-11-19 Patrick Gansterer <paroga@webkit.org> + + Unreviewed, build fix after r72360. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + +2010-11-18 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Geoff Garen. + + Bug 49577 - Function.prototype should be non-configurable + + Ooops, Function.prototype should not be enumerable! + + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): + +2010-11-18 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 49708 - Stop recompiling functions to regenerate exception info. + + Instead only hold info as necessary – keep divot info is the inspector + is enabled, line number info is debugging or profiling, and handler + info for functions with try/catch. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpStatistics): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::addExpressionInfo): + (JSC::CodeBlock::addLineInfo): + (JSC::CodeBlock::hasExpressionInfo): + (JSC::CodeBlock::hasLineInfo): + (JSC::CodeBlock::needsCallReturnIndices): + (JSC::CodeBlock::callReturnIndexVector): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + (JSC::BytecodeGenerator::emitExpressionInfo): + (JSC::BytecodeGenerator::addLineInfo): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JITStubs.cpp: + (JSC::jitThrow): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Collector.cpp: + (JSC::Heap::markRoots): + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::usingAPI): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::supportsRichSourceInfo): + (JSC::JSGlobalObject::globalData): + +2010-11-18 Adam Roben <aroben@apple.com> + + Add a script to delete manifest-related files when they are older than + any .vsprops file + + Changes to .vsprops files can cause the manifest files to become + invalid, and Visual Studio doesn't always figure out that it needs to + rebuild them. + + Reviewed by Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + Call the new script. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + Added the new script. + + * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added. + (file_modification_times): Generator to return the modification time of + each file in a directory hierarchy. + (main): Get the modification time of the newest vsprops file, then find + all manifest-related files in the obj directory. Delete all + manifest-related files that are older than the newest vsprops file. + +2010-11-18 Mark Rowe <mrowe@apple.com> + + Rubber-stamped by Adam Roben. + + <rdar://problem/8602509&8602717&8602724> Enable compaction support. + + * Configurations/JavaScriptCore.xcconfig: + +2010-11-18 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 49635 - Profiler implementation is fragile + + The profile presently requires the exception handling mechanism to explicitly + remove all stack frames that are exited during the exception unwind mechanism. + This is fragile in a number of ways: + * We have to change bytecode register allocation when compiling code to run + when profiling, to preserve the callee function (this is also required to + call did_call after the call has returned). + * In the JIT we have to maintain additional data structures + (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register + containing the callee. + * In the interpreter we use 'magic values' to offset into the instruction + stream to rediscover the register containing the function. + + Instead, move profiling into the head and tail of functions. + * This correctly accounts the cost of the call itself to the caller. + * This allows us to access the callee function object from the callframe. + * This means that at the point a call is made we can track the stack depth + on the ProfileNode. + * When unwinding we can simply report the depth at which the exception is + being handled - all call frames above this level are freed. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::methodCallLinkInfo): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::exceptionUnwind): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::callerCallFrame): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::_willExecute): + (JSC::Profiler::_didExecute): + (JSC::Profiler::exceptionUnwind): + * profiler/Profiler.h: + +2010-11-18 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Remove leftover Windows Debug_Internal configurations + https://bugs.webkit.org/show_bug.cgi?id=49758 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2010-11-18 Chao-ying Fu <fu@mips.com> + + Reviewed by Csaba Osztrogonác. + + Avoid increasing required alignment of target type warning + https://bugs.webkit.org/show_bug.cgi?id=43963 + + * runtime/UString.h: + (JSC::UStringHash::equal): + * wtf/StdLibExtras.h: + +2010-11-17 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add stubbed out ScrollAnimator for the Mac + https://bugs.webkit.org/show_bug.cgi?id=49678 + + * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no + change in behavior at the moment. + +2010-11-17 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit + + Reviewed by Darin Adler. + + Add an explicit overflow check prior to allocating our buffer, + rather than implicitly relying on the guard in convertUTF16ToUTF8. + + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + +2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r72197. + http://trac.webkit.org/changeset/72197 + https://bugs.webkit.org/show_bug.cgi?id=49661 + + broke fast/regex/test1.html (Requested by stampho on #webkit). + + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExpRepresentation::~RegExpRepresentation): + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: + +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + YARR JIT should fallback to YARR Interpreter instead of PCRE. + https://bugs.webkit.org/show_bug.cgi?id=46719 + + Remove the ENABLE_YARR macro and the option of matching regular + expressions with PCRE from JavaScriptCore. + + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::match): + * tests/mozilla/expected.html: + * wtf/Platform.h: + * yarr/RegexCompiler.cpp: + * yarr/RegexCompiler.h: + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock): + (JSC::Yarr::RegexCodeBlock::getFallback): + (JSC::Yarr::RegexCodeBlock::isFallback): + (JSC::Yarr::RegexCodeBlock::setFallback): + (JSC::Yarr::executeRegex): + * yarr/RegexParser.h: + * yarr/RegexPattern.h: + +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Extend YARR Interpreter with beginning character look-up optimization + https://bugs.webkit.org/show_bug.cgi?id=45751 + + Add beginning character look-up optimization which sets the start + index to the first possible successful pattern match. + Extend YARR Interpreter with lookupForBeginChars function which + implements the beginning character look-up optimization. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::InputStream::readPair): + (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput): + (JSC::Yarr::Interpreter::lookupForBeginChars): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::interpret): + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): + +2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Christiansen, Tor Arne Vestbø. + + [Qt] Add support for use GStreamer with the Qt build + + Enable the build/inclusion of the wtf/QObject convenience classes. + + * JavaScriptCore.pri: + * wtf/wtf.pri: + +2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Collect the beginning characters in a RegExp pattern for look-up + optimization + https://bugs.webkit.org/show_bug.cgi?id=45748 + + Extend the YARR's parser with an algorithm which collects the potential + beginning characters from a RegExp pattern for later look-up optimization. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::BeginCharHelper::BeginCharHelper): + (JSC::Yarr::BeginCharHelper::addBeginChar): + (JSC::Yarr::BeginCharHelper::merge): + (JSC::Yarr::BeginCharHelper::addCharacter): + (JSC::Yarr::BeginCharHelper::linkHotTerms): + (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor): + (JSC::Yarr::RegexPatternConstructor::addBeginTerm): + (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms): + (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms): + (JSC::Yarr::RegexPatternConstructor::setupBeginChars): + (JSC::Yarr::compileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::TermChain::TermChain): + (JSC::Yarr::BeginChar::BeginChar): + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r72160. + http://trac.webkit.org/changeset/72160 + https://bugs.webkit.org/show_bug.cgi?id=49646 + + Broke lots of fast/profiler tests, among others (Requested by + aroben on #webkit). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::functionRegisterForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addFunctionRegisterInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + (JSC::BytecodeGenerator::emitReturn): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::profileHookRegister): + * bytecompiler/NodesCodegen.cpp: + (JSC::CallArguments::CallArguments): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::operator==): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::willExecute): + (JSC::Profiler::didExecute): + * profiler/Profiler.h: + +2010-11-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 49635 - Profiler implementation is fragile + + The profile presently requires the exception handling mechanism to explicitly + remove all stack frames that are exited during the exception unwind mechanism. + This is fragile in a number of ways: + * We have to change bytecode register allocation when compiling code to run + when profiling, to preserve the callee function (this is also required to + call did_call after the call has returned). + * In the JIT we have to maintain additional data structures + (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register + containing the callee. + * In the interpreter we use 'magic values' to offset into the instruction + stream to rediscover the register containing the function. + + Instead, move profiling into the head and tail of functions. + * This correctly accounts the cost of the call itself to the caller. + * This allows us to access the callee function object from the callframe. + * This means that at the point a call is made we can track the stack depth + on the ProfileNode. + * When unwinding we can simply report the depth at which the exception is + being handled - all call frames above this level are freed. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::methodCallLinkInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + (JSC::BytecodeGenerator::emitReturn): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::count): + * bytecompiler/NodesCodegen.cpp: + (JSC::CallArguments::CallArguments): + * interpreter/Interpreter.cpp: + (JSC::ProfileHostCall::ProfileHostCall): + (JSC::ProfileHostCall::~ProfileHostCall): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_profile_has_called): + (JSC::JIT::emit_op_profile_will_return): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_profile_has_called): + (JSC::JIT::emit_op_profile_will_return): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + (JSC::ProfileGenerator::exceptionUnwind): + (JSC::ProfileGenerator::stopProfiling): + * profiler/ProfileGenerator.h: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::ProfileNode): + (JSC::ProfileNode::willExecute): + * profiler/ProfileNode.h: + (JSC::ProfileNode::create): + (JSC::ProfileNode::operator==): + (JSC::ProfileNode::exec): + * profiler/Profiler.cpp: + (JSC::dispatchFunctionToProfiles): + (JSC::Profiler::hasCalled): + (JSC::Profiler::willEvaluate): + (JSC::Profiler::willReturn): + (JSC::Profiler::didEvaluate): + (JSC::Profiler::exceptionUnwind): + * profiler/Profiler.h: + +2010-11-16 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben and Steve Falkenburg. + + Touch Platform.h to force a rebuild for Windows. + + * wtf/Platform.h: + +2010-11-16 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Disable LTCG for Windows Release builds. Add new Release_LTCG configuration. + https://bugs.webkit.org/show_bug.cgi?id=49632 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + The number of recursive match calls isn't limited in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=47906 + + Check the number of the matchDisjunction recursive calls to avoid unbounded + recursion. + Now the matchDisjunction function returns JSRegExpResult instead of bool. + The JSRegExpResult enum contains the result of matching or the error code + of the failure (like HitLimit) which terminates the matching. + The error codes are based on pcre's jsRegExpExecute error codes. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::Interpreter::matchNonZeroDisjunction): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + * yarr/RegexInterpreter.h: + +2010-11-16 Brian Weinstein <bweinstein@apple.com> + + Rest of the Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-11-16 Gavin Barraclough <barraclough@apple.com> + + Windows build fix pt 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-11-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=49606 + + The bug here is that we read the prototype from the RHS argument using a regular + op_get_by_id before op_instanceof has checked that this is an object implementing + HasInstance. This incorrect behaviour gives rise to further unnecessary complexity + in the code base, since we have additional logic (implemented using the + GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors + from the get_by_id into invalid parameter errors. Having fixed this bug this code + is all redundant, since in these cases the get_by_id will never have been reached. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addExpressionInfo): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitCheckHasInstance): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::InstanceOfNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_check_has_instance): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_check_has_instance): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * runtime/ExceptionHelpers.cpp: + (JSC::createInterruptedExecutionException): + (JSC::createTerminatedExecutionException): + (JSC::createUndefinedVariableError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + * runtime/ExceptionHelpers.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::toPrimitive): + (JSC::JSNotAnObject::getPrimitiveNumber): + (JSC::JSNotAnObject::toBoolean): + (JSC::JSNotAnObject::toNumber): + (JSC::JSNotAnObject::toString): + (JSC::JSNotAnObject::toObject): + (JSC::JSNotAnObject::getOwnPropertySlot): + (JSC::JSNotAnObject::getOwnPropertyDescriptor): + (JSC::JSNotAnObject::put): + (JSC::JSNotAnObject::deleteProperty): + (JSC::JSNotAnObject::getOwnPropertyNames): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::JSNotAnObject): + * runtime/JSObject.h: + (JSC::JSObject::isActivationObject): + * runtime/JSValue.cpp: + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::synthesizeObject): + (JSC::JSValue::synthesizePrototype): + +2010-11-15 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Harden additional string functions against large lengths + https://bugs.webkit.org/show_bug.cgi?id=49574 + + * wtf/text/CString.cpp: + (WTF::CString::init): Check for length that is too large for CString. + (WTF::CString::newUninitialized): Ditto. + (WTF::CString::copyBufferIfNeeded): Fix types so the length stays + in a size_t. + + * wtf/text/WTFString.cpp: + (WTF::String::append): Check for length that is too large. + +2010-11-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 49577 - Function.prototype should be non-configurable + + JSC lazily allocates the prototype property of Function objects. + + We check the prototype exists on 'get', but not on 'put'. + If you 'put' without having first done a 'get' you can end up with a configurable + prototype (prototype should only ever be non-configurable). + + This is visible in a couple of ways: + * 'delete' on the property may succeed. (the next access will result in a new, + reset prototype object). + * the prototype may be set to a getter. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertyNames): + Reify the prototype property before allowing an enumerate including don't enum properties. + (JSC::JSFunction::put): + Reify the prototype property before any put to it. + +2010-11-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException + + Three types of source location information are added to errors. + + (1) Divot information. + + This was added with the intention of using it to provide better source highlighting in the inspector. + We may still want to do so, but we probably should not be exposing these values in a manner visible to + user scripts – only through an internal C++ interface. The code adding divot properties to objects has + been removed. + + (2) Line number information. + + Line number information is presently sometimes added at the point the exception is created, and sometimes + added at the point the exception passes through throwException. Change this so that throwException has + the sole responsibility for adding line number and source file information. + + (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`). + + These messages are currently created at the point the exceptions is raised. Instead reformat the message + such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.` + becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at + the in throw Exception. This presents a number of advantages: + * we no longer need to have source location information to create these TypeErrors. + * we can chose to append source location information in other error messages, including those where + passing source location to the point of construction would be inconvenient. + * we can chose in future to omit to append source location information when running in a non-debug mode. + + This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output, + removing double periods (..) at end of lines, and adding slightly more context to some errors. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + - Separated called to access line and range information. + + * bytecode/CodeBlock.h: + - Separated called to access line and range information. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::isInvalidParamForIn): + (JSC::isInvalidParamForInstanceOf): + - Update parameters passed to error constructors. + (JSC::appendSourceToError): + - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers) + (JSC::Interpreter::throwException): + - Updated to call appendSourceToError. + (JSC::Interpreter::privateExecute): + - Update parameters passed to error constructors. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + - Update parameters passed to error constructors. + + * runtime/Error.cpp: + (JSC::addErrorInfo): + (JSC::hasErrorInfo): + - Removed divot properties. + + * runtime/Error.h: + - Removed divot properties. + + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + - Initialize new property. + + * runtime/ErrorInstance.h: + (JSC::ErrorInstance::appendSourceToMessage): + (JSC::ErrorInstance::setAppendSourceToMessage): + (JSC::ErrorInstance::clearAppendSourceToMessage): + - Added flag to check for errors needing location information appending. + (JSC::ErrorInstance::isErrorInstance): + - Added virtual method to check for ErrorInstances. + + * runtime/ExceptionHelpers.cpp: + (JSC::createUndefinedVariableError): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages. + + * runtime/ExceptionHelpers.h: + - Updated function signatures. + + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + - Update parameters passed to error constructors. + + * runtime/JSObject.h: + (JSC::JSObject::isErrorInstance): + - Added virtual method to check for ErrorInstances. + +2010-11-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + CString(const char*) crashes when passed a null pointer + https://bugs.webkit.org/show_bug.cgi?id=49450 + + * wtf/text/CString.cpp: + (WTF::CString::CString): + Return early if str is null. + +2010-11-11 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 49420 - Clean up syntax/reference error throw. + + Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair. + This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data + attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around + this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised. + + We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an + Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitThrowReferenceError): + (JSC::BytecodeGenerator::emitThrowSyntaxError): + (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNodeInConditionContext): + * bytecompiler/NodesCodegen.cpp: + (JSC::ThrowableExpressionData::emitThrowReferenceError): + (JSC::ThrowableExpressionData::emitThrowSyntaxError): + (JSC::RegExpNode::emitBytecode): + (JSC::PostfixErrorNode::emitBytecode): + (JSC::PrefixErrorNode::emitBytecode): + (JSC::AssignErrorNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_throw_reference_error): + (JSC::JIT::emit_op_throw_syntax_error): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_throw_reference_error): + (JSC::JIT::emit_op_throw_syntax_error): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/Nodes.h: + +2010-11-11 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Harden some string functions against large lengths + https://bugs.webkit.org/show_bug.cgi?id=49293 + + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for + strlen results that are too large for StringImpl. + (WTF::StringImpl::lower): Check for lengths that are too large for + int32_t. + (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for + lengths that are too large for int32_t. + (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned + rather than int and int32_t so we can handle any length. + (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for + lengths that are too large for int32_t. + (WTF::StringImpl::find): Check for strlen results that are too large for + StringImpl. + (WTF::StringImpl::findIgnoringCase): Ditto. + (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr. + (WTF::StringImpl::createWithTerminatingNullCharacter): Check before + incrementing length. + +2010-11-11 Dan Horák <dan@danny.cz> + + Reviewed by Andreas Kling. + + Add support for the s390/s390x architectures, it's big-endian + with s390 being 32-bit and s390x being 64-bit. + + https://bugs.webkit.org/show_bug.cgi?id=34786 + + * wtf/Platform.h: + +2010-11-10 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by David Hyatt. + + HTML5 Ruby support should be mandatory feature + https://bugs.webkit.org/show_bug.cgi?id=49272 + + Remove Ruby as optional feature. + + * Configurations/FeatureDefines.xcconfig: + * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows. + +2010-11-10 Peter Rybin <peter.rybin@gmail.com> + + Reviewed by Adam Barth. + + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 + + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-11-09 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + ARM JIT asserts when loading http://reader.google.com in debug mode + https://bugs.webkit.org/show_bug.cgi?id=48912 + + There are several cases when the uninterrupted sequence is larger than + maximum required offset for pathing the same sequence. Eg.: if in a + uninterrupted sequence the last macroassembler's instruction is a stub + call, it emits store instruction(s) which should not be included in the + calculation of length of uninterrupted sequence. So, the insnSpace and + constSpace should be upper limit instead of hard limit. + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::endUninterruptedSequence): + +2010-11-09 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/49279> Fix include statements for local headers + + Reviewed by Gavin Barraclough. + + Use "Foo.h" instead of <Foo.h> for local headers. + + * assembler/AbstractMacroAssembler.h: Also fixed sort order. + * assembler/CodeLocation.h: + * yarr/RegexJIT.h: + * yarr/RegexParser.h: + +2010-11-08 Adam Roben <aroben@apple.com> + + Roll out r71532 + + It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default + .bashrc unsets %TEMP%, which broke copy-tools.cmd. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed. + * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed. + +2010-11-08 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la' + https://bugs.webkit.org/show_bug.cgi?id=49128 + + r59042 introduced a C++-style comment in Platform.h, which is often + included in C source files. Change it to a C-style comment. + + * wtf/Platform.h: Fix the C++-style comment. + +2010-11-08 Adam Roben <aroben@apple.com> + + Show a message and cause the build to immediately fail when any + .vsprops files are copied + + When $WebKitLibrariesDir is set to a non-standard location, the + .vsprops files have to be copied from WebKitLibraries/win to + $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up + changes to the .vsprops files until the next time it opens the solution + file. Before this patch, the build would soldier on with the old + .vsprops files, leading to strange build failures. Now we detect that + the .vsprops files have been updated, display a message to the user + telling them what to do, and make the build fail immediately. + + Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when + .vsprops files are updated + + Reviewed by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + Moved code to copy the tools directory to the new copy-tools.cmd + script. Moved that after the command that writes the buildfailed file + so the build will be considered a failure if copy-tools.cmd fails. + Changed to write the project name into buildfailed like all our other + projects do, so those other projects will know that the failure was due + to this project. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + Added new scripts. + + * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies + the tools directory to $WebKitLibrariesDir. If any files were copied, + we display a message to the user and exit with error code 1 to cause + the build to fail. In non-interactive builds, we just print the message + to the build log. In interactive builds, we show the message in an + alert. + + * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses + Windows Scripting Host to display a message in an alert. + +2010-11-07 Sam Magnuson <smagnuson@netflix.com> + + Reviewed by Andreas Kling. + + [Qt] make install does not cause JavaScriptCore to be built + https://bugs.webkit.org/show_bug.cgi?id=49114 + + * JavaScriptCore.pro: + +2010-11-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Website consistently crashing TOT in JIT::execute() on news.com.au + https://bugs.webkit.org/show_bug.cgi?id=48954 + + The problem here was the strict pass of this conversion was loading the + this structure into one register but doing the flags check off a different + register. This is clearly wrong. I have been unable to trigger the crash + with a reduction, but I've added an assertion to the this conversion to + attempt to make it more readily catchable in future. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_convert_this_strict): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_convert_this_strict): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-11-04 Xan Lopez <xlopez@igalia.com> + + Reviewed by Adam Barth. + + Use leakRef instead of releaseRef + https://bugs.webkit.org/show_bug.cgi?id=48974 + + Use leakRef instead of the deprecated releaseRef. This was renamed + some time ago because 'releaseRef' is too close to 'release', + which does something completely different. + +2010-11-04 Eric Seidel <eric@webkit.org> + + Reviewed by Gavin Barraclough. + + REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute + https://bugs.webkit.org/show_bug.cgi?id=48789 + + The contract for all String/AtomicString methods seems to be that it's + safe to call them, even when the String is null (impl() returns 0). + This contract was broken by r49798 (unintentionally) when optimizing + for dromeo. + This patch adds a null check to AtomicString::lower() fixing this + crash and preventing future confusion. + + * wtf/text/AtomicString.cpp: + (WTF::AtomicString::lower): + +2010-11-04 Adam Barth <abarth@webkit.org> + + Enabled ICCJPEG on Chromium Mac + https://bugs.webkit.org/show_bug.cgi?id=48977 + + * wtf/Platform.h: + +2010-11-03 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Crash in Function.prototype.call.apply + https://bugs.webkit.org/show_bug.cgi?id=48485 + + The problem here was op_load_varargs failing to ensure that + there was sufficient space for the entire callframe prior to + op_call_varargs. This meant that when we then re-entered the + VM it was possible to stomp over an earlier portion of the + stack, so causing sub-optimal behaviour. + + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoadVarargs): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::ApplyFunctionCallDotNode::emitBytecode): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_load_varargs): + +2010-11-03 Kenneth Russell <kbr@google.com> + + Reviewed by Chris Marrin. + + Redesign extension mechanism in GraphicsContext3D + https://bugs.webkit.org/show_bug.cgi?id=46894 + + * JavaScriptCore.exp: + - Exposed String::split(const String&, Vector<String>). + +2010-11-03 Adam Roben <aroben@apple.com> + + Bring WTF.vcproj up to date + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and + unicode directories, added new files, removed old files. + +2010-11-03 Gabor Loki <loki@webkit.org> + + Reviewed by Andreas Kling. + + Remove unused initializeWeakRandomNumberGenerator + https://bugs.webkit.org/show_bug.cgi?id=48899 + + WeakRandom class is used instead of weakRandomNumber and its initializer. + + * wtf/RandomNumberSeed.h: + +2010-11-03 Gabor Loki <loki@webkit.org> + + Reviewed by Geoffrey Garen. + + Unused class: JSFastMath with JSValue64 + https://bugs.webkit.org/show_bug.cgi?id=48835 + + Remove unused JSFastMath class. + + * runtime/JSImmediate.h: + +2010-11-02 Adam Roben <aroben@apple.com> + + Windows build fix after r71127 + + MSVC isn't smart enough to figure out that the definition of the global + nullptr variable isn't needed, so we provide one for it. + + Fixes <http://webkit.org/b/48862> Windows build is broken due to + undefined symbol nullptr + + Reviewed by Anders Carlsson. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS + resort the files. + + * wtf/NullPtr.cpp: Added. + +2010-11-02 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits + https://bugs.webkit.org/show_bug.cgi?id=48841 + + Remove special handling of HashTableDeletedValue in PlatformRefPtr. + This is better handled on a case-by-case basis, when HashTraits + cannot account for it. + + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::~PlatformRefPtr): + (WTF::PlatformRefPtr::clear): + (WTF::::operator): + +2010-10-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute + https://bugs.webkit.org/show_bug.cgi?id=47573 + + I think the interpreter portion of this was introduced by + an incorrect but silent merge when I updated prior to committing. + The JIT change is basically just a correctness fix, but it is + needed to prevent the testcase from asserting in debug builds. + + The basic problem is incorrectly setting the activation object + on an arguments object. The crash was due to us setting a null + activation in the interpreter, in the jit we were setting the + activation of a strict mode arguments object. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * wtf/Platform.h: + +2010-10-29 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Adam Roben and David Kilzer. + + Fix and cleanup of build systems + https://bugs.webkit.org/show_bug.cgi?id=48342 + + * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API + +2010-10-28 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Include stddef.h unconditionally in Assertions.h + https://bugs.webkit.org/show_bug.cgi?id=48573 + + There is no reason to have stddef.h include be MSVC-only. + + * wtf/Assertions.h: + +2010-10-28 Herczeg Zoltan <zherczeg@webkit.org> + + Rubber stamped by Csaba Osztrogonác. + + Try to fix interpreter build. + + Needed parentheses around assignment to avoid GCC warning after + http://trac.webkit.org/changeset/70703 + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Csaba Osztrogonác. + + resetAssertionMatches() is an unused function in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=48503 + + The resetAssertionMatches() function is removed from YARR Interpreter + because it's never called. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::resetMatches): + +2010-10-28 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Andreas Kling. + + Wrong instruction form for BKPT + https://bugs.webkit.org/show_bug.cgi?id=48427 + + One '0' is missing from BKPT instruction. + Thanks for Jacob Bramley for reporting this error. + + * assembler/ARMAssembler.h: + +2010-10-28 Xan Lopez <xlopez@igalia.com> + + Try to fix Snow Leopard build. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::testPrototype): + +2010-10-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Oliver Hunt. + + Do not have two different asCell APIs in JSValue + https://bugs.webkit.org/show_bug.cgi?id=47979 + + Remove JSCell* asCell(JSValue) in favor of only using + JSValue::asCell(). + + * API/APICast.h: + (toRef): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::testPrototype): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/GetterSetter.h: + (JSC::asGetterSetter): + * runtime/JSByteArray.h: + (JSC::asByteArray): + * runtime/JSCell.h: + (JSC::JSCell::getCallData): + (JSC::JSCell::getConstructData): + * runtime/JSString.h: + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::asString): + * runtime/JSValue.h: + * runtime/Operations.cpp: + (JSC::jsIsObjectType): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + * runtime/Protect.h: + (JSC::gcProtect): + (JSC::gcUnprotect): + +2010-10-27 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + Support emit_op_mod() for MIPS on JSVALUE32_64 + https://bugs.webkit.org/show_bug.cgi?id=46511 + + This patch uses MIPS div instructions for op_mod to improve performance. + + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + +2010-10-27 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build correction. + + * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is + turned off in the WinCairo port. This isn't supported (yet.) + +2010-10-27 Chris Rogers <crogers@google.com> + + Reviewed by Chris Marrin. + + Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit + https://bugs.webkit.org/show_bug.cgi?id=48279 + + * Configurations/FeatureDefines.xcconfig: + +2010-10-27 Brian Weinstein <bweinstein@apple.com> + + Windows build fix. + + * jit/JITStubs.cpp: + (JSC::jitThrow): + +2010-10-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 48365 - Remove output parameters from JITStackFrame + + The JIT stub functions presently use the stackframe to provide a couple of additional return values. + * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property. + * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property. + + Change exception returns such that exceptions are always returned on JSGlobalData::exception. + Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + (JSC::CachedCall::call): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + * jit/JITCode.h: + (JSC::JITCode::execute): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_catch): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_catch): + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::jitThrow): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + * runtime/CallData.cpp: + (JSC::call): + * runtime/Completion.cpp: + (JSC::evaluate): + * runtime/ConstructData.cpp: + (JSC::construct): + * runtime/ExceptionHelpers.cpp: + (JSC::createErrorForInvalidGlobalAssignment): + (JSC::throwOutOfMemoryError): + (JSC::throwStackOverflowError): + * runtime/ExceptionHelpers.h: + * runtime/JSArray.cpp: + (JSC::JSArray::sort): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2010-10-27 Gabor Loki <loki@webkit.org> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=48060 + Speed up op_jeq_null and op_jneq_null. + + For both opcodes the NullTag and UndefinedTag are checked to control the + jump. These values can be simply checked by AboveOrEqual or Below + condition if they are the two highest unsigned integers from JSValue's + Tag field. + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + * runtime/JSValue.h: + +2010-10-25 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=41948 + REGRESSION(r60392): Registerfile can be unwound too far following an exception + + SunSpider reports no change. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): Walk the stack to calculate the high + water mark currently in use. It's not safe to assume that the current + CallFrame's high water mark is the highest high water mark because + calls do not always set up at the end of a CallFrame. A large caller + CallFrame can encompass a small callee CallFrame. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock + in the CallFrame of a host call, like the Interpreter does, instead of + leaving the CodeBlock field uninitialized. The backtracing code requires + a valid CodeBlock field in each CallFrame. + +2010-10-27 Gabor Loki <loki@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Add cmn to branch32(reg, imm) on ARM + https://bugs.webkit.org/show_bug.cgi?id=48062 + + The conditional comparison can be done with cmn if the imm value is + negative and can fit into the cmn instruction. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branch32): + +2010-10-26 Oliver Hunt <oliver@apple.com> + + Interpreter build fix. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Remove exec and globalData arguments from jsNumber + https://bugs.webkit.org/show_bug.cgi?id=48270 + + Remove the now unused exec and globalData arguments from jsNumber + and mechanically update all users of jsNumber. + + * API/JSValueRef.cpp: + (JSValueMakeNumber): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + * bytecompiler/NodesCodegen.cpp: + (JSC::ArrayNode::emitBytecode): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (functionRun): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::BooleanConstructor): + * runtime/CachedTranscendentalFunction.h: + (JSC::CachedTranscendentalFunction::operator()): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::DateConstructor): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + * runtime/Error.cpp: + (JSC::addErrorSourceInfo): + (JSC::addErrorDivotInfo): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::ErrorConstructor): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::FunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::JSByteArray): + * runtime/JSByteArray.h: + (JSC::JSByteArray::getIndex): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getOwnPropertyDescriptor): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + * runtime/JSNumberCell.h: + (JSC::JSValue::JSValue): + (JSC::jsNaN): + (JSC::JSValue::toJSNumber): + * runtime/JSONObject.cpp: + (JSC::unwrapBoxedPrimitive): + (JSC::PropertyNameForFunctionCall::value): + (JSC::JSONStringify): + * runtime/JSString.cpp: + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::getStringPropertySlot): + * runtime/JSValue.h: + (JSC::jsDoubleNumber): + (JSC::jsNumber): + (JSC::jsNaN): + (JSC::JSValue::JSValue): + (JSC::JSValue::toJSNumber): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::NumberConstructor): + (JSC::numberConstructorNaNValue): + (JSC::numberConstructorNegInfinity): + (JSC::numberConstructorPosInfinity): + (JSC::numberConstructorMaxValue): + (JSC::numberConstructorMinValue): + (JSC::constructWithNumberConstructor): + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + * runtime/Operations.cpp: + (JSC::jsAddSlowCase): + * runtime/Operations.h: + (JSC::jsAdd): + * runtime/PrototypeFunction.cpp: + (JSC::PrototypeFunction::PrototypeFunction): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + (JSC::RegExpMatchesArray::fillArrayInstance): + * runtime/RegExpObject.cpp: + (JSC::regExpObjectLastIndex): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::StringConstructor): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncLocaleCompare): + +2010-10-25 David Tapuska <dtapuska@rim.com> + + Reviewed by David Kilzer. + + Enable VFP if our compiler settings indicated we had a hardware + VFP. + + https://bugs.webkit.org/show_bug.cgi?id=46096 + + * assembler/MacroAssemblerARM.cpp: + (JSC::isVFPPresent): + +2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r70451. + http://trac.webkit.org/changeset/70451 + https://bugs.webkit.org/show_bug.cgi?id=48249 + + Broke set-unloaded-frame-location.html under Qt (Requested by + caseq on #webkit). + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Removed. + +2010-10-25 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Replace _countof with WTF_ARRAY_LENGTH + https://bugs.webkit.org/show_bug.cgi?id=48229 + + * wtf/Platform.h: + +2010-10-25 Peter Rybin <peter.rybin@gmail.com> + + Reviewed by Adam Barth. + + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 + + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-10-24 Kwang Yul Seo <skyul@company100.net> + + Reviewed by David Kilzer. + + Check endianness with __BIG_ENDIAN in RVCT. + https://bugs.webkit.org/show_bug.cgi?id=46122 + + RVCT defines __BIG_ENDIAN if compiling for a big-endian target. + + * wtf/Platform.h: + +2010-10-24 Dan Bernstein <mitz@apple.com> + + Rubber-stamped by Dave Kilzer. + + Removed empty directories. + + * JavaScriptCore: Removed. + * JavaScriptCore/runtime: Removed. + +2010-10-24 Patrick Gansterer <paroga@webkit.org> + + Unreviewed, fix typo of last build fix. + + * wtf/DateMath.cpp: + +2010-10-24 Patrick Gansterer <paroga@webkit.org> + + Unreviewed build fix for chromium. + + * wtf/DateMath.cpp: Added missing include. + +2010-10-24 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Add WTF_ARRAY_LENGTH macro to WTF + https://bugs.webkit.org/show_bug.cgi?id=32828 + + Unify the different implementations and usages. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::toJSON): + (JSC::Stringifier::appendStringifiedValue): + * runtime/UString.cpp: + (JSC::UString::number): + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): + * wtf/StdLibExtras.h: + +2010-10-24 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Filter example Chiseled from SVG Wow! is slow + https://bugs.webkit.org/show_bug.cgi?id=48174 + + Added 'using WTF::ByteArray;' at the end of ByteArray.h + + * wtf/ByteArray.h: + +2010-10-24 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Inline WTF::bitwise_cast and fix style + https://bugs.webkit.org/show_bug.cgi?id=48208 + + * wtf/StdLibExtras.h: + (WTF::bitwise_cast): + (WTF::bitCount): + +2010-10-23 Xan Lopez <xlopez@igalia.com> + + Reviewed by Sam Weinig. + + Unify globalData APIs + https://bugs.webkit.org/show_bug.cgi?id=47969 + + Make JSGlobalObject::globalData return a reference and adapt + callers. This unifies the API with the existing + CallFrame::globalData, which also returns a reference. + + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * interpreter/CallFrame.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + * jsc.cpp: + (runWithScripts): + * parser/JSParser.cpp: + (JSC::jsParse): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * runtime/Error.cpp: + (JSC::createError): + (JSC::createEvalError): + (JSC::createRangeError): + (JSC::createReferenceError): + (JSC::createSyntaxError): + (JSC::createTypeError): + (JSC::createURIError): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::globalData): + +2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> + + Unreviewed, rolling out r70369. + http://trac.webkit.org/changeset/70369 + https://bugs.webkit.org/show_bug.cgi?id=47974 + + Caused weird artifacts in expected results. + + * wtf/Platform.h: + +2010-10-23 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + Crashes randomly in cairo_scaled_font_destroy + https://bugs.webkit.org/show_bug.cgi?id=46794 + + Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr + goes away this should probably be handled in the future via some special + hooks in RefCounted (or its contained type). + + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::~PlatformRefPtr): + (WTF::PlatformRefPtr::clear): + (WTF::::operator): + +2010-10-22 Adam Roben <aroben@apple.com> + + Remove the QuartzCorePresent.h mechanism + + This header was used to detect whether QuartzCore headers were present + on the system. Everyone should have these headers now so we no longer + need to detect. + + Reviewed by Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove + code to generate QuartzCorePresent.h. + + * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and + collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef. + +2010-10-22 Adam Barth <abarth@webkit.org> + + Unreviewed, rolling out r70290. + http://trac.webkit.org/changeset/70290 + https://bugs.webkit.org/show_bug.cgi?id=48111 + + Undelete Android build files. + + * Android.mk: Added. + +2010-10-22 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Csaba Osztrogonác. + + JSC interpreter regressions after r69940 + https://bugs.webkit.org/show_bug.cgi?id=47839 + + Wrong "if": It should test whether the result exists, + and not the opposite. It is an interpreter bug, hence + the bots does not capture it. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + +2010-10-21 Adam Barth <abarth@webkit.org> + + Reviewed by David Levin. + + Remove Android build system + https://bugs.webkit.org/show_bug.cgi?id=48111 + + * Android.mk: Removed. + +2010-10-21 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Add a String constructor which takes AECHAR* + https://bugs.webkit.org/show_bug.cgi?id=45043 + + Add String(const AECHAR*) constructor for convenience. + + * wtf/text/WTFString.h: + +2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk + https://bugs.webkit.org/show_bug.cgi?id=47896 + + * wtf/gobject/GTypedefs.h: + +2010-10-21 Adam Barth <abarth@webkit.org> + + Unreviewed, rolling out r70174. + http://trac.webkit.org/changeset/70174 + https://bugs.webkit.org/show_bug.cgi?id=41948 + + This patch reverts a change that causes + http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + +2010-10-20 Simon Fraser <simon.fraser@apple.com> + + Fix the EFL build. + + * wtf/CMakeLists.txt: + +2010-10-20 Simon Fraser <simon.fraser@apple.com> + + Fix Windows build: export needed symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-19 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=47851 + + Add methods to DecimalNumber to return the buffer length + required for decimal and exponential output. + + Make some of the DecimalNumber code non-inline (no + effect on Sunspider), adding DecimalNumber.cpp to various + build systems. + + Make some DecimalNumber methods 'const'. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * wtf/DecimalNumber.cpp: Added. + (WTF::DecimalNumber::bufferLengthForStringDecimal): + (WTF::DecimalNumber::bufferLengthForStringExponential): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::sign): + (WTF::DecimalNumber::exponent): + (WTF::DecimalNumber::significand): + (WTF::DecimalNumber::precision): + * wtf/dtoa.cpp: + (WTF::dtoa): + * wtf/dtoa.h: + * wtf/wtf.pri: + +2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r70165. + http://trac.webkit.org/changeset/70165 + https://bugs.webkit.org/show_bug.cgi?id=48007 + + It broke tests on Qt bot (Requested by Ossy on #webkit). + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Removed. + +2010-10-20 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build + step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-10-20 Dumitru Daniliuc <dumi@chromium.org> + + Unreviewed, fixing the Win build. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + +2010-10-20 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=41948 + REGRESSION(r60392): Registerfile can be unwound too far following an exception + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): Walk the stack to calculate the high + water mark currently in use. It's not safe to assume that the current + CallFrame's high water mark is the highest high water mark because + calls do not always set up at the end of a CallFrame. A large caller + CallFrame can encompass a small callee CallFrame. + +2010-10-20 Peter Rybin <peter.rybin@gmail.com> + + Reviewed by Adam Barth. + + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 + + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-10-19 Kwang Yul Seo <skyul@company100.net> + + Reviewed by David Kilzer. + + [BREWMP] Turn off JIT for simulator build + https://bugs.webkit.org/show_bug.cgi?id=47937 + + We don't need to test x86 JIT. + + * wtf/Platform.h: + +2010-10-19 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Remove support for JSVALUE32 from JSC + https://bugs.webkit.org/show_bug.cgi?id=47948 + + Remove all the code for supporting JSVALUE32 from JSC. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emitSlow_op_jlesseq): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITCall.cpp: + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_next_pname): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + * jit/JITStubs.h: + * jit/JSInterfaceJIT.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + * jit/ThunkGenerators.cpp: + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): + * runtime/Collector.cpp: + (JSC::isPossibleCell): + (JSC::typeName): + * runtime/JSCell.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeForLookup): + * runtime/JSImmediate.h: + (JSC::reinterpretIntptrToDouble): + (JSC::JSImmediate::isIntegerNumber): + (JSC::JSImmediate::isDouble): + (JSC::JSImmediate::areBothImmediateIntegerNumbers): + (JSC::JSImmediate::makeDouble): + (JSC::JSImmediate::doubleValue): + (JSC::JSImmediate::toBoolean): + (JSC::JSImmediate::fromNumberOutsideIntegerRange): + (JSC::JSImmediate::from): + (JSC::JSImmediate::toDouble): + (JSC::JSFastMath::rightShiftImmediateNumbers): + * runtime/JSNumberCell.cpp: + * runtime/JSNumberCell.h: + * runtime/JSObject.h: + (JSC::JSObject::JSObject): + * runtime/JSValue.h: + * runtime/NumberObject.h: + * wtf/Platform.h: + +2010-10-19 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Geoffrey Garen. + + BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors + https://bugs.webkit.org/show_bug.cgi?id=47920 + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization. + +2010-10-19 Kwang Yul Seo <skyul@company100.net> + + Reviewed by David Kilzer. + + RVCT fails to compile DateMath.cpp due to overloaded function pow + https://bugs.webkit.org/show_bug.cgi?id=47844 + + Choose std::pow(double, double) among multiple overloaded pow functions + to fix build for RVCT. + + * wtf/DateMath.cpp: + (WTF::parseES5DateFromNullTerminatedCharacters): + +2010-10-19 Patrick Gansterer <paroga@webkit.org> + + Reviewed by David Kilzer. + + Use UChar instead of wchar_t in UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47904 + + Make UnicodeWinCE more portable, so we can use it for other ports too. + + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + * wtf/unicode/wince/UnicodeWinCE.h: + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isHighSurrogate): + (WTF::Unicode::isLowSurrogate): + (WTF::Unicode::umemcasecmp): + (WTF::Unicode::surrogateToUcs4): + +2010-10-19 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + Fix style of UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47818 + + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + * wtf/unicode/wince/UnicodeWinCE.h: + +2010-10-18 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + * GNUmakefile.am: add missing file. + +2010-10-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Strict mode: Functions created with the function constructor don't implement strict mode semantics + https://bugs.webkit.org/show_bug.cgi?id=47860 + + When creating the FunctionExecutable for a new function the function constructor + was always passing false for whether or not a function was strict, rather than + using the information from the freshly parsed function itself. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::fromGlobalCode): + +2010-10-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + Strict mode: |this| should be undefined if it is not explicitly provided + https://bugs.webkit.org/show_bug.cgi?id=47833 + + To make strict mode behave correctly we want to pass undefined instead of null + as the default this value. This has no impact on behaviour outside of strict + mode as both values are replaced with the global object if necessary. + + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + + +2010-10-18 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + Make a nullptr that works with OwnPtr and RefPtr + https://bugs.webkit.org/show_bug.cgi?id=47756 + + * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h. + + * wtf/NullPtr.h: Added. + + * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr. + * wtf/OwnPtr.h: Ditto. + * wtf/PassOwnArrayPtr.h: Ditto. + * wtf/PassOwnPtr.h: Ditto. + * wtf/PassRefPtr.h: Ditto. + * wtf/RefPtr.h: Ditto. + * wtf/RetainPtr.h: Ditto. + +2010-10-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Strict mode: JIT doesn't check for |this| being an immediate before dereferencing + https://bugs.webkit.org/show_bug.cgi?id=47826 + + There's no guarantee that |this| will be a cell in a strict mode function, so + don't claim that it is. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isKnownNotImmediate): + +2010-10-18 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Oliver Hunt. + + if (0) throw "x" ; else { } throws parse error after r69906 + https://bugs.webkit.org/show_bug.cgi?id=47807 + + r69906 introduced a bug: the semicolon is not parsed after a throw + expression anymore. Thus, the semicolon terminates the "if" parsing + in the example above, and the else token results a parse error. + + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): + +2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Andreas Kling. + + Remove some unnecessary lines of code from Parser.cpp + https://bugs.webkit.org/show_bug.cgi?id=47816 + + * parser/Parser.cpp: + +2010-10-18 Xan Lopez <xlopez@igalia.com> + + Reviewed by Csaba Osztrogonác. + + Build broken with JIT disabled + https://bugs.webkit.org/show_bug.cgi?id=47801 + + This is a regression caused by r69940. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + +2010-10-18 Zoltan Horvath <zoltan@webkit.org> + + Reviewed by Darin Adler. + + Change FastAllocBase implementation into a macro + https://bugs.webkit.org/show_bug.cgi?id=42998 + + It was investigated in bug #33896 that inheriting classes from FastAllocBase + can result in objects getting larger which leads to memory regressions. + Using a macro instead of inheriting classes from FastAllocBase would solve the issue. + + * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro + +2010-10-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions + https://bugs.webkit.org/show_bug.cgi?id=47791 + + Simple fix, check for arguments in addition to eval. + + * parser/JSParser.cpp: + (JSC::JSParser::parseUnaryExpression): + +2010-10-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure + https://bugs.webkit.org/show_bug.cgi?id=47788 + + Fixing this required a couple of changes: + * resolve_base now has a flag to indicate whether it is being used for a put in strict mode. + this allows us to throw an exception when we're doing a completely generic resolve for + assignment, and that assignment would create a new global. + * There is a new opcode 'op_ensure_property_exists' that is used to determine whether + the property being assigned to already exists on the global object. This currently + has no caching, but such caching could be added relatively trivially. It is only used + in the case where we know that a property will be placed on the global object, and + we cannot verify that the property already exists. + + In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather + than making op_resolve_base have an additional runtime branch. + + There's also a new helper function to create the exception for the invalid assignment. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::AssignResolveNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/JSParser.cpp: + (JSC::JSParser::parseProgram): + * runtime/ExceptionHelpers.cpp: + (JSC::createErrorForInvalidGlobalAssignment): + * runtime/ExceptionHelpers.h: + * runtime/Operations.h: + (JSC::resolveBase): + +2010-10-17 Simon Fraser <simon.fraser@apple.com> + + First part of fix for Windows build failure. Will wait for the + next set of link errors to determine the mangled forms for dtoaRoundSF + and dtoaRoundDP. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-17 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Nikolas Zimmermann. + + Very large and small numbers fail to round-trip through CSS + https://bugs.webkit.org/show_bug.cgi?id=20674 + + New exports required to use DecimalNumber in WebCore. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-10-16 Kyusun Kim <maniagoon@company100.net> + + Reviewed by Alexey Proskuryakov. + + Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters() + https://bugs.webkit.org/show_bug.cgi?id=47758 + + * wtf/CurrentTime.h: + * wtf/DateMath.h: + +2010-10-16 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Rename StringHasherFunctions.h to StringHasher.h + https://bugs.webkit.org/show_bug.cgi?id=47200 + + Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/StringHashFunctions.h: Removed. + * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h. + * wtf/text/StringHash.h: + * wtf/text/StringImpl.h: + +2010-10-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline + https://bugs.webkit.org/show_bug.cgi?id=47762 + + The old YACC parser depended on the lexer for some classes of semicolon insertion. + The new parser handles ASI entirely on its own so when the lexer inserts a semicolon + on its own the net result is a spurious semicolon in the input stream. This can result + in incorrect parsing in some cases: + + if (0) + break + ;else {} + + Would result in a parse failure as the output from the lexer is essentially + + if (0) + break + ;;else + + So the second semicolon is interpreted as a empty statement, which terminates the if, + making the else an error. + + + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): + Parsing of throw statement was wrong, and only worked due to the weird behaviour + in the lexer + * parser/Lexer.cpp: + (JSC::Lexer::lex): + Remove bogus semicolon insertion from the newline handling + +2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Replace some String::format() usages by StringConcatenate in WebKit + https://bugs.webkit.org/show_bug.cgi?id=47714 + + * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString(). + +2010-10-15 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed build fix for Debug Leopard which is failng to compile after r69842. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + The parenthetical assertion checking isn't working in some cases with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46893 + + Calculate the countToCheck value of a TypeParentheticalAssertion by + subtracting the number of characters which follows + a TypeParentheticalAssertion term with the number of characters which should + be matched by terms which are contained + in the TypeParentheticalAssertion term (minimumSize). + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2010-10-14 Nathan Vander Wilt <nate@andyet.net> + + Reviewed by Darin Adler. + + Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632 + + * runtime/DateConversion.cpp: + (JSC::parseDate): + * wtf/DateMath.cpp: + (WTF::ymdhmsToSeconds): + (WTF::parseES5DateFromNullTerminatedCharacters): + * wtf/DateMath.h: + +2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Gavin Barraclough. + + Replace lots of String::format() usages by StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47664 + + Add StringTypeAdapter<char> to accept single characters for makeString(). + + * wtf/text/StringConcatenate.h: + (WTF::makeString): + +2010-10-14 David Goodwin <david_goodwin@apple.com> + + Reviewed by Darin Adler. + + need way to measure size of JITed ARM code + https://bugs.webkit.org/show_bug.cgi?id=47121 + + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + (JSC::LinkBuffer::dumpLinkStats): + (JSC::LinkBuffer::dumpCode): + +2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + The backreference checking isn't working in some cases with YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46904 + + The Interpreter::matchBackReference() function returns true without matching + when a backreference points to the same parentheses where it is. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchBackReference): + +2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Text breaking is slow: enable ICU as an opt-in + https://bugs.webkit.org/show_bug.cgi?id=40332 + + Added a config flag that enables ICU as an opt-in instead of the Qt specific code. + Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h + + * JavaScriptCore.pri: + * wtf/unicode/qt4/UnicodeQt4.h: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isPunct): + (WTF::Unicode::isLower): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::combiningClass): + (WTF::Unicode::direction): + (WTF::Unicode::category): + +2010-10-14 Anton Faern <anton@bladehawke.com> + + Reviewed by Csaba Osztrogonác. + + https://bugs.webkit.org/show_bug.cgi?id=47658 + NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO + change. This means that OS(NETBSD) is also undefined. + + * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD + +2010-10-13 David Goodwin <david_goodwin@apple.com> + + Reviewed by Oliver Hunt. + + ARMv7 JIT should generated conditional branches when possible + https://bugs.webkit.org/show_bug.cgi?id=47384 + + Use different jump padding sizes for conditional and unconditional + jumps (12 bytes and 10 bytes respectively). This allows the JIT to + include the IT instruction as part of the conditional jump sequence + which in turn allows it to optimize away the IT using an ARMv7 + conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for + conditional branches when displacement is in range. Also use IT/B(T4) + for conditional branch when displacement does not fit in B(T3). + + For unconditional jump, instruction selection options are: + B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection + options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX. + + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + (JSC::ARMv7Assembler::ifThenElse): + (JSC::ARMv7Assembler::jumpSizeDelta): + (JSC::ARMv7Assembler::canCompact): + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT1): + (JSC::ARMv7Assembler::canBeJumpT3): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkJumpT1): + (JSC::ARMv7Assembler::linkJumpT3): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkConditionalJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkConditionalBX): + (JSC::ARMv7Assembler::linkJumpAbsolute): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::canCompact): + (JSC::MacroAssemblerARMv7::computeJumpType): + (JSC::MacroAssemblerARMv7::jumpSizeDelta): + (JSC::MacroAssemblerARMv7::jump): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::ret): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + +2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Darin Adler. + + Don't depend on Windows on sched_yield and sched.h + https://bugs.webkit.org/show_bug.cgi?id=45543 + + sched.h is part of pthreads and sched_yield is implemented + in pthreads-win32 as Sleep(0). This patch avoids a gratuitous + dependency on pthreads-win32 in this file. + + * wtf/TCSpinLock.h: + (TCMalloc_SlowLock): + +2010-10-13 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Port unicode + https://bugs.webkit.org/show_bug.cgi?id=45716 + + Brew MP port uses only the subset of ICU library to reduce the binary size. + Follow the WinCE's implementation. + + * wtf/Platform.h: + * wtf/unicode/Unicode.h: + * wtf/unicode/brew/UnicodeBrew.cpp: Added. + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::direction): + (WTF::Unicode::category): + (WTF::Unicode::decompositionType): + (WTF::Unicode::combiningClass): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + * wtf/unicode/brew/UnicodeBrew.h: Added. + (WTF::Unicode::isArabicChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::hasLineBreakingPropertyComplexContext): + (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): + (WTF::Unicode::umemcasecmp): + +2010-10-13 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-13 Adam Barth <abarth@webkit.org> + + Reviewed by Maciej Stachowiak. + + [WTFURL] Add URLQueryCanonicalizer + https://bugs.webkit.org/show_bug.cgi?id=45088 + + This class canonicalizes the query component of URLs. The main tricky + bit there is the convertCharset function, which I've moved to a + templated dependency. There'll likely be more about that in future + patches. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLEscape.cpp: Added. + * wtf/url/src/URLEscape.h: Added. + (WTF::appendEscapedCharacter): + * wtf/url/src/URLQueryCanonicalizer.h: Added. + (WTF::URLQueryCanonicalizer::canonicalize): + (WTF::URLQueryCanonicalizer::isAllASCII): + (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString): + (WTF::URLQueryCanonicalizer::convertToQueryEncoding): + +2010-10-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 43987 - Downloading using XHR is much slower than before + Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector. + Fundamentally this should be the same (copies current contents to expand capacity, + rather than using a rope), but this approach allows the intermadiate state of the + String to be inspected in the buffer without copying to resolve. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::Holder::appendNextProperty): + Renamed StringBuilder::size() -> length() (to match other String types). + + * runtime/UStringBuilder.h: + (JSC::UStringBuilder::append): + (JSC::UStringBuilder::toUString): + Update for changes in parent class, can just 'using' the append methods. + + * wtf/text/StringBuilder.cpp: Added. + (WTF::StringBuilder::reifyString): + (WTF::StringBuilder::resize): + (WTF::StringBuilder::reserveCapacity): + (WTF::StringBuilder::allocateBuffer): + (WTF::StringBuilder::appendUninitialized): + (WTF::StringBuilder::append): + (WTF::StringBuilder::shrinkToFit): + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::StringBuilder): + (WTF::StringBuilder::append): + (WTF::StringBuilder::toString): + (WTF::StringBuilder::toStringPreserveCapacity): + (WTF::StringBuilder::length): + (WTF::StringBuilder::isEmpty): + (WTF::StringBuilder::operator[]): + (WTF::StringBuilder::clear): + Class updated to use overcapacity in a StringImpl, rather than a Vector. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/CMakeLists.txt: + * wtf/wtf.pri: + +2010-10-13 Adam Roben <aroben@apple.com> + + Export tryFastRealloc for WebKit2's benefit + + Rubber-stamped by Anders Carlsson. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added + tryFastRealloc. Removed RegExpObject::info, which is now exported via + JS_EXPORTDATA. + +2010-10-13 Adam Barth <abarth@webkit.org> + + Reviewed by Maciej Stachowiak. + + [WTFURL] Add a mechanism for classifying types of characters + https://bugs.webkit.org/show_bug.cgi?id=45085 + + Various characters have different escaping rules depending on where + they are in URLs. This patch adds a table containing that information. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLCharacterTypes.cpp: Added. + * wtf/url/src/URLCharacterTypes.h: Added. + (WTF::URLCharacterTypes::isQueryChar): + (WTF::URLCharacterTypes::isIPv4Char): + (WTF::URLCharacterTypes::isHexChar): + (WTF::URLCharacterTypes::isCharOfType): + +2010-10-13 Xan Lopez <xlopez@igalia.com> + + Reviewed by Csaba Osztrogonác. + + Missing parameters for bytecode dump of next_pname + https://bugs.webkit.org/show_bug.cgi?id=47590 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): add missing parameters to the dump. + +2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Add wtf/text/StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47584 + + Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too. + Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString. + Exactly the same design that has been followed while refactoring StringBuilder. + + The UString variants can all be removed as soon as WTF::String & JSC::UString converge. + + * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * bytecode/CodeBlock.cpp: s/makeString/makeUString/ + (JSC::escapeQuotes): + (JSC::valueToSourceString): + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpToSourceString): + (JSC::regexpName): + * bytecompiler/NodesCodegen.cpp: Ditto. + (JSC::substitute): + * profiler/Profiler.cpp: Ditto. + (JSC::Profiler::createCallIdentifier): + * runtime/ExceptionHelpers.cpp: Ditto. + (JSC::createUndefinedVariableError): + (JSC::createErrorMessage): + (JSC::createInvalidParamError): + * runtime/FunctionConstructor.cpp: Ditto. + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: Ditto. + (JSC::insertSemicolonIfNeeded): + * runtime/JSONObject.cpp: Ditto. + (JSC::Stringifier::indent): + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/RegExpConstructor.cpp: Ditto. + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: Ditto. + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: Ditto. + (JSC::regExpProtoFuncCompile): + * runtime/StringConcatenate.h: Removed. + * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h + (JSC::makeUString): + * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h. + (WTF::makeString): + +2010-10-12 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::length): + +2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Gavin Barraclough. + + Unify JSC::StringBuilder & WebCore::StringBuilder + https://bugs.webkit.org/show_bug.cgi?id=47538 + + Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String(). + Move the append(const JSC::UString&) method into runtime/UStringBuilder.h. + UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality. + + No new code, just move code around. + + * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * runtime/Executable.cpp: + (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString(). + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): Ditto. + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncUnescape): Ditto. + * runtime/JSONObject.cpp: + (JSC::Stringifier::stringify): Ditto. + (JSC::Stringifier::appendQuotedString): Ditto. + (JSC::Stringifier::appendStringifiedValue): Ditto. + (JSC::Stringifier::startNewLine): Ditto. + (JSC::Stringifier::Holder::appendNextProperty): Ditto. + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): Ditto. + * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include. + * runtime/StringBuilder.h: Removed. + * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods. + (JSC::UStringBuilder::append): append(const JSC::UString&) + (JSC::UStringBuilder::toUString): + * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h + (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere. + (WTF::StringBuilder::isEmpty): Ditto (+ constify method). + (WTF::StringBuilder::reserveCapacity): Ditto. + (WTF::StringBuilder::resize): Ditto. + (WTF::StringBuilder::size): Ditto. + (WTF::StringBuilder::operator[]): Ditto. + (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder. + +2010-10-12 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + Cleaned up the processing of replacements after regular expression + processing, especially the case where there wasn't a match. + Changed to use empty strings instead of computing a zero length sub + string. + https://bugs.webkit.org/show_bug.cgi?id=47506 + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncReplace): + +2010-10-11 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Clang build fix after r69472. + https://bugs.webkit.org/show_bug.cgi?id=46523 + + * wtf/text/StringHash.h: + +2010-10-11 Oliver Hunt <oliver@apple.com> + + Undo last minute change to 32bit build. + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_convert_this_strict): + +2010-10-11 Brian Weinstein <bweinstein@apple.com> + + Build fix for Windows. Add a necessary export from r69516. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-11 Oliver Hunt <oliver@apple.com> + + Fix interpreter build -- was broken by incorrect merge. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [ES5] Implement strict mode + https://bugs.webkit.org/show_bug.cgi?id=10701 + + Initial strict mode implementation. This is the simplest + implementation that could possibly work and adds (hopefully) + all of the restrictions required by strict mode. There are + a number of inefficiencies, especially in the handling of + arguments and eval as smart implementations would make this + patch more complicated. + + The SyntaxChecker AST builder has become somewhat more complex + as strict mode does require more parse tree information to + validate the syntax. + + Summary of major changes to the parser: + * We track when we enter strict mode (this may come as a surprise) + * Strict mode actually requires a degree of AST knowledge to validate + so the SyntaxChecker now produces values that can be used to distinguish + "node" types. + * We now track variables that are written to. We do this to + statically identify writes to global properties that don't exist + and abort at that point. This should actually make it possible + to optimise some other cases in the future but for now it's + purely for validity checking. Currently writes are only tracked + in strict mode code. + * Labels are now tracked as it is now a syntax error to jump to a label + that does not exist (or to use break, continue, or return in a context + where they would be invalid). + + Runtime changes: + * In order to get correct hanlding of the Arguments object all + strict mode functions that reference arguments create and tearoff + the arguments object on entry. This is not strictly necessary + but was the least work necessary to get the correct behaviour. + * PutPropertySlot now tracks whether it is being used for a strict + mode write, and if so Object::put will throw when a write can't be + completed. + * StrictEvalActivation was added as an "activation" object for strict + mode eval (so that strict eval does not introduce new variables into + the containing scope). + + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isStrictMode): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::createArgumentsIfNecessary): + (JSC::BytecodeGenerator::emitReturn): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::isStrictMode): + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::execute): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_convert_this_strict): + (JSC::JIT::emitSlow_op_convert_this_strict): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_pnames): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::isResolve): + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::startLoop): + (JSC::JSParser::endLoop): + (JSC::JSParser::startSwitch): + (JSC::JSParser::endSwitch): + (JSC::JSParser::setStrictMode): + (JSC::JSParser::strictMode): + (JSC::JSParser::isValidStrictMode): + (JSC::JSParser::declareParameter): + (JSC::JSParser::breakIsValid): + (JSC::JSParser::pushLabel): + (JSC::JSParser::popLabel): + (JSC::JSParser::hasLabel): + (JSC::JSParser::DepthManager::DepthManager): + (JSC::JSParser::DepthManager::~DepthManager): + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::startSwitch): + (JSC::JSParser::Scope::endSwitch): + (JSC::JSParser::Scope::startLoop): + (JSC::JSParser::Scope::endLoop): + (JSC::JSParser::Scope::inLoop): + (JSC::JSParser::Scope::breakIsValid): + (JSC::JSParser::Scope::pushLabel): + (JSC::JSParser::Scope::popLabel): + (JSC::JSParser::Scope::hasLabel): + (JSC::JSParser::Scope::isFunction): + (JSC::JSParser::Scope::declareVariable): + (JSC::JSParser::Scope::declareWrite): + (JSC::JSParser::Scope::deleteProperty): + (JSC::JSParser::Scope::declareParameter): + (JSC::JSParser::Scope::setNeedsFullActivation): + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::getUncapturedWrittenVariables): + (JSC::JSParser::Scope::getDeletedVariables): + (JSC::JSParser::Scope::setStrictMode): + (JSC::JSParser::Scope::strictMode): + (JSC::JSParser::Scope::isValidStrictMode): + (JSC::JSParser::pushScope): + (JSC::JSParser::popScope): + (JSC::JSParser::declareVariable): + (JSC::JSParser::declareWrite): + (JSC::JSParser::deleteProperty): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseSourceElements): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseBlockStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionBody): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseStrictObjectLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::isReparsing): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::isStrictMode): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::makeFunctionCallNode): + (JSC::SyntaxChecker::appendToComma): + (JSC::SyntaxChecker::createCommaExpr): + (JSC::SyntaxChecker::makeAssignNode): + (JSC::SyntaxChecker::makePrefixNode): + (JSC::SyntaxChecker::makePostfixNode): + (JSC::SyntaxChecker::makeTypeOfNode): + (JSC::SyntaxChecker::makeDeleteNode): + (JSC::SyntaxChecker::makeNegateNode): + (JSC::SyntaxChecker::makeBitwiseNotNode): + (JSC::SyntaxChecker::createLogicalNot): + (JSC::SyntaxChecker::createUnaryPlus): + (JSC::SyntaxChecker::createVoid): + (JSC::SyntaxChecker::thisExpr): + (JSC::SyntaxChecker::createResolve): + (JSC::SyntaxChecker::createObjectLiteral): + (JSC::SyntaxChecker::createArray): + (JSC::SyntaxChecker::createNumberExpr): + (JSC::SyntaxChecker::createString): + (JSC::SyntaxChecker::createBoolean): + (JSC::SyntaxChecker::createNull): + (JSC::SyntaxChecker::createBracketAccess): + (JSC::SyntaxChecker::createDotAccess): + (JSC::SyntaxChecker::createRegex): + (JSC::SyntaxChecker::createNewExpr): + (JSC::SyntaxChecker::createConditionalExpr): + (JSC::SyntaxChecker::createAssignResolve): + (JSC::SyntaxChecker::createFunctionExpr): + (JSC::SyntaxChecker::createFunctionBody): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + * runtime/Arguments.cpp: + (JSC::Arguments::createStrictModeCallerIfNecessary): + (JSC::Arguments::createStrictModeCalleeIfNecessary): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + * runtime/CommonIdentifiers.cpp: + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + * runtime/Error.cpp: + (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction): + (JSC::StrictModeTypeErrorFunction::constructThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getConstructData): + (JSC::StrictModeTypeErrorFunction::callThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getCallData): + (JSC::createTypeErrorFunction): + * runtime/Error.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + (JSC::ProgramExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::isStrictMode): + (JSC::EvalExecutable::create): + (JSC::FunctionExecutable::create): + * runtime/JSActivation.cpp: + (JSC::JSActivation::toStrictThisObject): + * runtime/JSActivation.h: + * runtime/JSFunction.cpp: + (JSC::createDescriptorForThrowingProperty): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::getOwnPropertyDescriptor): + (JSC::JSFunction::put): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::internalFunctionStructure): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::toStrictThisObject): + (JSC::throwTypeError): + * runtime/JSObject.h: + (JSC::JSObject::isStrictModeFunction): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSValue::putDirect): + (JSC::JSValue::toStrictThisObject): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::toStrictThisObject): + * runtime/JSStaticScopeObject.h: + * runtime/JSValue.h: + * runtime/JSZombie.h: + (JSC::JSZombie::toStrictThisObject): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::PutPropertySlot): + (JSC::PutPropertySlot::isStrictMode): + * runtime/StrictEvalActivation.cpp: Added. + (JSC::StrictEvalActivation::StrictEvalActivation): + (JSC::StrictEvalActivation::deleteProperty): + (JSC::StrictEvalActivation::toThisObject): + (JSC::StrictEvalActivation::toStrictThisObject): + * runtime/StrictEvalActivation.h: Added. + +2010-10-10 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Windows build fix after r69472. + + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::hash): + +2010-10-10 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Use WTF::StringHasher in WTF::CaseFoldingHash + https://bugs.webkit.org/show_bug.cgi?id=46523 + + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::foldCase): + (WTF::CaseFoldingHash::hash): + +2010-10-09 Pratik Solanki <psolanki@apple.com> + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=47445 + Remove unused function WTFThreadData::initializeIdentifierTable() + + * wtf/WTFThreadData.h: + +2010-10-08 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + Added check to start of subexpression being positive before using + subexpression in replacement. + https://bugs.webkit.org/show_bug.cgi?id=47324 + + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + +2010-10-08 Chris Evans <cevans@google.com> + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=47393 + + Use unsigned consistently to check for max StringImpl length. + Add a few integer overflow checks. + Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request. + + * wtf/text/WTFString.cpp: + * wtf/text/StringImpl.h: + * wtf/text/StringImpl.cpp: + Better use of size_t vs. unsigned; check for integer overflows. + +2010-10-07 David Goodwin <david_goodwin@apple.com> + + Reviewed by Oliver Hunt. + + ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount + https://bugs.webkit.org/show_bug.cgi?id=47356 + + * assembler/ARMv7Assembler.h: + +2010-10-06 Chris Evans <cevans@google.com> + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=47248 + + Use size_t consistently in CString, to prevent theoretical trouble + with > 4GB strings on 64-bit platforms. + + * wtf/text/CString.h: + * wtf/text/CString.cpp: + Use size_t for string lengths. + * wtf/MD5.cpp: + (WTF::expectMD5): use suitable format string + cast for size_t. + * JavaScriptCore.exp: + Update symbol name. + +2010-10-06 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Start cleaning up Arguments.h + https://bugs.webkit.org/show_bug.cgi?id=47304 + + * wtf/TypeTraits.h: + * wtf/TypeTraits.cpp: + Add RemoveReference type trait. + +2010-10-06 Rafael Antognolli <antognolli@profusion.mobi> + + Unreviewed build fix. + + [EFL] Build fix for glib support. + https://bugs.webkit.org/show_bug.cgi?id=47221 + + If compiling with GLib support enabled, we also need to link wtf against + glib library. + + * wtf/CMakeListsEfl.txt: + +2010-10-05 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Gavin Barraclough. + + [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT + https://bugs.webkit.org/show_bug.cgi?id=47117 + + Use IMemCache1 to flush data cache and invalidate instruction cache. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2010-10-05 Leandro Pereira <leandro@profusion.mobi> + + Unreviewed. Build fix. + + Moved "jsc" directory to "shell", so that the name does not clash with the + JavaScriptCore shell in some build systems. + http://webkit.org/b/47049 + + * CMakeLists.txt: Changed reference from "jsc" to "shell". + * jsc: Removed. + * jsc/CMakeLists.txt: Removed. + * jsc/CMakeListsEfl.txt: Removed. + * shell: Copied from JavaScriptCore/jsc. + +2010-10-05 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Use PlatformRefPtr in randomNumber + https://bugs.webkit.org/show_bug.cgi?id=46989 + + Use PlatformRefPtr to free memory automatically. + + * wtf/RandomNumber.cpp: + (WTF::randomNumber): + +2010-10-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64) + https://bugs.webkit.org/show_bug.cgi?id=46690 + + Use the correct register value when initialising the arguments + object in the interpreter. This is covered by existing tests. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-04 David Goodwin <david_goodwin@apple.com> + + Reviewed by Oliver Hunt. + + ARMv7 JIT should take advantage of 2-byte branches to reduce code size + https://bugs.webkit.org/show_bug.cgi?id=47007 + + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT2): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkJumpT2): + (JSC::ARMv7Assembler::linkJumpAbsolute): + +2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com> + + Reviewed by Antonio Gomes. + + [EFL] Use fast malloc for WebKit EFL + https://bugs.webkit.org/show_bug.cgi?id=46691 + + Use fast malloc for WebKit EFL because the fast malloc is to allocate + memory quickly. + + * wtf/CMakeListsEfl.txt: + +2010-10-04 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Lazily create activation objects + https://bugs.webkit.org/show_bug.cgi?id=47107 + + Make it possible to lazily create the activation object + for a function that needs one. This allows us to reduce + the overhead of entering a function that may require + an activation in some cases, but not always. + + This does make exception handling a little more complex as + it's now necessary to verify that a callframes activation + has been created, and create it if not, in all of the + paths used in exception handling. + + We also need to add logic to check for the existence of + the activation in the scoped_var opcodes, as well as + op_ret, op_ret_object_or_this and op_tearoff_activation + so that we can avoid creating an activation unnecesarily + on function exit. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::createActivation): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::setActivationRegister): + (JSC::CodeBlock::activationRegister): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + (JSC::BytecodeGenerator::createActivationIfNecessary): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITCall32_64.cpp: + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::emit_op_create_activation): + (JSC::JIT::emit_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_create_activation): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-10-04 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig. + + Remove ENABLE_SANDBOX + https://bugs.webkit.org/show_bug.cgi?id=47032 + + * Configurations/FeatureDefines.xcconfig: + +2010-10-01 Pratik Solanki <psolanki@apple.com> + + Reviewed by Geoffrey Garen. + Specify ALWAYS_INLINE at function declaration not function definition + https://bugs.webkit.org/show_bug.cgi?id=46960 + + For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well. + + * bytecompiler/BytecodeGenerator.h: + * wtf/FastMalloc.cpp: + +2010-10-01 Kwang Yul Seo <skyul@company100.net> + + Unreviewed. + + [BREWMP] Change Collector BLOCK_SIZE to 64KB + https://bugs.webkit.org/show_bug.cgi?id=46436 + + Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices. + + * runtime/Collector.h: + +2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Stack overflow on symbian platform. + https://bugs.webkit.org/show_bug.cgi?id=40598 + + Move big allocation in arrayProtoFuncToString from stack to heap. + JSC::arrayProtoFuncToString function can be called recursivly and + 1K allocation on stack cahse stack overflow. + Can be useful for other platforms with limited stack size. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + +2010-09-30 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr. + https://bugs.webkit.org/show_bug.cgi?id=46373 + + A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef + to wrap the instance in PlatformRefPtr. + + * wtf/brew/ShellBrew.h: + (WTF::createRefPtrInstance): + +2010-09-30 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Port PlatformRefPtr + https://bugs.webkit.org/show_bug.cgi?id=46370 + + Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP. + + * wtf/brew/RefPtrBrew.h: Added. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + +2010-09-29 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Add additional checks to StringBuffer. + <rdar://problem/7756381> + + * wtf/text/StringBuffer.h: + (WTF::StringBuffer::StringBuffer): + (WTF::StringBuffer::resize): + +2010-09-30 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + Make 2D accelerated canvas rendering build on Mac + https://bugs.webkit.org/show_bug.cgi?id=46007 + + Added ACCELERATED_2D_CANVAS to FeatureDefines + + * Configurations/FeatureDefines.xcconfig: + +2010-09-30 Kevin Ollivier <kevino@theolliviers.com> + + [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from + the copy so as not to alter global settings. + + * wscript: + +2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + The case-insensitivity backreference checking isn't working with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46882 + + Add ignorecase checking to the Interpreter::tryConsumeBackReference() function. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::tryConsumeBackReference): + +2010-09-30 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Andreas Kling. + + [BREWMP] Leave initializeRandomNumberGenerator empty. + https://bugs.webkit.org/show_bug.cgi?id=46851 + + On Brew MP, AEECLSID_RANDOM initializes itself. + + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + +2010-09-30 Gabor Loki <loki@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Remove unnecessary cacheFlush calls from Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=46702 + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): + +2010-09-29 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Next try to fix cygwin build. + + * wtf/Assertions.cpp: + +2010-09-29 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN). + + * wtf/Assertions.cpp: + +2010-09-29 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Build fix for cygwin. + + * wtf/Assertions.cpp: + +2010-09-29 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Andreas Kling. + + [WINCE] Buildfix for Assertions.cpp after r68511. + https://bugs.webkit.org/show_bug.cgi?id=46807 + + Some, but not all WinCE environments have support for IsDebuggerPresent(). + Add HAVE(ISDEBUGGERPRESENT) to make this a build option. + HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default. + + * wtf/Assertions.cpp: + * wtf/Platform.h: + +2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Csaba Osztrogonác. + + JSC compile fails on 32bit platform when Regexp Tracing is enabled + https://bugs.webkit.org/show_bug.cgi?id=46713 + + Fix the cast of pointer in regexp tracing to avoid the warning. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + +2010-09-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Begin hooking up painting in the plug-in process + https://bugs.webkit.org/show_bug.cgi?id=46766 + + * JavaScriptCore.exp: + Add tryFastRealloc, used by WebKit2. + +2010-09-28 Philippe Normand <pnormand@igalia.com> + + Reviewed by Martin Robinson. + + Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT) + https://bugs.webkit.org/show_bug.cgi?id=46721 + + Enable GOwnPtr/GRefPtr build only if glib support has been + explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro. + + * wtf/gobject/GOwnPtr.cpp: + * wtf/gobject/GOwnPtr.h: + * wtf/gobject/GRefPtr.cpp: + * wtf/gobject/GRefPtr.h: + +2010-09-28 İsmail Dönmez <ismail@namtrac.org> + + Reviewed by Andreas Kling. + + Test for WINCE instead of WINCEBASIC, compiler always defines WINCE. + Remove reference to unexisting path JavaScriptCore/os-wince. + + * JavaScriptCore.pri: + * wtf/Assertions.cpp: + +2010-09-27 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Changed the initialization of JSArray objects to have space for + 3 elements for the constructor that takes a ArgList argument. + This improves v8-deltablue performance by about 2.8% by reducing + the number of realloc() calls. + https://bugs.webkit.org/show_bug.cgi?id=46664 + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + +2010-09-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + Bug 46680 - Inlining string concatenation can regress interpreter performance + <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter + Do not inline calls to string concatenation in the interpret loop. + + * interpreter/Interpreter.cpp: + (JSC::concatenateStrings): + (JSC::Interpreter::privateExecute): + +2010-09-27 Anders Carlsson <andersca@apple.com> + + Fix thinko. + + * runtime/JSCell.h: + +2010-09-27 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Try to fix Windows build. + + * runtime/JSCell.h: + (JSC::MSVCBugWorkaround::MSVCBugWorkaround): + (JSC::MSVCBugWorkaround::~MSVCBugWorkaround): + +2010-09-27 Erik Arvidsson <arv@chromium.org> + + Reviewed by Darin Adler. + + Add operator == for AtomicString and Vector<Uchar> + https://bugs.webkit.org/show_bug.cgi?id=46509 + + * JavaScriptCore.exp: + * wtf/text/AtomicString.cpp: + (WTF::operator==): + * wtf/text/AtomicString.h: + (WTF::operator==): + (WTF::operator!=): + +2010-09-27 Anders Carlsson <andersca@apple.com> + + Try to fix the Windows build. + + * wtf/Noncopyable.h: + +2010-09-26 Anders Carlsson <andersca@apple.com> + + Reviewed by Alexey Proskuryakov and Adam Barth. + + Add WTF_MAKE_NONCOPYABLE macro + https://bugs.webkit.org/show_bug.cgi?id=46589 + + Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The + reason for this is that the Itanium C++ ABI states that no empty classes of the same type + can be laid out at the same offset in the class. This can result in objects getting larger + which leads to memory regressions. (One example of this is the String class which grew by + sizeof(void*) when both its base class and its first member variable inherited indirectly + from FastAllocBase). + + * wtf/Noncopyable.h: + Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated. + + * runtime/JSCell.h: + * wtf/RefCounted.h: + Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE. + +2010-09-27 Philippe Normand <pnormand@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] use ENABLE(GLIB_SUPPORT) + https://bugs.webkit.org/show_bug.cgi?id=46630 + + * wtf/Platform.h: Include GTypedefs.h only if glib support + is explicitly enabled. + +2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com> + + Reviewed by Adam Barth. + + jsc: Document the strcat opcode. + https://bugs.webkit.org/show_bug.cgi?id=46571 + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com> + + Reviewed by Adam Barth. + + make-bytecode-docs.pl: Add a comment to the generated HTML + https://bugs.webkit.org/show_bug.cgi?id=46570 + + Generate an HTML Comment that this file was generated from + Interpreter.cpp with the make-bytecode-docs.pl script. + + * docs/make-bytecode-docs.pl: + +2010-09-27 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Remove WTF::stringHash functions + https://bugs.webkit.org/show_bug.cgi?id=46520 + + Since r68289 the stringHash functions are only wrappers around StringHasher::createHash. + So use StringHasher::createHash directly and remove stringHash. + + * wtf/StringHashFunctions.h: + * wtf/text/StringImpl.h: + (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly. + +2010-09-26 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + Add WTF::StringHasher::createBlobHash + https://bugs.webkit.org/show_bug.cgi?id=46514 + + Add this function for hashing FormElementKey and QualifiedNameComponents. + + * wtf/StringHashFunctions.h: + (WTF::StringHasher::createBlobHash): + +2010-09-26 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Adam Barth. + + REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue) + running websocket/tests/bad-sub-protocol-non-ascii.html + https://bugs.webkit.org/show_bug.cgi?id=46553 + + Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong. + Add an additional member variable to indicate if we have an pending character + instead of only using an invalid character for this purpose. + + * wtf/StringHashFunctions.h: + (WTF::StringHasher::StringHasher): + (WTF::StringHasher::addCharacters): + (WTF::StringHasher::addCharacter): + (WTF::StringHasher::hash): + +2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> + + Reviewed by Oliver Hunt. + + valueOf called in wrong order in atan2 and date constructors. + https://bugs.webkit.org/show_bug.cgi?id=26978 + + Fixed the bug where the arguments to atan2 were being evaluated + out of order. + + * runtime/MathObject.cpp: + (JSC::mathProtoFuncATan2): + +2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com> + + Reviewed by Oliver Hunt. + + valueOf called in wrong order in atan2 and date constructors. + https://bugs.webkit.org/show_bug.cgi?id=26978 + + Fixed the issue where the parameters to the Date constructor + were being evaluated to numbers more than once. + + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::dateUTC): + +2010-09-25 Oliver Hunt <oliver@apple.com> + + Fix various builds + + Relearning the lesson that last minute changes are bad. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetArgumentsLength): + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_get_argument_by_val): + +2010-09-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Cameron Zwarich. + + Avoid constructing arguments object when accessing length and index properties + https://bugs.webkit.org/show_bug.cgi?id=46572 + + Add opcodes to read argument length and properties, and then implement them. + Much like other lazy opcodes these opcodes take a fast path when the arguments + object has not been instantiated, and fall back on generic access mechanisms + if they are acting on an instantiated object. + + 3% win on v8-earleyboyer, no change elsewhere. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetArgumentsLength): + (JSC::BytecodeGenerator::emitGetArgumentByVal): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::BracketAccessorNode::emitBytecode): + (JSC::DotAccessorNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emitSlow_op_get_argument_by_val): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emitSlow_op_get_argument_by_val): + +2010-09-25 Patrick Gansterer <paroga@webkit.org> + + Unreviewed. + + Fix typo in StringHasher class + https://bugs.webkit.org/show_bug.cgi?id=45970 + + * wtf/StringHashFunctions.h: + (WTF::StringHasher::createHash): + +2010-09-24 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Gavin Barraclough. + + Add WTF::StringHasher + https://bugs.webkit.org/show_bug.cgi?id=45970 + + StringHasher is a class for calculation stringHash out of character string. + This class will unify the different usages of the same algorithm. + + * wtf/StringHashFunctions.h: + (WTF::StringHasher::StringHasher): + (WTF::StringHasher::addCharacters): + (WTF::StringHasher::addCharacter): + (WTF::StringHasher::hash): + (WTF::StringHasher::createHash): + (WTF::StringHasher::defaultCoverter): + (WTF::StringHasher::addCharactersToHash): + (WTF::stringHash): + +2010-09-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Variable declarations inside a catch scope don't get propogated to the parent scope + https://bugs.webkit.org/show_bug.cgi?id=46501 + + Add logic to make variable declaration look for a scope for the + new variable. This allows us to create a scope (eg. for catch) + and then seal it, so that additional variable declarations + contained are propogated to the correct target. Strangely this + comes out as a performance win, but I think it's mostly cache + effects. + + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::preventNewDecls): + (JSC::JSParser::Scope::allowsNewDecls): + (JSC::JSParser::declareVariable): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionDeclaration): + +2010-09-24 İsmail Dönmez <ismail@namtrac.org> + + Reviewed by Csaba Osztrogonác. + + Add a Windows compatible inttypes.h header to fix WinCE build. + https://bugs.webkit.org/show_bug.cgi?id=46463 + + * os-win32/inttypes.h: Added. + +2010-09-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit). + https://bugs.webkit.org/show_bug.cgi?id=46448 + + Roll this back in, with additional logic to prevent us from delaying construction + of functions named "arguments" + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitInitLazyRegister): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitLazyNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emit_op_new_func): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivationForMoreThanVariables): + +2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r68223. + http://trac.webkit.org/changeset/68223 + https://bugs.webkit.org/show_bug.cgi?id=46448 + + It broke 2-3 tests on bots (Requested by Ossy on #webkit). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_func): + (JSC::JIT::emit_op_init_arguments): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_new_func): + (JSC::JIT::emit_op_init_arguments): + * parser/Nodes.h: + +2010-09-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Delay construction of functions that aren't captured + https://bugs.webkit.org/show_bug.cgi?id=46433 + + If a function isn't captured by an activation there's no + way it can be accessed indirectly, so we can delay the + construction until it's used (similar to what we do with + arguments). We rename the existing op_init_arguments to + op_init_lazy_reg and removed its implicit handling of + the anonymous argument register, and make op_new_function + take a parameter to indicate whether it should null check + the target slot before creating the function object. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitInitLazyRegister): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::createLazyRegisterIfNecessary): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitLazyNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emit_op_new_func): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_init_lazy_reg): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivationForMoreThanVariables): + +2010-09-23 David Kilzer <ddkilzer@apple.com> + + <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2 + https://bugs.webkit.org/show_bug.cgi?id=46423 + + Reviewed by Oliver Hunt. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Disable the gcc computed + goto hacks added in r55564 when compiling with llvm-gcc-4.2. + +2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Darin Adler. + + Fix usage of enum as if it was a define + https://bugs.webkit.org/show_bug.cgi?id=46355 + + pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an + enum. Hence, it cannot be used by the preprocessor which always + evaluates that condition as true. This was giving a warning when + compiling with gcc and "-Wundef" flag. + + The second path, when PTHREAD_MUTEX_DEFAULT is not the same of + PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path + and get rid of that #if. + + * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to + set mutex type to PTHREAD_MUTEX_NORMAL. + (WTF::Mutex::Mutex): + +2010-09-23 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Removed extraneous truncation of ovector on entry and error exit. + Changed the initialization to -1 of vector to only initialize + the start indecies, which is sufficient for the pattern/subpatterns. + Changed the JIT code to not clear the end index for subpatterns + as it isn't needed. These changes are worth ~2.7% on v8-regexp. + https://bugs.webkit.org/show_bug.cgi?id=46404 + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + +2010-09-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Only copy captured variables into activation + https://bugs.webkit.org/show_bug.cgi?id=46330 + + We now track free variable information which means that + we no longer need to copy every variable defined in a + function. With this patch activations only retain those + variables needed for correctness. In order to interact + safely with the inspector this means that JSActivation + now provides its own lookup functions so it can avoid + trying to read or write to variables that have been + optimised out. + + * bytecode/CodeBlock.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * parser/Nodes.h: + (JSC::ScopeNode::capturedVariableCount): + (JSC::ScopeNode::captures): + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + (JSC::FunctionExecutable::capturedVariableCount): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + (JSC::JSActivation::symbolTableGet): + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::getOwnPropertyNames): + (JSC::JSActivation::symbolTablePutWithAttributes): + * runtime/JSActivation.h: + +2010-09-23 Ismail Donmez <ismail@namtrac.org> + + Reviewed by Andreas Kling. + + Fix jsc.exe build for Windows CE + + * jsc.pro: Add mmtimer.lib for Windows CE. + +2010-09-23 Ismail Donmez <ismail@namtrac.org> + + Unreviewed. + + JIT should be disabled on Windows CE. Broken in r64176. + + * wtf/Platform.h: + +2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Gavin Barraclough. + + Reduce the number of BOL checks in YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46260 + + Extend the YARR Interpreter with an optimization which reduces the number of + BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a + "TypeAssertionBOL" byteTerm it will be checked just one time. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::ByteCompiler::regexBegin): + (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/RegexInterpreter.h: + (JSC::Yarr::ByteTerm::BodyAlternativeBegin): + (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction): + (JSC::Yarr::ByteTerm::BodyAlternativeEnd): + (JSC::Yarr::ByteTerm::AlternativeBegin): + (JSC::Yarr::ByteTerm::AlternativeDisjunction): + (JSC::Yarr::ByteTerm::AlternativeEnd): + +2010-09-22 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Fixed the cross over from alternatives executed once and + those that loop. This fixed the problem where the index + was getting messed up for looping alternatives causing an + infinite loop. + https://bugs.webkit.org/show_bug.cgi?id=46189 + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + +2010-09-22 Steve Falkenburg <sfalken@apple.com> + + Rubber stamped by Jon Honeycutt. + + Allow jsc.exe to be run against unversioned ICU. + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + +2010-09-22 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Laszlo Gombos. + + Use "typedef wchar_t JSChar" when compiled with RVCT + https://bugs.webkit.org/show_bug.cgi?id=40651 + + Use wchar_t for JSChar and UChar when compiled with RVCT. + Linux is the exception for this rule. + + * API/JSStringRef.h: + * wtf/unicode/qt4/UnicodeQt4.h: + +2010-09-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown + https://bugs.webkit.org/show_bug.cgi?id=44245 + + Remove incorrect code from op_load_varargs in the interpreter. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-09-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails + https://bugs.webkit.org/show_bug.cgi?id=44246 + + JIT code generated for instanceof was not checking to ensure that the prototype property was + an object, this patch ensures that it does. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_instanceof): + +2010-09-22 Patrick Gansterer <paroga@webkit.org> + + Reviewed by Darin Adler. + + Inline UTF8SequenceLength + https://bugs.webkit.org/show_bug.cgi?id=45589 + + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance. + +2010-09-21 Oliver Hunt <oliver@apple.com> + + RS=Gavin Barraclough. + + Fix codeblock dumping + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + +2010-09-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Speed up function.apply(..., arguments) + https://bugs.webkit.org/show_bug.cgi?id=46207 + + Add code to do argument copying inline in the case + where we're using Function.apply to forward our arguments + directly. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + Splitted op_load_varargs into fast and slow paths, so add the call + to the slow path generator. + * jit/JIT.h: + * jit/JITCall32_64.cpp: + Remove 32bit specific emit_op_load_varargs as the logic is the + same for all value representations + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_load_varargs): + Copy arguments inline + (JSC::JIT::emitSlow_op_load_varargs): + +2010-09-21 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in + interpreter due to 54724 and 54596 + + Fixed a typo (using "UNLIKELY" instead of "LIKELY"). + + * wtf/PassRefPtr.h: + (WTF::refIfNotNull): + (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs + hold real data. Also, in cases where they do not hold real data, the + compiler usually sees a call to release() right before the call to the + destructor, so it can probably optimize out the test completely. + +2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Martin Robinson. + + Build issues with Windows versions of the GTK+ port + https://bugs.webkit.org/show_bug.cgi?id=45844 + + Link with winmm.dll when necessary and specify the executable extension + explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@ + rule actually works. + + Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses + a section in ThreadSpecific.cpp + + * GNUmakefile.am: + +2010-09-21 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] 'make dist' should be fixed in preparation for the next release + https://bugs.webkit.org/show_bug.cgi?id=46129 + + * GNUmakefile.am: Update the sources list to include missing headers. + +2010-09-21 Dave Tapuska <dtapuska@rim.com> + + Reviewed by Csaba Osztrogonác. + + https://bugs.webkit.org/show_bug.cgi?id=45673 + + r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be + 8 byte aligned. A non 8 byte divisible value for this will + cause the sp to become non 8 byte aligned. + + Verify and correct offset values that r65596 effected that + weren't updated. + + * jit/JITStubs.cpp: + * jit/JITStubs.h: + +2010-09-21 Xan Lopez <xlopez@igalia.com> + + Reviewed by Martin Robinson. + + Fix Opcode stats compilation + https://bugs.webkit.org/show_bug.cgi?id=46079 + + The FixedArray API had changed, and <stdio.h> was not included for + printf. + + * bytecode/Opcode.cpp: + (JSC::OpcodeStats::~OpcodeStats): + +2010-09-20 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Fixed detection of alternative smaller than the first alternative + to only check looping alternatives. + https://bugs.webkit.org/show_bug.cgi?id=46049 + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + +2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + REGRESSION(67790): jsc tests are failed with YARR interpreter + https://bugs.webkit.org/show_bug.cgi?id=46083 + + Fix the initializing of the lastSubpatternId member of + parentheses. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): + +2010-09-20 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 46077 - ASSERT failure in YARR JIT + + We will currently attempt to loop if there are multiple alternatives, they are all + BOL predicated, and the last alternative is longer then the first - however if all + alternatives are BOL predicated the head of loop label will not have been set, and + we'll try to link a jump to an undefined label. Stop doing so. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + +2010-09-20 Adam Roben <aroben@apple.com> + + Export RegExpObject::info from JavaScriptCore + + This allows obj->inherits(&RegExpObject::info) to work correctly from + outside JavaScriptCore.dll on Windows. + + Fixes <http://webkit.org/b/46098> + fast/loader/stateobjects/pushstate-object-types.html fails on Windows + + Reviewed by John Sullivan. + + * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as + we already have for some other classes whose info members have to be + used from outside the DLL. + +2010-09-19 Gavin Barraclough <barraclough@apple.com> + + Windows build fix pt 2. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-09-19 Gavin Barraclough <barraclough@apple.com> + + Windows build fix pt 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-09-19 Gavin Barraclough <barraclough@apple.com> + + Build fix - implicit double-to-int conversion invalid on 32-bit. + + * runtime/DatePrototype.cpp: + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncSetYear): + +2010-09-19 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod. + + These methods implement the same conversion (see discussion in the notes + of sections of 9.5 and 9.6 of the spec), only differing in how the result + is interpretted. + + Date prototype is incorrectly using toInt32, and this is causing us to + provide an output value indicating whether the input to ToInt32 was finite + (the corresponding methods on Date are actually spec'ed to use ToInteger, + not ToInt32). This patch partially fixes this in order to remove this + bogus output value, hoewever more work will be require to bring Date + fully up to spec compliance (the constructor is still performing ToInt32 + conversions). + + * JavaScriptCore.exp: + * runtime/DatePrototype.cpp: + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/JSValue.cpp: + (JSC::toInt32): + * runtime/JSValue.h: + (JSC::toUInt32): + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): + +2010-09-18 Darin Adler <darin@apple.com> + + First step in fixing Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Removed incorrect symbol. The build will probably still fail, + but the failure will tell us what symbol to add. + +2010-09-18 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Added code to unroll regular expressions containing ^. + Alternatives that begin with ^ are tagged during parsing + and rolled up in containing sub expression structs. + After parsing, a regular expression flagged as containing + a ^ (a.k.a. BOL) is processed further in optimizeBOL(). + A copy of the disjunction is made excluding alternatives that + are rooted with BOL. The original alternatives are flagged + to only be executed once. The copy of the other alternatives are + added to the original expression. + In the case that all original alternatives are flagged, there + won't be any looping alternatives. + The JIT generator will emit code accordingly, executing the + original alternatives once and then looping over the + alternatives that aren't anchored with a BOL (if any). + https://bugs.webkit.org/show_bug.cgi?id=45787 + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::assertionBOL): + (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd): + (JSC::Yarr::RegexPatternConstructor::copyDisjunction): + (JSC::Yarr::RegexPatternConstructor::copyTerm): + (JSC::Yarr::RegexPatternConstructor::optimizeBOL): + (JSC::Yarr::compileRegex): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + * yarr/RegexPattern.h: + (JSC::Yarr::PatternAlternative::PatternAlternative): + (JSC::Yarr::PatternAlternative::setOnceThrough): + (JSC::Yarr::PatternAlternative::onceThrough): + (JSC::Yarr::PatternDisjunction::PatternDisjunction): + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-09-18 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Rename Wince files to WinCE + https://bugs.webkit.org/show_bug.cgi?id=37287 + + * wtf/unicode/Unicode.h: + * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp. + * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h. + * wtf/unicode/wince/UnicodeWince.cpp: Removed. + * wtf/unicode/wince/UnicodeWince.h: Removed. + * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h. + * wtf/wince/FastMallocWince.h: Removed. + +2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + Enable Platform Strategies on Qt + + [Qt] Turn on PLATFORM_STRATEGIES + https://bugs.webkit.org/show_bug.cgi?id=45831 + + * wtf/Platform.h: Enable Platform Strategies when building QtWebkit + +2010-09-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Imprecise tracking of variable capture leads to overly pessimistic creation of activations + https://bugs.webkit.org/show_bug.cgi?id=46020 + + The old logic for track free and captured variables would cause us + to decide we needed an activation in every function along the scope + chain between a variable capture and its declaration. We now track + captured variables precisely which requires a bit of additional work + + The most substantial change is that the parsing routine needs to + be passed the list of function parameters when reparsing a function + as when reparsing we don't parse the function declaration itself only + its body. + + * JavaScriptCore.exp: + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::needsFullActivation): + We need to distinguish between use of a feature that requires + an activation and eval so we now get this additional flag. + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::getCapturedVariables): + We can't simply return the list of "capturedVariables" now as + is insufficiently precise, so we compute them instead. + (JSC::JSParser::popScope): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseMemberExpression): + * parser/JSParser.h: + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + Pass function parameters (if available) to the parser. + +2010-09-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add IsFloatingPoint and IsArithmetic type traits + https://bugs.webkit.org/show_bug.cgi?id=46018 + + * wtf/TypeTraits.h: + * wtf/TypeTraits.cpp: + +2010-09-17 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Oliver Hunt. + + [GTK] FontPlatformDataFreeType should use smart pointers to hold its members + https://bugs.webkit.org/show_bug.cgi?id=45917 + + Added support to PlatformRefPtr for handling HashTableDeletedValue. + + * wtf/PlatformRefPtr.h: + (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue. + (WTF::PlatformRefPtr::isHashTableDeletedValue): Added. + +2010-09-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Crash due to timer triggered GC on one heap while another heap is active + https://bugs.webkit.org/show_bug.cgi?id=45932 + <rdar://problem/8318446> + + The GC timer may trigger for one heap while another heap is active. This + is safe, but requires us to ensure that we have temporarily associated the + thread's identifierTable with the heap we're collecting on. Otherwise we + may end up with the identifier tables in an inconsistent state leading to + an eventual crash. + + * runtime/Collector.cpp: + (JSC::Heap::allocate): + (JSC::Heap::reset): + (JSC::Heap::collectAllGarbage): + Add assertions to ensure we have the correct identifierTable active + while collecting. + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallbackPlatformData::trigger): + Temporarily make the expected IdentifierTable active + * wtf/WTFThreadData.h: + (JSC::IdentifierTable::remove): + Make it possible to see when IdentifierTable::remove has succeeded + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::~StringImpl): + CRASH if an StringImpl is an Identifier but isn't present in the + active IdentifierTable. If we get to this state something has + gone wrong and we should just crash immediately. + +2010-09-16 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Implement dissolveDragImageToFraction + https://bugs.webkit.org/show_bug.cgi?id=45826 + + * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose. + +2010-09-16 Eric Uhrhane <ericu@chromium.org> + + Reviewed by Jian Li. + + Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM. + https://bugs.webkit.org/show_bug.cgi?id=45798 + + * Configurations/FeatureDefines.xcconfig: + +2010-09-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Use free variable analysis to improve activation performance + https://bugs.webkit.org/show_bug.cgi?id=45837 + + Adds free and captured variable tracking to the JS parser. This + allows us to avoid construction of an activation object in some + cases. Future patches will make more use of this information to + improve those cases where activations are still needed. + + * parser/ASTBuilder.h: + * parser/JSParser.cpp: + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::declareVariable): + (JSC::JSParser::Scope::useVariable): + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::capturedVariables): + (JSC::JSParser::ScopeRef::ScopeRef): + (JSC::JSParser::ScopeRef::operator->): + (JSC::JSParser::ScopeRef::index): + (JSC::JSParser::currentScope): + (JSC::JSParser::pushScope): + (JSC::JSParser::popScope): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parsePrimaryExpression): + * parser/Nodes.cpp: + (JSC::ScopeNodeData::ScopeNodeData): + (JSC::ScopeNode::ScopeNode): + (JSC::ProgramNode::ProgramNode): + (JSC::ProgramNode::create): + (JSC::EvalNode::EvalNode): + (JSC::EvalNode::create): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::needsActivation): + (JSC::ScopeNode::hasCapturedVariables): + * parser/Parser.cpp: + (JSC::Parser::didFinishParsing): + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + * runtime/Executable.h: + (JSC::ScriptExecutable::needsActivation): + (JSC::ScriptExecutable::recordParse): + +2010-09-14 Hyung Song <beergun@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type. + https://bugs.webkit.org/show_bug.cgi?id=44764 + + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.cpp: + (WTF::deleteOwnedPtr): + +2010-09-14 Darin Adler <darin@apple.com> + + Reviewed by Geoffrey Garen. + + Sort with non-numeric custom sort function fails on array with length but no values + https://bugs.webkit.org/show_bug.cgi?id=45781 + + * runtime/JSArray.cpp: + (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead + exit for any array without values, even if it has a non-0 length. + +2010-09-14 Steve Falkenburg <sfalken@apple.com> + + Windows production build fix. + Roll out r65143. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-09-14 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Share UnicodeMacrosFromICU.h + https://bugs.webkit.org/show_bug.cgi?id=45710 + + glib, qt4 and wince use the same macros from ICU. + Remove the code duplication and use the same header file. + + * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h. + * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed. + * wtf/unicode/qt4/UnicodeQt4.h: + * wtf/unicode/wince/UnicodeWince.h: + +2010-09-13 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Preparation for eliminating deprecatedParseURL + https://bugs.webkit.org/show_bug.cgi?id=45695 + + * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from + the HTML tree builder. + +2010-09-13 Darin Fisher <darin@chromium.org> + + Reviewed by David Levin. + + Add option to conditionally compile smooth scrolling support. + https://bugs.webkit.org/show_bug.cgi?id=45689 + + ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms. + + * wtf/Platform.h: + +2010-09-13 Adam Roben <aroben@apple.com> + + Copy JavaScriptCore's generated sources to the right directory + + * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo. + +2010-09-13 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Don't call _msize + https://bugs.webkit.org/show_bug.cgi?id=45556 + + Because Brew MP uses its own memory allocator, it is not correct to use + _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard. + + * wtf/FastMalloc.cpp: + (WTF::fastMallocSize): + +2010-09-11 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] V8 port: webcore project files changes + https://bugs.webkit.org/show_bug.cgi?id=45141 + + * JavaScriptCore.pro: Moved wtf specific files to wtf.pri, + so that they can also be used from WebCore.pro for v8 builds. + * wtf/wtf.pri: Added. + +2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch> + + Reviewed by Andreas Kling. + + Add a define missing when building with glib unicode backend + https://bugs.webkit.org/show_bug.cgi?id=45544 + + * wtf/unicode/glib/UnicodeMacrosFromICU.h: + +2010-09-10 Stephanie Lewis <slewis@apple.com> + + Reviewed by Alexey Proskuryakov. + + Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know + about the JIT and other implementation details of JavaScriptCore. Necessary + to fix PPC build. + + https://bugs.webkit.org/show_bug.cgi?id=45528 + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/MemoryStatistics.cpp: Added. + (JSC::memoryStatistics): + * runtime/MemoryStatistics.h: Added. + +2010-09-09 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Added a regular expression tracing facility. This tracing is connected + to jsc. Every compiled regular expression object is added to a list. + When the process exits, each regular expression dumps its pattern, + JIT address, number of times it was executed and the number of matches. + This tracing is controlled by the macro ENABLE_REGEXP_TRACING in + wtf/Platform.h. + https://bugs.webkit.org/show_bug.cgi?id=45401 + + * JavaScriptCore.exp: + * jsc.cpp: + (runWithScripts): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + (JSC::JSGlobalData::addRegExpToTrace): + (JSC::JSGlobalData::dumpRegExpTrace): + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + (JSC::RegExp::match): + * runtime/RegExp.h: + * wtf/Platform.h: + * yarr/RegexJIT.h: + (JSC::Yarr::RegexCodeBlock::getAddr): + +2010-09-09 John Therrell <jtherrell@apple.com> + + 32-bit build fix. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::committedByteCount): + +2010-09-09 John Therrell <jtherrell@apple.com> + + Reviewed by Alexey Proskuryakov. + + Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes + https://bugs.webkit.org/show_bug.cgi?id=45134 + + Added thread-safe committed byte counting and reporting functionality to RegisterFile and + ExecutableAllocator. + + * JavaScriptCore.exp: + Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes. + + * interpreter/RegisterFile.cpp: + (JSC::registerFileStatisticsMutex): + Added function which returns a static Mutex used for locking during read/write access to + static committed byte count variable. + (JSC::RegisterFile::~RegisterFile): + Added call to addToStatistics since memory is decommitted here. + (JSC::RegisterFile::releaseExcessCapacity): + Added call to addToStatistics since memory is decommitted here. + (JSC::RegisterFile::initializeThreading): + Added function which calls registerFileStatisticsMutex(). + (JSC::RegisterFile::committedByteCount): + Added function which returns the current committed byte count for RegisterFile. + (JSC::RegisterFile::addToCommittedByteCount): + Added function which updates committed byte count. + + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + Added call to addToStatistics since memory is committed here. + (JSC::RegisterFile::grow): + Added call to addToStatistics since memory is committed here. + + * jit/ExecutableAllocator.h: + Added function prototype for public static function committedByteCount(). + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + Added call to addToStatistics since memory is decommitted here. + (JSC::FixedVMPoolAllocator::reuse): + Added call to addToStatistics since memory is committed here. + (JSC::FixedVMPoolAllocator::addToCommittedByteCount): + Added function which updates committed byte count. + (JSC::ExecutableAllocator::committedByteCount): + Added function which returns the current committed byte count for ExecutableAllocator. + + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + Added call to RegisterFile::initializeThreading. + +2010-09-09 Mark Rowe <mrowe@apple.com> + + Reviewed by Oliver Hunt. + + <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims + + * API/JSObjectRef.cpp: + (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion + failure. Instead map NULL directly to the null JSValue. + * API/tests/testapi.c: + (main): Add test coverage for the NULL value case. + +2010-09-09 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Gavin Barraclough. + + [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler + https://bugs.webkit.org/show_bug.cgi?id=29268 + + * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now. + +2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Removing doneSemicolon label in the lexer + https://bugs.webkit.org/show_bug.cgi?id=45289 + + As a side effect of moving the multiline comment parsing + to a separate function, an opportunity raised to simplify + the single line comment parsing, and removing doneSemicolon + label. Slight performance increase on --parse-only + tests (from 32.8ms to 31.5ms) + + * parser/Lexer.cpp: + (JSC::Lexer::lex): + +2010-09-08 Xan Lopez <xlopez@igalia.com> + + Reviewed by Alexey Proskuryakov. + + Remove accessor for private member variable in JSParser + https://bugs.webkit.org/show_bug.cgi?id=45378 + + m_token is private to JSParser, so it does not seem to be useful + to have an accessor for it. On top of that, the file was both + using the accessor and directly accessing the member variable, + only one style should be used. + +2010-09-08 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Oliver Hunt. + + [Qt] REGRESSION(63348): jsc is broken + https://bugs.webkit.org/show_bug.cgi?id=42818 + + Need fastcall conventions on Qt/Win/MinGW. + Based on patches of Gavin Barraclough: r63947 and r63948. + + * jit/JITStubs.cpp: + * jit/JITStubs.h: + +2010-09-08 Robert Hogan <robert@webkit.org> + + Reviewed by Antonio Gomes. + + Remove some unnecessary duplicate calls to string functions + + https://bugs.webkit.org/show_bug.cgi?id=45314 + + * wtf/text/WTFString.cpp: + (WTF::String::format): + +2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Andreas Kling. + + Re-Disable JIT for MSVC 64bit to fix the build on this compiler. + https://bugs.webkit.org/show_bug.cgi?id=45382 + + It was enabled in the cleanup made in r64176, though it is still + not implemented. + + * wtf/Platform.h: + +2010-09-08 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Need a WebSocket implementation + https://bugs.webkit.org/show_bug.cgi?id=45197 + + Add a GIO-based WebSocket implementation. + + * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + * wtf/gobject/GRefPtr.h: Added new template specialization declarations. + * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations. + +2010-08-30 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin Adler. + + Handle MediaQueryExp memory management exclusively with smart pointers + https://bugs.webkit.org/show_bug.cgi?id=44874 + + Implemented a non-copying sort function to make it possible to sort a Vector + of OwnPtrs (which cannot be copied). This is required for the above. + + * wtf/NonCopyingSort.h: Added. + (WTF::nonCopyingSort): It's secretly heapsort. + (WTF::heapSort): heapsort implementation. + (WTF::siftDown): Helper function for heapsort. + (WTF::heapify): ditto + + Adjust build systems. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-09-08 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Refactoring multiline comments in the lexer + https://bugs.webkit.org/show_bug.cgi?id=45289 + + MultiLine comment parsing is moved to a separate function. + + Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms) + SunSpider reports no change (from 523.1ms to 521.2ms). + + * parser/Lexer.cpp: + (JSC::Lexer::parseMultilineComment): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-09-07 James Robinson <jamesr@chromium.org> + + Compile fix attempt for windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-09-07 Mihai Parparita <mihaip@chromium.org> + + Reviewed by James Robinson. + + Fix Windows build after r66936 + https://bugs.webkit.org/show_bug.cgi?id=45348 + + Add symbol names that were missing from r66936. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-09-07 Mihai Parparita <mihaip@chromium.org> + + Reviewed by Oliver Hunt. + + pushState and replaceState do not clone RegExp objects correctly + https://bugs.webkit.org/show_bug.cgi?id=44718 + + Move internal representation of JSC::RegExp (which depends on wether + YARR and YARR_JIT is enabled) into RegExpRepresentation which can live + in the implementation only. This makes it feasible to use RegExp in + WebCore without bringing in all of YARR. + + * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are + needed inside WebCore's JSC bindings. + * runtime/RegExp.cpp: + (JSC::RegExpRepresentation::~RegExpRepresentation): + (JSC::RegExp::RegExp): + (JSC::RegExp::~RegExp): + (JSC::RegExp::compile): + (JSC::RegExp::match): + * runtime/RegExp.h: + +2010-09-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8381749> -Wcast-align warning emitted when building with clang + + Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc. + + * Configurations/Base.xcconfig: + +2010-09-07 Zoltan Horvath <zoltan@webkit.org> + + Reviewed by Darin Adler. + + REGRESSION(66741): Undefined pthread macros + https://bugs.webkit.org/show_bug.cgi?id=45246 + + PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, + but used in a statement. Add an additional check to test this. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + +2010-09-06 Oliver Hunt <oliver@apple.com> + + Windows build fix + +2010-09-05 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + SerializedScriptValue needs to use a flat storage mechanism + https://bugs.webkit.org/show_bug.cgi?id=45244 + + Export JSArray::put + + * JavaScriptCore.exp: + +2010-09-06 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + Support JSVALUE32_64 on MIPS + https://bugs.webkit.org/show_bug.cgi?id=43999 + + Add missing functions to support JSVALUE32_64 on MIPS. + Remove JSVALUE32 as the default for MIPS. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::divd): + (JSC::MIPSAssembler::mthc1): + (JSC::MIPSAssembler::cvtwd): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::neg32): + (JSC::MacroAssemblerMIPS::branchOr32): + (JSC::MacroAssemblerMIPS::set8): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::divDouble): + (JSC::MacroAssemblerMIPS::convertInt32ToDouble): + (JSC::MacroAssemblerMIPS::branchDouble): + (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32): + (JSC::MacroAssemblerMIPS::zeroDouble): + * jit/JIT.h: + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + * wtf/Platform.h: + +2010-09-06 Robert Hogan <robert@webkit.org> + + Unreviewed, compile fix. + + Fix compile failure in r66843 + + Revert to original patch in bugzilla. Leave bug open for + discussion on potential removal of double utf8 conversion. + + https://bugs.webkit.org/show_bug.cgi?id=45240 + + * wtf/text/WTFString.cpp: + (WTF::String::format): + +2010-09-06 Robert Hogan <robert@webkit.org> + + Reviewed by Andreas Kling. + + [Qt] utf8 encoding of console() messages + + Unskip: + http/tests/security/xssAuditor/embed-tag-null-char.html + http/tests/security/xssAuditor/object-embed-tag-null-char.html + + Both tests failed because Qt's implementation of String::format() + is casting a utf8 result to String, which assumes latin1 in + its constructor. So instead of casting a QString to a String, use + StringImpl::create() instead. Unfortunately, this involves a lot + of extra casts but the end result is correct. + + https://bugs.webkit.org/show_bug.cgi?id=45240 + + * wtf/text/WTFString.cpp: + (WTF::String::format): + +2010-09-03 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=45135 + <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex + regardless of platform default, so that we can assert that it's held (this is for platforms + that don't have libdispatch). + (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look + at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock + is held. + (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before + manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we + can make unbalanced calls to dispatch_resume(). + +2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Martin Robinson. + + [EFL] Regression (66531) Build break with Glib Support + https://bugs.webkit.org/show_bug.cgi?id=45011 + + Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory + since when glib is enabled, EFL port needs it, too. + + * CMakeListsEfl.txt: Include gobject directory to find new header + file. + * GNUmakefile.am: Ditto. + * wtf/CMakeListsEfl.txt: Ditto. + * wtf/Platform.h: Include header if port is EFL and glib support is + enabled. + * wtf/gtk/GtkTypedefs.h: Removed. + * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now + guarded by PLATFORM(GTK). + +2010-09-03 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Simon Hausmann. + + Fix warning in wtf/ByteArray.h + https://bugs.webkit.org/show_bug.cgi?id=44672 + + * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers. + +2010-09-02 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Actually parse a URL from ParsedURL + https://bugs.webkit.org/show_bug.cgi?id=45080 + + This patch only handles standard URLs. At some point we'll need to + distinguish between standard URLs and other kinds of URLs. + + * wtf/url/api/ParsedURL.cpp: + (WTF::ParsedURL::ParsedURL): + +2010-09-02 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add ParsedURL and URLString to WTFURL API + https://bugs.webkit.org/show_bug.cgi?id=45078 + + Currently there's no actual URL parsing going on, but this patch is a + start to sketching out the API. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/api/ParsedURL.cpp: Added. + (WTF::ParsedURL::ParsedURL): + (WTF::ParsedURL::scheme): + (WTF::ParsedURL::username): + (WTF::ParsedURL::password): + (WTF::ParsedURL::host): + (WTF::ParsedURL::port): + (WTF::ParsedURL::path): + (WTF::ParsedURL::query): + (WTF::ParsedURL::fragment): + (WTF::ParsedURL::segment): + * wtf/url/api/ParsedURL.h: Added. + (WTF::ParsedURL::spec): + * wtf/url/api/URLString.h: Added. + (WTF::URLString::URLString): + (WTF::URLString::string): + +2010-09-02 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Add WTFURL to the JavaScriptCore build on Mac + https://bugs.webkit.org/show_bug.cgi?id=45075 + + Building code is good. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-09-02 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=43230 + <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser + + One can't delete a ThreadSpecific object that has data in it. It's not even possible to + enumerate data objects in all threads, much less destroy them from a thread that's destroying + the ThreadSpecific. + + * parser/JSParser.cpp: + (JSC::JSParser::JSParser): + * runtime/JSGlobalData.h: + * wtf/WTFThreadData.cpp: + (WTF::WTFThreadData::WTFThreadData): + * wtf/WTFThreadData.h: + (WTF::WTFThreadData::approximatedStackStart): + Moved stack guard tracking from JSGlobalData to WTFThreadData. + + * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't + ever face a situation where we'd want to delete a ThreadSpecific object. + +2010-09-01 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Oliver Hunt. + + Ecma-262 15.11.1.1 states that if the argument is undefined then an + Error object's message property should be set to the empty string. + + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + (JSC::ErrorInstance::create): + * runtime/ErrorInstance.h: + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + +2010-08-31 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that + mixed types with code that uses size_t. + + * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning. + +2010-08-31 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Isolate all GTK+ typedefs into one file + https://bugs.webkit.org/show_bug.cgi?id=44900 + + * GNUmakefile.am: Add GtkTypedefs.h to the source lists. + * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build. + * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs. + * wtf/gobject/GOwnPtr.h: Ditto. + * wtf/gobject/GRefPtr.h: Ditto. + * wtf/gtk/GtkTypedefs.h: Added. + +2010-08-31 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Fix 'make dist' in preparation of the 1.3.3 release + https://bugs.webkit.org/show_bug.cgi?id=44978 + + * GNUmakefile.am: Adding missing headers to the sources list. + +2010-08-31 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + Support emit_op_mod() for MIPS + https://bugs.webkit.org/show_bug.cgi?id=42855 + + This patch uses MIPS div instructions for op_mod to improve performance. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::div): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + +2010-08-31 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Darin Adler. + + Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED. + https://bugs.webkit.org/show_bug.cgi?id=44870 + + * wtf/Assertions.h: + * wtf/UnusedParam.h: + +2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + JSC TimeoutChecker::didTimeOut overflows on ARM + https://bugs.webkit.org/show_bug.cgi?id=38538 + + Make getCPUTime() return values relative to the first call. + The previous implementation relied on simply on currentTime(), which + return a time since epoch and not a time since the thread started. This + made the return value of getCPUTime() overflow on 32 bits. + + * runtime/TimeoutChecker.cpp: + (JSC::getCPUTime): + +2010-08-30 Mihai Parparita <mihaip@chromium.org> + + Reviewed by Adam Barth. + + HISTORY_ALWAYS_ASYNC should be removed (history should always be async) + https://bugs.webkit.org/show_bug.cgi?id=44315 + + Remove ENABLE_HISTORY_ALWAYS_ASYNC #define. + + * wtf/Platform.h: + +2010-08-30 Chris Rogers <crogers@google.com> + + Reviewed by Kenneth Russell. + + Fix namespace for wtf/Complex.h and wtf/Vector3.h + https://bugs.webkit.org/show_bug.cgi?id=44892 + + * wtf/Complex.h: + * wtf/Vector3.h: + +2010-08-30 Andy Estes <aestes@apple.com> + + Reviewed by Eric Carlson. + + Strings returned by asciiDebug() should be NULL-terminated. + https://bugs.webkit.org/show_bug.cgi?id=44866 + + * wtf/text/WTFString.cpp: + (asciiDebug): + +2010-08-30 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Refactor number parsing in the lexer + https://bugs.webkit.org/show_bug.cgi?id=44104 + + Number parsing was full of gotos, and needed a complete + redesign to remove them (Only one remained). Furthermore + integer arithmetic is empolyed for fast cases (= small + integer numbers). + + * parser/Lexer.cpp: + (JSC::Lexer::parseHex): + (JSC::Lexer::parseOctal): + (JSC::Lexer::parseDecimal): + (JSC::Lexer::parseNumberAfterDecimalPoint): + (JSC::Lexer::parseNumberAfterExponentIndicator): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-08-29 Darin Adler <darin@apple.com> + + Fix Qt build. + + * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP. + * wtf/unicode/qt4/UnicodeQt4.h: Ditto. + * wtf/unicode/wince/UnicodeWince.h: Ditto. + +2010-08-29 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Port vprintf_stderr_common + https://bugs.webkit.org/show_bug.cgi?id=33568 + + Use BREW's DBGPRINTF to output debug messages. + + * wtf/Assertions.cpp: + +2010-08-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values + + We are in places casting doubles to unsigneds, and unsigneds to ints, without always check + that the result is within bounds. This is problematic in the case of double-to-unsigned + conversion because we should be saturating to array length. + + Also, the error return value from Array.splice should be [], not undefined. + + I don't see any security concerns here. These methods are spec'ed in such a way that they + can be applied to non Array objects, so in all cases the (potentially bogus) indices are + being passed to functions that will safely check accesses are within bounds. + + * runtime/ArrayPrototype.cpp: + (JSC::argumentClampedIndexFromStartOrEnd): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/JSValue.h: + (JSC::JSValue::toUInt32): + +2010-08-28 Pratik Solanki <psolanki@apple.com> + + Reviewed by Dan Bernstein. + + Add an ENABLE define for purgeable memory support + https://bugs.webkit.org/show_bug.cgi?id=44777 + + * wtf/Platform.h: + +2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin + https://bugs.webkit.org/show_bug.cgi?id=43179 + + Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent + NPAPI Plugin Cache. The flag is enabled by default. + + * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE + +2010-07-27 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + Add JavaScript API to allow a page to go fullscreen. + rdar://problem/6867795 + https://bugs.webkit.org/show_bug.cgi?id=43099 + + * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS). + +2010-08-27 Gavin Barraclough <barraclough@apple.com> + + Windows build fix pt 2. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-27 Gavin Barraclough <barraclough@apple.com> + + Windows build fix pt 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate. + + These methods should be using a version of dtoa that can generate results accurate + to the requested precision, whereas our version of dtoa is only currently able to + support producing results sufficiently accurate to distinguish the value from any + other IEEE-754 double precision number. + + This change has no impact on benchmarks we track. + + On microbenchmarks for these functions, this is a slight regression where a high + precision is requested (dtoa now need to iterate further to generate a a greater + number of digits), but with smaller precision values (hopefully more common) this + improves performance, since it reduced the accurate of result dtoa is required, + to produce, and removes the need to pre-round values before calling dtoa. + + * JavaScriptCore.exp: + doubleToStringInJavaScriptFormat renamed to numberToString + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + doubleToStringInJavaScriptFormat renamed to numberToString + + * runtime/UString.cpp: + (JSC::UString::number): + doubleToStringInJavaScriptFormat renamed to numberToString + + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::DecimalNumber): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + Remove all pre-rounding of values, instead call dtoa correctly. + + * wtf/dtoa.cpp: + (WTF::dtoa): + * wtf/dtoa.h: + Reenable support for rounding to specific-figures/decimal-places in dtoa. + Modify to remove unbiased rounding, provide ECMA required away-from-zero. + Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to + numberToString. + +2010-08-27 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + Byte alignment issue on MIPS + https://bugs.webkit.org/show_bug.cgi?id=29415 + + MIPS accesses one byte at a time for now to avoid the help from the + kernel to fix unaligned accesses. + + * wtf/text/AtomicString.cpp: + (WebCore::equal): + * wtf/text/StringHash.h: + (WebCore::StringHash::equal): + +2010-08-27 Xan Lopez <xlopez@igalia.com> + + Reviewed by Tor Arne Vestbø. + + Fix a couple of typos in comment. + + * bytecode/CodeBlock.h: + +2010-08-26 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * wtf/dtoa.cpp: + +2010-08-26 Gavin Barraclough <baraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 44735 - Clean up dtoa.cpp + Remove unused & unmaintained code paths, reformat code to match + coding standard & use platform #defines from Platform.h directly. + + * wtf/dtoa.cpp: + (WTF::storeInc): + (WTF::multadd): + (WTF::s2b): + (WTF::lo0bits): + (WTF::mult): + (WTF::pow5mult): + (WTF::lshift): + (WTF::diff): + (WTF::ulp): + (WTF::b2d): + (WTF::d2b): + (WTF::ratio): + (WTF::): + (WTF::strtod): + (WTF::quorem): + (WTF::dtoa): + +2010-08-26 Gavin Barraclough <barraclough@apple.com> + + Rubber Stamped by Oliver Hunt. + + Partially revert r65959. The toString changes regressed the v8 tests, + but keep the toFixed/toExponential/toPrecision changes. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/NumberPrototype.cpp: + * runtime/UString.cpp: + (JSC::UString::number): + * wtf/DecimalNumber.h: + * wtf/dtoa.cpp: + (WTF::append): + (WTF::doubleToStringInJavaScriptFormat): + * wtf/dtoa.h: + * wtf/text/WTFString.cpp: + * wtf/text/WTFString.h: + +2010-08-26 James Robinson <jamesr@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Remove the USE(GLES2_RENDERING) define and associated code + https://bugs.webkit.org/show_bug.cgi?id=43761 + + Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused. + + * wtf/Platform.h: + +2010-08-26 Gavin Barraclough <barraclough@apple.com> + + Rolling out r64608, this regressed performance. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::LinkBuffer): + (JSC::LinkBuffer::~LinkBuffer): + (JSC::LinkBuffer::performFinalization): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::executableCopy): + * assembler/X86Assembler.h: + (JSC::X86Assembler::executableCopy): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::create): + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::poolForSize): + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::allocInternal): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compilePutByIdTransition): + (JSC::JIT::compilePatchGetArrayLength): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::getPolymorphicAccessStructureListSlot): + * jit/JITStubs.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::finalize): + * runtime/ExceptionHelpers.cpp: + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): + +2010-08-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Brady Eidson. + + Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl. + + * wtf/text/WTFString.cpp: + (asciiDebug): + Return a Vector<char> containing the contents of a string as ASCII. + +2010-08-26 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Add PassOwnArrayPtr + https://bugs.webkit.org/show_bug.cgi?id=44627 + + * GNUmakefile.am: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + Add the new files. + + * wtf/Forward.h: + Forward declare PassOwnArrayPtr. + + * wtf/OwnArrayPtr.h: + Mimic the OwnPtr interface. + + * wtf/OwnArrayPtrCommon.h: Added. + (WTF::deleteOwnedArrayPtr): + Move delete function here so it can be shared by OwnArrayPtr and + PassOwnArrayPtr. + + * wtf/PassOwnArrayPtr.h: Added. + Mimic the PassOwnPtr interface. + +2010-08-26 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + [JSC] JavaScript parsing error when loading Equifax web page + https://bugs.webkit.org/show_bug.cgi?id=42900 + + '-->' is ostensibly only meant to occur when there is only + whitespace preceeding it on the line. However firefox treats + multiline comments as a space character, so they are allowed. + One side effect of the firefox model is that any line terminators + inside the multiline comment are ignored, so + + foo/* + */--> + + is treated as + + foo --> + + and so '-->' will not be a comment in this case. Happily this simply + means that to fix this issue all we need to do is stop updating + m_atLineStart when handling multiline comments. + + * parser/Lexer.cpp: + (JSC::Lexer::lex): + +2010-08-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Improve overflow handling in StringImpl::Replace + https://bugs.webkit.org/show_bug.cgi?id=42502 + <rdar://problem/8203794> + + Harden StringImpl::replace against overflow -- I can't see how this + could be abused, but it's better to be safe than sorry. + + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::replace): + +2010-08-26 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions + https://bugs.webkit.org/show_bug.cgi?id=44624 + + Clean up GNUmakefile.am. + + * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move + a couple include lines from the top-level GNUmakefile.am. + +2010-08-25 Xan Lopez <xlopez@igalia.com> + + Reviewed by Kent Tamura. + + Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used + https://bugs.webkit.org/show_bug.cgi?id=29259 + + Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang. + + * wtf/dtoa.cpp: + (WTF::s2b): + +2010-08-25 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kevin Ollivier. + + [BREWMP] Add build system + https://bugs.webkit.org/show_bug.cgi?id=44645 + + Make waf script portable so that we can add more ports. + + * wscript: + +2010-08-25 Michael Saboff <msaboff@apple.com> + + Reviewed by Sam Weinig. + + Remove the single entry regular expression cache introduced as part of + the fix for https://bugs.webkit.org/show_bug.cgi?id=41238. + The performance problem in Dromaeo that initiated that bug is no + longer present. Dromaeo has been modified so that the regular + expression tests are somewhat random and don't benefit from a + single entry cache. + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::match): + * runtime/RegExp.h: + +2010-08-25 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + Cairo and EFL port shouldn't depend on glib. + https://bugs.webkit.org/show_bug.cgi?id=44354 + + Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in + GRefPtr.h. + + * GNUmakefile.am: Add PlatformRefPtr.h to the source list. + * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h. + (WTF::PlatformRefPtr::PlatformRefPtr): Ditto. + (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto. + (WTF::PlatformRefPtr::clear): Ditto. + (WTF::PlatformRefPtr::get): Ditto. + (WTF::PlatformRefPtr::operator*): Ditto. + (WTF::PlatformRefPtr::operator->): Ditto. + (WTF::PlatformRefPtr::operator!): Ditto. + (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto. + (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto. + (WTF::::operator): Ditto. + (WTF::::swap): Ditto. + (WTF::swap): Ditto. + (WTF::operator==): Ditto. + (WTF::operator!=): Ditto. + (WTF::static_pointer_cast): Ditto. + (WTF::const_pointer_cast): Ditto. + (WTF::getPtr): Ditto. + (WTF::adoptPlatformRef): Ditto. + * wtf/gobject/GRefPtr.cpp: Changes to reflect new names. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + * wtf/gobject/GRefPtr.h: Ditto. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + +2010-08-25 Xan Lopez <xlopez@igalia.com> + + Reviewed by Alexey Proskuryakov. + + Remove dead code in JSGlobalObject + https://bugs.webkit.org/show_bug.cgi?id=44615 + + The recursion data member in the JSGlobalObject and its getter + plus inc/dec methods seems to be unused, remove them. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::init): + * runtime/JSGlobalObject.h: + +2010-08-25 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Changed the initial and subsequent allocation of vector storage to + Array()s. The changes are to limit sparse arrays to 100000 entries + and fixed the sparse map to vector storage conversion to use the + minimum amount of memory needed to store the current number of entries. + These changes address https://bugs.webkit.org/show_bug.cgi?id=43707 + + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::getNewVectorLength): + +2010-08-16 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Avoid increasing required alignment of target type warning + https://bugs.webkit.org/show_bug.cgi?id=43963 + + Fix platform independent alignment warnings. + + * wtf/ListHashSet.h: + (WTF::ListHashSetNodeAllocator::pool): + +2010-08-19 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Enable truncated floating point feature on ARM + https://bugs.webkit.org/show_bug.cgi?id=44233 + + Enable truncated floating point feature with the help of VCVTR.S32.F64 + instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit + integer/register, it saturates at INT_MAX or INT_MIN. Testing this + looks quicker than testing FPSCR for exception. + + Inspired by Jacob Bramley's patch from JaegerMonkey + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::cmn_r): + (JSC::ARMAssembler::vcvtr_s32_f64_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): + (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32): + +2010-08-24 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-24 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::intPow10): + * wtf/dtoa.cpp: + * wtf/dtoa.h: + +2010-08-23 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=44487 + + Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated + code & unnecessary complexity. Add a new DecimalNumber class to encapsulate + double to string conversion, share the implementations of rounding & + decimal-fraction/exponential formatting. + + * JavaScriptCore.exp: + Update exports. + + * runtime/NumberPrototype.cpp: + (JSC::toThisNumber): + (JSC::getIntegerArgumentInRange): + Helper methods used in implementing toExponential/toFixed/toString. + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + Reimplemented using new DecimalNumber class. + + * runtime/UString.cpp: + (JSC::UString::number): + Updated to call numberToString. + + * wtf/DecimalNumber.h: Added. + (WTF::): + (WTF::DecimalNumber::DecimalNumber): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + (WTF::DecimalNumber::sign): + (WTF::DecimalNumber::exponent): + (WTF::DecimalNumber::significand): + (WTF::DecimalNumber::precision): + (WTF::DecimalNumber::init): + (WTF::DecimalNumber::isZero): + (WTF::DecimalNumber::roundToPrecision): + New class to perform double to string conversion. + Has three constructors, which allow conversion with no rounding, + rounding to significant-figures, or rounding to decimal-places, + and two methods for formatting strings, either using decimal + fraction or exponential encoding. Internal implementation uses + pre-rounding of the values before calling dtoa rather than + relying on dtoa to correctly round, which does not produce + fully accurate results. Hopefully we can address this in the + near future. + + * wtf/dtoa.cpp: + (WTF::intPow10): + * wtf/dtoa.h: + intPow10 is used internally by DecimalNumber. + + * wtf/text/WTFString.cpp: + (WTF::copyToString): + (WTF::nanOrInfToString): + Used internally in numberToString for NaN/Infinity handling. + (WTF::numberToString): + Added new method to convert doubles to strings. + + * wtf/text/WTFString.h: + Added declaration for numberToString. This is here because + we should switch over to using this for all double to string + conversion in WebCore (see section 2.4.4.3 of the HTML5 spec). + +2010-08-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Don't seed the JS random number generator from time() + https://bugs.webkit.org/show_bug.cgi?id=41868 + <rdar://problem/8171025> + + Switch to using the secure random number generator to + seed the fast random generator, and make the generator + be per global object. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::weakRandomNumber): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncRandom): + +2010-08-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Beth Dakin. + + Make overflow guards in UString::utf8 explicit + https://bugs.webkit.org/show_bug.cgi?id=44540 + + Add an explicit overflow check prior to allocating our buffer, + rather than implicitly relying on the guard in convertUTF16ToUTF8. + + * runtime/UString.cpp: + (JSC::UString::utf8): + +2010-08-24 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Simon Hausmann. + + [Symbian] Fix commit/decommit of system memory using RChunk + + Swap accidentially reversed start and m_base values for determining the + offset within the RChunk. + + * wtf/PageReservation.h: + (WTF::PageReservation::systemCommit): + (WTF::PageReservation::systemDecommit): + +2010-08-23 Patrick Gansterer <paroga@paroga.com> + + Rubber-stamped by Gabor Loki. + + [WINCE] Buildfix for GeneratedJITStubs after r64818 + https://bugs.webkit.org/show_bug.cgi?id=44469 + + Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#". + + * jit/JITStubs.cpp: + +2010-08-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition + https://bugs.webkit.org/show_bug.cgi?id=44240 + <rdar://problem/8328995> + + Fix an error I introduced when cleaning up the interpreter side of the logic + to prevent setters being called in object initialisers. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-08-23 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + Fixed case where a single character search string in a string.replace() + did not properly handle back reference replacement. The fix is to + check for a '$' as part of the check to see if we can execute the + single character replace optimization. + https://bugs.webkit.org/show_bug.cgi?id=44067 + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2010-08-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + JSON.stringify is much slower than Firefox on particular pathological input + https://bugs.webkit.org/show_bug.cgi?id=44456 + + Make StringBuilder::reserveCapacity reserve additional space so we don't end up + repeatedly copying the entire result string. + + * runtime/StringBuilder.h: + (JSC::StringBuilder::append): + (JSC::StringBuilder::reserveCapacity): + +2010-08-23 Jian Li <jianli@chromium.org> + + Reviewed by Darin Fisher. + + Handle blob resource. + https://bugs.webkit.org/show_bug.cgi?id=43941 + + * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle. + +2010-08-19 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Geoffrey Garen. + + JSC: Move the static_cast into to(U)Int32 fast case + https://bugs.webkit.org/show_bug.cgi?id=44037 + + Do the static_cast<(u)int32_t> inline to avoid the function call overhead + for easily converted values (within (u)int32_t range.) + + * runtime/JSValue.cpp: + (JSC::toInt32SlowCase): + (JSC::toUInt32SlowCase): + * runtime/JSValue.h: + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): + +2010-08-18 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Geoffrey Garen. + + REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript + https://bugs.webkit.org/show_bug.cgi?id=43742 + + Add codegen for pow() to return Int32 values when possible. + + * jit/ThunkGenerators.cpp: + (JSC::powThunkGenerator): + +2010-08-18 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64 + https://bugs.webkit.org/show_bug.cgi?id=43897 + + A 64 bits wide member in a structure is aligned to 8 bytes on ARM by + default, but this is not taken into account in the offset defines of + JITStackFrame. + + * jit/JITStubs.cpp: + * jit/JITStubs.h: + +2010-08-18 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + Rename UString::substr to substringSharingImpl, add to WTF::String. + Now WTF::String can do everything that JSC::UString can do! + + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::escapeQuotes): + * bytecompiler/NodesCodegen.cpp: + (JSC::substitute): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::getRange): + * runtime/FunctionPrototype.cpp: + (JSC::insertSemicolonIfNeeded): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::indent): + (JSC::Stringifier::unindent): + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::substringSharingImpl): + * runtime/UString.h: + * wtf/text/WTFString.cpp: + (WTF::String::substringSharingImpl): + * wtf/text/WTFString.h: + +2010-08-18 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-08-18 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-08-17 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 44146 - Remove toDouble/toUInt32 methods from UString. + + These methods all implement JavaScript language specific behaviour, and as such + are not suited to being on a generic string object. They are also inefficient + and incorrectly used, refactor & cleanup. Uses of these methods really divide + out into two cases. + + ToNumber: + Uses of toDouble from JSString and from parseFloat are implementing ecma's + ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble + should largely just be moved out to a global jsToNumber function. ToNumber is + capable of recognizing either decimal or hexadecimal numbers, but parseFloat + should only recognize decimal values. This is currently handled by testing for + hexadecimal before calling toDouble, which should unnecessary - instead we can + just split out the two parts to the grammar into separate functions. Also, + strtod recognizes a set of literals (nan, inf, and infinity - all with any + capitalization) - which are not defined by any of the specs we are implementing. + To handle this we need to perform additional work in toDouble to convert the + unsupported cases of infinities back to NaNs. Instead we should simply remove + support for this literals from strtod. This should provide a more desirable + behaviour for all clients of strtod. + + Indexed properties: + Uses of the toStrictUInt32 methods are were all converting property names to + indices, and all uses of toUInt32 were incorrect; in all cases we should have + been calling toUInt32. This error results in some incorrect behaviour in the + DOM (accessing property "0 " of a NodeList should fail; it currently does not). + Move this method onto Identifier (our canonical property name), and make it + always perform a strict conversion. Add a layout test to check NodeList does + convert indexed property names correctly. + + * JavaScriptCore.exp: + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/Identifier.cpp: + (JSC::Identifier::toUInt32): + * runtime/Identifier.h: + (JSC::Identifier::toUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + (JSC::Identifier::toArrayIndex): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::getOwnPropertySlot): + (JSC::JSByteArray::getOwnPropertyDescriptor): + (JSC::JSByteArray::put): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::isInfinity): + (JSC::jsHexIntegerLiteral): + (JSC::jsStrDecimalLiteral): + (JSC::jsToNumber): + (JSC::parseFloat): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSString.cpp: + (JSC::JSString::getPrimitiveNumber): + (JSC::JSString::toNumber): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::getStringPropertySlot): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::put): + * runtime/StringObject.cpp: + (JSC::StringObject::deleteProperty): + * runtime/UString.cpp: + * runtime/UString.h: + * wtf/dtoa.cpp: + (WTF::strtod): + +2010-08-17 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find + + Bug 44080 introuduced a couple of cases in which array bounds could be overrun. + One of these was fixed in r65493, this patch fixes the other and address the + concerns voiced in comment #6 by restructuring the loops to remove the code + dupliction without introducing an additional if check. + + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): + (WTF::StringImpl::findIgnoringCase): + (WTF::StringImpl::reverseFind): + (WTF::StringImpl::reverseFindIgnoringCase): + +2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Ariya Hidayat. + + [Qt] Move the accelerated compositing build flag to the right place + https://bugs.webkit.org/show_bug.cgi?id=43882 + + * wtf/Platform.h: + +2010-08-17 Yuta Kitamura <yutak@chromium.org> + + Reviewed by Shinichiro Hamaji. + + Avoid uninitialized memory read in StringImpl::find(). + + REGRESSION(r65468): Crashes in StringImpl::find + https://bugs.webkit.org/show_bug.cgi?id=44099 + + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): + +2010-08-16 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig + + Add VectorTraits to String & DefaultHash traits to UString to unify behaviour. + + * runtime/UString.h: + (JSC::UStringHash::hash): + (JSC::UStringHash::equal): + (WTF::): + * wtf/text/WTFString.h: + (WTF::): + +2010-08-16 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig + + Remove unnecessary includes from UString.h, add new includes as necessary. + + * profiler/CallIdentifier.h: + * profiler/ProfileNode.h: + * runtime/DateConversion.cpp: + * runtime/Identifier.h: + (JSC::IdentifierRepHash::hash): + * runtime/RegExpCache.h: + * runtime/RegExpKey.h: + * runtime/UString.cpp: + (JSC::UString::substr): + * runtime/UString.h: + * wtf/text/WTFString.h: + +2010-08-16 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig + + Bug 44080 - String find/reverseFind methods need tidying up + These methods have a couple of problems with their interface, and implementation. + + These methods take and int index, and return an int - however this is problematic + since on 64-bit string indices may have a full 32-bit range. This spills out into + surrounding code, which unsafely casts string indices from unsigned to int. Code + checking the result of these methods check for a mix of "== -1", "< 0", and + "== notFound". Clean this up by changing these methods to take an unsigned + starting index, and return a size_t. with a failed match indicated by notFound. + reverseFind also has a special meaning for the starting index argument, in that a + negative index is interpreted as an offset back from the end of the string. Remove + this functionality, in the (1!) case where it is used we should just calculate the + offset by subtracting from the string's length. + + The implementation has a few problems too. The code is not in webkit style, in + using assorted abbreviations in variable names, and implementations of similar + find methods with differing argument types were unnecessarily inconsistent. When + find is passed const char* data the string would be handled as latin1 (zero + extended to UTF-16) for all characters but the first; this is sign extended. + Case-insensitive find is broken for unicode strings; the hashing optimization is + not unicode safe, and could result in false negatives. + + Unify UString find methods to match String. + + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::escapeQuotes): + * bytecompiler/NodesCodegen.cpp: + (JSC::substitute): + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExpKey.h: + (JSC::RegExpKey::getFlagsValue): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::substituteBackreferences): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSplit): + * runtime/UString.cpp: + * runtime/UString.h: + (JSC::UString::find): + (JSC::UString::reverseFind): + * wtf/text/AtomicString.h: + (WTF::AtomicString::find): + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::find): + (WTF::StringImpl::findCaseInsensitive): + (WTF::StringImpl::reverseFind): + (WTF::StringImpl::reverseFindCaseInsensitive): + (WTF::StringImpl::endsWith): + (WTF::StringImpl::replace): + * wtf/text/StringImpl.h: + (WTF::StringImpl::startsWith): + * wtf/text/WTFString.cpp: + (WTF::String::split): + * wtf/text/WTFString.h: + (WTF::String::find): + (WTF::String::reverseFind): + (WTF::String::findCaseInsensitive): + (WTF::String::reverseFindCaseInsensitive): + (WTF::String::contains): + (WTF::find): + (WTF::reverseFind): + +2010-08-16 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, do not build WebCore as a convenience library as this leads to + errors in the Win build w/export symbols and causes problems with DOM bindings + debugging in gdb. + + * wscript: + +2010-08-16 Leandro Pereira <leandro@profusion.mobi> + + [EFL] Build fix after r65366. + + * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if + they're empty. + * jsc/CMakeLists.txt: Ditto. + * wtf/CMakeLists.txt: Ditto. + +2010-08-15 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, don't build intermediate source in DerivedSources dir. + + * wscript: + +2010-08-14 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Kenneth Rohde Christiansen. + + [CMake] Add preprocessor detection for generator scripts + https://bugs.webkit.org/show_bug.cgi?id=43984 + + * CMakeLists.txt: + +2010-08-14 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Kenneth Rohde Christiansen. + + [CMake] Set target properties only if available + https://bugs.webkit.org/show_bug.cgi?id=43978 + + * CMakeLists.txt: + * jsc/CMakeLists.txt: + * wtf/CMakeLists.txt: + +2010-08-13 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, add CString to the list of forwards. + + * wtf/Forward.h: + +2010-08-13 Gavin Barraclough <barraclough@apple.com> + + Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-13 Gavin Barraclough <barraclough@apple.com> + + Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-13 Gavin Barraclough <barraclough@apple.com> + + Windows build fix + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-13 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + Switch String::/UString::ascii() to return a CString. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::dumpCaller): + * jsc.cpp: + (runWithScripts): + (runInteractive): + * runtime/Identifier.h: + (JSC::Identifier::ascii): + * runtime/ScopeChain.cpp: + (JSC::ScopeChainNode::print): + * runtime/UString.cpp: + (JSC::UString::ascii): + (JSC::UString::latin1): + * runtime/UString.h: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::asciiOLD): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.cpp: + (WTF::String::ascii): + (WTF::String::latin1): + * wtf/text/WTFString.h: + +2010-08-13 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Avoid increasing required alignment of target type warning on ARM + https://bugs.webkit.org/show_bug.cgi?id=38045 + + The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where + sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: + increases required alignment of target type warnings. + Casting the type of [pointer to Type2] object to void* bypasses the + warning. + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + (isPointerTypeAlignmentOkay): + (reinterpret_cast_ptr): + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WTF::String::String): + +2010-08-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig + + Unify UString::UTF8String() & String::utf8() methods, + remove UString::cost() & make atArrayIndex a free function. + + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/Identifier.h: + (JSC::Identifier::toStrictUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + (JSC::toArrayIndex): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::putUTF8Triple): + (JSC::UString::utf8): + * runtime/UString.h: + (JSC::UString::~UString): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::~String): + (WTF::String::swap): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + (WTF::String::length): + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + +2010-08-12 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Gavin Barraclough. + + Refactoring the fpu code generator for the ARM port + https://bugs.webkit.org/show_bug.cgi?id=43842 + + Support up to 32 double precision registers, and the + recent VFP instruction formats. This patch is mainly + a style change which keeps the current functionality. + + * assembler/ARMAssembler.h: + (JSC::ARMRegisters::): + (JSC::ARMAssembler::): + (JSC::ARMAssembler::emitInst): + (JSC::ARMAssembler::emitDoublePrecisionInst): + (JSC::ARMAssembler::emitSinglePrecisionInst): + (JSC::ARMAssembler::vadd_f64_r): + (JSC::ARMAssembler::vdiv_f64_r): + (JSC::ARMAssembler::vsub_f64_r): + (JSC::ARMAssembler::vmul_f64_r): + (JSC::ARMAssembler::vcmp_f64_r): + (JSC::ARMAssembler::vsqrt_f64_r): + (JSC::ARMAssembler::vmov_vfp_r): + (JSC::ARMAssembler::vmov_arm_r): + (JSC::ARMAssembler::vcvt_f64_s32_r): + (JSC::ARMAssembler::vcvt_s32_f64_r): + (JSC::ARMAssembler::vmrs_apsr): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::addDouble): + (JSC::MacroAssemblerARM::divDouble): + (JSC::MacroAssemblerARM::subDouble): + (JSC::MacroAssemblerARM::mulDouble): + (JSC::MacroAssemblerARM::sqrtDouble): + (JSC::MacroAssemblerARM::convertInt32ToDouble): + (JSC::MacroAssemblerARM::branchDouble): + (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): + +2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r65295. + http://trac.webkit.org/changeset/65295 + https://bugs.webkit.org/show_bug.cgi?id=43950 + + It broke 4 sputnik tests (Requested by Ossy on #webkit). + + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/Identifier.h: + (JSC::Identifier::Identifier): + (JSC::Identifier::toArrayIndex): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::UString::~UString): + (JSC::UString::toArrayIndex): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + (WTF::String::length): + (WTF::String::operator[]): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig + + Unify UString::UTF8String() & String::utf8() methods, + remove UString::cost() & make atArrayIndex a free function. + + * JavaScriptCore.exp: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + (JSC::printGlobalResolveInfo): + (JSC::printStructureStubInfo): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + * jsc.cpp: + (functionPrint): + (functionDebug): + (runInteractive): + (fillBufferWithContentsOfFile): + * pcre/pcre_exec.cpp: + (Histogram::~Histogram): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::c_str): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/Identifier.h: + (JSC::Identifier::toStrictUInt32): + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::deleteProperty): + * runtime/JSArray.h: + (JSC::toArrayIndex): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::parseInt): + (JSC::globalFuncJSCPrint): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + * runtime/UString.cpp: + (JSC::UString::toDouble): + (JSC::putUTF8Triple): + (JSC::UString::utf8): + * runtime/UString.h: + (JSC::UString::~UString): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + * wtf/text/WTFString.cpp: + (WTF::String::utf8): + * wtf/text/WTFString.h: + (WTF::String::~String): + (WTF::String::swap): + (WTF::String::isNull): + (WTF::String::isEmpty): + (WTF::String::impl): + (WTF::String::length): + (WTF::String::String): + (WTF::String::isHashTableDeletedValue): + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Eeerk! - revert accidentally committed changes in UString! + + * JavaScriptCore.exp: + * runtime/UString.cpp: + (JSC::UString::UString): + * runtime/UString.h: + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig + + Change UString constructors to match those in WTF::String. + This changes behaviour of UString((char*)0) to create null + strings, akin to UString() rather than UString::empty(). + (This matches String). Remove unused constructors from + UString, and add null-terminated UTF-16 constructor, to + match String. Move String's constructor into the .cpp to + match UString. + + * JavaScriptCore.exp: + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::calculatedFunctionName): + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::createSingleCharacterString): + * runtime/UString.cpp: + (JSC::UString::UString): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::swap): + (JSC::UString::adopt): + (JSC::UString::operator[]): + * wtf/text/WTFString.h: + (WTF::String::String): + (WTF::String::adopt): + (WTF::String::operator[]): + +2010-08-12 David Levin <levin@chromium.org> + + Reviewed by NOBODY (build fix). + + * runtime/UString.h: Removed unneccessary #include. + +2010-08-12 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig + + Revert changes to ALWAYS_INLINEness of a couple of functions in UString. + This appears to have degraded performance. + + * runtime/UString.cpp: + (JSC::UString::ascii): + * runtime/UString.h: + (JSC::UString::length): + (JSC::UString::isEmpty): + (JSC::UString::~UString): + +2010-08-12 Csaba Osztrogonác <ossy@webkit.org> + + Reviewed by Antonio Gomes. + + [Qt] Fix warnings: unknown conversion type character 'l' in format + https://bugs.webkit.org/show_bug.cgi?id=43359 + + Qt port doesn't call any printf in String::format(...), consequently + using __attribute__((format(printf,m,n))) is incorrect and causes + false positive warnings on Windows if you build with MinGW. + + Qt port calls QString::vsprintf(...) , which is platform + independent, and handles %lli, %llu and %llx on all platforms. + (http://trac.webkit.org/changeset/35712) + + * wtf/text/WTFString.h: + +2010-08-12 Gabor Loki <loki@webkit.org> + + Reviewed by Geoffrey Garen. + + Fix the array subscript is above array bounds warning in ByteArray on ARM. + https://bugs.webkit.org/show_bug.cgi?id=43358 + + The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861 + + * wtf/ByteArray.cpp: + (WTF::ByteArray::create): + +2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Reviewed by Martin Robinson. + + [GTK] Use GSettings to save/restore Web Inspector settings + https://bugs.webkit.org/show_bug.cgi?id=43512 + + * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our + GSettings support. + (WTF::refGPtr): + (WTF::derefGPtr): + * wtf/gobject/GRefPtr.h: + +2010-08-12 Gabor Loki <loki@webkit.org> + + Reviewed by Simon Hausmann. + + The scratch register should be saved in YARR with ARM JIT + https://bugs.webkit.org/show_bug.cgi?id=43910 + + Reported by Jocelyn Turcotte. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + +2010-08-11 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: + +2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn> + + Reviewed by Geoffrey Garen. + + Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date, + which means isNaN(new Date("")) should return true. + https://bugs.webkit.org/show_bug.cgi?id=43793 + Tests: fast/js/date-constructor.html + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::resetDateCache): + +2010-08-11 Gavin Barraclough <barraclough@apple.com> + + Windows & !JIT build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/RegExp.cpp: + (JSC::RegExp::match): + +2010-08-11 Gavin Barraclough <barraclough@apple.com> + + Rubber stamp by sam weinig + + Touch a file to stop the bot rolling a bit change out! + + * runtime/UString.cpp: + (JSC::UString::ascii): + +2010-08-11 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards. + + * wtf/Forward.h: + +2010-08-11 Gavin Barraclough <barraclough@apple.com> + + Rubber stamps by Darin Adler & Sam Weinig. + + Bug 43867 - Some UString cleanup + + Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String. + Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit(). + + * API/JSClassRef.cpp: + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClass::className): + * API/OpaqueJSString.cpp: + (OpaqueJSString::create): + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpName): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::processClauseList): + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createRegex): + * parser/ParserArena.h: + (JSC::IdentifierArena::makeNumericIdentifier): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::data): + (JSC::UStringSourceProvider::length): + * profiler/Profiler.cpp: + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyNames): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + * runtime/ExceptionHelpers.cpp: + * runtime/FunctionConstructor.cpp: + * runtime/FunctionPrototype.cpp: + (JSC::insertSemicolonIfNeeded): + * runtime/Identifier.h: + (JSC::Identifier::characters): + (JSC::Identifier::length): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::decode): + (JSC::parseInt): + (JSC::parseFloat): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + * runtime/JSNumberCell.cpp: + (JSC::JSNumberCell::toString): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::appendStringifiedValue): + (JSC::Stringifier::indent): + (JSC::Stringifier::unindent): + (JSC::Walker::walk): + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + (JSC::JSString::getIndexSlowCase): + * runtime/JSString.h: + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::fiberCount): + (JSC::jsSingleCharacterSubstring): + (JSC::jsNontrivialString): + (JSC::JSString::getIndex): + (JSC::jsString): + (JSC::jsStringWithFinalizer): + (JSC::jsSubstring): + (JSC::jsOwnedString): + * runtime/JSStringBuilder.h: + (JSC::JSStringBuilder::append): + * runtime/LiteralParser.h: + (JSC::LiteralParser::Lexer::Lexer): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/NumericStrings.h: + (JSC::NumericStrings::add): + (JSC::NumericStrings::lookupSmallString): + * runtime/Operations.h: + (JSC::jsString): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::getRightContext): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + * runtime/StringBuilder.h: + (JSC::StringBuilder::append): + * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h. + (JSC::): + (JSC::sumWithOverflow): + (JSC::tryMakeString): + (JSC::makeString): + * runtime/StringObject.cpp: + (JSC::StringObject::getOwnPropertyNames): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::localeCompare): + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::number): + (JSC::UString::ascii): + (JSC::UString::operator[]): + (JSC::UString::toDouble): + (JSC::UString::find): + (JSC::UString::rfind): + (JSC::UString::substr): + (JSC::operator==): + (JSC::operator<): + (JSC::operator>): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::adopt): + (JSC::UString::length): + (JSC::UString::characters): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::operator==): + (JSC::operator!=): + (JSC::codePointCompare): + (JSC::UString::toArrayIndex): + (JSC::IdentifierRepHash::hash): + (WTF::): + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + * yarr/RegexParser.h: + (JSC::Yarr::Parser::Parser): + +2010-08-11 Gabor Loki <loki@webkit.org> + + Qt build fix (ARMv7). + + Fix invalid conversion from int to Condition. + Add ARMv7Assembler.cpp to JavaScriptCore.pro. + + * JavaScriptCore.pro: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + +2010-08-11 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + At collection time, we frequently want to mark a cell, while checking + whether it was originally checked. Previously, this was a get + operation follwed by a set operation. Fusing the two saves + computation and gives a 0.5% sunspider speedup. + + * runtime/Collector.h: + (JSC::CollectorBitmap::getset): + (JSC::Heap::checkMarkCell): + * runtime/JSArray.h: + (JSC::MarkStack::drain): + * runtime/JSCell.h: + (JSC::MarkStack::append): + +2010-08-11 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + Improve vsprops copying for Windows build + https://bugs.webkit.org/show_bug.cgi?id=41982 + + When we detect a new SDK, always copy a new set of vsprops files. + Previously, if someone updated their SDK after updating their sources, + they could end up with out-of-date vsprops files. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-08-10 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Add leakRef and clear to all RefPtr variants + https://bugs.webkit.org/show_bug.cgi?id=42389 + + * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". We should probably put this in the style guide and do it + consitently. Fixed other minor style issues. Defined many of the inlined + functions outside the class definition, to avoid style checker warnings + about multiple statements on a single line and for slightly better clarity + of the class definition itself. Renamed releaseRef to leakRef. Added a + releaseRef that calls leakRef so we don't have to rename all callers oat + once. Added a clear function. + + * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef. +n + * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". Tidied up declarations and comments a bit. + Changed all uses of releaseRef to leakRef. + + * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do + "template<...>". Defined many of the inlined functions outside the class + definition, to avoid style checker warnings about multiple statements on + a single line and for slightly better clarity of the class definition itself. + Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we + don't have to rename all callers at once. Added a clear function. + +2010-08-10 Dumitru Daniliuc <dumi@chromium.org> + + Unreviewed, reverting an unintentional change to a file submitted in r65108. + + * bytecode/CodeBlock.h: + (JSC::binaryChop): + +2010-08-10 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig + + Bug 43817 - Remove UString::Rep + UString::Rep has for a long time been replaced by UStringImpl (Rep + remaining as a typedef). UStringImpl has since been removed too + (unified with StringImpl). Remove Rep, rename rep() to impl() and + m_rep to m_impl. Also add impl() method to Identifier, and rename + its UString member from _ustring to m_string. + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::getOwnPropertyNames): + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + * API/JSClassRef.cpp: + (tryCreateStringFromUTF8): + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * API/JSClassRef.h: + * API/OpaqueJSString.cpp: + (OpaqueJSString::ustring): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/JumpTable.h: + (JSC::StringJumpTable::offsetForValue): + (JSC::StringJumpTable::ctiForValue): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addVar): + (JSC::BytecodeGenerator::addGlobalVar): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addParameter): + (JSC::BytecodeGenerator::registerFor): + (JSC::BytecodeGenerator::willResolveToArguments): + (JSC::BytecodeGenerator::uncheckedRegisterForArguments): + (JSC::BytecodeGenerator::constRegisterFor): + (JSC::BytecodeGenerator::isLocal): + (JSC::BytecodeGenerator::isLocalConstant): + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::findScopedProperty): + (JSC::keyForCharacterSwitch): + (JSC::prepareJumpTableForStringSwitch): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::processClauseList): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * parser/JSParser.cpp: + (JSC::JSParser::parseStrictObjectLiteral): + * pcre/pcre_exec.cpp: + (Histogram::add): + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + * profiler/Profile.cpp: + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintDataSampleStyle): + * profiler/ProfileNode.h: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::IdentifierCStringTranslator::hash): + (JSC::IdentifierCStringTranslator::equal): + (JSC::IdentifierCStringTranslator::translate): + (JSC::Identifier::add): + (JSC::IdentifierUCharBufferTranslator::hash): + (JSC::IdentifierUCharBufferTranslator::equal): + (JSC::IdentifierUCharBufferTranslator::translate): + (JSC::Identifier::addSlowCase): + * runtime/Identifier.h: + (JSC::Identifier::Identifier): + (JSC::Identifier::ustring): + (JSC::Identifier::impl): + (JSC::Identifier::data): + (JSC::Identifier::size): + (JSC::Identifier::ascii): + (JSC::Identifier::isNull): + (JSC::Identifier::isEmpty): + (JSC::Identifier::toUInt32): + (JSC::Identifier::toStrictUInt32): + (JSC::Identifier::toArrayIndex): + (JSC::Identifier::toDouble): + (JSC::Identifier::equal): + (JSC::Identifier::add): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::displayName): + * runtime/JSFunction.cpp: + (JSC::JSFunction::displayName): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::addStaticGlobals): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::JSStaticScopeObject): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::jsSingleCharacterSubstring): + (JSC::jsSubstring): + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::deleteProperty): + (JSC::JSVariableObject::symbolTableGet): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::symbolTableGet): + (JSC::JSVariableObject::symbolTablePut): + (JSC::JSVariableObject::symbolTablePutWithAttributes): + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + (JSC::HashTable::deleteTable): + * runtime/Lookup.h: + (JSC::HashEntry::initialize): + (JSC::HashEntry::setKey): + (JSC::HashEntry::key): + (JSC::HashTable::entry): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyMapEntry::PropertyMapEntry): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArray::add): + (JSC::PropertyNameArray::addKnownUnique): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::create): + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::rep): + (JSC::SmallStrings::singleCharacterStringRep): + * runtime/SmallStrings.h: + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::put): + (JSC::Structure::hasTransition): + (JSC::Structure::remove): + (JSC::Structure::checkConsistency): + * runtime/Structure.h: + (JSC::Structure::get): + (JSC::Structure::hasTransition): + * runtime/StructureTransitionTable.h: + * runtime/SymbolTable.h: + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::toStrictUInt32): + (JSC::UString::substr): + * runtime/UString.h: + (JSC::UString::UString): + (JSC::UString::adopt): + (JSC::UString::data): + (JSC::UString::size): + (JSC::UString::isNull): + (JSC::UString::isEmpty): + (JSC::UString::impl): + (JSC::UString::cost): + (JSC::operator==): + (JSC::codePointCompare): + (JSC::IdentifierRepHash::hash): + (WTF::): + +2010-08-10 Gavin Barraclough <barraclough@apple.com> + + Bug 43816 - Remove UStringImpl + The class was actually removed a long time ago, replaced by StringImpl. + UStringImpl is just a typedef onto StringImpl. Remove this. + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::replaceCharacter): + * runtime/JSString.h: + (JSC::RopeBuilder::RopeIterator::operator*): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::jsSingleCharacterSubstring): + (JSC::jsSubstring): + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/RopeImpl.cpp: + (JSC::RopeImpl::derefFibersNonRecursive): + * runtime/RopeImpl.h: + (JSC::RopeImpl::deref): + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::SmallStringsStorage): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/UString.cpp: + (JSC::initializeUString): + * runtime/UString.h: + (JSC::UString::adopt): + (JSC::tryMakeString): + (JSC::makeString): + * runtime/UStringImpl.h: Removed. + +2010-08-10 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Eric Seidel. + + Make FastMalloc more portable. + https://bugs.webkit.org/show_bug.cgi?id=41790 + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_Central_FreeList::Populate): + (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): + +2010-08-10 Patrick Gansterer <paroga@paroga.com> + + Reviewed by David Levin. + + [WINCE] Buildfix for CE 6.0 + https://bugs.webkit.org/show_bug.cgi?id=43027 + + CE 6.0 doesn't define localtime in the system include files. + + * wtf/Platform.h: Include ce_time.h on all OS(WINCE). + +2010-08-10 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + Bug 43786 - Move AtomicStringHash from WebCore to WTF + Also remove deprecated string headers from WebCore/platform/text. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/AtomicString.h: + * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h. + +2010-08-09 Oliver Hunt <oliver@apple.com> + + Fix Qt/ARM again, this time including the other changed file. + + * jit/JIT.h: + +2010-08-09 Oliver Hunt <oliver@apple.com> + + Fix Qt/ARM + + C++ overload resolution I stab at thee + + * jit/JITInlineMethods.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::endUninterruptedSequence): + +2010-08-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Allow an assembler/macroassembler to compact branches to more concise forms when linking + https://bugs.webkit.org/show_bug.cgi?id=43745 + + This patch makes it possible for an assembler to convert jumps into a different + (presumably more efficient) form at link time. Currently implemented in the + ARMv7 JIT as that already had logic to delay linking of jumps until the end of + compilation already. The ARMv7 JIT chooses between either a 4 byte short jump + or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does + not yet produce the most compact form possible. The general design of the linker + should make it relatively simple to introduce new branch types with little effort, + as the linker has no knowledge of the exact form of any of the branches. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/ARMv7Assembler.cpp: Added. + (JSC::): + Record jump sizes + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::LinkRecord::LinkRecord): + (JSC::ARMv7Assembler::LinkRecord::from): + (JSC::ARMv7Assembler::LinkRecord::setFrom): + (JSC::ARMv7Assembler::LinkRecord::to): + (JSC::ARMv7Assembler::LinkRecord::type): + (JSC::ARMv7Assembler::LinkRecord::linkType): + (JSC::ARMv7Assembler::LinkRecord::setLinkType): + Encapsulate LinkRecord fields so we can compress the values somewhat + + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + Need to record the jump type now + + (JSC::ARMv7Assembler::b): + (JSC::ARMv7Assembler::blx): + (JSC::ARMv7Assembler::bx): + Need to pass the jump types + + (JSC::ARMv7Assembler::executableOffsetFor): + (JSC::ARMv7Assembler::jumpSizeDelta): + (JSC::ARMv7Assembler::linkRecordSourceComparator): + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::convertJumpTo): + (JSC::ARMv7Assembler::recordLinkOffsets): + (JSC::ARMv7Assembler::jumpsToLink): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::unlinkedCode): + Helper functions for the linker + + (JSC::ARMv7Assembler::linkJump): + (JSC::ARMv7Assembler::canBeShortJump): + (JSC::ARMv7Assembler::linkLongJump): + (JSC::ARMv7Assembler::linkShortJump): + (JSC::ARMv7Assembler::linkJumpAbsolute): + Moving code around for the various jump linking functions + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::beginUninterruptedSequence): + (JSC::AbstractMacroAssembler::endUninterruptedSequence): + We have to track uninterrupted sequences in any assembler that compacts + branches as that's not something we're allowed to do in such sequences. + AbstractMacroAssembler has a nop version of these functions as it makes the + code elsewhere nicer. + + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::LinkBuffer): + (JSC::LinkBuffer::link): + (JSC::LinkBuffer::patch): + (JSC::LinkBuffer::locationOf): + (JSC::LinkBuffer::locationOfNearCall): + (JSC::LinkBuffer::returnAddressOffset): + (JSC::LinkBuffer::trampolineAt): + Updated these functions to adjust for any changed offsets in the linked code + + (JSC::LinkBuffer::applyOffset): + A helper function to deal with the now potentially moved labels + + (JSC::LinkBuffer::linkCode): + The new and mighty linker function + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7): + (JSC::MacroAssemblerARMv7::beginUninterruptedSequence): + (JSC::MacroAssemblerARMv7::endUninterruptedSequence): + (JSC::MacroAssemblerARMv7::jumpsToLink): + (JSC::MacroAssemblerARMv7::unlinkedCode): + (JSC::MacroAssemblerARMv7::computeJumpType): + (JSC::MacroAssemblerARMv7::convertJumpTo): + (JSC::MacroAssemblerARMv7::recordLinkOffsets): + (JSC::MacroAssemblerARMv7::jumpSizeDelta): + (JSC::MacroAssemblerARMv7::link): + (JSC::MacroAssemblerARMv7::jump): + (JSC::MacroAssemblerARMv7::branchMul32): + (JSC::MacroAssemblerARMv7::breakpoint): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::ret): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::executableOffsetFor): + (JSC::MacroAssemblerARMv7::inUninterruptedSequence): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + All branches need to pass on their type now + + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::returnLastBytes): + We can't know ahead of time how much space will be necessary to + hold the linked code if we're compacting branches, this new + function allows us to return the unused bytes at the end of linking + + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compile): + The JIT class now needs to take a linker offset so that recompilation + can generate the same jumps when using branch compaction. + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + Update for new trampolineAt changes + + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): + * wtf/Platform.h: + +2010-08-09 Gavin Barraclough <barraclough@apple.com> + + Qt build fix III. + + * wtf/text/WTFString.h: + +2010-08-09 Gavin Barraclough <barraclough@apple.com> + + Qt build fix. + + * wtf/qt/StringQt.cpp: + +2010-08-06 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig + + Bug 43594 - Add string forwards to Forward.h + This allows us to remove forward declarations for these classes from + WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: + +2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64938. + http://trac.webkit.org/changeset/64938 + https://bugs.webkit.org/show_bug.cgi?id=43685 + + Did not compile on several ports (Requested by abarth on + #webkit). + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::load32): + (JSC::MacroAssemblerX86::store32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::movl_rm): + (JSC::X86Assembler::movl_mr): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/Instruction.h: + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::): + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::): + * jit/JIT.h: + * jit/JITMarkObjects.cpp: Removed. + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::setupPolymorphicProtoList): + * wtf/Platform.h: + +2010-08-07 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + The JIT code contains a number of direct references to GC'd objects. + When we have movable objects, these references will need to be + updated. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::int32AtLocation): + (JSC::AbstractMacroAssembler::pointerAtLocation): + (JSC::AbstractMacroAssembler::jumpTarget): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::loadPtrWithPatch): + Normally, loadPtr will optimize when the register is eax. Since + the slightly smaller instruction changes the offsets, it messes up + our ability to repatch the code. We added this new instruction + that garuntees a constant size. + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::load32WithPatch): + Changed load32 in the same way described above. + (JSC::MacroAssemblerX86::load32): + Moved the logic to optimize laod32 from movl_mr to load32 + (JSC::MacroAssemblerX86::store32): + Moved the logic to optimize store32 from movl_rm to store32 + * assembler/X86Assembler.h: + (JSC::X86Assembler::movl_rm): + (JSC::X86Assembler::movl_mr): + (JSC::X86Assembler::int32AtLocation): + (JSC::X86Assembler::pointerAtLocation): + (JSC::X86Assembler::jumpTarget): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/Instruction.h: + As described in StructureStubInfo.h, we needed to add additional + fields to both StructureStubInfo and + PolymorphicAccessStructureList so that we can determine the + structure of the JITed code at patch time. + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::markAggregate): + Added this function to mark the JITed code that correosponds to + this structure stub info. + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::): + * jit/JIT.h: + * jit/JITMarkObjects.cpp: Added. + (JSC::JIT::patchPrototypeStructureAddress): + (JSC::JIT::patchGetDirectOffset): + (JSC::JIT::markGetByIdProto): + (JSC::JIT::markGetByIdChain): + (JSC::JIT::markGetByIdProtoList): + (JSC::JIT::markPutByIdTransition): + (JSC::JIT::markGlobalObjectReference): + * jit/JITPropertyAccess.cpp: + Added asserts for the patch offsets. + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::setupPolymorphicProtoList): + * wtf/Platform.h: + Added ENABLE_MOVABLE_GC_OBJECTS flag + +2010-08-07 Michael Saboff <msaboff@apple.com> + + Reviewed by Geoffrey Garen. + + Revert JSArray to point to the beginning of the contained ArrayStorage + struct. This is described in + https://bugs.webkit.org/show_bug.cgi?id=43526. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + +2010-08-07 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator + https://bugs.webkit.org/show_bug.cgi?id=43399 + + m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR). + + * runtime/JSGlobalData.h: + +2010-08-07 Patrick Roland Gansterer <paroga@paroga.com> + + Reviewed by Eric Seidel. + + [Qt] Enable JIT on WinCE + https://bugs.webkit.org/show_bug.cgi?id=43303 + + Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm. + + * DerivedSources.pro: + +2010-08-07 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef + from SimpleFontData to FontPlatformData. + https://bugs.webkit.org/show_bug.cgi?id=43674 + + * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h. + +2010-08-07 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Eric Seidel. + + Bitmap.h has no default constructor + https://bugs.webkit.org/show_bug.cgi?id=43619 + + Without a constructor, the initial bits of the Bitmap class + are undefinied. If only a few, or zero bits are 0, the memory + area provided by AlignedMemoryAllocator can be easly exhausted. + + Csaba Osztrogonác helped to find this bug. + + * wtf/Bitmap.h: + (WTF::::Bitmap): + +2010-08-06 Rafael Antognolli <antognolli@profusion.mobi> + + [EFL] Build fix. + + * CMakeLists.txt: add runtime/CGHandle.cpp. + +2010-08-06 Jessie Berlin <jberlin@apple.com> + + Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. + Unreviewed. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: + +2010-08-06 Jessie Berlin <jberlin@apple.com> + + Windows Build Fix (continued). Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-06 Jessie Berlin <jberlin@apple.com> + + Windows Build Fix. Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + Add GCHandle.h and GCHandle.cpp. + +2010-08-06 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=43207 + + WeakGCPtr's should instead of directly pointing to the GC'd object + should be directed to an array of pointers that can be updated for + movable objects. + + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::updateWeakGCHandles): + (JSC::WeakGCHandlePool::update): + (JSC::Heap::addWeakGCHandle): + (JSC::Heap::markRoots): + * runtime/Collector.h: + (JSC::Heap::weakGCHandlePool): + * runtime/GCHandle.cpp: Added. + (JSC::WeakGCHandle::pool): + (JSC::WeakGCHandlePool::WeakGCHandlePool): + (JSC::WeakGCHandlePool::allocate): + (JSC::WeakGCHandlePool::free): + (JSC::WeakGCHandlePool::operator new): + * runtime/GCHandle.h: Added. + (JSC::WeakGCHandle::isValidPtr): + (JSC::WeakGCHandle::isPtr): + (JSC::WeakGCHandle::isNext): + (JSC::WeakGCHandle::invalidate): + (JSC::WeakGCHandle::get): + (JSC::WeakGCHandle::set): + (JSC::WeakGCHandle::getNextInFreeList): + (JSC::WeakGCHandle::setNextInFreeList): + (JSC::WeakGCHandlePool::isFull): + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::~WeakGCPtr): + (JSC::WeakGCPtr::get): + (JSC::WeakGCPtr::clear): + (JSC::WeakGCPtr::assign): + (JSC::get): + +2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Antonio Gomes. + + [Qt] Fix warnings about difference in symbol visiblity on Mac OS X + + * jsc.pro: + +2010-08-06 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Refactor identifier parsing in lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 + + The code is refactored to avoid gotos. The new code + has the same performance as the old one. + + SunSpider --parse-only: no change (from 34.0ms to 33.6ms) + SunSpider: no change (from 523.2ms to 523.5ms) + + * parser/Lexer.cpp: + (JSC::Lexer::parseIdent): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-08-06 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + The ARM JIT does not support JSValue32_64 with RVCT + https://bugs.webkit.org/show_bug.cgi?id=43411 + + JSValue32_64 is enabled for RVCT by default. + + * create_jit_stubs: + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::ctiVMThrowTrampoline): + (JSC::ctiOpThrowNotCaught): + * wtf/Platform.h: + +2010-08-05 Chao-ying Fu <fu@mips.com> + + Reviewed by Darin Adler. + + Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS + https://bugs.webkit.org/show_bug.cgi?id=43514 + + MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that + RenderArena::allocate() can return 8-byte aligned memory to avoid + exceptions on sdc1/ldc1. + + * wtf/Platform.h: + +2010-08-05 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig + + Bug 43594 - Add string forwards to Forward.h + This allows us to remove forward declarations for these classes from + WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Forward.h: + +2010-08-05 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + Fixed leak seen on buildbot. + + * runtime/GCActivityCallbackCF.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr, + since anything less would be uncivilized. + +2010-08-05 Andy Estes <aestes@apple.com> + + Reviewed by David Kilzer. + + Rename iOS-related OS and PLATFORM macros. + https://bugs.webkit.org/show_bug.cgi?id=43493 + + Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to + WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to + WTF_PLATFORM_IOS_SIMULATOR. + + * jit/ExecutableAllocator.h: + * jit/JITStubs.cpp: + * profiler/ProfilerServer.mm: + (-[ProfilerServer init]): + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::): + * wtf/Platform.h: + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): + +2010-08-05 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=43464 + + Currently, the global object is being embedded in the JavaScriptCore + bytecode, however since the global object is the same for all opcodes + in a code block, we can have the global object just be a member of the + associated code block. + + Additionally, I added an assert inside of emitOpcode that verifies + that the last generated opcode was of the correct length. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::globalObject): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::ProgramCodeBlock::ProgramCodeBlock): + (JSC::EvalCodeBlock::EvalCodeBlock): + (JSC::FunctionCodeBlock::FunctionCodeBlock): + * bytecode/Opcode.h: + (JSC::opcodeLength): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitOpcode): + Added an assert to check that the last generated opcode is the + correct length. + (JSC::BytecodeGenerator::rewindBinaryOp): + Changed the last opcode to op_end since the length will no longer + be correct. + (JSC::BytecodeGenerator::rewindUnaryOp): + Changed the last opcode to op_end since the length will no longer + be correct. + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitGetScopedVar): + (JSC::BytecodeGenerator::emitPutScopedVar): + (JSC::BytecodeGenerator::emitResolveWithBase): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::privateExecute): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_resolve_global_dynamic): + (JSC::JIT::emitSlow_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + * jit/JITStubs.cpp: + (JSC::cti_op_resolve_global): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + +2010-08-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 43185 - Switch RegisterFile over to use PageAllocation + + Remove platform-specific memory allocation code. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + (JSC::RegisterFile::releaseExcessCapacity): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + (JSC::RegisterFile::checkAllocatedOkay): + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::lastError): + * wtf/PageAllocation.h: + (WTF::PageAllocation::allocate): + (WTF::PageAllocation::allocateAt): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::pageSize): + (WTF::PageAllocation::isPageAligned): + (WTF::PageAllocation::isPowerOfTwo): + * wtf/PageReservation.h: + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::reserve): + (WTF::PageReservation::reserveAt): + +2010-08-05 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array + content aren't properly initialized as part of unshift. + + * runtime/JSArray.cpp: + (JSC::JSArray::unshiftCount): + +2010-08-05 Jian Li <jianli@chromium.org> + + Reviewed by David Levin. + + Unify blob related feature defines to ENABLE(BLOB). + https://bugs.webkit.org/show_bug.cgi?id=43081 + + * Configurations/FeatureDefines.xcconfig: + +2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Rubber-stamped by Xan Lopez. + + Remove GHashTable left-overs. GHashTable is ref-counted, and is + correctly supported by GRefPtr. + + * wtf/gobject/GOwnPtr.h: + +2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed. + + Typo fix that makes distcheck happy. + + * GNUmakefile.am: + +2010-08-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt and Beth Dakin. + + https://bugs.webkit.org/show_bug.cgi?id=43461 + Invalid NaN parsing + + * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a + non-standard NaN representation, since our NaN encoding assumes that all + true NaNs have the standard bit pattern. + + * API/JSValueRef.cpp: + (JSValueMakeNumber): Don't allow an API client to accidentally specify + a non-standard NaN either. + +2010-08-04 Gavin Barraclough <barraclough@apple.com> + + Windows build fix part II. + + * wtf/PageReservation.h: + (WTF::PageReservation::systemReserve): + +2010-08-04 Gavin Barraclough <barraclough@apple.com> + + Windows build fix. + + * wtf/PageReservation.h: + (WTF::PageReservation::systemReserve): + +2010-08-04 Gavin Barraclough <barraclough@apple.com> + + Build fix - add new header to !Mac projects. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + +2010-08-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation. + + The PageAllocation class has a number of issues: + * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate + blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in + behaviour. + * In order for PageAllocation to work correctly on WinCE we should be decommitting memory + before deallocating. In order to simplify understanding the expected state at deallocate, + split behaviour out into PageAllocation and PageReservation classes. Require that all + memory be decommitted before calling deallocate on a PageReservation, add asserts to + enforce this. + * add many missing asserts. + * inline more functions. + * remove ability to create sub-PageAllocations from an existing PageAllocations object - + this presented an interface that would allow sub regions to be deallocated, which would + not have provided expected behaviour. + * remove writable/executable arguments to commit, this value can be cached at the point + the memory is reserved. + * remove writable/executable arguments to allocateAligned, protection other than RW is not + supported. + * add missing checks for overflow & failed allocation to mmap path through allocateAligned. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::Allocation::Allocation): + (JSC::ExecutablePool::Allocation::base): + (JSC::ExecutablePool::Allocation::size): + (JSC::ExecutablePool::Allocation::operator!): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::coalesceFreeSpace): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::allocInternal): + * runtime/AlignedMemoryAllocator.h: + (JSC::::allocate): + (JSC::::AlignedMemoryAllocator): + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + * runtime/Collector.h: + * wtf/PageAllocation.cpp: + * wtf/PageAllocation.h: + (WTF::PageAllocation::operator!): + (WTF::PageAllocation::allocate): + (WTF::PageAllocation::allocateAt): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::deallocate): + (WTF::PageAllocation::pageSize): + (WTF::PageAllocation::systemAllocate): + (WTF::PageAllocation::systemAllocateAt): + (WTF::PageAllocation::systemAllocateAligned): + (WTF::PageAllocation::systemDeallocate): + (WTF::PageAllocation::systemPageSize): + * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h. + (WTF::PageReservation::PageReservation): + (WTF::PageReservation::commit): + (WTF::PageReservation::decommit): + (WTF::PageReservation::reserve): + (WTF::PageReservation::reserveAt): + (WTF::PageReservation::deallocate): + (WTF::PageReservation::systemCommit): + (WTF::PageReservation::systemDecommit): + (WTF::PageReservation::systemReserve): + (WTF::PageReservation::systemReserveAt): + * wtf/Platform.h: + +2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64655. + http://trac.webkit.org/changeset/64655 + https://bugs.webkit.org/show_bug.cgi?id=43496 + + JavaScriptCore references patch seems to have caused + regressions in QT and GTK builds (Requested by nlawrence on + #webkit). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): + * runtime/JSCell.h: + (JSC::JSValue::asCell): + (JSC::MarkStack::append): + * 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::): + (JSC::JSValue::JSValue): + (JSC::JSValue::asCell): + * runtime/MarkStack.h: + * runtime/NativeErrorConstructor.cpp: + * runtime/NativeErrorConstructor.h: + * runtime/Structure.h: + (JSC::Structure::storedPrototype): + +2010-08-04 Gavin Barraclough <barraclough@apple.com> + + Rubber stamped by Sam Weinig. + + Enable JSVALUE64 for CPU(PPC64). + Basic browsing seems to work. + + * wtf/Platform.h: + +2010-08-04 Nathan Lawrence <nlawrence@apple.com> + + 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-03 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Oliver Hunt. + + Tightened up some get_by_id_chain* code generation + https://bugs.webkit.org/show_bug.cgi?id=40935 + + This is in the style of + https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to + call accessor functions when it was not necessary to directly access + the private variables. + + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + +2010-08-03 Adam Roben <aroben@apple.com> + + Turn on PLATFORM_STRATEGIES on Windows + + Fixes <http://webkit.org/b/43431>. + + Reviewed by Anders Carlsson. + + * wtf/Platform.h: + +2010-08-04 Gabor Loki <loki@webkit.org> + + Reviewed by Geoffrey Garen. + + Enable JSValue32_64 for GCC on ARM by default + https://bugs.webkit.org/show_bug.cgi?id=43410 + + * wtf/Platform.h: + +2010-08-03 Gavin Barraclough <barraclough@apple.com> + + Speculative windows build fix. + + * wtf/Bitmap.h: + +2010-08-03 Gavin Barraclough <barraclough@apple.com> + + Build fix following r64624. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/PageAllocation.h: + +2010-08-03 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=43269 + + Added new allocateAligned methods to PageAllocation. In order to + prevent a regress in performance, the function needs to be inlined. + + Additionally, I ported the symbian block allocator to use + PageAllocation and added a new WTF::Bitmap class to support this. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/AlignedMemoryAllocator.h: Added. + (JSC::AlignedMemory::deallocate): + (JSC::AlignedMemory::base): + (JSC::AlignedMemory::AlignedMemory): + (JSC::AlignedMemoryAllocator::destroy): + (JSC::AlignedMemoryAllocator::allocate): + (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator): + (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator): + (JSC::AlignedMemoryAllocator::free): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::freeBlocks): + (JSC::Heap::allocate): + (JSC::Heap::shrinkBlocks): + (JSC::Heap::markConservatively): + (JSC::Heap::clearMarkBits): + (JSC::Heap::markedCells): + * runtime/Collector.h: + (JSC::CollectorHeap::collectorBlock): + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::operator*): + (JSC::LiveObjectIterator::operator++): + (JSC::DeadObjectIterator::operator++): + * wtf/Bitmap.h: Added. + (WTF::Bitmap::get): + (WTF::Bitmap::set): + (WTF::Bitmap::clear): + (WTF::Bitmap::clearAll): + (WTF::Bitmap::advanceToNextFreeBit): + (WTF::Bitmap::count): + (WTF::Bitmap::isEmpty): + (WTF::Bitmap::isFull): + * wtf/PageAllocation.h: + (WTF::PageAllocation::operator UnspecifiedBoolType): + (WTF::PageAllocation::allocateAligned): + (WTF::PageAllocation::reserveAligned): + * wtf/Platform.h: + * wtf/symbian: Removed. + * wtf/symbian/BlockAllocatorSymbian.cpp: Removed. + * wtf/symbian/BlockAllocatorSymbian.h: Removed. + +2010-08-03 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code + was using the wrong "length" value to move array contents when adding + space to the beginning of an array for an unshift() or similar + operation. Instead of using m_vectorLength, the length of the + allocated JSValue array, the code was using m_length, the declared + length of the array. These two values do not need to match. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::increaseVectorPrefixLength): + +2010-08-03 Chao-ying Fu <fu@mips.com> + + Reviewed by Gavin Barraclough. + + Fix following https://bugs.webkit.org/show_bug.cgi?id=43089 + (accidentally inverted a compiler version check). + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2010-08-03 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Gavin Barraclough. + + Implement DEFINE_STUB_FUNCTION for WinCE. + https://bugs.webkit.org/show_bug.cgi?id=34953 + + * jit/JITStubs.cpp: + (JSC::): + (JSC::DEFINE_STUB_FUNCTION): + +2010-08-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 43390 - Do not CRASH if we run out of room for jit code. + + Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated. + The assemblers should pass this through without trying to use it in executableCopy. + Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this. + + Change the JIT to throw an exception if allocation fails. + Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path). + Change YARR JIT to fallback to PCRE + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::executableCopy): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::allocationSuccessful): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::executableCopy): + * assembler/X86Assembler.h: + (JSC::X86Assembler::executableCopy): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::allocInternal): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compilePutByIdTransition): + (JSC::JIT::compilePatchGetArrayLength): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::setupPolymorphicProtoList): + * jit/JITStubs.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::finalize): + * runtime/ExceptionHelpers.cpp: + (JSC::createOutOfMemoryError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::compile): + +2010-08-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + Fixed a crash seen on the GTK 64bit buildbot. + + When JSArray is allocated for the vptr stealing hack, it's not allocated + in the heap, so the JSArray constructor can't safely call Heap::heap(). + + Since this was subtle enough to confuse smart people, I've changed JSArray + to have an explicit vptr stealing constructor. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSArray.h: + (JSC::JSArray::): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): + +2010-08-03 Alex Milowski <alex@milowski.com> + + Reviewed by Beth Dakin. + + Changed the ENABLE_MATHML value to enable MathML by default. + + * Configurations/FeatureDefines.xcconfig: + +2010-08-03 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Change to keep returned pointer from malloc family functions to + quiet memory leak detect. The pointer is saved in the new m_allocBase + member of the ArrayStorage structure. This fixes the issue found in + https://bugs.webkit.org/show_bug.cgi?id=43229. + + As part of this change, we use m_allocBase when reallocating and + freeing the memory associated with ArrayStorage. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + * runtime/JSArray.h: + +2010-08-03 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=43444 + PLATFORM(CF) is false on Windows in JavaScriptCore + + Moved some PLATFORM(WIN) #defines down into JavaScriptCore. + + * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited + from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h + just #undefined that later. + +2010-08-03 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since + PLATFORM(CF) is not defined on Windows. + + We'll need to enable the GC activity callback some other way, but this + change should get the build back to normal. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + + * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error + in the future with an explicit error message. + +2010-08-03 Geoffrey Garen <ggaren@apple.com> + + Try to fix Windows build: update .def file. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-08-03 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=41318 + GC should reclaim garbage even when new objects are not being allocated rapidly + + Added a callback in JavaScriptCore that gets triggered after an + allocation causes the heap to reset. This is useful for adding a + timer that will trigger garbage collection after the "last" allocation. + + Also needed was to add lock and unlock methods to JSLock that needed + only a JSGlobalData object versus an ExecState object. + + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_put_by_val): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::reset): + (JSC::Heap::setActivityCallback): + * runtime/Collector.h: + * runtime/GCActivityCallback.cpp: Added. + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): + * runtime/GCActivityCallback.h: Added. + (JSC::GCActivityCallback::~GCActivityCallback): + (JSC::GCActivityCallback::operator()): + (JSC::GCActivityCallback::GCActivityCallback): + (JSC::DefaultGCActivityCallback::create): + * runtime/GCActivityCallbackCF.cpp: Added. + (JSC::DefaultGCActivityCallbackPlatformData::trigger): + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::operator()): + * runtime/JSLock.cpp: + (JSC::JSLock::JSLock): + * runtime/JSLock.h: + +2010-08-02 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp + + * wscript: + +2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> + + Reviewed by Simon Hausmann. + + [QT] build fix for symbian + https://bugs.webkit.org/show_bug.cgi?id=43234 + + 1) wrong order of passing param's + 2) static_cast complains on symbian so using reinterpret_cast + + No new tests added. Just a build fix for qt symbian + + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocation::reserve): + +2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Simon Fraser. + + Enabling view modes to all platforms + https://bugs.webkit.org/show_bug.cgi?id=37505 + + Removing ENABLE_WIDGETS_10_SUPPORT flag. + + As view mode media feature is not part of widget 1.0 specification + any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use + of this flag was related to view mode media feature implementation in Qt. + + * wtf/Platform.h: + +2010-07-30 Andy Estes <aestes@apple.com> + + Reviewed by David Kilzer. + + Add Xcode support for compiling WebKit against iOS SDKs. + https://bugs.webkit.org/show_bug.cgi?id=42796 + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + +2010-07-30 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Davin Levin. + + Added a yield() function. + https://bugs.webkit.org/show_bug.cgi?id=42843 + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::yield): + * wtf/ThreadingWin.cpp: + (WTF::yield): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::yield): + * wtf/qt/ThreadingQt.cpp: + (WTF::yield): + +2010-07-30 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Antonio Gomes. + + [EFL] Add library version and soname to EFL generated libraries and binary. + https://bugs.webkit.org/show_bug.cgi?id=43212 + + Add version and soname to libjavascriptcore.so and libwtf.so in case of + linking as shared libraries, and version to jsc executable. + + * CMakeLists.txt: + * jsc/CMakeLists.txt: + * wtf/CMakeLists.txt: + +2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> + + Reviewed by Simon Hausmann. + + [QT] build fix for symbian + https://bugs.webkit.org/show_bug.cgi?id=43234 + + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): + +2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64313. + http://trac.webkit.org/changeset/64313 + https://bugs.webkit.org/show_bug.cgi?id=43233 + + Some Chromium bots are not happy with it for some unknown + reason. (Requested by dumi on #webkit). + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + * wtf/ThreadingWin.cpp: + * wtf/gtk/ThreadingGtk.cpp: + * wtf/qt/ThreadingQt.cpp: + +2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r64302. + http://trac.webkit.org/changeset/64302 + https://bugs.webkit.org/show_bug.cgi?id=43223 + + Assertion is bogus (Requested by olliej on #webkit). + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WebCore::String::String): + +2010-07-29 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Changed the handling for removing and adding elements at the front + of an array. The code now keeps a bias that indicates the amount of + JSValue sized holes are prior to the ArrayStorage block. This means + that shift operations are now memmove's of the header part of + the ArrayStorage and unshift operations are similar, but may require a + realloc first to create the space. Similar operations are performed + for special cases of splice and slice. + Also optimized the new Array(size) case so that we don't allocate and + initialize array elements until the JS code starts using elements. + The array growth code is slightly more aggressive for initial growth + based on size growth of any previous array. + + * Configurations/JavaScriptCore.xcconfig: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::arrayStorage): + (JSC::JSArray::setArrayStorage): + (JSC::JSArray::markChildrenDirect): + +2010-07-29 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes. + + * runtime/Collector.h: + +2010-07-28 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by David Levin. + + Added a yield() function. + https://bugs.webkit.org/show_bug.cgi?id=42843 + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::yield): + * wtf/ThreadingWin.cpp: + (WTF::yield): + * wtf/gtk/ThreadingGtk.cpp: + (WTF::yield): + * wtf/qt/ThreadingQt.cpp: + (WTF::yield): + +2010-07-29 Michael Saboff <msaboff@apple.com> + + Reviewed by Oliver Hunt. + + Fixed issue where RegExp greedy jit code loops when no input is + consumed. Changed the code to only loop if some input was consumed, + but fall through if we successfully match an alternative that + doesn't consume any input. + https://bugs.webkit.org/show_bug.cgi?id=42664 + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + +2010-07-29 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Avoid increasing required alignment of target type warning on ARM + https://bugs.webkit.org/show_bug.cgi?id=38045 + + The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where + sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM: + increases required alignment of target type warnings. + Casting the type of [pointer to Type2] object to void* bypasses the + warning. + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putShortUnchecked): + (JSC::AssemblerBuffer::putIntUnchecked): + (JSC::AssemblerBuffer::putInt64Unchecked): + * jit/JITStubs.cpp: + * pcre/pcre_compile.cpp: + (jsRegExpCompile): + * wtf/FastMalloc.cpp: + (WTF::PageHeapAllocator::New): + (WTF::TCMalloc_Central_FreeList::Populate): + * wtf/MD5.cpp: + (WTF::reverseBytes): + (WTF::MD5::addBytes): + (WTF::MD5::checksum): + * wtf/StdLibExtras.h: + (reinterpret_cast_ptr): + * wtf/Vector.h: + (WTF::VectorBuffer::inlineBuffer): + * wtf/qt/StringQt.cpp: + (WebCore::String::String): + +2010-07-29 Martin Robinson <mrobinson@igalia.com> + + Unreviewed build fix. + + Include a missing header in the source list to fix 'make dist.' + + * GNUmakefile.am: Include missing header. + +2010-07-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Darin Adler. + + Bug 43162 - Add support for MADV_FREE to PageAllocation. + + * wtf/PageAllocation.cpp: + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + +2010-07-27 Kinuko Yasuda <kinuko@chromium.org> + + Reviewed by Ojan Vafai. + + Add FILE_SYSTEM build flag for FileSystem API + https://bugs.webkit.org/show_bug.cgi?id=42915 + + * Configurations/FeatureDefines.xcconfig: + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Temporarily rolling out http://trac.webkit.org/changeset/64177, + this seems to give QT ARM/Win a headache (specifically, looks + like structure layour differs, objects get too large - + "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:" + "error: size of array 'dummyclass_fits_in_cell' is negative"). + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/JSArray.cpp: + (JSC::increasedVectorLength): + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::markChildrenDirect): + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Speculative build fix for Chromium/Win + + * wtf/Platform.h: + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo. + + * wtf/Platform.h: + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O + + * wtf/Platform.h: + +2010-07-27 Michael Saboff <msaboff@apple.com> + + Reviewed by Gavin Barraclough. + + Changed the handling for removing and adding elements at the front + of an array. The code now keeps a bias that indicates the amount of + JSValue sized holes are prior to the ArrayStorage block. This means + that shift operations are now memmove's of the header part of + the ArrayStorage and unshift operations are similar, but may require a + realloc first to create the space. Similar operations are performed + for special cases of splice and slice. + Also optimized the new Array(size) case so that we don't allocate and + initialize array elements until the JS code starts using elements. + The array growth code is slightly more aggressive for initial growth + based on size growth of any previous array. + + * Configurations/JavaScriptCore.xcconfig: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + (JSC::JSArray::~JSArray): + (JSC::JSArray::getOwnPropertySlot): + (JSC::JSArray::getOwnPropertyDescriptor): + (JSC::JSArray::put): + (JSC::JSArray::putSlowCase): + (JSC::JSArray::deleteProperty): + (JSC::JSArray::getOwnPropertyNames): + (JSC::JSArray::getNewVectorLength): + (JSC::JSArray::increaseVectorLength): + (JSC::JSArray::increaseVectorPrefixLength): + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToRegisters): + (JSC::JSArray::compactForSorting): + (JSC::JSArray::subclassData): + (JSC::JSArray::setSubclassData): + (JSC::JSArray::checkConsistency): + * runtime/JSArray.h: + (JSC::JSArray::length): + (JSC::JSArray::canGetIndex): + (JSC::JSArray::getIndex): + (JSC::JSArray::setIndex): + (JSC::JSArray::uncheckedSetIndex): + (JSC::JSArray::arrayStorage): + (JSC::JSArray::setArrayStorage): + (JSC::JSArray::markChildrenDirect): + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 43089 - Cleanup JIT related switched in Platform.h + + The code the enable to JIT checks every permutation of platform & OS individually, but + now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should + be cleaner to just enable by default on these platforms, and explicitly disable on configs + that don't aren't supported. + + Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this + confusing since enabling this "optimization" would be possible, but would be a regression + on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler + technologies applicable to all platforms, and make a more optional behaviour like this a + "USE". + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * wtf/Platform.h: + +2010-07-27 James Robinson <jamesr@chromium.org> + + Reviewed by Darin Fisher. + + [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on + https://bugs.webkit.org/show_bug.cgi?id=43084 + + This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no + change in behavior, that's all controlled by ENABLE() macros that are currently off. + + * wtf/Platform.h: + +2010-07-23 Helder Correia <heldercorreia@codeaurora.org> + + Reviewed by Darin Adler. + + Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are + failing. For canvas image data manipulation, the values passed should + be truncated and wrapped. Also fix the canvas-ImageData-behaviour test + to expect wrapping rather than clamping, and add some new checkings. + https://bugs.webkit.org/show_bug.cgi?id=40272 + + * runtime/JSByteArray.h: + (JSC::JSByteArray::setIndex): + (JSC::JSByteArray::JSByteArray): + +2010-07-27 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 42621 - Add a bump allocator for the YARR interpreter + + The regex engine requires lifo allocation, however currently uses the general purpose + malloc/free memory allocation. A simple bump pointer allocator should provide a lower + overhead allocation solution. + + When using YARR interpreter, 15% progression on v8-regex. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalData.h: + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + * wtf/BumpPointerAllocator.h: Added. + (WTF::BumpPointerPool::ensureCapacity): + (WTF::BumpPointerPool::alloc): + (WTF::BumpPointerPool::dealloc): + (WTF::BumpPointerPool::operator new): + (WTF::BumpPointerPool::BumpPointerPool): + (WTF::BumpPointerPool::create): + (WTF::BumpPointerPool::shrink): + (WTF::BumpPointerPool::destroy): + (WTF::BumpPointerPool::ensureCapacityCrossPool): + (WTF::BumpPointerPool::deallocCrossPool): + (WTF::BumpPointerAllocator::BumpPointerAllocator): + (WTF::BumpPointerAllocator::~BumpPointerAllocator): + (WTF::BumpPointerAllocator::startAllocator): + (WTF::BumpPointerAllocator::stopAllocator): + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::freeDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::interpret): + (JSC::Yarr::Interpreter::Interpreter): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::byteCompileRegex): + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Windows build fix from Chromium/GTK build fix! + + * wtf/PageAllocation.cpp: + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Chromium/GTK build fix + + * wtf/PageAllocation.cpp: + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Build fix for !Mac platforms. + + * Android.mk: + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 43009 - Abstract out page allocation from executable allocators + + It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. + + In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. + I think this will match current behaviour for the next client we will want to port across (RegisterFile & + Collector). + + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Removed. + * jit/ExecutableAllocatorSymbian.cpp: Removed. + * jit/ExecutableAllocatorWin.cpp: Removed. + * wscript: + * wtf/PageAllocator.cpp: Added. + (WTF::protection): + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocator::allocate): + (WTF::PageAllocator::reserve): + (WTF::PageAllocator::deallocate): + (WTF::PageAllocator::pagesize): + * wtf/PageAllocator.h: Added. + (WTF::PageAllocation::PageAllocation): + (WTF::PageAllocation::base): + (WTF::PageAllocation::size): + (WTF::PageAllocation::chunk): + (WTF::PageAllocation::operator!): + (WTF::PageAllocator::): + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry! + + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorSymbian.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorWin.cpp: Added. + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * wscript: + * wtf/PageAllocation.cpp: Removed. + * wtf/PageAllocation.h: Removed. + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Speculative !debug build fix II. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Speculative !debug build fix. + + * wtf/PageAllocation.h: + (WTF::PageAllocation::PageAllocation): + +2010-07-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 43009 - Abstract out page allocation from executable allocators + + It would be great to have a single platform abstraction for block allocation, rather than copy/paste code. + + In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory. + I think this will match current behaviour for the next client we will want to port across (RegisterFile & + Collector). + + * CMakeListsEfl.txt: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::intializePageSize): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocator.h: + (JSC::ExecutablePool::ExecutablePool): + (JSC::ExecutablePool::poolAllocate): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::release): + (JSC::FixedVMPoolAllocator::reuse): + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::FixedVMPoolAllocator::isWithinVMPool): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: Removed. + * jit/ExecutableAllocatorSymbian.cpp: Removed. + * jit/ExecutableAllocatorWin.cpp: Removed. + * wscript: + * wtf/PageAllocator.cpp: Added. + (WTF::protection): + (WTF::PageAllocation::commit): + (WTF::PageAllocation::decommit): + (WTF::PageAllocator::allocate): + (WTF::PageAllocator::reserve): + (WTF::PageAllocator::deallocate): + (WTF::PageAllocator::pagesize): + * wtf/PageAllocator.h: Added. + (WTF::PageAllocation::PageAllocation): + (WTF::PageAllocation::base): + (WTF::PageAllocation::size): + (WTF::PageAllocation::chunk): + (WTF::PageAllocation::operator!): + (WTF::PageAllocator::): + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. + + https://bugs.webkit.org/show_bug.cgi?id=29381 + + * runtime/TimeoutChecker.h: Add getter for the timeout interval + +2010-07-25 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Kent Tamura. + + [WINCE] Buildfix for JSC in release mode + https://bugs.webkit.org/show_bug.cgi?id=42934 + + * jsc.cpp: Don't use __try on WinCE. + +2010-07-24 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + [MSVC] Ensure 4 byte alignment on ARM + https://bugs.webkit.org/show_bug.cgi?id=42935 + + * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame. + +2010-07-24 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + [WINCE] Cleanup defines in Platform.h + https://bugs.webkit.org/show_bug.cgi?id=42933 + + * wtf/Platform.h: + +2010-07-23 Rafael Antognolli <antognolli@profusion.mobi> + + Reviewed by Antonio Gomes. + + [EFL] Cleanup glib support (make it optional) + https://bugs.webkit.org/show_bug.cgi?id=42480 + + Remove gobject/GRefPtr.cpp if not using soup/glib. + + * wtf/CMakeListsEfl.txt: + +2010-07-23 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Adam Roben. + + [WINCE] Implement TCSpinLock. + https://bugs.webkit.org/show_bug.cgi?id=41792 + + Implement the SpinLock with InterlockedExchange from the Windows API. + + * wtf/TCSpinLock.h: + (TCMalloc_SpinLock::Lock): + (TCMalloc_SpinLock::Unlock): + (TCMalloc_SpinLock::IsHeld): + (TCMalloc_SpinLock::Init): + (TCMalloc_SlowLock): + +2010-07-22 Csaba Osztrogonác <ossy@webkit.org> + + Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build. + + * jit/JITStubs.cpp: + * jit/JITStubs.h: + +2010-07-22 Gavin Barraclough <barraclough@apple.com> + + Eeeep! r63947 hosed all non-x86 builds! + + * jit/JITStubs.h: + +2010-07-22 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 42818 - [Qt] REGRESSION(63348): jsc is broken + Speculative fix, need fastcall conventions on Qt/Win. + + * jit/JITStubs.cpp: + * jit/JITStubs.h: + +2010-07-22 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Do more constant folding + https://bugs.webkit.org/show_bug.cgi?id=42867 + + Constant fold a few more operations. SunSpider says this is + a win but I suspect that's just code motion at play. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::makeModNode): + (JSC::ASTBuilder::makeURightShiftNode): + (JSC::ASTBuilder::makeBitOrNode): + (JSC::ASTBuilder::makeBitAndNode): + (JSC::ASTBuilder::makeBitXOrNode): + (JSC::ASTBuilder::makeBinaryNode): + +2010-07-22 Kent Hansen <kent.hansen@nokia.com> + + Reviewed by Kent Tamura. + + Error properties of the Global Object are missing the DontEnum attribute + https://bugs.webkit.org/show_bug.cgi?id=28771 + + Add the attributes to become spec compliant. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + +2010-07-20 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + WebKit on Windows should build optionally with an unversioned ICU DLL + https://bugs.webkit.org/show_bug.cgi?id=42722 + <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU + + Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh. + Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API + should be namespaced with the current ICU version number. Proper value is determined + by checking for the presence of libicuuc.lib, the unversioned copy of ICU. + + To get the proper value for U_DISABLE_RENAMING into all source files, we force + the include of ICUVersion.h (our generated header) via the compiler options. + + Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib) + we copy the ICU lib to an intermediate location under obj with a common name. This + allows us to link properly with either without adding a new build configuration. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + Copy ICU libs into a common location with a common name. + Add additional library search path to pick up icu lib. + Change ICU library filename specified to linker. + Add forced include of ICUVersion.h. + +2010-07-20 Steve Falkenburg <sfalken@apple.com> + + Re-save vsprops files after no-op edits in Visual Studio + to fix manual edit issues. + +2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> + + Reviewed by Steve Block. + + Need to be able to configure Geolocation policy regarding user permissions + https://bugs.webkit.org/show_bug.cgi?id=42068 + + If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy + by default + + * wtf/Platform.h: + +2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63742. + http://trac.webkit.org/changeset/63742 + https://bugs.webkit.org/show_bug.cgi?id=42641 + + Broke Leopard Intel build. (Requested by bbandix on #webkit). + + * wtf/Platform.h: + +2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> + + Reviewed by Steve Block. + + Need to be able to configure Geolocation policy regarding user permissions + https://bugs.webkit.org/show_bug.cgi?id=42068 + + If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy + by default + + * wtf/Platform.h: + +2010-07-19 Dirk Schulze <krit@webkit.org> + + Reviewed by Nikolas Zimmermann. + + SVG CleanUp of SVGPathData parsing + https://bugs.webkit.org/show_bug.cgi?id=41410 + + Added piOverTwo to MathExtras. + + * wtf/MathExtras.h: + +2010-07-19 Mike Moretti <mike.moretti@nokia.com> + + Reviewed by Laszlo Gombos. + + [Symbian] Build fix after r63404. + + Implement isValid() function for the Symbian executable allocator. + + * jit/ExecutableAllocatorSymbian.cpp: + (JSC::ExecutableAllocator::isValid): + +2010-07-19 Chris Marrin <cmarrin@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=42118 + Disable WebGL on Leopard for now. + + LayoutTests fail on some graphics hardware on Leopard because one of the features we use, + GL_ARB_framebuffer_object, is not universally available in Leopard like it is in + SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a + software OpenGL driver on machines without this support. + + * Configurations/FeatureDefines.xcconfig: + +2010-07-16 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Use OwnPtr for CodeBlock objects + https://bugs.webkit.org/show_bug.cgi?id=42490 + + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline. + Eliminated the code that used to initialize the raw pointer since it's now + an OwnPtr. + (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here. + (JSC::ProgramExecutable::ProgramExecutable): Ditto. + (JSC::ProgramExecutable::~ProgramExecutable): Ditto. + (JSC::FunctionExecutable::FunctionExecutable): Ditto. + (JSC::FunctionExecutable::~FunctionExecutable): Ditto. + (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get. + (JSC::ProgramExecutable::compileInternal): Ditto. + (JSC::FunctionExecutable::compileForCallInternal): Ditto. + (JSC::FunctionExecutable::compileForConstructInternal): Ditto. + (JSC::FunctionExecutable::recompile): Use clear instead of delete followed + by assignment of 0. + + * runtime/Executable.h: Moved constructors to the cpp file and changed + raw pointers to OwnPtr. + +2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [EFL] Fix build on 64-bit systems. According to + JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which + needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build + system. + https://bugs.webkit.org/show_bug.cgi?id=42559 + + * CMakeListsEfl.txt: add missing file for x86_64. + +2010-07-16 Leandro Pereira <leandro@profusion.mobi> + + [EFL] Unreviewed build system cleanup. + + Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from + root CMakeLists.txt to the platform CMakeLists.txt. + + * CMakeLists.txt: + * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp. + +2010-07-16 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + ES5 allows use of reserved words as IdentifierName + https://bugs.webkit.org/show_bug.cgi?id=42471 + + Modify the lexer to allow us to avoid identifying reserved + words in those contexts where they are valid identifiers, and + we know it's safe. Additionally tag the reserved word tokens + so we can easily identify them in those cases where we can't + guarantee that we've skipped reserved word identification. + + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseMemberExpression): + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::): + +2010-07-16 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + clang++ build fixes for JavaScriptCore and WebCore + https://bugs.webkit.org/show_bug.cgi?id=42478 + + * runtime/RegExpKey.h: + (JSC::operator==): + Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL. + +2010-07-16 Anders Carlsson <andersca@apple.com> + + Reviewed by David Levin. + + Really add WARN_UNUSED_RESULT to leakRef + https://bugs.webkit.org/show_bug.cgi?id=42464 + + * wtf/PassRefPtr.h: + (WTF::PassRefPtr::): + (WTF::NonNullPassRefPtr::): + Put the WARN_UNUSED_RESULT attribute at the right place. + + * wtf/RetainPtr.h: + (WTF::RetainPtr::releaseRef): + Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need + to be fixed first. + +2010-07-15 Victor Wang <victorw@chromium.org> + + Reviewed by David Levin. + + [Chromium] Disable c4291 for chromium windows multi dll build. + + https://bugs.webkit.org/show_bug.cgi?id=42177 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2010-07-15 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Crash entering mail.yahoo.com + https://bugs.webkit.org/show_bug.cgi?id=42394 + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the + identifier we're resolving is not a local variable, registerFor returns + NULL. + + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I + noticed this while working on it: No need to NULL-check returnNode, + since an early return has already done so. + +2010-07-15 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Oliver Hunt. + + [GTK] Simplify the distribution step + https://bugs.webkit.org/show_bug.cgi?id=42414 + + * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead + of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list. + Refer to create_hash_table and create_regexp_tables directly, as is the + behavior with other code generation scripts. + +2010-07-15 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Fix dumping of op_put_by_id. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printPutByIdOp): + +2010-07-15 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Refactoring some parts of the lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 + + This patch is a precursor of refactoring the identifier + parsing, which currently slows down the lexer, and not + ready for landing. This patch contains those sources, + which does not slow down the lexer (mainly style changes). + + SunSpider: no change (529.4ms to 528.7ms) + --parse-only: no change (31.0ms to 31.2ms) + + * parser/Lexer.cpp: + (JSC::isIdentStart): using typesOfASCIICharacters to determine + whether the current character is in identifier start + (JSC::isIdentPart): using typesOfASCIICharacters to determine + whether the current character is in identifier part + (JSC::Lexer::parseString): style fix + (JSC::Lexer::lex): removing the else after the main which + which reduces code duplication + +2010-07-15 Mark Rowe <mrowe@apple.com> + + Update the sorting in the Xcode project files. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-07-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails + https://bugs.webkit.org/show_bug.cgi?id=42310 + + Add some null checks to deal with the Fixed VM allocator failing + to get the requested executable region, delay the creation of the + JITStubs in JSGlobalData until after we know whether we're using + the JIT. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::poolForSize): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::alloc): + (JSC::FixedVMPoolAllocator::free): + (JSC::FixedVMPoolAllocator::isValid): + (JSC::ExecutableAllocator::isValid): + (JSC::ExecutablePool::systemAlloc): + (JSC::ExecutablePool::systemRelease): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutableAllocator::isValid): + * jit/ExecutableAllocatorWin.cpp: + (JSC::ExecutableAllocator::isValid): + * jit/JIT.cpp: + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + (JSC::JIT::compileCTINativeCall): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITThunks::hostFunctionStub): + * jit/ThunkGenerators.cpp: + (JSC::charCodeAtThunkGenerator): + (JSC::charAtThunkGenerator): + (JSC::fromCharCodeThunkGenerator): + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): + * runtime/Executable.h: + (JSC::NativeExecutable::create): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::getHostFunction): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::getCTIStub): + * yarr/RegexJIT.cpp: + (JSC::Yarr::jitCompileRegex): + +2010-07-14 Gavin Barraclough <barraclough@apple.com> + + Speculative Qt/Windows build fix. + + * jit/JITStubs.h: + +2010-07-14 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=42280 + JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it! + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReferenceForTrampoline): + * jit/JITStubs.cpp: + * jit/JITStubs.h: + * wtf/Platform.h: + +2010-07-14 Oliver Hunt <oliver@apple.com> + + RS=Geoff Garen. + + Guard the CF path of interpreter vs. jit selection with PLATFORM(CF) + + This allows the code to work on windows as well. Also unifies the + environment variable with the preference name. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2010-07-14 Oliver Hunt <oliver@apple.com> + + Reviewed by Don Melton. + + Crash when trying to enable JIT and Interpreter in a single build. + + CFPreferences code added at the last minute failed to account for + the preference not being present and then attempted to CFRelease + a null value. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2010-07-14 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Darin Adler. + + Change indentations in the lexer + https://bugs.webkit.org/show_bug.cgi?id=41845 + + This patch fixes an old, indentation error comes from kjs, + as webkit has a different style rule for switches, and change + the indentation of the main switch, which is a temporary + style error. This change makes easier to see the behavioural + changes in the follow-up patch. + + No behavioural changes. + + * parser/Lexer.cpp: + (JSC::singleEscape): + (JSC::Lexer::lex): + +2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63262. + http://trac.webkit.org/changeset/63262 + https://bugs.webkit.org/show_bug.cgi?id=42229 + + broke Windows compile (Requested by bweinstein on #webkit). + + * API/tests/testapi.c: + (assertEqualsAsCharactersPtr): + (main): + * testapi.pro: Removed. + +2010-07-13 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + ES5 requires BOMs to be treated as whitespace + https://bugs.webkit.org/show_bug.cgi?id=42218 + + Add BOM character to the Lexer's definition of whitespace, + and remove the logic that dealt with stripping BOMs and + caching the cleaned string. + + * parser/Lexer.h: + (JSC::Lexer::isWhiteSpace): + * parser/SourceProvider.h: + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + +2010-07-13 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Darin Adler. + + Avoid slow-path for put() in Array.splice() + https://bugs.webkit.org/show_bug.cgi?id=41920 + + Defer creation of the returned array until its final size is known + to avoid growing it while adding elements. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old) + and CreateCompact (which should only be used when constructing arrays whose + size and contents are known at the time of creation.) + (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact + initialization mode. (Only applies to non-empty arrays.) + (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone) + * runtime/JSArray.h: + (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact + arrays. Does no bounds or other sanity checking. + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray. + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor. + * runtime/JSGlobalObject.h: + (JSC::constructEmptyArray): Pass CreateInitialized to ctor. + * runtime/RegExpConstructor.cpp: + (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor. + +2010-07-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 42207 - Clean up interface to compile executables, always check for exceptions + + Presently interface to compile executable is inconsistent between eval/program and + function code, and is error prone in allowing a caller to byte compile without JIT + compiling an executable (we rely on all executables with codeblocks having JIT code). + Unify on an interface where all compilation is performed by a single compile (with + ForCall|ForConstruct variants) method, and make all clients check for errors. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * parser/Parser.h: + (JSC::Parser::isFunctionBodyNode): + (JSC::Parser::parse): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/ExceptionHelpers.cpp: + (JSC::createStackOverflowError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + * runtime/Executable.h: + (JSC::EvalExecutable::compile): + (JSC::EvalExecutable::generatedBytecode): + (JSC::EvalExecutable::generatedJITCode): + (JSC::ProgramExecutable::compile): + (JSC::ProgramExecutable::generatedBytecode): + (JSC::ProgramExecutable::generatedJITCode): + (JSC::FunctionExecutable::generatedBytecode): + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): + (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::canUseJIT): + +2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Oliver Hunt. + + testapi.c depends on the Core Foundation. + https://bugs.webkit.org/show_bug.cgi?id=40058 + + Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it + to compile in Qt environments. + + All tests should work except for the JSStringCreateWithCharacters() function, + because its tests depend on Core Foundation specific functions. + + * API/tests/testapi.c: + (testJSStringRefCF): moved CoreFoundation specific tests to this function. + (main): The moves plus some minor tweaks. + * testapi.pro: Added. + +2010-07-13 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 42182 - Change how numeric compare functions are detected + + There are three problems with the current mechanism: + * It requires that a function executable be bytecode compiled without + being JIT generated (in order to copy the bytecode from the numeric + compare function). This is a problem since we have an invariant when + running with the JIT that functions are never bytecode compiled without + also being JIT generated (after checking the codeblock we assume the + function has JIT code). To help maintain this invariant + * This implementation will prevent us from experimenting with alternate + compilation paths which do not compile via bytecode. + * It doesn't work. Functions passing more than two arguments will match + if they are comparing their last two arguments, not the first two. + Generally the mapping back from bytecode to semantics may be more + complex then initially expected. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::setIsNumericCompareFunction): + (JSC::BytecodeGenerator::argumentNumberFor): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::BlockNode::singleStatement): + (JSC::FunctionBodyNode::emitBytecode): + * parser/Nodes.h: + (JSC::ExpressionNode::isSubtract): + (JSC::BinaryOpNode::lhs): + (JSC::BinaryOpNode::rhs): + (JSC::SubNode::isSubtract): + (JSC::ReturnNode::value): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + +2010-07-12 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*) + https://bugs.webkit.org/show_bug.cgi?id=41763 + + There are two parts to this patch, the first is to fix the actual + problem. When calling copyStringWithoutBOMs on a string we know + to contain BOMs we return a value indicating that there are no + BOMs. + + The second part of this fix is simply to harden the path that + led to a crash when parsing failed. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + Harden compilation stubs against parser failure. + * parser/Lexer.cpp: + (JSC::Lexer::sourceCode): + Add assertions to ensure that subranges into a source provider + are always actually braces. Hopefully this should catch similar + failures in future. These assertions fire on existing tests + without this fix. + * runtime/Executable.h: + (JSC::FunctionExecutable::tryJitCodeForCall): + (JSC::FunctionExecutable::tryJitCodeForConstruct): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): + Make copyStringWithBOMs do the right thing. + +2010-07-13 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Fix the constant encoding in data transfer instructions on ARM + https://bugs.webkit.org/show_bug.cgi?id=42166 + + The getImm function is designed to produce modified immediate constant + for data processing instructions. It should not be used to encode + any constant for data transfer. In the current situation there is no + way to use any immediate constant for data transfer. So, the moveImm + function is the desired method to pass the offset value to the data + transfer instructions. + + Reported by Jacob Bramley. + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::dataTransfer32): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::call32): + +2010-07-09 Darin Adler <darin@apple.com> + + Reviewed by Geoffrey Garen. + + String to number coercion is not spec compliant + https://bugs.webkit.org/show_bug.cgi?id=31349 + + ToNumber should ignore NBSP (\u00a0) + https://bugs.webkit.org/show_bug.cgi?id=25490 + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseIntOverflow): Added a version that works on UChar. + * runtime/JSGlobalObjectFunctions.h: Ditto. + + * runtime/UString.cpp: + (JSC::isInfinity): Added helper functions. + (JSC::UString::toDouble): Use isStrWhiteSpace instead of + isSASCIISpace to define what we should skip. Got rid of the + code that used CString and UTF8String, instead processing the + UChar of the string directly, except for when we call strtod. + For strtod, use our own home-grown conversion function that + does not try to do any UTF-16 processing. Tidied up the logic + a bit as well. + +2010-07-12 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] make dist is broken because of missing headers and other miscellaneous reasons + https://bugs.webkit.org/show_bug.cgi?id=42107 + + * GNUmakefile.am: Add missing header to the sources list. + +2010-07-12 Adam Roben <aroben@apple.com> + + Stop generating stripped symbols for Release builds + + It turns out we can strip the symbols after-the-fact using PDBCopy. + + Fixes <http://webkit.org/b/42085>. + + Reviewed by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + Removed the pre-link event, which just created the public\sym + directory. + +2010-07-12 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions + https://bugs.webkit.org/show_bug.cgi?id=42086 + + * wtf/OwnPtr.h: + * wtf/PassOwnPtr.h: + * wtf/PassRefPtr.h: + (WTF::PassRefPtr::releaseRef): + (WTF::NonNullPassRefPtr::leakRef): + (WTF::NonNullPassRefPtr::releaseRef): + * wtf/RetainPtr.h: + (WTF::RetainPtr::releaseRef): + +2010-07-10 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled + https://bugs.webkit.org/show_bug.cgi?id=42039 + + Separate the existence of computed goto support in the compiler + from whether or not we are using the interpreter. All the current + HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like + the option of using it elsewhere. The interpreter now uses + ENABLE(COMPUTED_GOTO_INTERPRETER) + + * bytecode/Instruction.h: + (JSC::Instruction::Instruction): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::isOpcode): + (JSC::Interpreter::privateExecute): + * interpreter/Interpreter.h: + (JSC::Interpreter::getOpcode): + (JSC::Interpreter::getOpcodeID): + * wtf/Platform.h: + +2010-07-10 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Remove switches from inner expression loops in the parser + https://bugs.webkit.org/show_bug.cgi?id=42035 + + Use bitmasks and flags on the token types to identify unary and + binary operators, rather than switching on the token type to + identify them. + + * parser/JSParser.cpp: + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + * parser/JSParser.h: + (JSC::): + +2010-07-09 Leon Clarke <leonclarke@google.com> + + Reviewed by Adam Barth. + + add support for link prefetching + https://bugs.webkit.org/show_bug.cgi?id=3652 + + * Configurations/FeatureDefines.xcconfig: + +2010-07-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + Tidy up lexer token ids + https://bugs.webkit.org/show_bug.cgi?id=42014 + + Stop using character literals to identify single character tokens + and instead use symbolic names for all tokens. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::makeBinaryNode): + * parser/JSParser.cpp: + (JSC::JSParser::consume): + (JSC::JSParser::match): + (JSC::JSParser::autoSemiColon): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::allowAutomaticSemicolon): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseDebuggerStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseStrictObjectLiteral): + (JSC::JSParser::parseArrayLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseArguments): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-07-09 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 42015 - Enable JSValue32_64 on ARMv7 + + * Configurations/JavaScriptCore.xcconfig: + * jit/JIT.h: + * jit/JITStubs.cpp: + * wtf/Platform.h: + +2010-07-09 Kenneth Russell <kbr@google.com> + + Reviewed by Dimitri Glazkov. + + Assertion failure in String::utf8() for certain invalid UTF16 inputs + https://bugs.webkit.org/show_bug.cgi?id=41983 + + * wtf/text/WTFString.cpp: + (WebCore::String::utf8): + - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8. + +2010-07-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Remove a couple of excess writes from the lexer + https://bugs.webkit.org/show_bug.cgi?id=41981 + + Remove a couple of fields from JSTokenInfo, and rename the remaining ones + to something more accurate + + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::tokenStart): + (JSC::JSParser::tokenLine): + (JSC::JSParser::tokenEnd): + * parser/JSParser.h: + (JSC::JSTokenInfo::JSTokenInfo): + * parser/Lexer.cpp: + (JSC::Lexer::lex): + +2010-07-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Property declarations in an object literal should not consider the prototype chain when being added to the new object + https://bugs.webkit.org/show_bug.cgi?id=41929 + + To fix this all we need to do is ensure that all new properties are + added with putDirect rather than a fully generic call to put. This + is safe as an object literal is by definition going to produce a + completely normal object. + + Rather than duplicating all the put_by_id logic we add an additional + flag to op_put_by_id to indicate it should be using putDirect. In + the interpreter this adds a runtime branch, but in the jit this is + essentially free as the branch is taken at compile time. This does + actually improve object literal creation time even in the interpreter + as we no longer need to walk the prototype chain to verify that the + cached put is safe. + + We still emit normal put_by_id code when emitting __proto__ as we want + to get the correct handling for changing the prototype. + + Sunspider claims this is a 0.7% speedup which is conceivably real due + to the performance improvement in object literals, but I suspect its + really just the result of code motion. + + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitPutById): + (JSC::BytecodeGenerator::emitDirectPutById): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::PropertyListNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.h: + (JSC::JIT::compilePutByIdTransition): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchPutByIdReplace): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchPutByIdReplace): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSObject.h: + (JSC::JSObject::putDirect): + (JSC::JSValue::putDirect): + * runtime/JSValue.h: + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + String.prototype methods should CheckObjectCoercible (test this is not null or undefined). + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::trimString): + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Date.prototype.toJSON takes one argument, report this correctly. + + * runtime/DatePrototype.cpp: + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + RegExp's prototype should be an object of type RegExp. + + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + * runtime/RegExpPrototype.h: + +2010-07-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + JavaScript parser violates ECMA automatic semicolon insertion rule + https://bugs.webkit.org/show_bug.cgi?id=41844 + + Remove (very) old and bogus logic that automatically inserted a semicolon + at the end of a script's source. + + * parser/Lexer.cpp: + (JSC::Lexer::lex): + +2010-07-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Anders Carlson. + + Tidy up the lexer + + Remove some of the old yacc/lex-isms still present in the lexer + + * parser/JSParser.h: + (JSC::): + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-07-08 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Make object-literal parsing conformant with the spec. + https://bugs.webkit.org/show_bug.cgi?id=41892 + + Bring our parsing of object literals into conformance with the ES5 spec. + Basically disallow conflicting accessor vs. normal property definitions + The bulk of this patch is just fiddling to maintain performance. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createProperty): + (JSC::ASTBuilder::getName): + (JSC::ASTBuilder::getType): + * parser/JSParser.cpp: + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseStrictObjectLiteral): + * parser/JSParser.h: + * parser/Lexer.cpp: + (JSC::Lexer::clear): + * parser/Lexer.h: + (JSC::Lexer::currentOffset): + (JSC::Lexer::setOffset): + Add logic to allow us to roll the lexer back in the input stream. + * parser/Nodes.h: + (JSC::PropertyNode::): + (JSC::PropertyNode::type): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::isValid): + (JSC::SourceProvider::setValid): + SourceProvider now records whether the input text + has already been validated. + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::Property::Property): + (JSC::SyntaxChecker::Property::operator!): + (JSC::SyntaxChecker::createProperty): + (JSC::SyntaxChecker::createPropertyList): + (JSC::SyntaxChecker::createGetterOrSetterProperty): + The SyntaxChecker mode now needs to maintain a bit more information + to ensure that we can validate object literals correctly. + +2010-07-08 Darin Adler <darin@apple.com> + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::sharedInstance): Fix typo. + +2010-07-08 Darin Adler <darin@apple.com> + + Reviewed by Oliver Hunt. + + Fix assertion seen on the Leopard buildbot. + The single shared instance of JSGlobalData was not being + adopted after creation. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef. + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + BOMs are whitespace. + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::isStrWhiteSpace): + +2010-07-08 Martin Robinson <mrobinson@igalia.com> + + Unreviewed. + + Try fix the GTK+ build by touching this file. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + GTK build fix take two. + + * GNUmakefile.am: + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + GTK build fix. + + * GNUmakefile.am: + +2010-07-08 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=41641 + + Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms + other than x86-64 (this may be useful on 32-bit platforms, too). + + Simplify ifdefs by dividing into thwo broad allocation strategies + (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). + + Rename constant used in the code to have names descriptive of their purpose, + rather than their specific value on a given platform. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: + +2010-07-08 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Silence a few noisy build rules. + + * GNUmakefile.am: + +2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r62765. + http://trac.webkit.org/changeset/62765 + https://bugs.webkit.org/show_bug.cgi?id=41840 + + All jscore and layout tests crash on Qt bot (Requested by Ossy + on #webkit). + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::scavengerThread): + +2010-07-08 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Oliver Hunt. + + Interpreter: Crash in op_load_varargs on 64-bit + https://bugs.webkit.org/show_bug.cgi?id=41795 + + Added missing cast of argCount to int32_t in op_load_varargs. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-07-08 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Geoffrey Garen. + + Make FastMalloc more portable. + https://bugs.webkit.org/show_bug.cgi?id=41790 + + Use WTF::Mutex instead of pthread_mutex_t and + replace pthread_cond_t with WTF::ThreadCondition. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::scavengerThread): + +2010-07-08 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Remove needless #include <fcntl.h> from TCSystemAlloc.cpp. + https://bugs.webkit.org/show_bug.cgi?id=41777 + + * wtf/TCSystemAlloc.cpp: + +2010-07-07 Darin Adler <darin@apple.com> + + Fixed build in configurations like PowerPC. + + * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h. + * runtime/RegExpObject.cpp: Ditto. + * wtf/SizeLimits.cpp: Changed compile time assertion to work + even on platforms where two bool members do not end up taking + the same size as one int member! + +2010-07-07 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Lazy mode of parser allows invalid syntax in object literals. + https://bugs.webkit.org/show_bug.cgi?id=41809 + + Make the parser itself validate getter and setter syntax rather + than offloading it to the AST builder. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createGetterOrSetterProperty): + * parser/JSParser.cpp: + (JSC::JSParser::parseProperty): + +2010-07-07 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Adam Roben. + + Revert r62689. + https://bugs.webkit.org/show_bug.cgi?id=41804 + + * runtime/Collector.cpp: + (JSC::Heap::freeBlocks): + +2010-07-07 Adam Barth <abarth@webkit.org> + + Reviewed by Sam Weinig. + + Add reverseFind to Vector and deploy in HTML5 parser + https://bugs.webkit.org/show_bug.cgi?id=41778 + + This method seems generally useful. I'm slightly surprised we don't + have it already. + + * wtf/Vector.h: + (WTF::::reverseFind): + +2010-07-07 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Turn on adoptRef assertion for RefCounted + https://bugs.webkit.org/show_bug.cgi?id=41547 + + * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other + WTF headers should use "" includes; consistent in most WTF headers. + Added a call to relaxAdoptionRequirement. + + * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED. + Added relaxAdoptionRequirement. + +2010-07-07 Anders Carlsson <andersca@apple.com> + + Try to fix the Windows build. + + * runtime/Collector.cpp: + (JSC::Heap::freeBlocks): + +2010-07-07 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + More OwnPtr work + https://bugs.webkit.org/show_bug.cgi?id=41727 + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr. + * API/JSCallbackObjectFunctions.h: + (JSC::JSCallbackObject::JSCallbackObject): Ditto. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): Ditto. + * bytecode/CodeBlock.h: + (JSC::CodeBlock::createRareDataIfNecessary): Ditto. + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): Ditto. + * parser/ParserArena.cpp: + (JSC::ParserArena::ParserArena): Ditto. + * runtime/Arguments.h: + (JSC::Arguments::Arguments): Ditto. + * runtime/Executable.cpp: + (JSC::EvalExecutable::compile): Ditto. + (JSC::ProgramExecutable::compile): Ditto. + (JSC::FunctionExecutable::compileForCall): Ditto. + (JSC::FunctionExecutable::compileForConstruct): Ditto. + (JSC::FunctionExecutable::reparseExceptionInfo): Ditto. + (JSC::EvalExecutable::reparseExceptionInfo): Ditto. + * runtime/JSArray.cpp: + (JSC::JSArray::sort): Ditto. + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): Ditto. + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::RegExpObject): Ditto. + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::createSingleCharacterString): Ditto. + (JSC::SmallStrings::singleCharacterStringRep): Ditto. + + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): Use adoptPtr. + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto. + (JSC::Yarr::ByteCompiler::compile): Ditto. + (JSC::Yarr::ByteCompiler::regexBegin): Ditto. + (JSC::Yarr::byteCompileRegex): Ditto. + * yarr/RegexInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto. + +2010-07-07 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Make clear set the pointer to 0 before deletion + https://bugs.webkit.org/show_bug.cgi?id=41727 + + * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new + value before deleting the old one, including in the set function and the + clear function. This required changing safeDelete. + * wtf/OwnPtr.h: Ditto. Also removed some extra null checks. + * wtf/PassOwnPtr.h: Ditto. + + * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new + value before deref'ing the old one in the clear function. Also added a + leakRef function for NonNullPassRefPtr. + * wtf/RefPtr.h: Ditto. + + * wtf/gobject/GOwnPtr.h: More of the same. + * wtf/gobject/GRefPtr.h: Ditto. + +2010-07-07 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Oliver Hunt. + + Refactored string parsing inside the lexer + https://bugs.webkit.org/show_bug.cgi?id=41606 + + Does not use goto. Although the last sunspider + parse-only tests yields 1.044x speedup, I think the + patch can have a slight improvement at most. + + * parser/Lexer.cpp: + (JSC::singleEscape): + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: + +2010-07-06 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Make it possible to have both the JIT and Interpreter available in a single build + https://bugs.webkit.org/show_bug.cgi?id=41722 + + Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible + to have both JIT and INTERPRETER enabled at the same time. This doesn't add + support for mix mode execution, but it does allow a single build to contain all + the code needed to use either the interpreter or the jit. + + If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment + variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter. + + This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER), + or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif + #if ENABLE(INTERPRETER), etc. There are also a few functions that need to be + renamed to resolve return type ambiguity. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + * interpreter/CallFrame.h: + (JSC::ExecState::returnVPC): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/Executable.cpp: + (JSC::EvalExecutable::generateJITCode): + (JSC::ProgramExecutable::generateJITCode): + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * runtime/JSFunction.cpp: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::canUseJIT): + * wtf/Platform.h: + +2010-07-06 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr + https://bugs.webkit.org/show_bug.cgi?id=41320 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment + instead of set since the result of reparseExceptionInfo is now a + PassOwnPtr. + + * bytecode/CodeBlock.h: Change extractExceptionInfo to return a + PassOwnPtr instead of a raw pointer. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr. + (JSC::EvalExecutable::reparseExceptionInfo): Ditto. + (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was + in the header before, but it's better to not have it there to reduce + header dependencies. Return a PassOwnPtr. + + * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr, + and put it in the private sections of classes other than the base class. + + * wtf/MessageQueue.h: + (WTF::MessageQueue::append): Use leakPtr instead of release. + (WTF::MessageQueue::appendAndCheckEmpty): Ditto. + (WTF::MessageQueue::prepend): Ditto. + + * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return + a PassOwnPtr rather than a raw pointer. Added a leakPtr function that + returns a raw pointer. Put the constructor that takes a raw pointer and + the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the + new adoptPtr function from PassOwnPtr.h. + + * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function + to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr. + Put the constructor and assignment operators that take a raw pointer + into a section guarded by LOOSE_PASS_OWN_PTR. + +2010-07-06 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler + + Update comment in StringExtras.h to be more accurate. + + * wtf/StringExtras.h: + +2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r62511. + http://trac.webkit.org/changeset/62511 + https://bugs.webkit.org/show_bug.cgi?id=41686 + + Breaks Linux/64bit compilation (Requested by xan_ on #webkit). + + * jit/ExecutableAllocator.cpp: + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: + +2010-07-05 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=41641 + + Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms + other than x86-64 (this may be useful on 32-bit platforms, too). + + Simplify ifdefs by dividing into thwo broad allocation strategies + (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND). + + Rename constant used in the code to have names descriptive of their purpose, + rather than their specific value on a given platform. + + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::reprotectRegion): + (JSC::ExecutableAllocator::cacheFlush): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): + (JSC::FixedVMPoolAllocator::free): + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * wtf/Platform.h: + +2010-07-05 Steve Block <steveblock@google.com> + + Reviewed by Darin Adler. + + ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h + https://bugs.webkit.org/show_bug.cgi?id=41594 + + * wtf/ThreadingPthreads.cpp: + +2010-07-04 Mark Rowe <mrowe@apple.com> + + Build fix after r62456. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent + warnings about comparisons between signed and unsigned types, and attempts to call an overload + of std::min that doesn't exist. + +2010-07-02 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41553 + Make StringExtras.h versions of snprintf and vsnprintf match the unix versions. + + - MSVC does not ensure the buffers are null terminated as the unix versions do. + + * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes. + * runtime/UString.cpp: Clean up includes. + (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong. + * wtf/StringExtras.h: + (snprintf): Ensure null termination of buffer. + (vsnprintf): Ditto. + +2010-07-03 Yong Li <yoli@rim.com> + + Reviewed by Darin Adler. + + Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in + the interpreter as well as the JIT. + + https://bugs.webkit.org/show_bug.cgi?id=41351 + rdar://problem/8142141 + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Fix signed integer overflow problem + in op_load_varargs handling. 0xFFFFFFFF was read as -1. + +2010-06-26 Jeremy Orlow <jorlow@chromium.org> + + Reviewed by Dumitru Daniliuc. + + Support for keys and in-memory storage for IndexedDB + https://bugs.webkit.org/show_bug.cgi?id=41252 + + Set the role to Private. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-07-02 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Move BOM handling out of the lexer and parser + https://bugs.webkit.org/show_bug.cgi?id=41539 + + Doing the BOM stripping in the lexer meant that we could + end up having to strip the BOMs from a source multiple times. + To deal with this we now require all strings provided by + a SourceProvider to already have had the BOMs stripped. + This also simplifies some of the lexer logic. + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): + +2010-07-03 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Kent Tamura. + + [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar. + https://bugs.webkit.org/show_bug.cgi?id=41411 + + * wtf/unicode/wince/UnicodeWince.cpp: + (WTF::Unicode::isAlphanumeric): + * wtf/unicode/wince/UnicodeWince.h: + (WTF::Unicode::isArabicChar): + +2010-07-03 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log. + https://bugs.webkit.org/show_bug.cgi?id=41524 + + Print "WebKit CRASH" before crashing. + + * wtf/Assertions.h: + +2010-07-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken + + This method tried to repatch a LDR (T2) into an ADD (T3) - but it only + repatches the first instruction word. The layout of the fields in the + second word is different, and also needs repatching. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::repatchLoadPtrToLEA): + +2010-07-02 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Clamp the number of arguments supported by function.apply + https://bugs.webkit.org/show_bug.cgi?id=41351 + <rdar://problem/8142141> + + Add clamping logic to function.apply similar to that + enforced by firefox. We have a smaller clamp than + firefox as our calling convention means that stack + usage is proportional to argument count -- the firefox + limit is larger than you could actually call. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Arguments.h: + (JSC::Arguments::): + +2010-07-02 Chao-ying Fu <fu@mips.com> + + Reviewed by Oliver Hunt. + + Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS + https://bugs.webkit.org/show_bug.cgi?id=40179 + + Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * wtf/Platform.h: + +2010-07-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 41552 - Clean up ARMv7 vfp code generation + Emit separate opcode individually, remove magic numbers. + + Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned). + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::vadd_F64): + (JSC::ARMv7Assembler::vcmp_F64): + (JSC::ARMv7Assembler::vcvt_F64_S32): + (JSC::ARMv7Assembler::vcvtr_S32_F64): + (JSC::ARMv7Assembler::vdiv_F64): + (JSC::ARMv7Assembler::vldr): + (JSC::ARMv7Assembler::vmov_F64_0): + (JSC::ARMv7Assembler::vmov): + (JSC::ARMv7Assembler::vmrs): + (JSC::ARMv7Assembler::vmul_F64): + (JSC::ARMv7Assembler::vstr): + (JSC::ARMv7Assembler::vsub_F64): + (JSC::ARMv7Assembler::VFPOperand::VFPOperand): + (JSC::ARMv7Assembler::VFPOperand::bits1): + (JSC::ARMv7Assembler::VFPOperand::bits4): + (JSC::ARMv7Assembler::vcvtOp): + (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp): + (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::branchDouble): + * runtime/JSImmediate.h: + (JSC::JSValue::isCell): + +2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r62410. + http://trac.webkit.org/changeset/62410 + https://bugs.webkit.org/show_bug.cgi?id=41549 + + accursed last minute changes (Requested by olliej on #webkit). + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::copyCodeWithoutBOMs): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::): + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::hasBOMs): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + +2010-07-02 Sam Weinig <sam@webkit.org> + + Reviewed by Geoffrey Garen. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=41548 + Use snprintf instead of sprintf everywhere in JavaScriptCore + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::globalFuncEscape): + * runtime/UString.cpp: + (JSC::UString::from): + +2010-07-02 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Move BOM handling out of the lexer and parser + https://bugs.webkit.org/show_bug.cgi?id=41539 + + Doing the BOM stripping in the lexer meant that we could + end up having to strip the BOMs from a source multiple times. + To deal with this we now require all strings provided by + a SourceProvider to already have had the BOMs stripped. + This also simplifies some of the lexer logic. + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): + (JSC::Lexer::sourceCode): + * parser/SourceProvider.h: + (JSC::SourceProvider::SourceProvider): + (JSC::UStringSourceProvider::create): + (JSC::UStringSourceProvider::getRange): + (JSC::UStringSourceProvider::UStringSourceProvider): + * wtf/text/StringImpl.h: + (WebCore::StringImpl::copyStringWithoutBOMs): + +2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + [ Updated after rollout. ] + + Merged RegExp constructor and RegExp::create methods. + Both functions are called with three parameters and check whether + flags (the third param) is given or not. + Avoid extra hash lookups in RegExpCache::create by passing a pre-computed + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + +2010-07-02 Martin Robinson <mrobinson@igalia.com> + + Unreviewed. Build fix for GTK+. + + Build Lexer.lut.h with the rest of the .lut.h files. Later these should + all probably be moved to DerivedSources. + + * GNUmakefile.am: + +2010-06-23 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Gustavo Noronha Silva. + + [GTK] Separate DerivedSources per-project + https://bugs.webkit.org/show_bug.cgi?id=41109 + + Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore. + + * GNUmakefile.am: + +2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Oliver Hunt. + + The alternativeFrameLocation value is wrong in the emitDisjunction function in + case of PatternTerm::TypeParentheticalAssertion. This value needs to be + computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc + memory corruption in some cases. + Layout test added for checking of TypeParentheticalAssertion case. + https://bugs.webkit.org/show_bug.cgi?id=41458 + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2010-07-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Add a FixedArray template to encapsulate fixed length arrays + https://bugs.webkit.org/show_bug.cgi?id=41506 + + This new type is used in place of fixed length C arrays so + that debug builds can guard against attempts to go beyond + the end of the array. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/Opcode.cpp: + (JSC::OpcodeStats::~OpcodeStats): + * pcre/pcre_compile.cpp: + (calculateCompiledPatternLength): + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + (JSC::Heap::allocate): + * runtime/Collector.h: + (JSC::CollectorBitmap::clearAll): + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::operator*): + * runtime/DateInstanceCache.h: + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + * runtime/JSString.h: + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/NumericStrings.h: + * runtime/RegExpCache.h: + * runtime/SmallStrings.h: + (JSC::SmallStrings::singleCharacterStrings): + * wtf/AVLTree.h: + * wtf/FixedArray.h: Added. + (WTF::FixedArray::operator[]): + (WTF::FixedArray::data): + +2010-07-01 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Oliver Hunt. + + Improve the main lexer switch by mapping input characters to their type + https://bugs.webkit.org/show_bug.cgi?id=41459 + + Sunsipder: no change (from 532.9ms to 531.5ms) + SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms) + + * parser/Lexer.cpp: + (JSC::): + (JSC::Lexer::lex): + +2010-07-01 Sam Weinig <sam@webkit.org> + + Rubber-stamped by Ander Carlsson. + + Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard. + + * wtf/Platform.h: + +2010-07-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 41490 - Add missing operations to MacroAssemblerARMv7 + Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed. + + * assembler/ARMv7Assembler.h: + (JSC::ARMRegisters::): + (JSC::ARMRegisters::asSingle): + (JSC::ARMRegisters::asDouble): + (JSC::VFPImmediate::VFPImmediate): + (JSC::VFPImmediate::isValid): + (JSC::VFPImmediate::value): + (JSC::ARMv7Assembler::singleRegisterMask): + (JSC::ARMv7Assembler::doubleRegisterMask): + (JSC::ARMv7Assembler::): + (JSC::ARMv7Assembler::add_S): + (JSC::ARMv7Assembler::neg): + (JSC::ARMv7Assembler::orr_S): + (JSC::ARMv7Assembler::sub): + (JSC::ARMv7Assembler::sub_S): + (JSC::ARMv7Assembler::vadd_F64): + (JSC::ARMv7Assembler::vcmp_F64): + (JSC::ARMv7Assembler::vcvt_F64_S32): + (JSC::ARMv7Assembler::vcvtr_S32_F64): + (JSC::ARMv7Assembler::vdiv_F64): + (JSC::ARMv7Assembler::vldr): + (JSC::ARMv7Assembler::vmov_F64_0): + (JSC::ARMv7Assembler::vmov): + (JSC::ARMv7Assembler::vmul_F64): + (JSC::ARMv7Assembler::vstr): + (JSC::ARMv7Assembler::vsub_F64): + (JSC::ARMv7Assembler::vcvt): + (JSC::ARMv7Assembler::vmem): + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle): + (JSC::MacroAssemblerARMv7::neg32): + (JSC::MacroAssemblerARMv7::loadDouble): + (JSC::MacroAssemblerARMv7::divDouble): + (JSC::MacroAssemblerARMv7::convertInt32ToDouble): + (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32): + (JSC::MacroAssemblerARMv7::zeroDouble): + (JSC::MacroAssemblerARMv7::branchOr32): + (JSC::MacroAssemblerARMv7::set32): + (JSC::MacroAssemblerARMv7::set8): + * assembler/MacroAssemblerMIPS.h: + * assembler/MacroAssemblerX86Common.h: + +2010-07-01 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoff Garen. + + Improve reentrancy logic in polymorphic cache stubs + <https://bugs.webkit.org/show_bug.cgi?id=41482> + <rdar://problem/8094380> + + Make the polymorphic cache stubs handle reentrancy + better. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC::getPolymorphicAccessStructureListSlot): + +2010-07-01 Antti Koivisto <koivisto@iki.fi> + + Revert accidental commit. + + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + +2010-06-30 Darin Adler <darin@apple.com> + + Reviewed by Adam Barth. + + Add assertion, off by default, for when you forget to do adoptRef + https://bugs.webkit.org/show_bug.cgi?id=41422 + + * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted + function, called on the pointer by adoptRef, with an empty inline + default version, meant to be overloaded. Unified the inlining + with a macro named REF_DEREF_INLINE to make it clearer what's + going on in the refIfNotNull/derefIfNotNull functions. Renamed + releaseRef to leakRef, but left the old name in for compatibility + for now. + + * wtf/RefCounted.h: Added code to require adoption and assert if + you don't call adoptRef. For now, it is turned off because of the + LOOSE_REF_COUNTED define in this header. Later we can turn it on + once we get everything working without asserting. + +2010-06-29 Michael Saboff <msaboff@apple.com> + + Reviewed by Darin Adler. + + Bug 41238 - RegExp performance slow on Dromaeo benchmark + + Other javascript engines appear to cache prior results of regular + expression operations. + + Suggest adding some sort of caching mechanism to regular expression + processing. + + Added a single entry cache of match() results to RegExp class. + + Also added performance improvements to UString == operator. + First check the impls for equality. Then get the length of + each of the non-null impls. Next check the sizes for equality. + Then check the data for the case of different impls that point + to the same data (most likely due to substrings from the beginning of + another string). Lastly we check the underlying data for equality. + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::match): + * runtime/RegExp.h: + * runtime/UString.h: + (JSC::operator==): + +2010-06-29 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + WTF::HashSet iterators are quasi-mutable. Changing the value through + dereferencing an iterator will not change the behavior of methods like + contains or find, but will change the behavior of iterating. + + * wtf/HashSet.h: + (WTF::::begin): + (WTF::::end): + (WTF::::find): + (WTF::::remove): + * wtf/HashTable.h: + +2010-06-29 Martin Robinson <mrobinson@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Clean up the source lists in the GNUMakefile.am files + https://bugs.webkit.org/show_bug.cgi?id=41229 + + Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate + the source lists. + + * GNUmakefile.am: + +2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix QtScript build after QScriptValuePrivate ctor changes + https://bugs.webkit.org/show_bug.cgi?id=41307 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::prototype): + * qt/benchmarks/qscriptengine/qscriptengine.pro: + +2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] QScriptEngine API should contain a newArray function + https://bugs.webkit.org/show_bug.cgi?id=39115 + + * qt/api/qscriptengine.cpp: + (QScriptEngine::newArray): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::newArray): + * qt/api/qscriptengine_p.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::newArray): + +2010-06-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + Install jsc as jsc-X where X is the major API version to allow + parallel installation of both GTK+ 2.x and 3.x versions. + + * GNUmakefile.am: + +2010-06-28 John Gregg <johnnyg@google.com> + + Reviewed by Kent Tamura. + + add ENABLE_DIRECTORY_UPLOAD build support + https://bugs.webkit.org/show_bug.cgi?id=41100 + + * Configurations/FeatureDefines.xcconfig: + +2010-06-28 Xan Lopez <xlopez@igalia.com> + + Revert to build jsc, since the tests expect this. + + * GNUmakefile.am: + +2010-06-28 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Oliver Hunt. + + Only one character lookahead should be enough for the lexer + https://bugs.webkit.org/show_bug.cgi?id=41213 + + The lexer had 4 character lookahead before, which required + a complex shifting mechanism. This can be improved by using + only one character lookahead for most decisions, and a + peek() function as a fallback when it is absolutely necessary. + + * parser/Lexer.cpp: + (JSC::Lexer::currentCharacter): + (JSC::Lexer::currentOffset): + (JSC::Lexer::setCode): + (JSC::Lexer::shift): + (JSC::Lexer::peek): + (JSC::Lexer::getUnicodeCharacter): + (JSC::Lexer::shiftLineTerminator): + (JSC::Lexer::lastTokenWasRestrKeyword): + (JSC::Lexer::lex): + (JSC::Lexer::scanRegExp): + (JSC::Lexer::skipRegExp): + * parser/Lexer.h: + +2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Unreviewed build fix. + + [EFL] Build fix for latest version of Ecore library. + Ecore recently changed return type of callbacks from int to Eina_Bool. + + * wtf/efl/MainThreadEfl.cpp: + (WTF::timeoutFired): Return Eina_Bool instead of int. + +2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] QScriptValue should have API for accessing object properties + https://bugs.webkit.org/show_bug.cgi?id=40903 + + Make possible to access properties inside QScriptValues. While this + still doesn't support the ResolveLocal parameter, it is already useful + for testing the API. + + The tests from upstream QtScript weren't imported since most of them + depend on the setProperty() function as well. A simple test was created. + + * qt/api/qscriptvalue.cpp: + (QScriptValue::property): + * qt/api/qscriptvalue.h: + (QScriptValue::): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::property): + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + (tst_QScriptValue::propertySimple): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + +2010-06-28 Xan Lopez <xlopez@igalia.com> + + Reviewed by Gustavo Noronha. + + [GTK] Add support for GTK+3 + https://bugs.webkit.org/show_bug.cgi?id=41253 + + Suffix jsc with the API version of the library, so that + libwebkitgtk 1.x and 3.x can install jsc. + + * GNUmakefile.am: + +2010-06-27 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Turn ENABLE(SINGLE_THREADED) on. + https://bugs.webkit.org/show_bug.cgi?id=41135 + + Brew MP does not support preemptive multi-threading. + Disable threading for Brew MP. + + * wtf/Platform.h: + +2010-06-26 Tony Gentilcore <tonyg@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add an ENABLE_WEB_TIMING option for enabling Web Timing support. + https://bugs.webkit.org/show_bug.cgi?id=38924 + + * Configurations/FeatureDefines.xcconfig: + +2010-06-25 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + We assume in testapi.c that the value aHeapRef refers to will not be + moved. When we have movable objects, this will not be the case. + + * API/tests/testapi.c: + (main): + +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r61924. + http://trac.webkit.org/changeset/61924 + https://bugs.webkit.org/show_bug.cgi?id=41240 + + It was rolled out, but cq+ wasn't removed (Requested by Ossy_ + on #webkit). + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + +2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + Merge RegExp constructor and RegExp::create methods into one. + Both of function are called with tree parameters and check whether + flags (the third param) is given or not. + Simplify hash lookups in RegExpCache::create with giving them an extra + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + +2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Introduce QtScript benchmarks. + + The QtScript performance should be tested regularly. The patch introduces + micro benchmarks for existing API. + + [Qt] Performance of the QtScript API is not tested. + https://bugs.webkit.org/show_bug.cgi?id=40911 + + * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri. + * qt/benchmarks/benchmarks.pro: Added. + * qt/benchmarks/qscriptengine/qscriptengine.pro: Added. + * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added. + (tst_QScriptEngine::checkSyntax_data): + (tst_QScriptEngine::checkSyntax): + (tst_QScriptEngine::constructor): + (tst_QScriptEngine::evaluateString_data): + (tst_QScriptEngine::evaluateString): + (tst_QScriptEngine::evaluateProgram_data): + (tst_QScriptEngine::evaluateProgram): + (tst_QScriptEngine::newObject): + (tst_QScriptEngine::nullValue): + (tst_QScriptEngine::undefinedValue): + (tst_QScriptEngine::globalObject): + (tst_QScriptEngine::toStringHandle): + * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added. + * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added. + (tst_QScriptValue::tst_QScriptValue): + (tst_QScriptValue::~tst_QScriptValue): + (tst_QScriptValue::values_data): + (tst_QScriptValue::ctorBool): + (tst_QScriptValue::ctorReal): + (tst_QScriptValue::ctorNumber): + (tst_QScriptValue::ctorQString): + (tst_QScriptValue::ctorCString): + (tst_QScriptValue::ctorSpecial): + (tst_QScriptValue::ctorQScriptValue): + (tst_QScriptValue::isValid_data): + (tst_QScriptValue::isValid): + (tst_QScriptValue::isBool_data): + (tst_QScriptValue::isBool): + (tst_QScriptValue::isNumber_data): + (tst_QScriptValue::isNumber): + (tst_QScriptValue::isFunction_data): + (tst_QScriptValue::isFunction): + (tst_QScriptValue::isNull_data): + (tst_QScriptValue::isNull): + (tst_QScriptValue::isString_data): + (tst_QScriptValue::isString): + (tst_QScriptValue::isUndefined_data): + (tst_QScriptValue::isUndefined): + (tst_QScriptValue::isObject_data): + (tst_QScriptValue::isObject): + (tst_QScriptValue::isError_data): + (tst_QScriptValue::isError): + (tst_QScriptValue::toString_data): + (tst_QScriptValue::toString): + (tst_QScriptValue::toNumber_data): + (tst_QScriptValue::toNumber): + (tst_QScriptValue::toBool_data): + (tst_QScriptValue::toBool): + (tst_QScriptValue::toInteger_data): + (tst_QScriptValue::toInteger): + (tst_QScriptValue::toInt32_data): + (tst_QScriptValue::toInt32): + (tst_QScriptValue::toUInt32_data): + (tst_QScriptValue::toUInt32): + (tst_QScriptValue::toUInt16_data): + (tst_QScriptValue::toUInt16): + (tst_QScriptValue::toObject_data): + (tst_QScriptValue::toObject): + (tst_QScriptValue::equals_data): + (tst_QScriptValue::equals): + (tst_QScriptValue::strictlyEquals_data): + (tst_QScriptValue::strictlyEquals): + (tst_QScriptValue::instanceOf_data): + (tst_QScriptValue::instanceOf): + +2010-06-25 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Remove old js parser + https://bugs.webkit.org/show_bug.cgi?id=41222 + + Remove the old yacc parser, this also solves the tiger problem. Which + was a conflict between yacc generated token values and those in the + custom parser + + * Android.mk: + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pro: + * GNUmakefile.am: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * parser/Grammar.y: Removed. + * parser/JSParser.cpp: + * parser/JSParser.h: + * parser/Lexer.cpp: + * parser/NodeConstructors.h: + (JSC::Node::Node): + * parser/Parser.cpp: + (JSC::Parser::parse): + * wtf/Platform.h: + +2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + New QtScript API; setPrototype() and prototype(). + + This patch implements QScriptValue's prototype accessors. + + [Qt] QScriptValue should have accessors to a prototype. + https://bugs.webkit.org/show_bug.cgi?id=39356 + + * qt/api/qscriptvalue.cpp: + (QScriptValue::prototype): + (QScriptValue::setPrototype): + * qt/api/qscriptvalue.h: + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::prototype): + (QScriptValuePrivate::setPrototype): + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + (tst_QScriptValue::getSetPrototype): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + +2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Kenneth Rohde Christiansen. + + [CMake] Add option to enable JIT. + JIT is disabled by default, but now it's possible to enable it through + an option to CMake: -DENABLE_JIT will enable it. + https://bugs.webkit.org/show_bug.cgi?id=40936 + + * CMakeLists.txt: Add missing files and re-sort. + +2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi> + + Reviewed by Gustavo Noronha Silva. + + [CMake] Remove unused variable in EFL build system. It was previously + being used to set the flags of each port but it was superseded by + other flags. + https://bugs.webkit.org/show_bug.cgi?id=40931 + + * jsc/CMakeLists.txt: + +2010-06-25 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on + sunspider. + + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::AssemblerBuffer): + +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r61842. + http://trac.webkit.org/changeset/61842 + https://bugs.webkit.org/show_bug.cgi?id=41208 + + It broke Windows build (Requested by Ossy_ on #webkit). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Removed. + * wtf/win/OwnPtrWin.h: Removed. + +2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r61833. + http://trac.webkit.org/changeset/61833 + https://bugs.webkit.org/show_bug.cgi?id=41205 + + It broke Leopard and GTK (Requested by Ossy_ on #webkit). + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + +2010-06-25 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Adam Barth. + + Change OwnPtrCommon to include platform-specific headers + https://bugs.webkit.org/show_bug.cgi?id=40279 + + Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. + Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Added. + * wtf/win/OwnPtrWin.h: Added. + +2010-06-25 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Darin Adler. + + Add the possibility for a head and footer section to create_jit_stubs. + https://bugs.webkit.org/show_bug.cgi?id=36050 + + * create_jit_stubs: + +2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + Merge RegExp constructor and RegExp::create methods into one. + Both of function are called with tree parameters and check whether + flags (the third param) is given or not. + Simplify hash lookups in RegExpCache::create with giving them an extra + iterator parameter. + https://bugs.webkit.org/show_bug.cgi?id=41055 + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + +2010-06-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64 + https://bugs.webkit.org/show_bug.cgi?id=41193 + + I noticed a use of '+ 4' in some of the 32_64 code paths and realised there + were a few places where endianness was being hardcoded. This patch fixes + the errors i could find through code inspection. + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_global): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + +2010-06-24 Oliver Hunt <oliver@apple.com> + + Build fix + + Temporarily get the tiger bot working again by disabling the + new JS parser. GCC on tiger is miscompiling the parser and + I don't have access to a tiger machine right now. + + * wtf/Platform.h: + + 2010-06-21 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=40128 + Fixed broken debug functionality. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + Fixed to work with updated call frame. + * runtime/JSImmediate.h: + (JSC::JSValue::isCell): + Added assert for aligned cell. + * runtime/JSValue.cpp: + (JSC::JSValue::description): + Fixed to work with current JSValue implementation. + * runtime/JSZombie.cpp: + (JSC::JSZombie::leakedZombieStructure): + JSombies compile again. + +2010-06-24 Leandro Pereira <leandro@profusion.mobi> + + Unreviewed build fix. + + * CMakeLists.txt: Add JSParser.cpp. + +2010-06-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Single character string replacement may replace too many characters + https://bugs.webkit.org/show_bug.cgi?id=41138 + <rdar://problem/8097496> + + Simple fix to stop the rope path of single character replacement + once the first replacement occurs. + + * runtime/JSString.cpp: + (JSC::JSString::replaceCharacter): + +2010-06-24 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + + Fix the length of instruction stream controlled by constant pool + https://bugs.webkit.org/show_bug.cgi?id=40293 + + The initial/maximum length of instruction stream (m_maxDistance) should + be set when the first constant arrives to the constant pool. Otherwise + the constant pool could be placed into an uninterrupted sequence. + + * assembler/AssemblerBufferWithConstantPool.h: + (JSC::): + +2010-06-24 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + We assume bytecodeOffset will always return a value > 1, + so we adjust the failure case to return 1 instead of 0. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + +2010-06-23 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + Custom-written JavaScript parser + https://bugs.webkit.org/show_bug.cgi?id=34019 + + Implement a recursive descent parser similar to that used by V8 and + SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests. + + The parser consists of a JSParser class that uses a TreeBuilder to actually + build the AST. There are currently two builders -- the ASTBuilder and + SyntaxChecker which separate the job of building an AST for code generation + and simply checking syntactic correctness. + + There's still some less than ideal code remaining in the parser to allow + us to retain the existing lexing code with minimal changes. We'll tidy + this up at a later date. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * parser/ASTBuilder.h: Added. + (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo): + (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo): + (JSC::ASTBuilder::ASTBuilder): + (JSC::ASTBuilder::createSourceElements): + (JSC::ASTBuilder::varDeclarations): + (JSC::ASTBuilder::funcDeclarations): + (JSC::ASTBuilder::features): + (JSC::ASTBuilder::numConstants): + (JSC::ASTBuilder::appendToComma): + (JSC::ASTBuilder::createCommaExpr): + (JSC::ASTBuilder::createLogicalNot): + (JSC::ASTBuilder::createUnaryPlus): + (JSC::ASTBuilder::createVoid): + (JSC::ASTBuilder::thisExpr): + (JSC::ASTBuilder::createResolve): + (JSC::ASTBuilder::createObjectLiteral): + (JSC::ASTBuilder::createArray): + (JSC::ASTBuilder::createNumberExpr): + (JSC::ASTBuilder::createString): + (JSC::ASTBuilder::createBoolean): + (JSC::ASTBuilder::createNull): + (JSC::ASTBuilder::createBracketAccess): + (JSC::ASTBuilder::createDotAccess): + (JSC::ASTBuilder::createRegex): + (JSC::ASTBuilder::createNewExpr): + (JSC::ASTBuilder::createConditionalExpr): + (JSC::ASTBuilder::createAssignResolve): + (JSC::ASTBuilder::createFunctionExpr): + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createArguments): + (JSC::ASTBuilder::createArgumentsList): + (JSC::ASTBuilder::createProperty): + (JSC::ASTBuilder::createPropertyList): + (JSC::ASTBuilder::createElementList): + (JSC::ASTBuilder::createFormalParameterList): + (JSC::ASTBuilder::createClause): + (JSC::ASTBuilder::createClauseList): + (JSC::ASTBuilder::setUsesArguments): + (JSC::ASTBuilder::createFuncDeclStatement): + (JSC::ASTBuilder::createBlockStatement): + (JSC::ASTBuilder::createExprStatement): + (JSC::ASTBuilder::createIfStatement): + (JSC::ASTBuilder::createForLoop): + (JSC::ASTBuilder::createForInLoop): + (JSC::ASTBuilder::createEmptyStatement): + (JSC::ASTBuilder::createVarStatement): + (JSC::ASTBuilder::createReturnStatement): + (JSC::ASTBuilder::createBreakStatement): + (JSC::ASTBuilder::createContinueStatement): + (JSC::ASTBuilder::createTryStatement): + (JSC::ASTBuilder::createSwitchStatement): + (JSC::ASTBuilder::createWhileStatement): + (JSC::ASTBuilder::createDoWhileStatement): + (JSC::ASTBuilder::createLabelStatement): + (JSC::ASTBuilder::createWithStatement): + (JSC::ASTBuilder::createThrowStatement): + (JSC::ASTBuilder::createDebugger): + (JSC::ASTBuilder::createConstStatement): + (JSC::ASTBuilder::appendConstDecl): + (JSC::ASTBuilder::appendStatement): + (JSC::ASTBuilder::addVar): + (JSC::ASTBuilder::combineCommaNodes): + (JSC::ASTBuilder::evalCount): + (JSC::ASTBuilder::appendBinaryExpressionInfo): + (JSC::ASTBuilder::operatorStackPop): + (JSC::ASTBuilder::operatorStackHasHigherPrecedence): + (JSC::ASTBuilder::getFromOperandStack): + (JSC::ASTBuilder::shrinkOperandStackBy): + (JSC::ASTBuilder::appendBinaryOperation): + (JSC::ASTBuilder::operatorStackAppend): + (JSC::ASTBuilder::popOperandStack): + (JSC::ASTBuilder::appendUnaryToken): + (JSC::ASTBuilder::unaryTokenStackLastType): + (JSC::ASTBuilder::unaryTokenStackLastStart): + (JSC::ASTBuilder::unaryTokenStackRemoveLast): + (JSC::ASTBuilder::assignmentStackAppend): + (JSC::ASTBuilder::createAssignment): + (JSC::ASTBuilder::Scope::Scope): + (JSC::ASTBuilder::setExceptionLocation): + (JSC::ASTBuilder::incConstants): + (JSC::ASTBuilder::usesThis): + (JSC::ASTBuilder::usesCatch): + (JSC::ASTBuilder::usesClosures): + (JSC::ASTBuilder::usesArguments): + (JSC::ASTBuilder::usesAssignment): + (JSC::ASTBuilder::usesWith): + (JSC::ASTBuilder::usesEval): + (JSC::ASTBuilder::createNumber): + (JSC::ASTBuilder::makeTypeOfNode): + (JSC::ASTBuilder::makeDeleteNode): + (JSC::ASTBuilder::makeNegateNode): + (JSC::ASTBuilder::makeBitwiseNotNode): + (JSC::ASTBuilder::makeMultNode): + (JSC::ASTBuilder::makeDivNode): + (JSC::ASTBuilder::makeAddNode): + (JSC::ASTBuilder::makeSubNode): + (JSC::ASTBuilder::makeLeftShiftNode): + (JSC::ASTBuilder::makeRightShiftNode): + (JSC::ASTBuilder::makeFunctionCallNode): + (JSC::ASTBuilder::makeBinaryNode): + (JSC::ASTBuilder::makeAssignNode): + (JSC::ASTBuilder::makePrefixNode): + (JSC::ASTBuilder::makePostfixNode): + * parser/JSParser.cpp: Added. + (JSC::JSParser::AllowInOverride::AllowInOverride): + (JSC::JSParser::AllowInOverride::~AllowInOverride): + (JSC::JSParser::token): + (JSC::JSParser::next): + (JSC::JSParser::consume): + (JSC::JSParser::match): + (JSC::JSParser::tokenStart): + (JSC::JSParser::tokenLine): + (JSC::JSParser::tokenEnd): + (JSC::JSParser::): + (JSC::JSParser::autoSemiColon): + (JSC::JSParser::canRecurse): + (JSC::JSParser::lastTokenEnd): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::allowAutomaticSemicolon): + (JSC::JSParser::parseSourceElements): + (JSC::JSParser::parseVarDeclaration): + (JSC::JSParser::parseConstDeclaration): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseThrowStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseDebuggerStatement): + (JSC::JSParser::parseBlockStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionBody): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseExpressionStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::isUnaryOp): + (JSC::JSParser::isBinaryOperator): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseProperty): + (JSC::JSParser::parseObjectLiteral): + (JSC::JSParser::parseArrayLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseArguments): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: Added. + (JSC::): + (JSC::JSTokenInfo::JSTokenInfo): + * parser/Lexer.cpp: + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::setLastLineNumber): + (JSC::Lexer::lastLineNumber): + * parser/NodeConstructors.h: + (JSC::Node::Node): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: Added. + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::createSourceElements): + (JSC::SyntaxChecker::makeFunctionCallNode): + (JSC::SyntaxChecker::appendToComma): + (JSC::SyntaxChecker::createCommaExpr): + (JSC::SyntaxChecker::makeAssignNode): + (JSC::SyntaxChecker::makePrefixNode): + (JSC::SyntaxChecker::makePostfixNode): + (JSC::SyntaxChecker::makeTypeOfNode): + (JSC::SyntaxChecker::makeDeleteNode): + (JSC::SyntaxChecker::makeNegateNode): + (JSC::SyntaxChecker::makeBitwiseNotNode): + (JSC::SyntaxChecker::createLogicalNot): + (JSC::SyntaxChecker::createUnaryPlus): + (JSC::SyntaxChecker::createVoid): + (JSC::SyntaxChecker::thisExpr): + (JSC::SyntaxChecker::createResolve): + (JSC::SyntaxChecker::createObjectLiteral): + (JSC::SyntaxChecker::createArray): + (JSC::SyntaxChecker::createNumberExpr): + (JSC::SyntaxChecker::createString): + (JSC::SyntaxChecker::createBoolean): + (JSC::SyntaxChecker::createNull): + (JSC::SyntaxChecker::createBracketAccess): + (JSC::SyntaxChecker::createDotAccess): + (JSC::SyntaxChecker::createRegex): + (JSC::SyntaxChecker::createNewExpr): + (JSC::SyntaxChecker::createConditionalExpr): + (JSC::SyntaxChecker::createAssignResolve): + (JSC::SyntaxChecker::createFunctionExpr): + (JSC::SyntaxChecker::createFunctionBody): + (JSC::SyntaxChecker::createArguments): + (JSC::SyntaxChecker::createArgumentsList): + (JSC::SyntaxChecker::createProperty): + (JSC::SyntaxChecker::createPropertyList): + (JSC::SyntaxChecker::createElementList): + (JSC::SyntaxChecker::createFormalParameterList): + (JSC::SyntaxChecker::createClause): + (JSC::SyntaxChecker::createClauseList): + (JSC::SyntaxChecker::setUsesArguments): + (JSC::SyntaxChecker::createFuncDeclStatement): + (JSC::SyntaxChecker::createBlockStatement): + (JSC::SyntaxChecker::createExprStatement): + (JSC::SyntaxChecker::createIfStatement): + (JSC::SyntaxChecker::createForLoop): + (JSC::SyntaxChecker::createForInLoop): + (JSC::SyntaxChecker::createEmptyStatement): + (JSC::SyntaxChecker::createVarStatement): + (JSC::SyntaxChecker::createReturnStatement): + (JSC::SyntaxChecker::createBreakStatement): + (JSC::SyntaxChecker::createContinueStatement): + (JSC::SyntaxChecker::createTryStatement): + (JSC::SyntaxChecker::createSwitchStatement): + (JSC::SyntaxChecker::createWhileStatement): + (JSC::SyntaxChecker::createWithStatement): + (JSC::SyntaxChecker::createDoWhileStatement): + (JSC::SyntaxChecker::createLabelStatement): + (JSC::SyntaxChecker::createThrowStatement): + (JSC::SyntaxChecker::createDebugger): + (JSC::SyntaxChecker::createConstStatement): + (JSC::SyntaxChecker::appendConstDecl): + (JSC::SyntaxChecker::createGetterOrSetterProperty): + (JSC::SyntaxChecker::appendStatement): + (JSC::SyntaxChecker::addVar): + (JSC::SyntaxChecker::combineCommaNodes): + (JSC::SyntaxChecker::evalCount): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + * runtime/JSGlobalData.h: + * wtf/Platform.h: + * wtf/ThreadSpecific.h: + (WTF::T): + +2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Optimization of the QScriptValuePrivate. + + Patch change only internals of the QScriptValuePrivate. + Most of the QScriptValuePrivate's attributes were moved + into an union. + + [Qt] Optimization of the QScriptVAluePrivate. + https://bugs.webkit.org/show_bug.cgi?id=40415 + + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::globalObject): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::): + (QScriptValuePrivate::~QScriptValuePrivate): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::equals): + (QScriptValuePrivate::strictlyEquals): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::operator JSValueRef): + (QScriptValuePrivate::operator JSObjectRef): + (QScriptValuePrivate::refinedJSValue): + +2010-06-23 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Oliver Hunt. + + [GTK] Implement ThreadSpecific with glib + https://bugs.webkit.org/show_bug.cgi?id=39829 + + Implement ThreadSpecific with glib's GStaticPrivate. + This patch makes it possible to build GTK port without pthread. + + * wtf/ThreadSpecific.h: + (WTF::::ThreadSpecific): + (WTF::::~ThreadSpecific): + (WTF::::get): + (WTF::::set): + (WTF::::destroy): + +2010-06-23 Leandro Pereira <leandro@profusion.mobi> + + Unreviewed build fix. + + * CMakeLists.txt: Add runtime/RegExpCache.cpp. + +2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + Adding regular expression caching to JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=38142 + + The cache is based on Round Robin eviction policy, and + can cache at most 256 character long regular expressions, + and at most 256 of them. These values can be changed at compile time. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::regExpCache): + * runtime/RegExpCache.cpp: Added. + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + (JSC::RegExpCache::RegExpCache): + * runtime/RegExpCache.h: Added. + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpKey.h: Added. + (JSC::RegExpKey::RegExpKey): + (JSC::RegExpKey::getFlagsValue): + (WTF::operator==): + (WTF::): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + +2010-06-22 Gabor Loki <loki@webkit.org> + + Reviewed by Geoffrey Garen. + + Add native call support for ARM and Thumb-2 JIT. + https://bugs.webkit.org/show_bug.cgi?id=40231 + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * wtf/Platform.h: + +2010-06-21 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Make JSC more resilient in the face of parse failures + https://bugs.webkit.org/show_bug.cgi?id=40951 + + A number of recent bugs have occurred due to issues like miscounting + BOMs, etc which lead to interesting crashes later on. Adding this + logic hardens JSC in the face of these errors, and has no impact on + performance (32bit jit actually gets 0.7% faster but I put that down + to cache effects). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffset): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::FunctionExecutable::bytecodeForCall): + (JSC::FunctionExecutable::bytecodeForConstruct): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::numericCompareFunction): + +2010-06-21 John Sullivan <sullivan@apple.com> + + Reviewed by Adam Roben. + + RetainPtr can't be used in HashMaps or HashSets + <https://bugs.webkit.org/show_bug.cgi?id=40938> + + Added hashing knowledge similar to that in COMPtr.h. + + * wtf/RetainPtr.h: + (WTF::RetainPtr::RetainPtr): + New function, copied from COMPtr.h but for the type change. + (WTF::RetainPtr::isHashTableDeletedValue): + Ditto. + (WTF::RetainPtr::hashTableDeletedValue): + Ditto. + Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change. + The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h) + rather than the COMPtr implementation. + +2010-06-19 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Need to ensure that we grow the RegisterFile when creating a callframe for host code + https://bugs.webkit.org/show_bug.cgi?id=40858 + <rdar://problem/8108986> + + In the past the use of the callframe in hostcode was much more + limited. Now that we expect the callframe to always be valid + we need to grow the RegisterFile so that this is actually the + case. In this particular case the problem was failing to grow + the registerfile could lead to a callframe that extended beyond + RegisterFiler::end(), so vm re-entry would clobber the callframe + other scenarios could also lead to badness. + + I was unable to construct a simple testcase to trigger badness, + and any such testcase would be so dependent on exact vm stack + layout that it would be unlikely to work as a testcase following + any callframe or register allocation changes anyway. + + Thankfully the new assertion I added should help to catch these + failures in future, and triggers on a couple of tests currently. + + * interpreter/CallFrame.cpp: + (JSC::CallFrame::registerFile): + * interpreter/CallFrame.h: + (JSC::ExecState::init): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-06-21 Satish Sampath <satish@chromium.org> + + Reviewed by Steve Block. + + Speech Input Patch 0: Added compilation argument to conditionally compile pending patches. + https://bugs.webkit.org/show_bug.cgi?id=40878 + + * Configurations/FeatureDefines.xcconfig: + +2010-06-21 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Kent Tamura. + + [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1 + https://bugs.webkit.org/show_bug.cgi?id=40653 + + Currently, other ports do not use global new/delete operator overloading + when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable + "global fastMalloc new" because the default new/delete causes crash on device. + We need to replace them with Brew MP's MALLOC/FREE. + + * wtf/FastMalloc.h: + +2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Work around a build problem with libjscore on Symbian. + https://bugs.webkit.org/show_bug.cgi?id=40840 + + Sbsv2 sometimes have problems with debug/release configuration + determination causing QtWebKit in release to try linking with the debug + JavaScriptCore static library. This patch limit the jscore/jscored + r58306 fix necessary for mac builds only to the mac platform to prevent the + different name problem. + + The real fix would be to fix qmake or the toolchain, this patch might + help meanwhile. + + * JavaScriptCore.pri: + +2010-06-21 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Kent Tamura. + + Buildfix after r61338. + https://bugs.webkit.org/show_bug.cgi?id=40888 + + roundUpAllocationSize is needed in RegisterFile.h. + + * jit/ExecutableAllocator.h: + +2010-06-19 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Include <string.h> in StringExtras.h + https://bugs.webkit.org/show_bug.cgi?id=40808 + + Without string.h, RVCT 2.2 can't compile StringExtras.h. + It can't find strlen and strncmp. + + * wtf/StringExtras.h: + +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Don't use __attribute__((may_alias)) with the Intel compiler, + as it doesn't understand it. + + * wtf/Vector.h: + +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix compilation with the Intel C++ compiler (11.1.072). + + Like RVCT, label pointers must be void*, not const void*. + + * bytecode/Opcode.h: + +2010-06-19 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Add the WTF_COMPILER_INTEL for when the Intel compiler is used + for building. Usually, the Intel compiler masquerades as + another compiler in the system and gets away with it, but some + times specific fixes are required (such as when using language + extensions). + + * wtf/Platform.h: + +2010-06-18 Oliver Hunt <oliver@apple.com> + + Reviewed by Geoffrey Garen. + + Incorrect handling of multiple BOMs scattered through a file. + https://bugs.webkit.org/show_bug.cgi?id=40865 + + When determining the offset of open and close braces in a source + with BOMs we were finishing our count early as we failed to account + for BOMs prior to the open/close brace positions effecting those + positions. + + * parser/Lexer.cpp: + (JSC::Lexer::sourceCode): + +2010-06-17 Oliver Hunt <oliver@apple.com> + + Reviewed by Sam Weinig. + + Don't throw away exception information for functions that use exceptions + https://bugs.webkit.org/show_bug.cgi?id=40786 + + Simple patch to stop JSC from throwing away the exception information + of a function that uses "exceptiony" features like try and throw. This + is a speed up for catching expressions but it's difficult to quantify as + the old cost of reparsing is amortised over all exceptions caught in the + effected function. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::emitCatch): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitThrow): + +2010-06-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add PlatformStrategies and PluginStrategy classes. + https://bugs.webkit.org/show_bug.cgi?id=40850 + + * wtf/Platform.h: + +2010-06-18 Leandro Pereira <leandro@profusion.mobi> + + [EFL] Unreviewed build fix. + + * wtf/CMakeLists.txt: Add MD5.cpp. + +2010-06-17 Shu Chang <chang.shu@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix the link error on symbian with ENABLE_JIT=0. + 1. Add "#if ENABLE(JIT)" in the header file; + 2. Put feature enable/disable logic to a common.pri so + that both JavaScriptCore.pri and WebCore.pri can share. + + https://bugs.webkit.org/show_bug.cgi?id=40780 + + * JavaScriptCore.pri: + * jit/ExecutableAllocator.h: + +2010-06-17 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Use adoptRef and create functions in more code paths + https://bugs.webkit.org/show_bug.cgi?id=40760 + + * API/JSClassRef.h: Removed unneeded include of RefCounted.h. + * API/JSWeakObjectMapRefPrivate.cpp: Ditto. + + * bytecode/CodeBlock.h: + (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the + SharedSymbolTable::create function instead of calling new directly. + + * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable + class and made the constructor private. + +2010-06-17 Mark Brand <mabrand@mabrand.nl> + + Reviewed by Simon Hausmann. + + [Qt] use "win32-g++*" scope to match all MinGW makespecs + + The scope "win32-g++" comes from the name of the makespec. However, it + is frequently used to check for MinGW. This works fine as long as + win32-g++ is the only makespec for MinGW. Now we need the wildcard + to cover "win32-g++-cross" as well. + + * JavaScriptCore.pro: + +2010-06-16 Darin Adler <darin@apple.com> + + Reviewed by David Levin. + + Deploy adoptRef in more places, including all HTML and MathML elements + https://bugs.webkit.org/show_bug.cgi?id=39941 + + * wtf/ThreadSafeShared.h: Made the constructor protected and removed the + unneeded support for initial reference counts other than 1. + +2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu> + + Reviewed by Geoffrey Garen. + + Store matchBegin directly in the array of output instead of the stack. + https://bugs.webkit.org/show_bug.cgi?id=38988 + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateDisjunction): + (JSC::Yarr::RegexGenerator::generate): + +2010-06-15 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make JavaScriptCore build with clang++. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutVirtualRegister): + Explicitly cast to an int. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::compileRegex): + Return 0 instead of false. + +2010-06-15 Adam Roben <aroben@apple.com> + + Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds + + Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>. + + Reviewed by Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of + JavaScriptCore's DerivedSources directory to + AppleInternal/Sources/JavaScriptCore. + +2010-06-15 Gabor Loki <loki@webkit.org> + + Rubber-stamped by Eric Seidel. + + Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM + https://bugs.webkit.org/show_bug.cgi?id=40423 + + Using OBJECT_OFFSETOF macro instead of objectof to bypass access to + non-static data member warning. + + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + +2010-06-11 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + Rename the rest of the *Tokenizer classes to *DocumentParser + https://bugs.webkit.org/show_bug.cgi?id=40507 + + * wtf/Platform.h: + - fixed a comment to match new names. + +2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Explicit conversions from QtScript types to JSC opaque types were removed. + https://bugs.webkit.org/show_bug.cgi?id=40412 + + Conversion between a JSC C types and a QtScript private types, takes + main part of the source code. In most cases a mapping between the types + is one to one. New cast operators were added to simplify the code. + + The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef. + The QScriptEnginePrivate could be casted to the JSGlobalContext. + The QScriptProgramPrivate could be casted to the JSStringRef. + + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::evaluate): + (QScriptEnginePrivate::newObject): + (QScriptEnginePrivate::globalObject): + * qt/api/qscriptengine_p.h: + (QScriptEnginePrivate::operator JSGlobalContextRef): + * qt/api/qscriptprogram_p.h: + (QScriptProgramPrivate::operator JSStringRef): + * qt/api/qscriptsyntaxcheckresult.cpp: + (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate): + (QScriptSyntaxCheckResultPrivate::errorMessage): + (QScriptSyntaxCheckResultPrivate::errorLineNumber): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::~QScriptValuePrivate): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isBool): + (QScriptValuePrivate::isNumber): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isString): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::isFunction): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::equals): + (QScriptValuePrivate::strictlyEquals): + (QScriptValuePrivate::instanceOf): + (QScriptValuePrivate::call): + (QScriptValuePrivate::operator JSValueRef): + (QScriptValuePrivate::operator JSObjectRef): + (QScriptValuePrivate::setValue): + (QScriptValuePrivate::inherits): + (QScriptValuePrivate::refinedJSValue): + +2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Implement the simple text code path. + https://bugs.webkit.org/show_bug.cgi?id=40077 + + Remove the FONT_FAST_PATH macro and use the Qt's + fast text implementation instead of the one of WebKit. + + The Qt::TextBypassShaping flag is used to tell Qt to + only use the glyph advances. + + Qt 4.7 is needed to get this flag thus the complex path is always + used if QtWebKit is compiled against an earlier version. + + Contrary to the WebKit's implementation, the complex code path + is taken if the text is RightToLeft, justified or is formatted + with non-zero letter or word spacing. + + * wtf/Platform.h: + +2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + add codePointCompare to JavaScriptCore.exp + https://bugs.webkit.org/show_bug.cgi?id=40426 + + * JavaScriptCore.exp: + +2010-06-10 Oliver Hunt <oliver@apple.com> + + Reviewed by Maciej Stachowiak. + + Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode + https://bugs.webkit.org/show_bug.cgi?id=40367 + + If we're in the slow case of right shift we must write the type tag as + the only reason we hit this code path is because we know we're working + with a double. eg. we are guaranteed that the tag cannot be reused. + + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emitRightShiftSlowCase): + +2010-06-10 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + Remove weakRandomNumber + https://bugs.webkit.org/show_bug.cgi?id=40291 + + weakRandomNumber is used nowhere. Currently, WeakRandom is used instead. + + * wtf/RandomNumber.cpp: + * wtf/RandomNumber.h: + +2010-06-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Brady Eidson. + + Export StringImpl::ascii(). It might be not very useful, but it's a public function. + + * JavaScriptCore.exp: + +2010-06-09 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Adam Treat. + + [EFL] Allow building core libraries as shared objects to speed up + linking time on machines with small amounts of memory. + http://webkit.org/b/39899 + + * CMakeLists.txt: If building with shared core, install the lib. + * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically. + * wtf/CMakeLists.txt: If building with shared core, install the lib. + +2010-06-09 Gabor Loki <loki@webkit.org> + + Reviewed by David Levin. + + Remove some unused variable warnings from JITOpcodes + https://bugs.webkit.org/show_bug.cgi?id=40298 + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + +2010-05-18 Yuzo Fujishima <yuzo@google.com> + + Reviewed by Shinichiro Hamaji. + + Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText + Add U16_LENGTH that is needed to implement CSS character serialization. + https://bugs.webkit.org/show_bug.cgi?id=34529 + + * wtf/unicode/qt4/UnicodeQt4.h: + * wtf/unicode/wince/UnicodeWince.h: + +2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r60830. + http://trac.webkit.org/changeset/60830 + https://bugs.webkit.org/show_bug.cgi?id=40305 + + Broke the Windows build (Requested by abarth on #webkit). + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Removed. + * wtf/win/OwnPtrWin.h: Removed. + +2010-06-08 MORITA Hajime <morrita@google.com> + + Unreviewed. An attempt to fix test break. + + * Configurations/FeatureDefines.xcconfig: + +2010-06-08 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Adam Barth. + + Change OwnPtrCommon to include platform-specific headers + https://bugs.webkit.org/show_bug.cgi?id=40279 + + Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds. + Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.h: Added. + * wtf/win/OwnPtrWin.h: Added. + +2010-06-07 MORITA Hajime <morrita@google.com> + + Reviewed by Kent Tamura. + + https://bugs.webkit.org/show_bug.cgi?id=40219 + [Mac] ENABLE_METER_TAG should be enabled + + Added ENABLE_METER_TAG. + + * Configurations/FeatureDefines.xcconfig: + +2010-06-07 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Add more types to OwnPtr + https://bugs.webkit.org/show_bug.cgi?id=39667 + + Add ISSL and ISocket to the list of OwnPtr-ed type. + + * wtf/OwnPtrCommon.h: + * wtf/brew/OwnPtrBrew.cpp: + (WTF::deleteOwnedPtr): + +2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Crash when compiling on Snow Leopard and running on Leopard + https://bugs.webkit.org/show_bug.cgi?id=31403 + + Disable the use of pthread_setname_np and other symbols + when targetting Leopard. + + Use the defines TARGETING_XX instead of BUILDING_ON_XX + for features that cannot be used before Snow Leopard. + + * wtf/Platform.h: + +2010-06-07 Gabor Loki <loki@webkit.org> + + Reviewed by NOBODY (JSVALUE32_64 build fix). + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + +2010-06-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix pt 2). + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-06-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix pt 1). + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-06-06 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 40214 - Clean up error construction / throwing in JSC. + + The one egregious insanity here is that creating an error requires + a VM-entry-esqe-host call (the string argument is wrapped as a JS + object & pushed on the RegisterFile, then unwrapped back to a + UString). Changing this also means you only require a global + object, not an ExecState, to create an error. + + The methods to create error objects are also parameterized + requiring a switch on the type, which can be made cleaner and + faster by moving to a separate method per error type. Code to add + divot information to error had been duplicated, and is coalesced + back into a single function. + + Convenience methods added to create & throw type & syntax error + with a default error message, since this is a common case. + + Also, errors are currently thrown either using + "throwError(exec, error)" or "exec->setException(error)" - unify + on the former, since this is more commonly used. Add + "throwVMError(exec, error)" equivalents, as a convenience for + cases where the result was being wrapped in "JSValue::encode(...)". + + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::staticFunctionGetter): + (JSC::::callbackGetter): + * API/JSObjectRef.cpp: + (JSObjectMakeError): + * JavaScriptCore.exp: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitNewError): + (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::ThrowableExpressionData::emitThrowError): + (JSC::RegExpNode::emitBytecode): + (JSC::PostfixErrorNode::emitBytecode): + (JSC::PrefixErrorNode::emitBytecode): + (JSC::AssignErrorNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + * interpreter/CallFrame.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (functionRun): + (functionLoad): + (functionCheckSyntax): + * parser/Nodes.h: + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/Error.cpp: + (JSC::createError): + (JSC::createEvalError): + (JSC::createRangeError): + (JSC::createReferenceError): + (JSC::createSyntaxError): + (JSC::createTypeError): + (JSC::createURIError): + (JSC::addErrorSourceInfo): + (JSC::addErrorDivotInfo): + (JSC::addErrorInfo): + (JSC::hasErrorInfo): + (JSC::throwError): + (JSC::throwTypeError): + (JSC::throwSyntaxError): + * runtime/Error.h: + (JSC::throwVMError): + (JSC::throwVMTypeError): + * runtime/ErrorConstructor.cpp: + (JSC::constructWithErrorConstructor): + (JSC::callErrorConstructor): + * runtime/ErrorConstructor.h: + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + (JSC::ErrorInstance::create): + * runtime/ErrorInstance.h: + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + * runtime/ExceptionHelpers.cpp: + (JSC::createStackOverflowError): + (JSC::createUndefinedVariableError): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + (JSC::throwOutOfMemoryError): + * runtime/ExceptionHelpers.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::compile): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compile): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/Identifier.cpp: + (JSC::Identifier::from): + * runtime/Identifier.h: + * runtime/JSArray.cpp: + (JSC::JSArray::put): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEval): + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + (JSC::Walker::walk): + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + * runtime/JSObject.cpp: + (JSC::throwSetterError): + (JSC::JSObject::put): + (JSC::JSObject::putWithAttributes): + (JSC::JSObject::defaultValue): + (JSC::JSObject::hasInstance): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + * runtime/JSValue.cpp: + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::synthesizeObject): + (JSC::JSValue::synthesizePrototype): + * runtime/NativeErrorConstructor.cpp: + (JSC::constructWithNativeErrorConstructor): + (JSC::callNativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::toPropertyDescriptor): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncToString): + +2010-06-05 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx + https://bugs.webkit.org/show_bug.cgi?id=39710 + + Build fix for BREW MP. + + * wtf/MathExtras.h: + +2010-06-04 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + HTML5 parser should be within 1% of old parser performance + https://bugs.webkit.org/show_bug.cgi?id=40172 + + Fix cast in this operator= to allow for assignment between vectors with + different inline capacities (as clearly intended by its author). + + * wtf/Vector.h: + (WTF::::operator): + +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + New QtScript API; QScriptValue::instanceOf. + + New function create an easy way to check value's prototype hierarchy. + + [Qt] QScriptValue should have an instanceOf method + https://bugs.webkit.org/show_bug.cgi?id=40120 + + * qt/api/qscriptvalue.cpp: + (QScriptValue::instanceOf): + * qt/api/qscriptvalue.h: + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::instanceOf): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: + (tst_QScriptValue::instanceOf_initData): + (tst_QScriptValue::instanceOf_makeData): + (tst_QScriptValue::instanceOf_test): + +2010-06-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (interpreter build fix). + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-06-04 Mark Rowe <mrowe@apple.com> + + Silence some warnings seen on the build bot. + + * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline. + * JavaScriptCore.JSVALUE32only.exp: Ditto. + * JavaScriptCore.JSVALUE64only.exp: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't + complain about not knowing how to compile them. + +2010-06-04 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 40187 - Change function signature of NativeConstructor to match NativeFunction + + Mostly for consistency, but constructor & args arguments are redundant, + and this will help if we wish to be able to JIT calls to more constructors. + + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::construct): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::executeConstruct): + * interpreter/Interpreter.h: + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayConstructor.cpp: + (JSC::constructWithArrayConstructor): + * runtime/BooleanConstructor.cpp: + (JSC::constructWithBooleanConstructor): + * runtime/ConstructData.cpp: + (JSC::construct): + * runtime/ConstructData.h: + * runtime/DateConstructor.cpp: + (JSC::constructWithDateConstructor): + * runtime/Error.cpp: + (JSC::constructNativeError): + (JSC::Error::create): + * runtime/ErrorConstructor.cpp: + (JSC::constructWithErrorConstructor): + * runtime/FunctionConstructor.cpp: + (JSC::constructWithFunctionConstructor): + * runtime/NativeErrorConstructor.cpp: + (JSC::constructWithNativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + (JSC::NativeErrorConstructor::errorStructure): + * runtime/NumberConstructor.cpp: + (JSC::constructWithNumberConstructor): + * runtime/ObjectConstructor.cpp: + (JSC::constructWithObjectConstructor): + * runtime/RegExpConstructor.cpp: + (JSC::constructWithRegExpConstructor): + * runtime/StringConstructor.cpp: + (JSC::constructWithStringConstructor): + +2010-06-04 Tony Gentilcore <tonyg@chromium.org> + + Reviewed by Adam Barth. + + Add a takeFirst() method to Deque and use it where appropriate. + https://bugs.webkit.org/show_bug.cgi?id=40089 + + * wtf/Deque.h: + (WTF::::takeFirst): + * wtf/MainThread.cpp: + (WTF::dispatchFunctionsFromMainThread): + * wtf/MessageQueue.h: + (WTF::::tryGetMessage): + +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Remove a QEXPECT_FAIL flag from an autotest. + + Test tst_QScriptEngine::globalObject pass after 36600 bug + fix have been applied. + + [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed. + https://bugs.webkit.org/show_bug.cgi?id=40114 + + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::globalObject): + +2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix QScriptValue::equals. + + Handling for a few edge cases were added. Now comparison between + NaN, an invalid objects should works as supposed. + + [Qt] QScriptValue::equals problems + https://bugs.webkit.org/show_bug.cgi?id=40110 + + * qt/api/qscriptvalue.cpp: + (QScriptValue::equals): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::equals): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: + (tst_QScriptValue::equals_initData): + (tst_QScriptValue::equals_makeData): + (tst_QScriptValue::equals_test): + +2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + New states in QScriptValuePrivate. + + The CSpecial state was divided into CNull and CUndefined. It simplify + the QScriptValue code by avoiding a few "cast" and "if". + Moreover the MSVS compiler didn't like casting between a double and an + enum which is avoided now. + + [Qt] The QScriptValuePrivate::CSpecial is too generic. + https://bugs.webkit.org/show_bug.cgi?id=40067 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toObject): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::isNumberBased): + +2010-06-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Qt build fix). + + * wtf/Platform.h: + +2010-06-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Mark Rowe. + + Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms + This was fixed in bug #40094. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/Platform.h: + +2010-06-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (Interpreter build fix). + + * JavaScriptCore.JSVALUE32_64only.exp: + * JavaScriptCore.JSVALUE32only.exp: + * JavaScriptCore.JSVALUE64only.exp: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-06-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix II). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-06-03 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (windows build fix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-06-02 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 40094 - The return type of NativeFunction should be EncodedJSValue + On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not. + + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackFunction.h: + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::call): + * JavaScriptCore.exp: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::executeCall): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionCheckSyntax): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + (functionReadline): + (functionQuit): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + (JSC::arrayConstructorIsArray): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/CallData.h: + * runtime/DateConstructor.cpp: + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/JSCell.h: + (JSC::getCallData): + (JSC::getConstructData): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSONObject.cpp: + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + * runtime/JSObject.cpp: + (JSC::callDefaultValueFunction): + * runtime/JSValue.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::callObjectConstructor): + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::toPropertyDescriptor): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/RegExpConstructor.cpp: + (JSC::callRegExpConstructor): + * runtime/RegExpObject.cpp: + (JSC::callRegExpObject): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + (JSC::stringProtoFuncTrim): + (JSC::stringProtoFuncTrimLeft): + (JSC::stringProtoFuncTrimRight): + +2010-06-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Gavin Barraclough. + + Add value-representation specific sections to the mac export file. + + * Configurations/JavaScriptCore.xcconfig: + * DerivedSources.make: + * JavaScriptCore.JSVALUE32_64only.exp: Added. + * JavaScriptCore.JSVALUE32only.exp: Added. + * JavaScriptCore.JSVALUE64only.exp: Added. + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-06-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Gavin Barraclough. + + <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE. + + * pcre/pcre_exec.cpp: + (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good + reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug. + +2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Fix the QScriptValue::strictlyEquals function. + + Handling for a few edge cases was added. + + New autotest that covers the QScriptValue::strictlyEquals function. + + [Qt] QScriptValue::strictlyEquals is broken + https://bugs.webkit.org/show_bug.cgi?id=36600 + + * qt/api/qscriptvalue.cpp: + (QScriptValue::strictlyEquals): + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::strictlyEquals): + * qt/tests/qscriptvalue/qscriptvalue.pro: + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added. + (tst_QScriptValue::strictlyEquals_initData): + (tst_QScriptValue::strictlyEquals_makeData): + (tst_QScriptValue::strictlyEquals_test): + +2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + New function QScriptEngine::newObject. + + The function creates a object of class Object and returns it + as a QScriptValue. + + [Qt] QScriptEngine API should contain a newObject function + https://bugs.webkit.org/show_bug.cgi?id=39114 + + * qt/api/qscriptengine.cpp: + (QScriptEngine::newObject): + * qt/api/qscriptengine.h: + * qt/api/qscriptengine_p.cpp: + (QScriptEnginePrivate::newObject): + * qt/api/qscriptengine_p.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::newObject): + +2010-06-02 Gabor Loki <loki@webkit.org> + + Reviewed by Gavin Barraclough. + https://bugs.webkit.org/show_bug.cgi?id=40011 + + Thumb-2 build fix: The offset parameter of ldrh should be encoded as an + imm12 immediate constant in load16. If it is not fit in the instruction + a temporary register has to be used. + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load16): + +2010-06-02 Sterling Swigart <sswigart@google.com> + + Reviewed by David Levin. + + Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. + https://bugs.webkit.org/show_bug.cgi?id=39906 + + * Configurations/FeatureDefines.xcconfig: + +2010-06-01 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together + + This is a useful stepping stone towards reversing argument order. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addParameter): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallEval): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::CallArguments::thisRegister): + (JSC::CallArguments::argumentRegister): + (JSC::CallArguments::callFrame): + (JSC::CallArguments::count): + (JSC::BytecodeGenerator::shouldEmitProfileHooks): + * bytecompiler/NodesCodegen.cpp: + (JSC::NewExprNode::emitBytecode): + (JSC::CallArguments::CallArguments): + (JSC::EvalFunctionCallNode::emitBytecode): + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::FunctionCallBracketNode::emitBytecode): + (JSC::FunctionCallDotNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + +2010-06-01 Yong Li <yoli@rim.com> + + Reviewed by Darin Adler. + + Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex. + https://bugs.webkit.org/show_bug.cgi?id=39893 + + * wtf/ThreadingPthreads.cpp: + (WTF::Mutex::Mutex): + +2010-06-01 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Xan Lopez. + + [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap + https://bugs.webkit.org/show_bug.cgi?id=39831 + + Use DEFINE_STATIC_LOCAL for static local variables. + + * wtf/gtk/ThreadingGtk.cpp: + (WTF::threadMapMutex): + (WTF::threadMap): + (WTF::identifierByGthreadHandle): + +2010-06-01 Kent Tamura <tkent@chromium.org> + + Reviewed by Shinichiro Hamaji. + + Fix style errors of dtoa + https://bugs.webkit.org/show_bug.cgi?id=39972 + + Fix all errors reported by check-webkit-style. + + * wtf/dtoa.cpp: + * wtf/dtoa.h: + +2010-05-30 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + * wtf/OwnArrayPtr.h: + (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr. + At some point someone fixed the "asserts when assigning to 0 and the pointer is + already 0" issue in OwnPtr but forgot to do it here. + +2010-05-29 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: Updated exported symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-05-29 Geoffrey Garen <ggaren@apple.com> + + Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I + can figure out why it's crashing. + + * wtf/Platform.h: + +2010-05-29 Geoffrey Garen <ggaren@apple.com> + + Fixed Windows crash seen on buildbot. + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first + argument in ecx. + +2010-05-28 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: Updated exported symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-05-28 Geoffrey Garen <ggaren@apple.com> + + Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL + is disabled. + + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + * wtf/Platform.h: + +2010-05-28 Geoffrey Garen <ggaren@apple.com> + + Windows build fix: Updated exported symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-05-28 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt. + + Simplified the host calling convention. + + 22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host + function calls. + + No change on SunSpider. + + All JS calls (but not constructs, yet) now go through the normal JS + calling convention via the RegisterFile. As a result, the host calling + convention, which used to be this + + JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&) + + is now this + + JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*) + + Callee, 'this', and argument access all hapen relative to the ExecState*, + which is a pointer into the RegisterFile. + + This patch comes in two parts. + + PART ONE: Functional code changes. + + * wtf/Platform.h: Disabled optimized calls on platforms I didn't test. + We can re-enable once we verify that host calls on these platforms are + correct. + + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::functionName): + (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to + ExecState::callee(). + + (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue(). + + * interpreter/CallFrame.cpp: + * interpreter/CallFrame.h: + (JSC::ExecState::callee): + (JSC::ExecState::scopeChain): + (JSC::ExecState::init): Changed callee() to be JSObject* instead of + JSFunction* -- now, it might be some other callable host object. + + (JSC::ExecState::hostThisRegister): + (JSC::ExecState::hostThisValue): + (JSC::ExecState::argumentCount): + (JSC::ExecState::argumentCountIncludingThis): + (JSC::ExecState::argument): + (JSC::ExecState::setArgumentCountIncludingThis): + (JSC::ExecState::setCallee): Added convenient accessors for arguments + from within a host function. Removed thisValue() because it was too + tempting to use incorrectly, and it only had one or two clients, anyway. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue(). + + (JSC::Interpreter::throwException): Be sure to shrink the register file + before invoking the exception handler, to reduce the chances that the + handler will re-throw in the case of stack overflow. (Re-throwing is now + more likely than it used to be, since standardizing the calling convention + implicitly added stack overflow checks to some places where they used to be missing.) + + (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. + + (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. Added support for calling a host + function. + + (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope. + Updated for CallFrame::init API change. + + (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. + + (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change. + Added some explicit JSValue(JSObject*) initialization, since relaxing + the JSFunction* restriction on callee has made register types more ambiguous. + Removed toThisObject() conversion, since all callees do it themselves now. + Updated host function call for new host function signature. Updated for + change to ExecState::argumentCount() API. + + * interpreter/Register.h: + (JSC::Register::): + (JSC::Register::operator=): + (JSC::Register::function): Changed callee() to be JSObject* instead of + JSFunction* -- now, it might be some other callable host object. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that + set up the arguments to host functions -- all but one of the arguments + are gone now. This is the actual optimization. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API + changes noted above. Removed toThisObject() conversion, since all callees + do it themselves now. + + * runtime/ArgList.h: + (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a + temporary shim for converting from ExecState* to ArgList where it's still + necessary. + + * runtime/Arguments.h: + (JSC::Arguments::getArgumentsData): + (JSC::Arguments::Arguments): Updated for ExecState and Register API + changes noted above. + + * runtime/CallData.cpp: + (JSC::call): Changed call always to call Interpreter::executeCall, even + for host functions. This ensures that the normal calling convention is + set up in the RegsiterFile when calling from C++ to host function. + + * runtime/CallData.h: Changed host function signature as described above. + + * runtime/ConstructData.cpp: + (JSC::construct): Moved JSFunction::construct code here so I could nix + JSFunction::call and JSFunction::call. We want a JSFunction-agnostic + way to call and construct, so that everything works naturally for non- + JSFunction objects. + + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: Updated for ExecState and Register API changes + noted above. Nixed JSFunction::call and JSFunction::construct, noted above. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::init): Ditto. + + PART TWO: Global search and replace. + + In the areas below, I used global search-and-replace to change + (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*) + args.size() => exec->argumentCount() + args.at(i) => exec->argument(i) + + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackFunction.h: + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::call): + * JavaScriptCore.exp: + * jsc.cpp: + (functionPrint): + (functionDebug): + (functionGC): + (functionVersion): + (functionRun): + (functionLoad): + (functionCheckSyntax): + (functionSetSamplingFlags): + (functionClearSamplingFlags): + (functionReadline): + (functionQuit): + * runtime/ArrayConstructor.cpp: + (JSC::callArrayConstructor): + (JSC::arrayConstructorIsArray): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/BooleanConstructor.cpp: + (JSC::callBooleanConstructor): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/DateConstructor.cpp: + (JSC::callDate): + (JSC::dateParse): + (JSC::dateNow): + (JSC::dateUTC): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetMilliSeconds): + (JSC::dateProtoFuncSetUTCMilliseconds): + (JSC::dateProtoFuncSetSeconds): + (JSC::dateProtoFuncSetUTCSeconds): + (JSC::dateProtoFuncSetMinutes): + (JSC::dateProtoFuncSetUTCMinutes): + (JSC::dateProtoFuncSetHours): + (JSC::dateProtoFuncSetUTCHours): + (JSC::dateProtoFuncSetDate): + (JSC::dateProtoFuncSetUTCDate): + (JSC::dateProtoFuncSetMonth): + (JSC::dateProtoFuncSetUTCMonth): + (JSC::dateProtoFuncSetFullYear): + (JSC::dateProtoFuncSetUTCFullYear): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + (JSC::dateProtoFuncToJSON): + * runtime/ErrorConstructor.cpp: + (JSC::callErrorConstructor): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/FunctionConstructor.cpp: + (JSC::callFunctionConstructor): + * runtime/FunctionPrototype.cpp: + (JSC::callFunctionPrototype): + (JSC::functionProtoFuncToString): + (JSC::functionProtoFuncApply): + (JSC::functionProtoFuncCall): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEval): + (JSC::globalFuncParseInt): + (JSC::globalFuncParseFloat): + (JSC::globalFuncIsNaN): + (JSC::globalFuncIsFinite): + (JSC::globalFuncDecodeURI): + (JSC::globalFuncDecodeURIComponent): + (JSC::globalFuncEncodeURI): + (JSC::globalFuncEncodeURIComponent): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + (JSC::globalFuncJSCPrint): + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSONObject.cpp: + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + * runtime/JSString.h: + * runtime/MathObject.cpp: + (JSC::mathProtoFuncAbs): + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCeil): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncFloor): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncRound): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): + * runtime/NativeErrorConstructor.cpp: + (JSC::callNativeErrorConstructor): + * runtime/NumberConstructor.cpp: + (JSC::callNumberConstructor): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToString): + (JSC::numberProtoFuncToLocaleString): + (JSC::numberProtoFuncValueOf): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectConstructor.cpp: + (JSC::callObjectConstructor): + (JSC::objectConstructorGetPrototypeOf): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + (JSC::objectConstructorDefineProperty): + (JSC::objectConstructorDefineProperties): + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncValueOf): + (JSC::objectProtoFuncHasOwnProperty): + (JSC::objectProtoFuncIsPrototypeOf): + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + (JSC::objectProtoFuncLookupGetter): + (JSC::objectProtoFuncLookupSetter): + (JSC::objectProtoFuncPropertyIsEnumerable): + (JSC::objectProtoFuncToLocaleString): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + * runtime/Operations.h: + (JSC::jsString): + * runtime/RegExpConstructor.cpp: + (JSC::callRegExpConstructor): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::test): + (JSC::RegExpObject::exec): + (JSC::callRegExpObject): + (JSC::RegExpObject::match): + * runtime/RegExpObject.h: + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + (JSC::stringFromCharCode): + (JSC::callStringConstructor): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncConcat): + (JSC::stringProtoFuncIndexOf): + (JSC::stringProtoFuncLastIndexOf): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSlice): + (JSC::stringProtoFuncSplit): + (JSC::stringProtoFuncSubstr): + (JSC::stringProtoFuncSubstring): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncLocaleCompare): + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + (JSC::stringProtoFuncTrim): + (JSC::stringProtoFuncTrimLeft): + (JSC::stringProtoFuncTrimRight): + +2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Geoffrey Garen. + + Fix the JSObjectSetPrototype function. + + A cycle in a prototype chain can cause an application hang or + even crash. + A check for a prototype chain cycles was added to + the JSObjectSetPrototype. + + JSObjectSetPrototype doesn't check for cycle in prototype chain. + https://bugs.webkit.org/show_bug.cgi?id=39360 + + * API/JSObjectRef.cpp: + (JSObjectSetPrototype): + * API/tests/testapi.c: + (assertTrue): + (checkForCycleInPrototypeChain): + (main): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + * runtime/JSObject.h: + (JSC::JSObject::setPrototypeWithCycleCheck): + +2010-05-28 Chao-ying Fu <fu@mips.com> + + Reviewed by Eric Seidel. + + Fix MIPS JIT DoubleGreaterThanOrEqual Operands + https://bugs.webkit.org/show_bug.cgi?id=39504 + + Swapped two operands of left and right for DoubleGreaterThanOrEqual. + This patch fixed two layout tests as follows. + fast/js/comparison-operators-greater.html + fast/js/comparison-operators-less.html + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::branchDouble): + +2010-05-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen. + + Move jit compilation from linking thunks into cti_vm_lazyLink methods. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-05-28 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 39898 - Move arity check into callee. + + We can reduce the size of the virtual call trampolines by moving the arity check + into the callee functions. As a following step we will be able to remove the + check for native function / codeblocks by performing translation in a lazy stub. + + * interpreter/CallFrame.h: + (JSC::ExecState::init): + (JSC::ExecState::setReturnPC): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): + * jit/JIT.h: + (JSC::JIT::compile): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::generateJITCodeForCall): + (JSC::FunctionExecutable::generateJITCodeForConstruct): + (JSC::FunctionExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::NativeExecutable::NativeExecutable): + (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck): + (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck): + +2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Darin Adler. + + UTF-16 code points compare() for String objects + https://bugs.webkit.org/show_bug.cgi?id=39701 + + Moving compare() implementation from UString to StringImpl for it to be shared + with String. Adding overloaded free functions codePointCompare() in StringImpl + and WTFString. Renaming function compare in UString to codePointCompare to be + consistent. + + * runtime/JSArray.cpp: + (JSC::compareByStringPairForQSort): + * runtime/UString.cpp: + * runtime/UString.h: + (JSC::codePointCompare): + * wtf/text/StringImpl.cpp: + (WebCore::codePointCompare): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.cpp: + (WebCore::codePointCompare): + * wtf/text/WTFString.h: + +2010-05-26 Darin Adler <darin@apple.com> + + Reviewed by Kent Tamura. + + Null characters handled incorrectly in ToNumber conversion + https://bugs.webkit.org/show_bug.cgi?id=38088 + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): Changed code to use UTF8String().data() instead of + ascii() to fix the thread safety issue. Code path is covered by existing + tests in run-javascriptcore-tests. + (JSC::parseFloat): Moved comment to UString::toDouble since the issue + affects all clients, not just parseFloat. Specifically, this also affects + standard JavaScript numeric conversion, ToNumber. + + * runtime/UString.cpp: + (JSC::UString::toDouble): Added a comment about incorrect space skipping. + Changed trailing junk check to use the length of the CString instead of + checking for a null character. Also got rid of a little unneeded logic + in the case where we tolerate trailing junk. + +2010-05-27 Nathan Lawrence <nlawrence@apple.com> + + Reviewed by Geoffrey Garen. + + Search for the new allocation one word at a time. Improves + performance on SunSpider by approximately 1%. + http://bugs.webkit.org/show_bug.cgi?id=39758 + + * runtime/Collector.cpp: + (JSC::Heap::allocate): + * runtime/Collector.h: + (JSC::CollectorBitmap::advanceToNextPossibleFreeCell): + +2010-05-27 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fixes for Windows after recent changes. + + * wscript: + +2010-05-27 Gustavo Noronha Silva <gns@gnome.org> + + More build fixage for make dist. + + * GNUmakefile.am: + +2010-05-27 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + RVCT does not have strnstr. + https://bugs.webkit.org/show_bug.cgi?id=39719 + + Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr. + + * wtf/StringExtras.h: + +2010-05-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. + (relanding r60267) + + If the last item in a main disjunction is a quantified set of parentheses, + this is easier to code generate for than the general case for quantified + parentheses. This is because we never need to backtrack into the parentheses + - the first match will be the final and accepted match. + + This patch also somewhat reverts a recent change to when fallback to PCRE + occurs. At the minute the compiler is tracking on patterns which will + require JIT fallback. This is handy from a performance perspective (it saves + the failed attempt at JIT compilation), but it means introducing knowledge + of the JITs capabilities into the other layers of the regex compilers. For + the specific feature of back-references, add a flag tracking their presence + on the pattern, and make these expressions fallback without attempting to + JIT. For parentheses, return to detecting which cases are have or have not + been handled during JIT compilation. + + 18% progression on tagcloud, ~1.5% overall on sunspidey. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::shouldFallBack): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-05-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY (revert). + + Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::term): + (JSC::Yarr::RegexGenerator::generateParenthesesSingle): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-05-26 Gustavo Noronha Silva <gns@gnome.org> + + Build fixes for make distcheck. + + * GNUmakefile.am: + +2010-05-26 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Oliver Hunt. + + Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction. + + If the last item in a main disjunction is a quantified set of parentheses, + this is easier to code generate for than the general case for quantified + parentheses. This is because we never need to backtrack into the parentheses + - the first match will be the final and accepted match. + + This patch also somewhat reverts a recent change to when fallback to PCRE + occurs. At the minute the compiler is tracking on patterns which will + require JIT fallback. This is handy from a performance perspective (it saves + the failed attempt at JIT compilation), but it means introducing knowledge + of the JITs capabilities into the other layers of the regex compilers. For + the specific feature of back-references, add a flag tracking their presence + on the pattern, and make these expressions fallback without attempting to + JIT. For parentheses, return to detecting which cases are have or have not + been handled during JIT compilation. + + 18% progression on tagcloud, ~1.5% overall on sunspidey. + + * yarr/RegexCompiler.cpp: + (JSC::Yarr::RegexPatternConstructor::atomBackReference): + (JSC::Yarr::RegexPatternConstructor::quantifyAtom): + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm): + (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction): + (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack): + (JSC::Yarr::RegexGenerator::generateTerm): + (JSC::Yarr::RegexGenerator::RegexGenerator): + (JSC::Yarr::RegexGenerator::shouldFallBack): + (JSC::Yarr::jitCompileRegex): + * yarr/RegexPattern.h: + (JSC::Yarr::RegexPattern::RegexPattern): + (JSC::Yarr::RegexPattern::reset): + +2010-05-26 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + Fixed a crash seen on the Leopard bot, caused by merge. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe, + since it's no longer passed to us as an argument. + +2010-05-25 Geoffrey Garen <ggaren@apple.com> + + Fixed build failure caused by merge. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this + function no longer returns a pair. + +2010-05-25 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Oliver Hunt. + + <rdar://problem/8020221> + + Fixed a crash seen on Windows when calling a function with too many + arguments. + + SunSpider reports no change. + + No test because the ASSERT I added fires in existing tests. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too + many arguments have been provided, since the caller only allocated enough + registerFile space for the arguments it provided, not enough for the extra + copy of arguments we're going to need. + +2010-05-25 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + Build fix for JSFunction + https://bugs.webkit.org/show_bug.cgi?id=39658 + + MSVC can't compile one of JSFunction constructors when JIT is disabled. + "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. + Add ENABLE(JIT) guard to the constructor. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + * runtime/JSFunction.h: + +2010-05-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call. + + Presently, as soon as op-call strays off the hot path we set up a set of values on + the stack to be passed as arguments to cti functions, in case any should be called. + + Instead, hoist the setup of the callframe to happen slightly sooner, and make the + cti functions to compile & check arity read these values from the callframe. This + allows up to remove the deprecated methods to manually set up cti arguments, rather + than using JITStubCall.h. + + * interpreter/CallFrame.h: + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + +2010-05-24 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + Relanding r60075. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): + * bytecode/CodeBlock.h: + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitGetByIdExceptionInfo): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_get_callee): + (JSC::JIT::emit_op_create_this): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_callee): + (JSC::JIT::emit_op_create_this): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC::JITThunks::hostFunctionStub): + * jit/JITStubs.h: + (JSC::JITThunks::ctiNativeConstruct): + (JSC::): + * runtime/ExceptionHelpers.cpp: + (JSC::createNotAnObjectError): + * runtime/Executable.h: + (JSC::NativeExecutable::create): + (JSC::NativeExecutable::NativeExecutable): + * runtime/JSFunction.cpp: + (JSC::callHostFunctionAsConstructor): + * runtime/JSFunction.h: + * wtf/Platform.h: + +== Rolled over to ChangeLog-2010-05-24 == diff --git a/Source/JavaScriptCore/Configurations/Base.xcconfig b/Source/JavaScriptCore/Configurations/Base.xcconfig index a189159..8d91d70 100644 --- a/Source/JavaScriptCore/Configurations/Base.xcconfig +++ b/Source/JavaScriptCore/Configurations/Base.xcconfig @@ -77,6 +77,12 @@ REAL_PLATFORM_NAME_macosx = macosx; TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR); +JAVASCRIPTCORE_FRAMEWORKS_DIR = $(JAVASCRIPTCORE_FRAMEWORKS_DIR_$(REAL_PLATFORM_NAME)); +JAVASCRIPTCORE_FRAMEWORKS_DIR_iphoneos = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; +JAVASCRIPTCORE_FRAMEWORKS_DIR_iphonesimulator = $(JAVASCRIPTCORE_FRAMEWORKS_DIR_iphoneos); +JAVASCRIPTCORE_FRAMEWORKS_DIR_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks; + + // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants. // We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant. DEBUG_DEFINES_debug = ; diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig index 3971037..0c1d13c 100644 --- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig +++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig @@ -66,6 +66,8 @@ ENABLE_DATAGRID = ; ENABLE_DATALIST = $(ENABLE_DATALIST_$(REAL_PLATFORM_NAME)); ENABLE_DATALIST_macosx = ENABLE_DATALIST; +ENABLE_DATA_TRANSFER_ITEMS = ; + ENABLE_DEVICE_ORIENTATION = ; ENABLE_DIRECTORY_UPLOAD = ; ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE; @@ -125,4 +127,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig b/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig index adf594e..dd2a2e9 100644 --- a/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig +++ b/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig @@ -43,7 +43,7 @@ OTHER_LDFLAGS_macosx_1070 = -Xlinker -objc_gc_compaction; GCC_PREFIX_HEADER = JavaScriptCorePrefix.h; HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS); INFOPLIST_FILE = Info.plist; -INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/Frameworks; +INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR); PRODUCT_NAME = JavaScriptCore; OTHER_CFLAGS = $(OTHER_CFLAGS_$(CONFIGURATION)_$(CURRENT_VARIANT)); diff --git a/Source/JavaScriptCore/Configurations/Version.xcconfig b/Source/JavaScriptCore/Configurations/Version.xcconfig index cee5010..ae9167c 100644 --- a/Source/JavaScriptCore/Configurations/Version.xcconfig +++ b/Source/JavaScriptCore/Configurations/Version.xcconfig @@ -22,7 +22,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MAJOR_VERSION = 534; -MINOR_VERSION = 20; +MINOR_VERSION = 24; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make index 0ff9cdf..8abb17c 100644 --- a/Source/JavaScriptCore/DerivedSources.make +++ b/Source/JavaScriptCore/DerivedSources.make @@ -44,6 +44,7 @@ all : \ Lexer.lut.h \ MathObject.lut.h \ NumberConstructor.lut.h \ + ObjectConstructor.lut.h \ RegExpConstructor.lut.h \ RegExpJitTables.h \ RegExpObject.lut.h \ diff --git a/Source/JavaScriptCore/DerivedSources.pro b/Source/JavaScriptCore/DerivedSources.pro index eac4dd9..061ae56 100644 --- a/Source/JavaScriptCore/DerivedSources.pro +++ b/Source/JavaScriptCore/DerivedSources.pro @@ -19,6 +19,7 @@ LUT_FILES += \ runtime/JSONObject.cpp \ runtime/MathObject.cpp \ runtime/NumberConstructor.cpp \ + runtime/ObjectConstructor.cpp \ runtime/RegExpConstructor.cpp \ runtime/RegExpObject.cpp \ runtime/StringPrototype.cpp diff --git a/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APIShims.h b/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APIShims.h new file mode 100644 index 0000000..92e712a --- /dev/null +++ b/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APIShims.h @@ -0,0 +1 @@ +#include <JavaScriptCore/API/APIShims.h> diff --git a/Source/JavaScriptCore/GNUmakefile.am b/Source/JavaScriptCore/GNUmakefile.am index e6ccf2e..977cb18 100644 --- a/Source/JavaScriptCore/GNUmakefile.am +++ b/Source/JavaScriptCore/GNUmakefile.am @@ -5,6 +5,7 @@ javascriptcore_cppflags += \ -I$(srcdir)/Source/JavaScriptCore/assembler \ -I$(srcdir)/Source/JavaScriptCore/bytecode \ -I$(srcdir)/Source/JavaScriptCore/bytecompiler \ + -I$(srcdir)/Source/JavaScriptCore/collector/handles \ -I$(srcdir)/Source/JavaScriptCore/debugger \ -I$(srcdir)/Source/JavaScriptCore/ForwardingHeaders \ -I$(srcdir)/Source/JavaScriptCore/interpreter \ @@ -44,6 +45,7 @@ javascriptcore_built_nosources += \ Source/JavaScriptCore/runtime/JSONObject.lut.h \ Source/JavaScriptCore/runtime/MathObject.lut.h \ Source/JavaScriptCore/runtime/NumberConstructor.lut.h \ + Source/JavaScriptCore/runtime/ObjectConstructor.lut.h \ Source/JavaScriptCore/runtime/RegExpConstructor.lut.h \ Source/JavaScriptCore/runtime/RegExpObject.lut.h \ Source/JavaScriptCore/runtime/StringPrototype.lut.h @@ -109,6 +111,10 @@ javascriptcore_sources += \ Source/JavaScriptCore/bytecompiler/LabelScope.h \ Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp \ Source/JavaScriptCore/bytecompiler/RegisterID.h \ + Source/JavaScriptCore/collector/handles/Global.h \ + Source/JavaScriptCore/collector/handles/Handle.h \ + Source/JavaScriptCore/collector/handles/HandleHeap.cpp \ + Source/JavaScriptCore/collector/handles/HandleHeap.h \ Source/JavaScriptCore/config.h \ Source/JavaScriptCore/debugger/DebuggerActivation.cpp \ Source/JavaScriptCore/debugger/DebuggerActivation.h \ @@ -117,6 +123,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/debugger/Debugger.cpp \ Source/JavaScriptCore/debugger/Debugger.h \ Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h \ + Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APIShims.h \ Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h \ Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h \ Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h \ @@ -270,12 +277,8 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/FunctionPrototype.h \ Source/JavaScriptCore/runtime/GCActivityCallback.cpp \ Source/JavaScriptCore/runtime/GCActivityCallback.h \ - Source/JavaScriptCore/runtime/GCHandle.cpp \ - Source/JavaScriptCore/runtime/GCHandle.h \ Source/JavaScriptCore/runtime/GetterSetter.cpp \ Source/JavaScriptCore/runtime/GetterSetter.h \ - Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp \ - Source/JavaScriptCore/runtime/GlobalEvalFunction.h \ Source/JavaScriptCore/runtime/Identifier.cpp \ Source/JavaScriptCore/runtime/Identifier.h \ Source/JavaScriptCore/runtime/InitializeThreading.cpp \ @@ -346,7 +349,6 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/NativeErrorConstructor.h \ Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp \ Source/JavaScriptCore/runtime/NativeErrorPrototype.h \ - Source/JavaScriptCore/runtime/NativeFunctionWrapper.h \ Source/JavaScriptCore/runtime/NumberConstructor.cpp \ Source/JavaScriptCore/runtime/NumberConstructor.h \ Source/JavaScriptCore/runtime/NumberObject.cpp \ @@ -368,8 +370,6 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/PropertySlot.cpp \ Source/JavaScriptCore/runtime/PropertySlot.h \ Source/JavaScriptCore/runtime/Protect.h \ - Source/JavaScriptCore/runtime/PrototypeFunction.cpp \ - Source/JavaScriptCore/runtime/PrototypeFunction.h \ Source/JavaScriptCore/runtime/PutPropertySlot.h \ Source/JavaScriptCore/runtime/RegExpCache.cpp \ Source/JavaScriptCore/runtime/RegExpCache.h \ @@ -426,6 +426,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/wtf/Atomics.h \ Source/JavaScriptCore/wtf/AVLTree.h \ Source/JavaScriptCore/wtf/Bitmap.h \ + Source/JavaScriptCore/wtf/BlockStack.h \ Source/JavaScriptCore/wtf/BloomFilter.h \ Source/JavaScriptCore/wtf/BumpPointerAllocator.h \ Source/JavaScriptCore/wtf/ByteArray.cpp \ @@ -442,6 +443,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/wtf/Decoder.h \ Source/JavaScriptCore/wtf/Deque.h \ Source/JavaScriptCore/wtf/DisallowCType.h \ + Source/JavaScriptCore/wtf/DoublyLinkedList.h \ Source/JavaScriptCore/wtf/dtoa.cpp \ Source/JavaScriptCore/wtf/dtoa.h \ Source/JavaScriptCore/wtf/Encoder.h \ @@ -508,6 +510,10 @@ javascriptcore_sources += \ Source/JavaScriptCore/wtf/RefPtrHashMap.h \ Source/JavaScriptCore/wtf/RetainPtr.h \ Source/JavaScriptCore/wtf/SegmentedVector.h \ + Source/JavaScriptCore/wtf/SentinelLinkedList.h \ + Source/JavaScriptCore/wtf/SHA1.cpp \ + Source/JavaScriptCore/wtf/SHA1.h \ + Source/JavaScriptCore/wtf/SinglyLinkedList.h \ Source/JavaScriptCore/wtf/StackBounds.cpp \ Source/JavaScriptCore/wtf/StackBounds.h \ Source/JavaScriptCore/wtf/StaticConstructors.h \ diff --git a/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp b/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp index 7e520ae..2f1166c 100644 --- a/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp +++ b/Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp @@ -1,2 +1 @@ __ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFxS2_E -__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFxS2_E diff --git a/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp b/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp index 73efb9d..c693322 100644 --- a/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp +++ b/Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp @@ -1,2 +1 @@ __ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFPvS2_E -__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFPvS2_E diff --git a/Source/JavaScriptCore/JavaScriptCore.exp b/Source/JavaScriptCore/JavaScriptCore.exp index 564d7db..914c2ac 100644 --- a/Source/JavaScriptCore/JavaScriptCore.exp +++ b/Source/JavaScriptCore/JavaScriptCore.exp @@ -1,3 +1,4 @@ +__ZN3JSC22objectConstructorTableE _JSCheckScriptSyntax _JSClassCreate _JSClassRelease @@ -97,6 +98,8 @@ _WTFReportBacktrace _WTFReportError _WTFReportFatalError __ZN14OpaqueJSString6createERKN3JSC7UStringE +__ZN3JSC10HandleHeap12writeBarrierEPNS_7JSValueERKS1_ +__ZN3JSC10HandleHeap4growEv __ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPN3WTF10StringImplE __ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPN3WTF10StringImplE __ZN3JSC10Identifier27checkCurrentIdentifierTableEPNS_12JSGlobalDataE @@ -106,16 +109,18 @@ __ZN3JSC10Identifier4fromEPNS_9ExecStateEi __ZN3JSC10Identifier4fromEPNS_9ExecStateEj __ZN3JSC10Identifier5equalEPKN3WTF10StringImplEPKc __ZN3JSC10Identifier8toUInt32ERKNS_7UStringERb -__ZN3JSC10JSFunction4infoE __ZN3JSC10JSFunction4nameEPNS_9ExecStateE +__ZN3JSC10JSFunction6s_infoE __ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE __ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE -__ZN3JSC11JSByteArray15createStructureENS_7JSValueE -__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayEPKNS_9ClassInfoE +__ZN3JSC11JSByteArray13s_defaultInfoE +__ZN3JSC11JSByteArray15createStructureENS_7JSValueEPKNS_9ClassInfoE +__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayE +__ZN3JSC11MarkedSpace21allocateFromSizeClassERNS0_9SizeClassE __ZN3JSC11ParserArena5resetEv __ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE __ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE -__ZN3JSC12DateInstance4infoE +__ZN3JSC12DateInstance6s_infoE __ZN3JSC12DateInstanceC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEd __ZN3JSC12DateInstanceC1EPNS_9ExecStateEd __ZN3JSC12JSGlobalData10ClientDataD2Ev @@ -130,7 +135,7 @@ __ZN3JSC12JSGlobalData14sharedInstanceEv __ZN3JSC12JSGlobalData15dumpRegExpTraceEv __ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeE __ZN3JSC12JSGlobalDataD1Ev -__ZN3JSC12RegExpObject4infoE +__ZN3JSC12RegExpObject6s_infoE __ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEENS4_INS_6RegExpEEE __ZN3JSC12SamplingTool5setupEv __ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE @@ -141,9 +146,8 @@ __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE __ZN3JSC12StringObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC12StringObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSC12StringObject4infoE +__ZN3JSC12StringObject6s_infoE __ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7UStringE -__ZN3JSC12WeakGCHandle4poolEv __ZN3JSC12jsNumberCellEPNS_9ExecStateEd __ZN3JSC12nonInlineNaNEv __ZN3JSC13SamplingFlags4stopEv @@ -167,13 +171,13 @@ __ZN3JSC14TimeoutChecker5resetEv __ZN3JSC14throwTypeErrorEPNS_9ExecStateE __ZN3JSC15JSWrapperObject12markChildrenERNS_9MarkStackE __ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE -__ZN3JSC16InternalFunction4infoE +__ZN3JSC16InternalFunction12vtableAnchorEv __ZN3JSC16InternalFunction4nameEPNS_9ExecStateE +__ZN3JSC16InternalFunction6s_infoE __ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_10IdentifierE __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE -__ZN3JSC16WeakGCHandlePool4freeEPNS_12WeakGCHandleE __ZN3JSC16createRangeErrorEPNS_9ExecStateERKNS_7UStringE __ZN3JSC16throwSyntaxErrorEPNS_9ExecStateE __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb @@ -181,6 +185,7 @@ __ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE __ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi __ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE __ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataEPNS_8JSObjectE +__ZN3JSC18MachineStackMarker14registerThreadEv __ZN3JSC18PropertyDescriptor11setWritableEb __ZN3JSC18PropertyDescriptor12setUndefinedEv __ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj @@ -206,7 +211,8 @@ __ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE __ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE __ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE __ZN3JSC3NaNE -__ZN3JSC4Heap15addWeakGCHandleEPNS_6JSCellE +__ZN3JSC4Heap16activityCallbackEv +__ZN3JSC4Heap16allocateSlowCaseEm __ZN3JSC4Heap16objectTypeCountsEv __ZN3JSC4Heap17collectAllGarbageEv __ZN3JSC4Heap17globalObjectCountEv @@ -218,12 +224,11 @@ __ZN3JSC4Heap29reportExtraMemoryCostSlowCaseEm __ZN3JSC4Heap6isBusyEv __ZN3JSC4Heap7destroyEv __ZN3JSC4Heap7protectENS_7JSValueE -__ZN3JSC4Heap8allocateEm __ZN3JSC4Heap9unprotectENS_7JSValueE -__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE __ZN3JSC4Yarr11YarrPatternC1ERKNS_7UStringEbbPPKc __ZN3JSC4Yarr11byteCompileERNS0_11YarrPatternEPN3WTF20BumpPointerAllocatorE __ZN3JSC4Yarr9interpretEPNS0_15BytecodePatternEPKtjjPi +__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE __ZN3JSC6JSCell11getCallDataERNS_8CallDataE __ZN3JSC6JSCell11getJSNumberEv __ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE @@ -238,6 +243,7 @@ __ZN3JSC6JSCell9getObjectEv __ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE __ZN3JSC6JSLock12DropAllLocksC1EPNS_9ExecStateE __ZN3JSC6JSLock12DropAllLocksD1Ev +__ZN3JSC6JSLock26currentThreadIsHoldingLockEv __ZN3JSC6JSLock4lockENS_14JSLockBehaviorE __ZN3JSC6JSLock6unlockENS_14JSLockBehaviorE __ZN3JSC6JSLock9lockCountEv @@ -247,7 +253,7 @@ __ZN3JSC6RegExpD1Ev __ZN3JSC7JSArray12markChildrenERNS_9MarkStackE __ZN3JSC7JSArray15setSubclassDataEPv __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE -__ZN3JSC7JSArray4infoE +__ZN3JSC7JSArray6s_infoE __ZN3JSC7JSArray9setLengthEj __ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE __ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE @@ -300,15 +306,15 @@ __ZN3JSC8JSObject23allocatePropertyStorageEmm __ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE +__ZN3JSC8JSObject6s_infoE __ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler8profilerEv -__ZN3JSC8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeENS_7JSValueE +__ZN3JSC8evaluateEPNS_9ExecStateEPNS_14ScopeChainNodeERKNS_10SourceCodeENS_7JSValueE __ZN3JSC9CodeBlockD1Ev __ZN3JSC9CodeBlockD2Ev __ZN3JSC9MarkStack10s_pageSizeE __ZN3JSC9MarkStack18initializePagesizeEv -__ZN3JSC9Structure13hasTransitionEPN3WTF10StringImplEj __ZN3JSC9Structure17stopIgnoringLeaksEv __ZN3JSC9Structure18startIgnoringLeaksEv __ZN3JSC9Structure21addPropertyTransitionEPS0_RKNS_10IdentifierEjPNS_6JSCellERm @@ -317,9 +323,9 @@ __ZN3JSC9Structure25changePrototypeTransitionEPS0_NS_7JSValueE __ZN3JSC9Structure27despecifyDictionaryFunctionERKNS_10IdentifierE __ZN3JSC9Structure27despecifyFunctionTransitionEPS0_RKNS_10IdentifierE __ZN3JSC9Structure28addPropertyWithoutTransitionERKNS_10IdentifierEjPNS_6JSCellE -__ZN3JSC9Structure3getEPKN3WTF10StringImplERjRPNS_6JSCellE +__ZN3JSC9Structure3getEPN3WTF10StringImplERjRPNS_6JSCellE __ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm -__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoEj +__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE __ZN3JSC9StructureD1Ev __ZN3JSC9constructEPNS_9ExecStateENS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE __ZN3JSCeqERKNS_7UStringEPKc @@ -334,7 +340,7 @@ __ZN3WTF10StringImpl18simplifyWhiteSpaceEv __ZN3WTF10StringImpl19characterStartingAtEj __ZN3WTF10StringImpl19createUninitializedEjRPt __ZN3WTF10StringImpl22containsOnlyWhitespaceEv -__ZN3WTF10StringImpl23defaultWritingDirectionEv +__ZN3WTF10StringImpl23defaultWritingDirectionEPb __ZN3WTF10StringImpl23reverseFindIgnoringCaseEPS0_j __ZN3WTF10StringImpl37createStrippingNullCharactersSlowCaseEPKtj __ZN3WTF10StringImpl4findEPFbtEj @@ -405,13 +411,13 @@ __ZN3WTF15charactersToIntEPKtmPb __ZN3WTF16callOnMainThreadEPFvPvES0_ __ZN3WTF16codePointCompareERKNS_6StringES2_ __ZN3WTF16fastZeroedMallocEm -__ZN3WTF17charactersToFloatEPKtmPb +__ZN3WTF17charactersToFloatEPKtmPbS2_ __ZN3WTF17equalIgnoringCaseEPKtPKcj __ZN3WTF17equalIgnoringCaseEPNS_10StringImplEPKc __ZN3WTF17equalIgnoringCaseEPNS_10StringImplES1_ __ZN3WTF18calculateDSTOffsetEdd __ZN3WTF18calculateUTCOffsetEv -__ZN3WTF18charactersToDoubleEPKtmPb +__ZN3WTF18charactersToDoubleEPKtmPbS2_ __ZN3WTF18dateToDaysFrom1970Eiii __ZN3WTF18monthFromDayInYearEib __ZN3WTF19initializeThreadingEv @@ -431,6 +437,7 @@ __ZN3WTF23dayInMonthFromDayInYearEib __ZN3WTF23waitForThreadCompletionEjPPv __ZN3WTF27releaseFastMallocFreeMemoryEv __ZN3WTF28setMainThreadCallbacksPausedEb +__ZN3WTF29cryptographicallyRandomNumberEv __ZN3WTF29cryptographicallyRandomValuesEPvm __ZN3WTF36lockAtomicallyInitializedStaticMutexEv __ZN3WTF37parseDateFromNullTerminatedCharactersEPKc @@ -440,6 +447,9 @@ __ZN3WTF3MD58addBytesEPKhm __ZN3WTF3MD58checksumERNS_6VectorIhLm16EEE __ZN3WTF3MD5C1Ev __ZN3WTF4dtoaEPcdRbRiRj +__ZN3WTF4SHA111computeHashERNS_6VectorIhLm20EEE +__ZN3WTF4SHA18addBytesEPKhm +__ZN3WTF4SHA1C1Ev __ZN3WTF5Mutex4lockEv __ZN3WTF5Mutex6unlockEv __ZN3WTF5Mutex7tryLockEv @@ -503,7 +513,6 @@ __ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_10JSFunctionE __ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE __ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE __ZNK3JSC14JSGlobalObject14isDynamicScopeERb -__ZNK3JSC16InternalFunction9classInfoEv __ZNK3JSC16JSVariableObject16isVariableObjectEv __ZNK3JSC17DebuggerCallFrame10thisObjectEv __ZNK3JSC17DebuggerCallFrame12functionNameEv @@ -528,7 +537,6 @@ __ZNK3JSC6JSCell14isGetterSetterEv __ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE __ZNK3JSC6JSCell8toObjectEPNS_9ExecStateE __ZNK3JSC6JSCell8toStringEPNS_9ExecStateE -__ZNK3JSC6JSCell9classInfoEv __ZNK3JSC6JSCell9getStringEPNS_9ExecStateE __ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE __ZNK3JSC6JSCell9getUInt32ERj @@ -578,15 +586,16 @@ __ZNK3WTF6String5toIntEPb __ZNK3WTF6String5upperEv __ZNK3WTF6String6latin1Ev __ZNK3WTF6String6toUIntEPb -__ZNK3WTF6String7toFloatEPb +__ZNK3WTF6String7toFloatEPbS1_ __ZNK3WTF6String8foldCaseEv -__ZNK3WTF6String8toDoubleEPb +__ZNK3WTF6String8toDoubleEPbS1_ __ZNK3WTF6String8toIntPtrEPb __ZNK3WTF6String8toUInt64EPb __ZNK3WTF6String9substringEjj __ZNK3WTF8Collator7collateEPKtmS2_m __ZTVN3JSC12StringObjectE __ZTVN3JSC14JSGlobalObjectE +__ZTVN3JSC14ScopeChainNodeE __ZTVN3JSC15JSWrapperObjectE __ZTVN3JSC16InternalFunctionE __ZTVN3JSC16JSVariableObjectE diff --git a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp index 08e590b..9b93d97 100644 --- a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp +++ b/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp @@ -32,7 +32,7 @@ 'includes': [ # FIXME: Sense whether upstream or downstream build, and # include the right features.gypi - '../../../Source/WebKit/chromium/features.gypi', + '../../WebKit/chromium/features.gypi', '../JavaScriptCore.gypi', ], 'variables': { @@ -40,7 +40,7 @@ 'conditions': [ ['inside_chromium_build==0', { # Webkit is being built outside of the full chromium project. - 'chromium_src_dir': '../../../Source/WebKit/chromium', + 'chromium_src_dir': '../../WebKit/chromium', },{ # WebKit is checked out in src/chromium/third_party/WebKit 'chromium_src_dir': '../../../../..', @@ -106,6 +106,8 @@ '../wtf/unicode', ], 'sources': [ + '<@(javascriptcore_publicheader_files)', + '<@(javascriptcore_privateheader_files)', '<@(javascriptcore_files)', ], 'sources/': [ @@ -113,10 +115,27 @@ ['exclude', '../'], # ... Then include what we want. ['include', '../wtf/'], + # FIXME: This is clearly not sustainable. + ['exclude', '../wtf/android'], + ['exclude', '../wtf/brew'], + ['exclude', '../wtf/efl'], + ['exclude', '../wtf/gobject'], + ['exclude', '../wtf/gtk'], + ['exclude', '../wtf/haiku'], + ['exclude', '../wtf/mac'], + ['exclude', '../wtf/qt'], + ['exclude', '../wtf/url'], + ['exclude', '../wtf/wince'], + ['exclude', '../wtf/wx'], + ['exclude', '../wtf/unicode/brew'], + ['exclude', '../wtf/unicode/wince'], + ['exclude', '../wtf/unicode/glib'], + ['exclude', '../wtf/unicode/qt4'], # GLib/GTK, even though its name doesn't really indicate. ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'], - ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx)\\.(cpp|mm)$'], + ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx|Efl|Symbian)\\.(cpp|mm)$'], ['exclude', 'wtf/CurrentTime\\.cpp$'], + ['exclude', 'wtf/OSRandomSource\\.cpp$'], ['exclude', 'wtf/MainThread.cpp$'], ['exclude', 'wtf/TC.*\\.(cpp|h)$'], ], diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi index 754fd2b..292473c 100644 --- a/Source/JavaScriptCore/JavaScriptCore.gypi +++ b/Source/JavaScriptCore/JavaScriptCore.gypi @@ -1,12 +1,236 @@ { 'variables': { - 'javascriptcore_files': [ - 'API/APICast.h', + # These headers are part of JavaScriptCore's public API in the Apple Mac build. + 'javascriptcore_publicheader_files': [ + 'API/JSBase.h', + 'API/JSContextRef.h', + 'API/JSObjectRef.h', + 'API/JSStringRef.h', + 'API/JSStringRefCF.h', + 'API/JSValueRef.h', 'API/JavaScript.h', 'API/JavaScriptCore.h', - 'API/JSBase.cpp', - 'API/JSBase.h', + 'API/WebKitAvailability.h', + ], + # These headers are part of JavaScriptCore's private API in the Apple Mac build. + 'javascriptcore_privateheader_files': [ + 'API/APICast.h', + 'API/APIShims.h', 'API/JSBasePrivate.h', + 'API/JSContextRefPrivate.h', + 'API/JSObjectRefPrivate.h', + 'API/JSProfilerPrivate.h', + 'API/JSRetainPtr.h', + 'API/JSWeakObjectMapRefInternal.h', + 'API/JSWeakObjectMapRefPrivate.h', + 'API/OpaqueJSString.h', + 'assembler/MacroAssemblerCodeRef.h', + 'bytecode/Opcode.h', + 'collector/handles/Global.h', + 'collector/handles/Handle.h', + 'collector/handles/HandleHeap.h', + 'config.h', + 'debugger/Debugger.h', + 'debugger/DebuggerActivation.h', + 'debugger/DebuggerCallFrame.h', + 'interpreter/CallFrame.h', + 'interpreter/Interpreter.h', + 'interpreter/Register.h', + 'interpreter/RegisterFile.h', + 'jit/ExecutableAllocator.h', + 'jit/JITCode.h', + 'jit/JITStubs.h', + 'jit/ThunkGenerators.h', + 'parser/ResultType.h', + 'parser/SourceCode.h', + 'parser/SourceProvider.h', + 'parser/SourceProviderCache.h', + 'profiler/CallIdentifier.h', + 'profiler/Profile.h', + 'profiler/ProfileNode.h', + 'profiler/Profiler.h', + 'runtime/ArgList.h', + 'runtime/ArrayPrototype.h', + 'runtime/BooleanObject.h', + 'runtime/CachedTranscendentalFunction.h', + 'runtime/CallData.h', + 'runtime/ClassInfo.h', + 'runtime/CommonIdentifiers.h', + 'runtime/Completion.h', + 'runtime/ConstructData.h', + 'runtime/DateInstance.h', + 'runtime/DateInstanceCache.h', + 'runtime/Error.h', + 'runtime/ExceptionHelpers.h', + 'runtime/FunctionConstructor.h', + 'runtime/FunctionPrototype.h', + 'runtime/Heap.h', + 'runtime/Identifier.h', + 'runtime/InitializeThreading.h', + 'runtime/InternalFunction.h', + 'runtime/JSAPIValueWrapper.h', + 'runtime/JSArray.h', + 'runtime/JSByteArray.h', + 'runtime/JSCell.h', + 'runtime/JSFunction.h', + 'runtime/JSGlobalData.h', + 'runtime/JSGlobalObject.h', + 'runtime/JSImmediate.h', + 'runtime/JSLock.h', + 'runtime/JSNumberCell.h', + 'runtime/JSObject.h', + 'runtime/JSObjectWithGlobalObject.h', + 'runtime/JSString.h', + 'runtime/JSType.h', + 'runtime/JSTypeInfo.h', + 'runtime/JSValue.h', + 'runtime/JSVariableObject.h', + 'runtime/JSWrapperObject.h', + 'runtime/Lookup.h', + 'runtime/MachineStackMarker.h', + 'runtime/MarkStack.h', + 'runtime/MarkedBlock.h', + 'runtime/MarkedSpace.h', + 'runtime/MathObject.h', + 'runtime/MemoryStatistics.h', + 'runtime/NumberObject.h', + 'runtime/NumberPrototype.h', + 'runtime/NumericStrings.h', + 'runtime/ObjectPrototype.h', + 'runtime/Operations.h', + 'runtime/PropertyDescriptor.h', + 'runtime/PropertyMapHashTable.h', + 'runtime/PropertyNameArray.h', + 'runtime/PropertySlot.h', + 'runtime/Protect.h', + 'runtime/PutPropertySlot.h', + 'runtime/RegExp.h', + 'runtime/RegExpCache.h', + 'runtime/RopeImpl.h', + 'runtime/ScopeChain.h', + 'runtime/SmallStrings.h', + 'runtime/StringObject.h', + 'runtime/StringObjectThatMasqueradesAsUndefined.h', + 'runtime/StringPrototype.h', + 'runtime/Structure.h', + 'runtime/StructureChain.h', + 'runtime/StructureTransitionTable.h', + 'runtime/SymbolTable.h', + 'runtime/Terminator.h', + 'runtime/TimeoutChecker.h', + 'runtime/UString.h', + 'runtime/UStringBuilder.h', + 'runtime/WeakGCMap.h', + 'runtime/WeakGCPtr.h', + 'runtime/WeakRandom.h', + 'runtime/WriteBarrier.h', + 'wtf/ASCIICType.h', + 'wtf/AVLTree.h', + 'wtf/AlwaysInline.h', + 'wtf/Assertions.h', + 'wtf/Atomics.h', + 'wtf/Bitmap.h', + 'wtf/BlockStack.h', + 'wtf/BloomFilter.h', + 'wtf/BumpPointerAllocator.h', + 'wtf/ByteArray.h', + 'wtf/Complex.h', + 'wtf/CrossThreadRefCounted.h', + 'wtf/CryptographicallyRandomNumber.h', + 'wtf/CurrentTime.h', + 'wtf/DateMath.h', + 'wtf/DecimalNumber.h', + 'wtf/Decoder.h', + 'wtf/Deque.h', + 'wtf/DisallowCType.h', + 'wtf/DoublyLinkedList.h', + 'wtf/Encoder.h', + 'wtf/FastAllocBase.h', + 'wtf/FastMalloc.h', + 'wtf/FixedArray.h', + 'wtf/Forward.h', + 'wtf/GetPtr.h', + 'wtf/HashCountedSet.h', + 'wtf/HashFunctions.h', + 'wtf/HashIterators.h', + 'wtf/HashMap.h', + 'wtf/HashSet.h', + 'wtf/HashTable.h', + 'wtf/HashTraits.h', + 'wtf/ListHashSet.h', + 'wtf/ListRefPtr.h', + 'wtf/Locker.h', + 'wtf/MD5.h', + 'wtf/MainThread.h', + 'wtf/MathExtras.h', + 'wtf/MessageQueue.h', + 'wtf/NonCopyingSort.h', + 'wtf/Noncopyable.h', + 'wtf/NotFound.h', + 'wtf/NullPtr.h', + 'wtf/OSAllocator.h', + 'wtf/OwnArrayPtr.h', + 'wtf/OwnFastMallocPtr.h', + 'wtf/OwnPtr.h', + 'wtf/OwnPtrCommon.h', + 'wtf/PageAllocation.h', + 'wtf/PageAllocationAligned.h', + 'wtf/PageBlock.h', + 'wtf/PageReservation.h', + 'wtf/PassOwnArrayPtr.h', + 'wtf/PassOwnPtr.h', + 'wtf/PassRefPtr.h', + 'wtf/Platform.h', + 'wtf/PossiblyNull.h', + 'wtf/RandomNumber.h', + 'wtf/RefCounted.h', + 'wtf/RefCountedLeakCounter.h', + 'wtf/RefPtr.h', + 'wtf/RefPtrHashMap.h', + 'wtf/RetainPtr.h', + 'wtf/SentinelLinkedList.h', + 'wtf/SinglyLinkedList.h', + 'wtf/StackBounds.h', + 'wtf/StaticConstructors.h', + 'wtf/StdLibExtras.h', + 'wtf/StringExtras.h', + 'wtf/StringHasher.h', + 'wtf/ThreadSafeShared.h', + 'wtf/ThreadSpecific.h', + 'wtf/Threading.h', + 'wtf/ThreadingPrimitives.h', + 'wtf/TypeTraits.h', + 'wtf/UnusedParam.h', + 'wtf/VMTags.h', + 'wtf/ValueCheck.h', + 'wtf/Vector.h', + 'wtf/VectorTraits.h', + 'wtf/WTFThreadData.h', + 'wtf/dtoa.h', + 'wtf/text/AtomicString.h', + 'wtf/text/AtomicStringHash.h', + 'wtf/text/AtomicStringImpl.h', + 'wtf/text/CString.h', + 'wtf/text/StringBuffer.h', + 'wtf/text/StringBuilder.h', + 'wtf/text/StringConcatenate.h', + 'wtf/text/StringHash.h', + 'wtf/text/StringImpl.h', + 'wtf/text/StringImplBase.h', + 'wtf/text/TextPosition.h', + 'wtf/text/WTFString.h', + 'wtf/unicode/CharacterNames.h', + 'wtf/unicode/Collator.h', + 'wtf/unicode/UTF8.h', + 'wtf/unicode/Unicode.h', + 'wtf/unicode/icu/UnicodeIcu.h', + 'yarr/Yarr.h', + 'yarr/YarrInterpreter.h', + 'yarr/YarrPattern.h', + ], + 'javascriptcore_files': [ + 'API/APIShims.h', + 'API/JSBase.cpp', 'API/JSCallbackConstructor.cpp', 'API/JSCallbackConstructor.h', 'API/JSCallbackFunction.cpp', @@ -17,38 +241,49 @@ 'API/JSClassRef.cpp', 'API/JSClassRef.h', 'API/JSContextRef.cpp', - 'API/JSContextRef.h', - 'API/JSContextRefPrivate.h', 'API/JSObjectRef.cpp', - 'API/JSObjectRef.h', 'API/JSProfilerPrivate.cpp', - 'API/JSProfilerPrivate.h', - 'API/JSRetainPtr.h', 'API/JSStringRef.cpp', - 'API/JSStringRef.h', 'API/JSStringRefBSTR.cpp', 'API/JSStringRefBSTR.h', 'API/JSStringRefCF.cpp', - 'API/JSStringRefCF.h', 'API/JSValueRef.cpp', - 'API/JSValueRef.h', + 'API/JSWeakObjectMapRefPrivate.cpp', 'API/OpaqueJSString.cpp', - 'API/OpaqueJSString.h', - 'API/tests/JSNode.h', - 'API/tests/JSNodeList.h', - 'API/tests/Node.h', - 'API/tests/NodeList.h', - 'API/WebKitAvailability.h', - 'assembler/AbstractMacroAssembler.h', + 'AllInOneFile.cpp', + 'ForwardingHeaders/JavaScriptCore/APICast.h', + 'ForwardingHeaders/JavaScriptCore/APIShims.h', + 'ForwardingHeaders/JavaScriptCore/JSBase.h', + 'ForwardingHeaders/JavaScriptCore/JSContextRef.h', + 'ForwardingHeaders/JavaScriptCore/JSObjectRef.h', + 'ForwardingHeaders/JavaScriptCore/JSRetainPtr.h', + 'ForwardingHeaders/JavaScriptCore/JSStringRef.h', + 'ForwardingHeaders/JavaScriptCore/JSStringRefCF.h', + 'ForwardingHeaders/JavaScriptCore/JSValueRef.h', + 'ForwardingHeaders/JavaScriptCore/JavaScript.h', + 'ForwardingHeaders/JavaScriptCore/JavaScriptCore.h', + 'ForwardingHeaders/JavaScriptCore/OpaqueJSString.h', + 'ForwardingHeaders/JavaScriptCore/WebKitAvailability.h', + 'JavaScriptCorePrefix.h', + 'assembler/ARMAssembler.cpp', + 'assembler/ARMAssembler.h', + 'assembler/ARMv7Assembler.cpp', 'assembler/ARMv7Assembler.h', + 'assembler/AbstractMacroAssembler.h', 'assembler/AssemblerBuffer.h', + 'assembler/AssemblerBufferWithConstantPool.h', 'assembler/CodeLocation.h', + 'assembler/LinkBuffer.h', + 'assembler/MIPSAssembler.h', 'assembler/MacroAssembler.h', + 'assembler/MacroAssemblerARM.cpp', + 'assembler/MacroAssemblerARM.h', 'assembler/MacroAssemblerARMv7.h', - 'assembler/MacroAssemblerCodeRef.h', + 'assembler/MacroAssemblerMIPS.h', 'assembler/MacroAssemblerX86.h', - 'assembler/MacroAssemblerX86_64.h', 'assembler/MacroAssemblerX86Common.h', + 'assembler/MacroAssemblerX86_64.h', + 'assembler/RepatchBuffer.h', 'assembler/X86Assembler.h', 'bytecode/CodeBlock.cpp', 'bytecode/CodeBlock.h', @@ -57,24 +292,20 @@ 'bytecode/JumpTable.cpp', 'bytecode/JumpTable.h', 'bytecode/Opcode.cpp', - 'bytecode/Opcode.h', 'bytecode/SamplingTool.cpp', 'bytecode/SamplingTool.h', 'bytecode/StructureStubInfo.cpp', 'bytecode/StructureStubInfo.h', 'bytecompiler/BytecodeGenerator.cpp', 'bytecompiler/BytecodeGenerator.h', - 'bytecompiler/NodesCodegen.cpp', 'bytecompiler/Label.h', 'bytecompiler/LabelScope.h', + 'bytecompiler/NodesCodegen.cpp', 'bytecompiler/RegisterID.h', - 'config.h', + 'collector/handles/HandleHeap.cpp', 'debugger/Debugger.cpp', - 'debugger/Debugger.h', 'debugger/DebuggerActivation.cpp', - 'debugger/DebuggerActivation.h', 'debugger/DebuggerCallFrame.cpp', - 'debugger/DebuggerCallFrame.h', 'icu/unicode/parseerr.h', 'icu/unicode/platform.h', 'icu/unicode/putil.h', @@ -99,16 +330,10 @@ 'icu/unicode/uversion.h', 'interpreter/CachedCall.h', 'interpreter/CallFrame.cpp', - 'interpreter/CallFrame.h', 'interpreter/CallFrameClosure.h', 'interpreter/Interpreter.cpp', - 'interpreter/Interpreter.h', - 'interpreter/Register.h', 'interpreter/RegisterFile.cpp', - 'interpreter/RegisterFile.h', - 'JavaScriptCorePrefix.h', 'jit/ExecutableAllocator.cpp', - 'jit/ExecutableAllocator.h', 'jit/ExecutableAllocatorFixedVMPool.cpp', 'jit/JIT.cpp', 'jit/JIT.h', @@ -116,7 +341,6 @@ 'jit/JITArithmetic32_64.cpp', 'jit/JITCall.cpp', 'jit/JITCall32_64.cpp', - 'jit/JITCode.h', 'jit/JITInlineMethods.h', 'jit/JITOpcodes.cpp', 'jit/JITOpcodes32_64.cpp', @@ -124,10 +348,9 @@ 'jit/JITPropertyAccess32_64.cpp', 'jit/JITStubCall.h', 'jit/JITStubs.cpp', - 'jit/JITStubs.h', - 'jsc.cpp', - 'os-win32/stdbool.h', - 'os-win32/stdint.h', + 'jit/JSInterfaceJIT.h', + 'jit/SpecializedThunkJIT.h', + 'jit/ThunkGenerators.cpp', 'parser/ASTBuilder.h', 'parser/JSParser.cpp', 'parser/JSParser.h', @@ -141,64 +364,77 @@ 'parser/Parser.h', 'parser/ParserArena.cpp', 'parser/ParserArena.h', - 'parser/ResultType.h', - 'parser/SourceCode.h', - 'parser/SourceProvider.h', 'parser/SourceProviderCache.cpp', - 'parser/SourceProviderCache.h', 'parser/SourceProviderCacheItem.h', 'parser/SyntaxChecker.h', - 'profiler/CallIdentifier.h', 'profiler/Profile.cpp', - 'profiler/Profile.h', 'profiler/ProfileGenerator.cpp', 'profiler/ProfileGenerator.h', 'profiler/ProfileNode.cpp', - 'profiler/ProfileNode.h', 'profiler/Profiler.cpp', - 'profiler/Profiler.h', 'profiler/ProfilerServer.h', + 'profiler/ProfilerServer.mm', + 'qt/api/qscriptconverter_p.h', + 'qt/api/qscriptengine.cpp', + 'qt/api/qscriptengine.h', + 'qt/api/qscriptengine_p.cpp', + 'qt/api/qscriptengine_p.h', + 'qt/api/qscriptfunction.cpp', + 'qt/api/qscriptfunction_p.h', + 'qt/api/qscriptoriginalglobalobject_p.h', + 'qt/api/qscriptprogram.cpp', + 'qt/api/qscriptprogram.h', + 'qt/api/qscriptprogram_p.h', + 'qt/api/qscriptstring.cpp', + 'qt/api/qscriptstring.h', + 'qt/api/qscriptstring_p.h', + 'qt/api/qscriptsyntaxcheckresult.cpp', + 'qt/api/qscriptsyntaxcheckresult.h', + 'qt/api/qscriptsyntaxcheckresult_p.h', + 'qt/api/qscriptvalue.cpp', + 'qt/api/qscriptvalue.h', + 'qt/api/qscriptvalue_p.h', + 'qt/api/qscriptvalueiterator.cpp', + 'qt/api/qscriptvalueiterator.h', + 'qt/api/qscriptvalueiterator_p.h', + 'qt/api/qtscriptglobal.h', + 'qt/benchmarks/qscriptengine/tst_qscriptengine.cpp', + 'qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp', + 'qt/tests/qscriptengine/tst_qscriptengine.cpp', + 'qt/tests/qscriptstring/tst_qscriptstring.cpp', + 'qt/tests/qscriptvalue/tst_qscriptvalue.cpp', + 'qt/tests/qscriptvalue/tst_qscriptvalue.h', + 'qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp', + 'qt/tests/qscriptvalue/tst_qscriptvalue_generated_init.cpp', + 'qt/tests/qscriptvalue/tst_qscriptvalue_generated_istype.cpp', + 'qt/tests/qscriptvalue/tst_qscriptvalue_generated_totype.cpp', + 'qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp', 'runtime/ArgList.cpp', - 'runtime/ArgList.h', 'runtime/Arguments.cpp', 'runtime/Arguments.h', 'runtime/ArrayConstructor.cpp', 'runtime/ArrayConstructor.h', 'runtime/ArrayPrototype.cpp', - 'runtime/ArrayPrototype.h', 'runtime/BatchedTransitionOptimizer.h', 'runtime/BooleanConstructor.cpp', 'runtime/BooleanConstructor.h', 'runtime/BooleanObject.cpp', - 'runtime/BooleanObject.h', 'runtime/BooleanPrototype.cpp', 'runtime/BooleanPrototype.h', 'runtime/CallData.cpp', - 'runtime/CallData.h', - 'runtime/ClassInfo.h', - 'runtime/MarkedBlock.cpp', - 'runtime/MarkedBlock.h', - 'runtime/MarkedSpace.cpp', - 'runtime/MarkedSpace.h', - 'runtime/Heap.cpp', - 'runtime/Heap.h', 'runtime/CommonIdentifiers.cpp', - 'runtime/CommonIdentifiers.h', 'runtime/Completion.cpp', - 'runtime/Completion.h', + 'runtime/ConservativeSet.cpp', + 'runtime/ConservativeSet.h', 'runtime/ConstructData.cpp', - 'runtime/ConstructData.h', 'runtime/DateConstructor.cpp', 'runtime/DateConstructor.h', 'runtime/DateConversion.cpp', 'runtime/DateConversion.h', 'runtime/DateInstance.cpp', - 'runtime/DateInstance.h', - 'runtime/DateInstanceCache.h', 'runtime/DatePrototype.cpp', 'runtime/DatePrototype.h', 'runtime/Error.cpp', - 'runtime/Error.h', 'runtime/ErrorConstructor.cpp', 'runtime/ErrorConstructor.h', 'runtime/ErrorInstance.cpp', @@ -206,114 +442,79 @@ 'runtime/ErrorPrototype.cpp', 'runtime/ErrorPrototype.h', 'runtime/ExceptionHelpers.cpp', - 'runtime/ExceptionHelpers.h', + 'runtime/Executable.cpp', + 'runtime/Executable.h', 'runtime/FunctionConstructor.cpp', - 'runtime/FunctionConstructor.h', 'runtime/FunctionPrototype.cpp', - 'runtime/FunctionPrototype.h', 'runtime/GCActivityCallback.cpp', 'runtime/GCActivityCallback.h', - 'runtime/GCHandle.cpp', - 'runtime/GCHandle.h', + 'runtime/GCActivityCallbackCF.cpp', 'runtime/GetterSetter.cpp', 'runtime/GetterSetter.h', - 'runtime/GlobalEvalFunction.cpp', - 'runtime/GlobalEvalFunction.h', + 'runtime/Heap.cpp', 'runtime/Identifier.cpp', - 'runtime/Identifier.h', 'runtime/InitializeThreading.cpp', - 'runtime/InitializeThreading.h', 'runtime/InternalFunction.cpp', - 'runtime/InternalFunction.h', + 'runtime/JSAPIValueWrapper.cpp', 'runtime/JSActivation.cpp', 'runtime/JSActivation.h', 'runtime/JSArray.cpp', - 'runtime/JSArray.h', 'runtime/JSByteArray.cpp', - 'runtime/JSByteArray.h', 'runtime/JSCell.cpp', - 'runtime/JSCell.h', 'runtime/JSFunction.cpp', - 'runtime/JSFunction.h', 'runtime/JSGlobalData.cpp', - 'runtime/JSGlobalData.h', 'runtime/JSGlobalObject.cpp', - 'runtime/JSGlobalObject.h', 'runtime/JSGlobalObjectFunctions.cpp', 'runtime/JSGlobalObjectFunctions.h', 'runtime/JSImmediate.cpp', - 'runtime/JSImmediate.h', 'runtime/JSLock.cpp', - 'runtime/JSLock.h', 'runtime/JSNotAnObject.cpp', 'runtime/JSNotAnObject.h', 'runtime/JSNumberCell.cpp', - 'runtime/JSNumberCell.h', - 'runtime/JSObject.cpp', - 'runtime/JSObject.h', - 'runtime/JSObjectWithGlobalObject.cpp', - 'runtime/JSObjectWithGlobalObject.h', 'runtime/JSONObject.cpp', 'runtime/JSONObject.h', + 'runtime/JSObject.cpp', + 'runtime/JSObjectWithGlobalObject.cpp', 'runtime/JSPropertyNameIterator.cpp', 'runtime/JSPropertyNameIterator.h', 'runtime/JSStaticScopeObject.cpp', 'runtime/JSStaticScopeObject.h', 'runtime/JSString.cpp', - 'runtime/JSString.h', - 'runtime/JSType.h', - 'runtime/JSTypeInfo.h', + 'runtime/JSStringBuilder.h', 'runtime/JSValue.cpp', - 'runtime/JSValue.h', 'runtime/JSVariableObject.cpp', - 'runtime/JSVariableObject.h', 'runtime/JSWrapperObject.cpp', - 'runtime/JSWrapperObject.h', + 'runtime/JSZombie.cpp', + 'runtime/JSZombie.h', 'runtime/LiteralParser.cpp', 'runtime/LiteralParser.h', 'runtime/Lookup.cpp', - 'runtime/Lookup.h', 'runtime/MachineStackMarker.cpp', - 'runtime/MachineStackMarker.h', - 'runtime/ConservativeSet.cpp', - 'runtime/ConservativeSet.h', 'runtime/MarkStack.cpp', - 'runtime/MarkStack.h', + 'runtime/MarkStackPosix.cpp', + 'runtime/MarkStackSymbian.cpp', 'runtime/MarkStackWin.cpp', + 'runtime/MarkedBlock.cpp', + 'runtime/MarkedSpace.cpp', 'runtime/MathObject.cpp', - 'runtime/MathObject.h', + 'runtime/MemoryStatistics.cpp', 'runtime/NativeErrorConstructor.cpp', 'runtime/NativeErrorConstructor.h', 'runtime/NativeErrorPrototype.cpp', 'runtime/NativeErrorPrototype.h', - 'runtime/NativeFunctionWrapper.h', 'runtime/NumberConstructor.cpp', 'runtime/NumberConstructor.h', 'runtime/NumberObject.cpp', - 'runtime/NumberObject.h', 'runtime/NumberPrototype.cpp', - 'runtime/NumberPrototype.h', 'runtime/ObjectConstructor.cpp', 'runtime/ObjectConstructor.h', 'runtime/ObjectPrototype.cpp', - 'runtime/ObjectPrototype.h', 'runtime/Operations.cpp', - 'runtime/Operations.h', 'runtime/PropertyDescriptor.cpp', - 'runtime/PropertyDescriptor.h', - 'runtime/PropertyMapHashTable.h', 'runtime/PropertyNameArray.cpp', - 'runtime/PropertyNameArray.h', 'runtime/PropertySlot.cpp', - 'runtime/PropertySlot.h', - 'runtime/Protect.h', - 'runtime/PrototypeFunction.cpp', - 'runtime/PrototypeFunction.h', - 'runtime/PutPropertySlot.h', 'runtime/RegExp.cpp', - 'runtime/RegExp.h', 'runtime/RegExpCache.cpp', - 'runtime/RegExpCache.h', 'runtime/RegExpConstructor.cpp', 'runtime/RegExpConstructor.h', 'runtime/RegExpKey.h', @@ -322,128 +523,54 @@ 'runtime/RegExpObject.h', 'runtime/RegExpPrototype.cpp', 'runtime/RegExpPrototype.h', + 'runtime/RopeImpl.cpp', 'runtime/ScopeChain.cpp', - 'runtime/ScopeChain.h', 'runtime/ScopeChainMark.h', 'runtime/SmallStrings.cpp', - 'runtime/SmallStrings.h', + 'runtime/StrictEvalActivation.cpp', + 'runtime/StrictEvalActivation.h', 'runtime/StringConstructor.cpp', 'runtime/StringConstructor.h', 'runtime/StringObject.cpp', - 'runtime/StringObject.h', - 'runtime/StringObjectThatMasqueradesAsUndefined.h', 'runtime/StringPrototype.cpp', - 'runtime/StringPrototype.h', 'runtime/StringRecursionChecker.cpp', 'runtime/StringRecursionChecker.h', 'runtime/Structure.cpp', - 'runtime/Structure.h', 'runtime/StructureChain.cpp', - 'runtime/StructureChain.h', - 'runtime/StructureTransitionTable.h', - 'runtime/SymbolTable.h', - 'runtime/Terminator.h', 'runtime/TimeoutChecker.cpp', - 'runtime/TimeoutChecker.h', 'runtime/Tracing.h', 'runtime/UString.cpp', - 'runtime/UString.h', - 'runtime/UStringBuilder.h', 'runtime/UStringConcatenate.h', - 'runtime/WeakRandom.h', - 'wtf/AlwaysInline.h', - 'wtf/ASCIICType.h', 'wtf/Assertions.cpp', - 'wtf/Assertions.h', - 'wtf/Atomics.h', - 'wtf/AVLTree.h', - 'wtf/Bitmap.h', - 'wtf/BloomFilter.h', 'wtf/ByteArray.cpp', - 'wtf/ByteArray.h', - 'wtf/chromium/ChromiumThreading.h', - 'wtf/chromium/MainThreadChromium.cpp', - 'wtf/CrossThreadRefCounted.h', 'wtf/CryptographicallyRandomNumber.cpp', - 'wtf/CryptographicallyRandomNumber.h', 'wtf/CurrentTime.cpp', - 'wtf/CurrentTime.h', 'wtf/DateMath.cpp', - 'wtf/DateMath.h', 'wtf/DecimalNumber.cpp', - 'wtf/Deque.h', - 'wtf/DisallowCType.h', - 'wtf/dtoa.cpp', - 'wtf/dtoa.h', - 'wtf/FastAllocBase.h', 'wtf/FastMalloc.cpp', - 'wtf/FastMalloc.h', - 'wtf/Forward.h', - 'wtf/GetPtr.h', - 'wtf/gobject/GOwnPtr.cpp', - 'wtf/gobject/GOwnPtr.h', - 'wtf/gtk/MainThreadGtk.cpp', - 'wtf/gtk/ThreadingGtk.cpp', - 'wtf/HashCountedSet.h', - 'wtf/HashFunctions.h', - 'wtf/HashIterators.h', - 'wtf/HashMap.h', - 'wtf/HashSet.h', 'wtf/HashTable.cpp', - 'wtf/HashTable.h', - 'wtf/HashTraits.h', - 'wtf/ListHashSet.h', - 'wtf/ListRefPtr.h', - 'wtf/Locker.h', 'wtf/MD5.cpp', - 'wtf/MD5.h', 'wtf/MainThread.cpp', - 'wtf/MainThread.h', 'wtf/MallocZoneSupport.h', - 'wtf/MathExtras.h', - 'wtf/MessageQueue.h', - 'wtf/NonCopyingSort.h', - 'wtf/Noncopyable.h', - 'wtf/NotFound.h', + 'wtf/NullPtr.cpp', 'wtf/OSAllocatorPosix.cpp', + 'wtf/OSAllocatorSymbian.cpp', 'wtf/OSAllocatorWin.cpp', - 'wtf/OSAllocator.h', 'wtf/OSRandomSource.cpp', 'wtf/OSRandomSource.h', - 'wtf/OwnArrayPtr.h', - 'wtf/OwnFastMallocPtr.h', - 'wtf/OwnPtr.h', - 'wtf/OwnPtrCommon.h', - 'wtf/PageBlock.cpp', - 'wtf/PageAllocation.h', 'wtf/PageAllocationAligned.cpp', - 'wtf/PageAllocationAligned.h', - 'wtf/PageReservation', - 'wtf/PassOwnPtr.h', - 'wtf/PassRefPtr.h', - 'wtf/Platform.h', - 'wtf/PtrAndFlags.h', + 'wtf/PageAllocatorSymbian.h', + 'wtf/PageBlock.cpp', 'wtf/RandomNumber.cpp', - 'wtf/RandomNumber.h', 'wtf/RandomNumberSeed.h', - 'wtf/RefCounted.h', 'wtf/RefCountedLeakCounter.cpp', - 'wtf/RefCountedLeakCounter.h', - 'wtf/RefPtr.h', - 'wtf/RefPtrHashMap.h', - 'wtf/RetainPtr.h', 'wtf/SegmentedVector.h', + 'wtf/SHA1.cpp', + 'wtf/SHA1.h', 'wtf/SizeLimits.cpp', 'wtf/StackBounds.cpp', - 'wtf/StackBounds.h', - 'wtf/StaticConstructors.h', - 'wtf/StdLibExtras.h', - 'wtf/StringExtras.h', - 'wtf/StringHasher.h', + 'wtf/StringExtras.cpp', 'wtf/TCPackedCache.h', - 'wtf/qt/MainThreadQt.cpp', - 'wtf/qt/StringQt.cpp', - 'wtf/qt/ThreadingQt.cpp', 'wtf/TCPageMap.h', 'wtf/TCSpinLock.h', 'wtf/TCSystemAlloc.cpp', @@ -451,67 +578,114 @@ 'wtf/ThreadFunctionInvocation.h', 'wtf/ThreadIdentifierDataPthreads.cpp', 'wtf/ThreadIdentifierDataPthreads.h', + 'wtf/ThreadSpecificWin.cpp', 'wtf/Threading.cpp', - 'wtf/Threading.h', 'wtf/ThreadingNone.cpp', - 'wtf/ThreadingPrimitives.h', 'wtf/ThreadingPthreads.cpp', 'wtf/ThreadingWin.cpp', - 'wtf/ThreadSafeShared.h', - 'wtf/ThreadSpecific.h', - 'wtf/ThreadSpecificWin.cpp', 'wtf/TypeTraits.cpp', - 'wtf/TypeTraits.h', + 'wtf/WTFThreadData.cpp', + 'wtf/android/AndroidThreading.h', + 'wtf/android/MainThreadAndroid.cpp', + 'wtf/brew/MainThreadBrew.cpp', + 'wtf/brew/OwnPtrBrew.cpp', + 'wtf/brew/RefPtrBrew.h', + 'wtf/brew/ShellBrew.h', + 'wtf/brew/StringBrew.cpp', + 'wtf/brew/SystemMallocBrew.h', + 'wtf/chromium/ChromiumThreading.h', + 'wtf/chromium/MainThreadChromium.cpp', + 'wtf/dtoa.cpp', + 'wtf/efl/MainThreadEfl.cpp', + 'wtf/gobject/GOwnPtr.cpp', + 'wtf/gobject/GOwnPtr.h', + 'wtf/gobject/GRefPtr.cpp', + 'wtf/gobject/GRefPtr.h', + 'wtf/gobject/GTypedefs.h', + 'wtf/gtk/MainThreadGtk.cpp', + 'wtf/gtk/ThreadingGtk.cpp', + 'wtf/haiku/MainThreadHaiku.cpp', + 'wtf/haiku/StringHaiku.cpp', + 'wtf/mac/MainThreadMac.mm', + 'wtf/qt/MainThreadQt.cpp', + 'wtf/qt/StringQt.cpp', + 'wtf/qt/ThreadingQt.cpp', 'wtf/text/AtomicString.cpp', - 'wtf/text/AtomicString.h', - 'wtf/text/AtomicStringHash.h', - 'wtf/text/AtomicStringImpl.h', 'wtf/text/CString.cpp', - 'wtf/text/CString.h', - 'wtf/text/StringBuffer.h', 'wtf/text/StringBuilder.cpp', - 'wtf/text/StringBuilder.h', - 'wtf/text/StringConcatenate.h', - 'wtf/text/StringHash.h', 'wtf/text/StringImpl.cpp', - 'wtf/text/StringImpl.h', 'wtf/text/StringStatics.cpp', - 'wtf/text/TextPosition.h', 'wtf/text/WTFString.cpp', - 'wtf/text/WTFString.h', - 'wtf/unicode/CharacterNames.h', - 'wtf/unicode/Collator.h', 'wtf/unicode/CollatorDefault.cpp', + 'wtf/unicode/UTF8.cpp', + 'wtf/unicode/UnicodeMacrosFromICU.h', + 'wtf/unicode/brew/UnicodeBrew.cpp', + 'wtf/unicode/brew/UnicodeBrew.h', 'wtf/unicode/glib/UnicodeGLib.cpp', 'wtf/unicode/glib/UnicodeGLib.h', - 'wtf/unicode/glib/UnicodeMacrosFromICU.h', 'wtf/unicode/icu/CollatorICU.cpp', - 'wtf/unicode/icu/UnicodeIcu.h', 'wtf/unicode/qt4/UnicodeQt4.h', - 'wtf/unicode/Unicode.h', - 'wtf/unicode/UTF8.cpp', - 'wtf/unicode/UTF8.h', - 'wtf/UnusedParam.h', - 'wtf/ValueCheck.h', - 'wtf/Vector.h', - 'wtf/VectorTraits.h', - 'wtf/VMTags.h', - 'wtf/WTFThreadData.cpp', - 'wtf/WTFThreadData.h', + 'wtf/unicode/wince/UnicodeWinCE.cpp', + 'wtf/unicode/wince/UnicodeWinCE.h', + 'wtf/url/api/ParsedURL.cpp', + 'wtf/url/api/ParsedURL.h', + 'wtf/url/api/URLString.h', + 'wtf/url/src/RawURLBuffer.h', + 'wtf/url/src/URLBuffer.h', + 'wtf/url/src/URLCharacterTypes.cpp', + 'wtf/url/src/URLCharacterTypes.h', + 'wtf/url/src/URLComponent.h', + 'wtf/url/src/URLEscape.cpp', + 'wtf/url/src/URLEscape.h', + 'wtf/url/src/URLParser.h', + 'wtf/url/src/URLQueryCanonicalizer.h', + 'wtf/url/src/URLSegments.cpp', + 'wtf/url/src/URLSegments.h', 'wtf/win/MainThreadWin.cpp', 'wtf/win/OwnPtrWin.cpp', + 'wtf/wince/FastMallocWinCE.h', + 'wtf/wince/MemoryManager.cpp', + 'wtf/wince/MemoryManager.h', 'wtf/wx/MainThreadWx.cpp', - 'yarr/Yarr.h', + 'wtf/wx/StringWx.cpp', 'yarr/YarrInterpreter.cpp', - 'yarr/YarrInterpreter.h', 'yarr/YarrJIT.cpp', 'yarr/YarrJIT.h', 'yarr/YarrParser.h', 'yarr/YarrPattern.cpp', - 'yarr/YarrPattern.h', 'yarr/YarrSyntaxChecker.cpp', 'yarr/YarrSyntaxChecker.h', - ] + ], + # These files are separate from javascriptcore_files so we can use a + # header map in the Apple Mac Xcode build. + 'os_win32_files': [ + 'os-win32/WinMain.cpp', + 'os-win32/inttypes.h', + 'os-win32/stdbool.h', + 'os-win32/stdint.h', + ], + 'minidom_files': [ + 'API/tests/JSNode.c', + 'API/tests/JSNode.h', + 'API/tests/JSNodeList.c', + 'API/tests/JSNodeList.h', + 'API/tests/Node.c', + 'API/tests/Node.h', + 'API/tests/NodeList.c', + 'API/tests/NodeList.h', + 'API/tests/minidom.c', + ], + 'minidom_support_files': [ + 'API/tests/minidom.js', + ], + 'testapi_files': [ + 'API/tests/testapi.c', + ], + 'testapi_support_files': [ + 'API/tests/testapi.js', + ], + 'jsc_files': [ + 'jsc.cpp', + ], } } - diff --git a/Source/JavaScriptCore/JavaScriptCore.order b/Source/JavaScriptCore/JavaScriptCore.order index 9e4004f..b82958e 100644 --- a/Source/JavaScriptCore/JavaScriptCore.order +++ b/Source/JavaScriptCore/JavaScriptCore.order @@ -1425,7 +1425,7 @@ __ZN7WebCore10StringImpl11reverseFindEti __ZN3WTF23waitForThreadCompletionEjPPv __ZN3WTF14FastMallocZone10statisticsEP14_malloc_zone_tP19malloc_statistics_t __ZNK7WebCore6String18simplifyWhiteSpaceEv -__ZN7WebCore10StringImpl23defaultWritingDirectionEv +__ZN3WTF10StringImpl23defaultWritingDirectionEPb __ZN3JSCL20dateProtoFuncSetTimeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL21dateProtoFuncGetMonthEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZNK3JSC12DateInstance26calculateGregorianDateTimeEPNS_9ExecStateE diff --git a/Source/JavaScriptCore/JavaScriptCore.pri b/Source/JavaScriptCore/JavaScriptCore.pri index c1de599..391c74f 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pri +++ b/Source/JavaScriptCore/JavaScriptCore.pri @@ -18,8 +18,6 @@ CONFIG(standalone_package) { isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated } -CONFIG(standalone_package): DEFINES *= NDEBUG - JAVASCRIPTCORE_INCLUDEPATH = \ $$PWD \ $$PWD/.. \ @@ -27,6 +25,7 @@ JAVASCRIPTCORE_INCLUDEPATH = \ $$PWD/assembler \ $$PWD/bytecode \ $$PWD/bytecompiler \ + $$PWD/collector/handles \ $$PWD/debugger \ $$PWD/interpreter \ $$PWD/jit \ @@ -48,9 +47,8 @@ symbian { INCLUDEPATH = $$JAVASCRIPTCORE_INCLUDEPATH $$INCLUDEPATH } -symbian: { +symbian { LIBS += -lhal - # For hal.h INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE } @@ -70,16 +68,16 @@ wince* { } -defineTest(addJavaScriptCoreLib) { +defineTest(prependJavaScriptCoreLib) { # Argument is the relative path to JavaScriptCore.pro's qmake output pathToJavaScriptCoreOutput = $$ARGS/$$JAVASCRIPTCORE_DESTDIR win32-msvc*|wince* { - LIBS += -L$$pathToJavaScriptCoreOutput - LIBS += -l$$JAVASCRIPTCORE_TARGET + LIBS = -l$$JAVASCRIPTCORE_TARGET $$LIBS + LIBS = -L$$pathToJavaScriptCoreOutput $$LIBS POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib } else:symbian { - LIBS += -l$${JAVASCRIPTCORE_TARGET}.lib + LIBS = -l$${JAVASCRIPTCORE_TARGET}.lib $$LIBS # The default symbian build system does not use library paths at all. However when building with # qmake's symbian makespec that uses Makefiles QMAKE_LIBDIR += $$pathToJavaScriptCoreOutput @@ -88,13 +86,7 @@ defineTest(addJavaScriptCoreLib) { # Make sure jscore will be early in the list of libraries to workaround a bug in MinGW # that can't resolve symbols from QtCore if libjscore comes after. QMAKE_LIBDIR = $$pathToJavaScriptCoreOutput $$QMAKE_LIBDIR - webkit2 { - # FIXME Workaround for undefined reference linking issues until the build system gets redesigned - mac: LIBS += -Wl,-all_load -l$$JAVASCRIPTCORE_TARGET -WL,-noall_load - else: LIBS += -Wl,-whole-archive -l$$JAVASCRIPTCORE_TARGET -Wl,-no-whole-archive - } else { - LIBS += -l$$JAVASCRIPTCORE_TARGET - } + LIBS = -l$$JAVASCRIPTCORE_TARGET $$LIBS POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}lib$${JAVASCRIPTCORE_TARGET}.a } diff --git a/Source/JavaScriptCore/JavaScriptCore.pro b/Source/JavaScriptCore/JavaScriptCore.pro index 1b5e28a..e41f04d 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pro +++ b/Source/JavaScriptCore/JavaScriptCore.pro @@ -16,20 +16,6 @@ CONFIG += depend_includepath contains(QT_CONFIG, embedded):CONFIG += embedded -CONFIG(QTDIR_build) { - # Make sure we compile both debug and release on mac when inside Qt. - # This line was extracted from qbase.pri instead of including the whole file - win32|mac:!macx-xcode:CONFIG += debug_and_release -} else { - !CONFIG(release, debug|release) { - OBJECTS_DIR = obj/debug - } else { # Release - OBJECTS_DIR = obj/release - } - # Make sure that build_all follows the build_all config in WebCore - mac:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework):!build_pass:CONFIG += build_all -} - # WebCore adds these config only when in a standalone build. # qbase.pri takes care of that when in a QTDIR_build # Here we add the config for both cases since we don't include qbase.pri @@ -42,14 +28,6 @@ CONFIG(QTDIR_build) { CONFIG += no_debug_info } -# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++* { - TMPPATH = $$quote($$(INCLUDE)) - QMAKE_INCDIR_POST += $$split(TMPPATH,";") - TMPPATH = $$quote($$(LIB)) - QMAKE_LIBDIR_POST += $$split(TMPPATH,";") -} - *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 @@ -94,6 +72,7 @@ SOURCES += \ debugger/DebuggerActivation.cpp \ debugger/DebuggerCallFrame.cpp \ debugger/Debugger.cpp \ + collector/handles/HandleHeap.cpp \ interpreter/CallFrame.cpp \ interpreter/Interpreter.cpp \ interpreter/RegisterFile.cpp \ @@ -147,9 +126,7 @@ SOURCES += \ runtime/FunctionConstructor.cpp \ runtime/FunctionPrototype.cpp \ runtime/GCActivityCallback.cpp \ - runtime/GCHandle.cpp \ runtime/GetterSetter.cpp \ - runtime/GlobalEvalFunction.cpp \ runtime/Identifier.cpp \ runtime/InitializeThreading.cpp \ runtime/InternalFunction.cpp \ @@ -195,7 +172,6 @@ SOURCES += \ runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ - runtime/PrototypeFunction.cpp \ runtime/RegExpConstructor.cpp \ runtime/RegExp.cpp \ runtime/RegExpObject.cpp \ diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def index 010db39..7a8be2a 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def @@ -11,16 +11,17 @@ EXPORTS ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z ??0JSArray@JSC@@QAE@AAVJSGlobalData@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVArgList@1@@Z ??0JSArray@JSC@@QAE@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z - ??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@PBUClassInfo@1@@Z + ??0JSByteArray@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@PAVByteArray@4@@Z ??0JSFunction@JSC@@QAE@PAVExecState@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I_J0@Z@Z + ??0JSLock@JSC@@QAE@PAVExecState@1@@Z ??0JSObjectWithGlobalObject@JSC@@IAE@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z ??0MD5@WTF@@QAE@XZ ??0Mutex@WTF@@QAE@XZ - ??0PrototypeFunction@JSC@@QAE@PAVExecState@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@HABVIdentifier@1@P6I_J0@Z@Z ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z ??0RegExpObject@JSC@@QAE@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@V?$NonNullPassRefPtr@VRegExp@JSC@@@4@@Z + ??0SHA1@WTF@@QAE@XZ ??0StringObject@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVUString@1@@Z - ??0Structure@JSC@@AAE@VJSValue@1@ABVTypeInfo@1@I@Z + ??0Structure@JSC@@AAE@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z ??0ThreadCondition@WTF@@QAE@XZ ??0UString@JSC@@QAE@PBD@Z ??0UString@JSC@@QAE@PBDI@Z @@ -45,16 +46,19 @@ EXPORTS ??8WTF@@YA_NABVCString@0@0@Z ?NaN@JSC@@3NB ?absoluteTimeToWaitTimeoutInterval@WTF@@YAKN@Z + ?activityCallback@Heap@JSC@@QAEPAVGCActivityCallback@2@XZ ?add@Identifier@JSC@@SA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PBD@Z ?add@PropertyNameArray@JSC@@QAEXPAVStringImpl@WTF@@@Z ?addBytes@MD5@WTF@@QAEXPBEI@Z + ?addBytes@SHA1@WTF@@QAEXPBEI@Z ?addPropertyTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z ?addPropertyTransitionToExistingStructure@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z ?addPropertyWithoutTransition@Structure@JSC@@QAEIABVIdentifier@2@IPAVJSCell@2@@Z ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PAVStringImpl@4@@Z - ?addWeakGCHandle@Heap@JSC@@QAEPAVWeakGCHandle@2@PAVJSCell@2@@Z ?allocate@Heap@JSC@@QAEPAXI@Z + ?allocateFromSizeClass@MarkedSpace@JSC@@AAEPAXAAUSizeClass@12@@Z ?allocatePropertyStorage@JSObject@JSC@@QAEXII@Z + ?allocateSlowCase@Heap@JSC@@AAEPAXI@Z ?allocateStack@MarkStack@JSC@@CAPAXI@Z ?append@StringBuilder@WTF@@QAEXPBDI@Z ?append@StringBuilder@WTF@@QAEXPB_WI@Z @@ -79,12 +83,11 @@ EXPORTS ?checkCurrentIdentifierTable@Identifier@JSC@@CAXPAVJSGlobalData@2@@Z ?checkSyntax@JSC@@YA?AVCompletion@1@PAVExecState@1@ABVSourceCode@1@@Z ?checksum@MD5@WTF@@QAEXAAV?$Vector@E$0BA@@2@@Z - ?classInfo@InternalFunction@JSC@@UBEPBUClassInfo@2@XZ - ?classInfo@JSCell@JSC@@UBEPBUClassInfo@2@XZ ?className@JSObject@JSC@@UBE?AVUString@2@XZ ?clear@SourceProviderCache@JSC@@QAEXXZ ?collate@Collator@WTF@@QBE?AW4Result@12@PB_WI0I@Z ?collectAllGarbage@Heap@JSC@@QAEXXZ + ?computeHash@SHA1@WTF@@QAEXAAV?$Vector@E$0BE@@2@@Z ?configurable@PropertyDescriptor@JSC@@QBE_NXZ ?construct@JSC@@YAPAVJSObject@1@PAVExecState@1@VJSValue@1@W4ConstructType@1@ABTConstructData@1@ABVArgList@1@@Z ?constructArray@JSC@@YAPAVJSArray@1@PAVExecState@1@ABVArgList@1@@Z @@ -106,14 +109,16 @@ EXPORTS ?createReferenceError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z ?createSingleCharacterString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@E@Z ?createStackOverflowError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@VJSValue@2@@Z + ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@VJSValue@2@PBUClassInfo@2@@Z ?createSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z ?createTable@HashTable@JSC@@ABEXPAVJSGlobalData@2@@Z ?createThread@WTF@@YAIP6APAXPAX@Z0@Z ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z ?createTypeError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z + ?cryptographicallyRandomNumber@WTF@@YAIXZ ?cryptographicallyRandomValues@WTF@@YAXPAXI@Z ?currentThread@WTF@@YAIXZ + ?currentThreadIsHoldingLock@JSLock@JSC@@SA_NXZ ?currentTime@WTF@@YANXZ ?data@CString@WTF@@QBEPBDXZ ?dateToDaysFrom1970@WTF@@YANHHH@Z @@ -153,7 +158,7 @@ EXPORTS ?equal@Identifier@JSC@@SA_NPBVStringImpl@WTF@@PBD@Z ?equalUTF16WithUTF8@Unicode@WTF@@YA_NPB_W0PBD1@Z ?evaluate@DebuggerCallFrame@JSC@@QBE?AVJSValue@2@ABVUString@2@AAV32@@Z - ?evaluate@JSC@@YA?AVCompletion@1@PAVExecState@1@AAVScopeChain@1@ABVSourceCode@1@VJSValue@1@@Z + ?evaluate@JSC@@YA?AVCompletion@1@PAVExecState@1@PAVScopeChainNode@1@ABVSourceCode@1@VJSValue@1@@Z ?exclude@Profile@JSC@@QAEXPBVProfileNode@2@@Z ?fastCalloc@WTF@@YAPAXII@Z ?fastFree@WTF@@YAXPAX@Z @@ -164,12 +169,11 @@ EXPORTS ?fastZeroedMalloc@WTF@@YAPAXI@Z ?fillGetterPropertySlot@JSObject@JSC@@QAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z ?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z - ?free@WeakGCHandlePool@JSC@@QAEXPAVWeakGCHandle@2@@Z ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@I@Z ?functionGetter@PropertySlot@JSC@@ABE?AVJSValue@2@PAVExecState@2@@Z ?functionName@DebuggerCallFrame@JSC@@QBEPBVUString@2@XZ - ?get@Structure@JSC@@QAEIPBVStringImpl@WTF@@AAIAAPAVJSCell@2@@Z + ?get@Structure@JSC@@QAEIPAVStringImpl@WTF@@AAIAAPAVJSCell@2@@Z ?getCallData@JSCell@JSC@@UAE?AW4CallType@2@AATCallData@2@@Z ?getConstructData@JSCell@JSC@@UAE?AW4ConstructType@2@AATConstructData@2@@Z ?getJSNumber@JSCell@JSC@@UAE?AVJSValue@2@XZ @@ -201,10 +205,10 @@ EXPORTS ?globalExec@JSGlobalObject@JSC@@UAEPAVExecState@2@XZ ?globalObject@JSObjectWithGlobalObject@JSC@@QBEPAVJSGlobalObject@2@XZ ?globalObjectCount@Heap@JSC@@QAEIXZ + ?grow@HandleHeap@JSC@@AAEXXZ ?hasInstance@JSObject@JSC@@UAE_NPAVExecState@2@VJSValue@2@1@Z ?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@ABVIdentifier@2@@Z ?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@I@Z - ?hasTransition@Structure@JSC@@QAE_NPAVStringImpl@WTF@@I@Z ?heap@Heap@JSC@@SAPAV12@VJSValue@2@@Z ?increment@RefCountedLeakCounter@WTF@@QAEXXZ ?init@AtomicString@WTF@@SAXXZ @@ -229,11 +233,13 @@ EXPORTS ?lock@JSLock@JSC@@SAXW4JSLockBehavior@2@@Z ?lock@Mutex@WTF@@QAEXXZ ?lockAtomicallyInitializedStaticMutex@WTF@@YAXXZ + ?lockCount@JSLock@JSC@@SAHXZ ?lookupGetter@JSObject@JSC@@UAE?AVJSValue@2@PAVExecState@2@ABVIdentifier@2@@Z ?lookupSetter@JSObject@JSC@@UAE?AVJSValue@2@PAVExecState@2@ABVIdentifier@2@@Z ?markChildren@JSGlobalObject@JSC@@UAEXAAVMarkStack@2@@Z ?markChildren@JSObject@JSC@@UAEXAAVMarkStack@2@@Z ?markChildren@JSWrapperObject@JSC@@EAEXAAVMarkStack@2@@Z + ?markChildren@ScopeChainNode@JSC@@UAEXAAVMarkStack@2@@Z ?materializePropertyMap@Structure@JSC@@AAEXXZ ?monthFromDayInYear@WTF@@YAHH_N@Z ?msToYear@WTF@@YAHN@Z @@ -249,7 +255,6 @@ EXPORTS ?objectCount@Heap@JSC@@QBEIXZ ?objectProtoFuncToString@JSC@@YI_JPAVExecState@1@@Z ?parseDateFromNullTerminatedCharacters@WTF@@YANPBD@Z - ?pool@WeakGCHandle@JSC@@QAEPAVWeakGCHandlePool@2@XZ ?profiler@Profiler@JSC@@SAPAV12@XZ ?protect@Heap@JSC@@QAEXVJSValue@2@@Z ?protectedGlobalObjectCount@Heap@JSC@@QAEIXZ @@ -272,6 +277,7 @@ EXPORTS ?putWithAttributes@JSObject@JSC@@UAEXPAVJSGlobalData@2@IVJSValue@2@I@Z ?randomNumber@WTF@@YANXZ ?recompileAllJSFunctions@Debugger@JSC@@QAEXPAVJSGlobalData@2@@Z + ?registerThread@MachineStackMarker@JSC@@QAEXXZ ?reifyString@StringBuilder@WTF@@AAEXXZ ?releaseDecommitted@OSAllocator@WTF@@SAXPAXI@Z ?releaseStack@MarkStack@JSC@@CAXPAXI@Z @@ -357,9 +363,11 @@ EXPORTS ?unprotect@Heap@JSC@@QAE_NVJSValue@2@@Z ?unwrappedObject@JSObject@JSC@@UAEPAV12@XZ ?utf8@UString@JSC@@QBE?AVCString@WTF@@_N@Z + ?vtableAnchor@InternalFunction@JSC@@EAEXXZ ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z ?writable@PropertyDescriptor@JSC@@QBE_NXZ + ?writeBarrier@HandleHeap@JSC@@QAEXPAVJSValue@2@ABV32@@Z ?yield@WTF@@YAXXZ WTFLog WTFLogVerbose diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc deleted file mode 100644 index e09e26e..0000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc +++ /dev/null @@ -1,47 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "autoversion.h" -#include "winresrc.h" - -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __VERSION_MAJOR__,__VERSION_MINOR__,__VERSION_TINY__,__VERSION_BUILD__ - PRODUCTVERSION __VERSION_MAJOR__,__VERSION_MINOR__,__VERSION_TINY__,__VERSION_BUILD__ - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "JavaScriptCore Dynamic Link Library" - VALUE "FileVersion", __VERSION_TEXT__ - VALUE "CompanyName", "Apple Inc." - VALUE "InternalName", "JavaScriptCore" - VALUE "LegalCopyright", "Copyright Apple Inc. 2003-" __COPYRIGHT_YEAR_END_TEXT__ - VALUE "OriginalFilename", "JavaScriptCore.dll" - VALUE "ProductName", " JavaScriptCore" - VALUE "ProductVersion", __VERSION_TEXT__ - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj index 260779e..34a9902 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj @@ -144,7 +144,7 @@ CharacterSet="1" WholeProgramOptimization="2" > - <Tool + <Tool Name="VCPreBuildEventTool" /> <Tool @@ -451,7 +451,7 @@ CharacterSet="1" WholeProgramOptimization="4" > - <Tool + <Tool Name="VCPreBuildEventTool" /> <Tool @@ -586,43 +586,27 @@ > </File> <File - RelativePath="..\..\runtime\Heap.cpp" - > - </File> - <File - RelativePath="..\..\runtime\Heap.h" - > - </File> - <File - RelativePath="..\..\runtime\MarkedBlock.cpp" - > - </File> - <File - RelativePath="..\..\runtime\MarkedBlock.h" - > - </File> - <File - RelativePath="..\..\runtime\MarkedSpace.cpp" + RelativePath="..\..\runtime\CommonIdentifiers.cpp" > </File> <File - RelativePath="..\..\runtime\MarkedSpace.h" + RelativePath="..\..\runtime\CommonIdentifiers.h" > </File> <File - RelativePath="..\..\runtime\CommonIdentifiers.cpp" + RelativePath="..\..\runtime\Completion.cpp" > </File> <File - RelativePath="..\..\runtime\CommonIdentifiers.h" + RelativePath="..\..\runtime\Completion.h" > </File> <File - RelativePath="..\..\runtime\Completion.cpp" + RelativePath="..\..\runtime\ConservativeSet.cpp" > </File> <File - RelativePath="..\..\runtime\Completion.h" + RelativePath="..\..\runtime\ConservativeSet.h" > </File> <File @@ -750,14 +734,6 @@ > </File> <File - RelativePath="..\..\runtime\GCHandle.cpp" - > - </File> - <File - RelativePath="..\..\runtime\GCHandle.h" - > - </File> - <File RelativePath="..\..\runtime\GetterSetter.cpp" > </File> @@ -766,11 +742,11 @@ > </File> <File - RelativePath="..\..\runtime\GlobalEvalFunction.cpp" + RelativePath="..\..\runtime\Heap.cpp" > </File> <File - RelativePath="..\..\runtime\GlobalEvalFunction.h" + RelativePath="..\..\runtime\Heap.h" > </File> <File @@ -1006,11 +982,19 @@ > </File> <File - RelativePath="..\..\runtime\ConservativeSet.cpp" + RelativePath="..\..\runtime\MarkedBlock.cpp" > </File> <File - RelativePath="..\..\runtime\ConservativeSet.h" + RelativePath="..\..\runtime\MarkedBlock.h" + > + </File> + <File + RelativePath="..\..\runtime\MarkedSpace.cpp" + > + </File> + <File + RelativePath="..\..\runtime\MarkedSpace.h" > </File> <File @@ -1050,10 +1034,6 @@ > </File> <File - RelativePath="..\..\runtime\NativeFunctionWrapper.h" - > - </File> - <File RelativePath="..\..\runtime\NumberConstructor.cpp" > </File> @@ -1138,14 +1118,6 @@ > </File> <File - RelativePath="..\..\runtime\PrototypeFunction.cpp" - > - </File> - <File - RelativePath="..\..\runtime\PrototypeFunction.h" - > - </File> - <File RelativePath="..\..\runtime\RegExp.cpp" > </File> @@ -1779,14 +1751,6 @@ </File> </Filter> <Filter - Name="Resources" - > - <File - RelativePath=".\JavaScriptCore.rc" - > - </File> - </Filter> - <Filter Name="interpreter" > <File @@ -1974,6 +1938,30 @@ > </File> </Filter> + <Filter + Name="collector" + > + <Filter + Name="handles" + > + <File + RelativePath="..\..\collector\handles\Global.h" + > + </File> + <File + RelativePath="..\..\collector\handles\Handle.h" + > + </File> + <File + RelativePath="..\..\collector\handles\HandleHeap.cpp" + > + </File> + <File + RelativePath="..\..\collector\handles\HandleHeap.h" + > + </File> + </Filter> + </Filter> <File RelativePath="..\..\config.h" > diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops index 4a7f4d3..cb7362d 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops @@ -6,7 +6,7 @@ > <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;../../API/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include\pthreads"" + AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;../../API/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../collector/handles/;"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include\pthreads"" PreprocessorDefinitions="__STD_C" ForcedIncludeFiles="ICUVersion.h" /> diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make index 314a794..ba95c46 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make @@ -6,6 +6,7 @@ all: !ENDIF -mkdir 2>NUL "%ConfigurationBuildDir%\include\JavaScriptCore" xcopy /y /d "..\..\API\APICast.h" "%ConfigurationBuildDir%\include\JavaScriptCore" + xcopy /y /d "..\..\API\APIShims.h" "%ConfigurationBuildDir%\include\JavaScriptCore" xcopy /y /d "..\..\API\JavaScript.h" "%ConfigurationBuildDir%\include\JavaScriptCore" xcopy /y /d "..\..\API\JSBase.h" "%ConfigurationBuildDir%\include\JavaScriptCore" xcopy /y /d "..\..\API\JSContextRef.h" "%ConfigurationBuildDir%\include\JavaScriptCore" @@ -36,6 +37,7 @@ all: xcopy /y /d "..\..\interpreter\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" xcopy /y /d "..\..\assembler\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" xcopy /y /d "..\..\jit\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" + xcopy /y /d "..\..\collector\handles\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" xcopy /y /d "..\..\debugger\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" xcopy /y /d "..\..\profiler\*.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore" xcopy /y /d "..\..\create_hash_table" "%ConfigurationBuildDir%\include\private\JavaScriptCore" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd index 26707ca..233c45c 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd @@ -1 +1,2 @@ +if exist "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd index 42fbb71..a770776 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd @@ -4,5 +4,3 @@ cmd /c if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" if errorlevel 1 exit 1 echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" - -bash "%WEBKITLIBRARIESDIR%\tools\scripts\auto-version.sh" "%INTDIR%" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py index e12840f..aafe511 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py @@ -16,17 +16,14 @@ def main(): assert len(vsprops_files), "Couldn't find any .vsprops files in %s" % vsprops_directory newest_vsprops_time = max(map(os.path.getmtime, vsprops_files)) - # Delete any manifest-related files because Visual Studio isn't smart - # enough to figure out that it might need to rebuild them. obj_directory = os.path.join(os.environ['CONFIGURATIONBUILDDIR'], 'obj') - for manifest_file in glob.iglob(os.path.join(obj_directory, '*', '*.manifest*')): - delete_if_older_than(manifest_file, newest_vsprops_time) - - # Delete any precompiled headers because Visual Studio isn't smart enough - # to figure out that it might need to rebuild them, even if we touch - # wtf/Platform.h below. - for precompiled_header in glob.iglob(os.path.join(obj_directory, '*', '*.pch')): - delete_if_older_than(precompiled_header, newest_vsprops_time) + + # Visual Studio isn't smart enough to figure out it needs to rebuild these file types when + # .vsprops files change (even if we touch wtf/Platform.h below), so we delete them to force them + # to be rebuilt. + for extension in ('manifest', 'pch', 'res'): + for filepath in glob.iglob(os.path.join(obj_directory, '*', '*.%s' % extension)): + delete_if_older_than(filepath, newest_vsprops_time) # Touch wtf/Platform.h so all files will be recompiled. This is necessary # to pick up changes to preprocessor macros (e.g., ENABLE_*). diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj index 55371f3..8f0cfcb 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj @@ -537,6 +537,10 @@ > </File> <File + RelativePath="..\..\wtf\BlockStack.h" + > + </File> + <File RelativePath="..\..\wtf\BloomFilter.h" > </File> @@ -597,6 +601,10 @@ > </File> <File + RelativePath="..\..\wtf\DoublyLinkedList.h" + > + </File> + <File RelativePath="..\..\wtf\dtoa.cpp" > </File> @@ -869,6 +877,22 @@ > </File> <File + RelativePath="..\..\wtf\SentinelLinkedList.h" + > + </File> + <File + RelativePath="..\..\wtf\SHA1.cpp" + > + </File> + <File + RelativePath="..\..\wtf\SHA1.h" + > + </File> + <File + RelativePath="..\..\wtf\SinglyLinkedList.h" + > + </File> + <File RelativePath="..\..\wtf\SizeLimits.cpp" > </File> diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops index 3e329c3..604a66e 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops @@ -6,7 +6,7 @@ > <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;"../../os-win32/";../../assembler/;../../API/;../../parser/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;../../jit/;"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitLibrariesDir)\include"" + AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;"../../os-win32/";../../assembler/;../../API/;../../parser/;../../collector/handles/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;../../jit/;"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitLibrariesDir)\include"" PreprocessorDefinitions="__STD_C" ForcedIncludeFiles="ICUVersion.h" ForcedUsingFiles="" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops index 83c9007..1d2060f 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops @@ -7,6 +7,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories=""$(ProjectDir)\..\..\API";"$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private\JavaScriptCore";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private"" + PreprocessorDefinitions="NOMINMAX" WarningLevel="4" Detect64BitPortabilityProblems="true" ForcedIncludeFiles="ICUVersion.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 74e3b43..9f8d49a 100644 --- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { /* Begin PBXAggregateTarget section */ @@ -103,6 +103,7 @@ 1440F8920A508B100005F061 /* JSCallbackFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1440F8900A508B100005F061 /* JSCallbackFunction.cpp */; }; 1440F8AF0A508D200005F061 /* JSCallbackConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1440F8AD0A508D200005F061 /* JSCallbackConstructor.cpp */; }; 1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1440FCE20A51E46B0005F061 /* JSClassRef.cpp */; }; + 14456A321314657800212CA3 /* DoublyLinkedList.h in Headers */ = {isa = PBXBuildFile; fileRef = 14456A311314657800212CA3 /* DoublyLinkedList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14469DD7107EC79E00650446 /* dtoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651F6412039D5B5F0078395C /* dtoa.cpp */; }; 14469DDE107EC7E700650446 /* Lookup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8680255597D01FF60F7 /* Lookup.cpp */; }; 14469DDF107EC7E700650446 /* MathObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A86A0255597D01FF60F7 /* MathObject.cpp */; }; @@ -115,7 +116,6 @@ 14469DE6107EC7E700650446 /* ObjectPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2680C80E16D4E900A06E92 /* ObjectPrototype.cpp */; }; 14469DE7107EC7E700650446 /* PropertyNameArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65400C0F0A69BAF200509887 /* PropertyNameArray.cpp */; }; 14469DE8107EC7E700650446 /* PropertySlot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* PropertySlot.cpp */; }; - 14469DE9107EC7E700650446 /* PrototypeFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC257DF10E1F53740016B6C9 /* PrototypeFunction.cpp */; }; 14469DEA107EC7E700650446 /* ScopeChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9374D3A8038D9D74008635CE /* ScopeChain.cpp */; }; 14469DEB107EC7E700650446 /* StringConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC18C3C00E16EE3300B34460 /* StringConstructor.cpp */; }; 14469DEC107EC7E700650446 /* StringObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC18C3C20E16EE3300B34460 /* StringObject.cpp */; }; @@ -142,7 +142,6 @@ 147F39CA107EC37600427A48 /* ErrorPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC02E9060E1839DB000F9297 /* ErrorPrototype.cpp */; }; 147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2680C00E16D4E900A06E92 /* FunctionConstructor.cpp */; }; 147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A85C0255597D01FF60F7 /* FunctionPrototype.cpp */; }; - 147F39CD107EC37600427A48 /* GlobalEvalFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC257DED0E1F52ED0016B6C9 /* GlobalEvalFunction.cpp */; }; 147F39CE107EC37600427A48 /* Identifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933A349D038AE80F008635CE /* Identifier.cpp */; }; 147F39CF107EC37600427A48 /* InternalFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9BB95B0E19680600DF8855 /* InternalFunction.cpp */; }; 147F39D0107EC37600427A48 /* JSArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93ADFCE60CCBD7AC00D30B08 /* JSArray.cpp */; }; @@ -176,7 +175,6 @@ 14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */; }; 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A6581A0F4E36F4000150FD /* JITStubs.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 14C824AB12F7C77E008F35E0 /* MarkedBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14C824AA12F7C77E008F35E0 /* MarkedBlock.cpp */; }; 14C824AD12F7C785008F35E0 /* MarkedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C824AC12F7C785008F35E0 /* MarkedBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */; }; 14F8BA3E107EC886009892DC /* FastMalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B908E7EECC0023E5F6 /* FastMalloc.cpp */; }; @@ -201,16 +199,19 @@ 5135FAF212D26ACE003C083B /* Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5135FAD512D26856003C083B /* Decoder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5135FAF312D26AD1003C083B /* Encoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5135FAD612D26856003C083B /* Encoder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D53726F0E1C54880021E549 /* Tracing.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D53726E0E1C54880021E549 /* Tracing.h */; }; - 5D5D8AB60E0D0A7200F9C692 /* jsc in Copy Into Framework */ = {isa = PBXBuildFile; fileRef = 932F5BE10822A1C700736975 /* jsc */; }; 5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; }; 5D63E9AD10F2BD6E00FC8AE9 /* StringHasher.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D63E9AC10F2BD6E00FC8AE9 /* StringHasher.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D6A566B0F05995500266145 /* Threading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D6A566A0F05995500266145 /* Threading.cpp */; }; + 5DBB151B131D0B310056AD36 /* testapi.js in Copy Support Script */ = {isa = PBXBuildFile; fileRef = 14D857740A4696C80032146C /* testapi.js */; }; + 5DBB1525131D0BD70056AD36 /* minidom.js in Copy Support Script */ = {isa = PBXBuildFile; fileRef = 1412110D0A48788700480255 /* minidom.js */; }; 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */ = {isa = PBXBuildFile; fileRef = F692A8540255597D01FF60F7 /* create_hash_table */; settings = {ATTRIBUTES = (); }; }; 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6507D2970E871E4A00D7D896 /* JSTypeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; }; 65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65DFC92D08EA173A00F7300B /* HashTable.cpp */; }; 65E1A3DF122B894500B26097 /* NonCopyingSort.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E1A2F4122B880D00B26097 /* NonCopyingSort.h */; settings = {ATTRIBUTES = (Private, ); }; }; 65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B808E7EECC0023E5F6 /* Assertions.cpp */; settings = {COMPILER_FLAGS = "-Wno-missing-format-attribute"; }; }; + 76FB9F0F12E851860051A2EB /* SHA1.h in Headers */ = {isa = PBXBuildFile; fileRef = 76FB9F0E12E851860051A2EB /* SHA1.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 76FB9F1112E851960051A2EB /* SHA1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76FB9F1012E851960051A2EB /* SHA1.cpp */; }; 7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4EE7080EBB7963005934AA /* StructureChain.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E4EE70E0EBB7A5B005934AA /* StructureChain.cpp */; }; 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EFF00630EC05A9A00AA7C93 /* NodeInfo.h */; }; @@ -226,7 +227,7 @@ 86438FC41265503E00E0DFCA /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86438FC31265503E00E0DFCA /* StringBuilder.cpp */; }; 86565742115BE3DA00291F40 /* CString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86565740115BE3DA00291F40 /* CString.cpp */; }; 86565743115BE3DA00291F40 /* CString.h in Headers */ = {isa = PBXBuildFile; fileRef = 86565741115BE3DA00291F40 /* CString.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; }; + 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86676D5211FED9BC004B6863 /* BumpPointerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 86676D4D11FED55D004B6863 /* BumpPointerAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B4012DB8A8100A9FE7B /* YarrSyntaxChecker.cpp */; }; 86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B4112DB8A8100A9FE7B /* YarrSyntaxChecker.h */; }; @@ -287,7 +288,6 @@ 93052C340FB792190048FDC3 /* ParserArena.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93052C320FB792190048FDC3 /* ParserArena.cpp */; }; 93052C350FB792190048FDC3 /* ParserArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 93052C330FB792190048FDC3 /* ParserArena.h */; settings = {ATTRIBUTES = (); }; }; 932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; }; - 932F5BD50822A1C700736975 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; }; 932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */; }; 932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 9322A00306C341D3009067BB /* libicucore.dylib */; }; 932F5BDD0822A1C700736975 /* jsc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45E12D8806A49B0F00E9DF84 /* jsc.cpp */; }; @@ -330,8 +330,6 @@ 9714AF5F122F32070092D9F5 /* ParsedURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9714AF58122F31F50092D9F5 /* ParsedURL.h */; }; 9714AF60122F32070092D9F5 /* URLString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9714AF59122F31F50092D9F5 /* URLString.h */; }; 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */ = {isa = PBXBuildFile; fileRef = 97F6903A1169DF7F00A6BB46 /* Terminator.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 972A485F12661E0800F4514F /* URLCharacterTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 972A485D12661E0800F4514F /* URLCharacterTypes.cpp */; }; - 972A48771266256F00F4514F /* URLEscape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 972A48741266256F00F4514F /* URLEscape.cpp */; }; 97941A5713029AAB004A3447 /* OSRandomSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97941A3F130299DB004A3447 /* OSRandomSource.cpp */; }; 97941A5A13029ACC004A3447 /* OSRandomSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 97941A40130299DB004A3447 /* OSRandomSource.h */; }; 97941A7E1302A098004A3447 /* CryptographicallyRandomNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97941A7C1302A098004A3447 /* CryptographicallyRandomNumber.cpp */; }; @@ -346,6 +344,7 @@ A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = A730B6101250068F009D25B1 /* StrictEvalActivation.h */; }; A730B6131250068F009D25B1 /* StrictEvalActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A730B6111250068F009D25B1 /* StrictEvalActivation.cpp */; }; + A731B25A130093880040A7FA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; }; A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A7386551118697B400540279 /* SpecializedThunkJIT.h */; }; A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7386552118697B400540279 /* ThunkGenerators.cpp */; }; A7386556118697B400540279 /* ThunkGenerators.h in Headers */ = {isa = PBXBuildFile; fileRef = A7386553118697B400540279 /* ThunkGenerators.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -357,7 +356,6 @@ A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */; }; A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A76C51741182748D00715B05 /* JSInterfaceJIT.h */; }; - A76EE6590FAE59D5003F069A /* NativeFunctionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A76EE6580FAE59D5003F069A /* NativeFunctionWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7795590101A74D500114E55 /* MarkStack.h in Headers */ = {isa = PBXBuildFile; fileRef = A779558F101A74D500114E55 /* MarkStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; A783A2AB11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A783A2AA11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp */; }; @@ -369,13 +367,21 @@ A791EF290F11E07900AE1F68 /* JSByteArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A791EF270F11E07900AE1F68 /* JSByteArray.cpp */; }; A7A1F7AC0F252B3C00E184E2 /* ByteArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A1F7AA0F252B3C00E184E2 /* ByteArray.cpp */; }; A7A1F7AD0F252B3C00E184E2 /* ByteArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A1F7AB0F252B3C00E184E2 /* ByteArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7AC25BD1304D146003396DE /* MarkedBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14C824AA12F7C77E008F35E0 /* MarkedBlock.cpp */; }; A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */; }; A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */; }; + A7C40C0A130B057D00D002A1 /* BlockStack.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C40C07130B057D00D002A1 /* BlockStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7C40C0B130B057D00D002A1 /* SentinelLinkedList.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C40C08130B057D00D002A1 /* SentinelLinkedList.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7C40C0C130B057D00D002A1 /* SinglyLinkedList.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C40C09130B057D00D002A1 /* SinglyLinkedList.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7C530E4102A3813005BC741 /* MarkStackPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */; }; A7D649AA1015224E009B2E1B /* PossiblyNull.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D649A91015224E009B2E1B /* PossiblyNull.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DCB77912E3D90500911940 /* WriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E2EA690FB460CF00601F06 /* LiteralParser.h */; }; A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */; }; + A7E4FC8F12F8E4CA00AF4CF4 /* Global.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E4FC8712F8E4CA00AF4CF4 /* Global.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7E4FC9012F8E4CA00AF4CF4 /* Handle.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E4FC8812F8E4CA00AF4CF4 /* Handle.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7E4FC9112F8E4CA00AF4CF4 /* HandleHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E4FC8912F8E4CA00AF4CF4 /* HandleHeap.cpp */; }; + A7E4FC9212F8E4CA00AF4CF4 /* HandleHeap.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E4FC8A12F8E4CA00AF4CF4 /* HandleHeap.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7F19ECE11DD490900931E70 /* FixedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F19ECD11DD490900931E70 /* FixedArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F9935D0FD7325100A0B2D0 /* JSONObject.h */; }; A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */; }; @@ -520,8 +526,6 @@ BC18C52C0E16FCD200B34460 /* RegExpObject.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = BC18C52B0E16FCD200B34460 /* RegExpObject.lut.h */; }; BC18C52E0E16FCE100B34460 /* Lexer.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = BC18C52D0E16FCE100B34460 /* Lexer.lut.h */; }; BC257DE80E1F51C50016B6C9 /* Arguments.h in Headers */ = {isa = PBXBuildFile; fileRef = BC257DE60E1F51C50016B6C9 /* Arguments.h */; }; - BC257DF00E1F52ED0016B6C9 /* GlobalEvalFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BC257DEE0E1F52ED0016B6C9 /* GlobalEvalFunction.h */; }; - BC257DF40E1F53740016B6C9 /* PrototypeFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BC257DF20E1F53740016B6C9 /* PrototypeFunction.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC3046070E1F497F003232CF /* Error.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3046060E1F497F003232CF /* Error.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC3135640F302FA3003DFD3A /* DebuggerActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = BC3135620F302FA3003DFD3A /* DebuggerActivation.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3135630F302FA3003DFD3A /* DebuggerActivation.cpp */; }; @@ -551,13 +555,7 @@ BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; }; C0A272630E50A06300E96E15 /* NotFound.h in Headers */ = {isa = PBXBuildFile; fileRef = C0A2723F0E509F1E00E96E15 /* NotFound.h */; settings = {ATTRIBUTES = (Private, ); }; }; DD377CBC12072C18006A2517 /* Bitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = DD377CBB12072C18006A2517 /* Bitmap.h */; settings = {ATTRIBUTES = (Private, ); }; }; - DDE82AD31209D955005C1756 /* GCHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE82AD11209D955005C1756 /* GCHandle.cpp */; }; - DDE82AD41209D955005C1756 /* GCHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE82AD11209D955005C1756 /* GCHandle.cpp */; }; - DDE82AD51209D955005C1756 /* GCHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE82AD11209D955005C1756 /* GCHandle.cpp */; }; - DDE82AD61209D955005C1756 /* GCHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = DDE82AD21209D955005C1756 /* GCHandle.h */; }; - DDE82AD71209D955005C1756 /* GCHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDE82AD11209D955005C1756 /* GCHandle.cpp */; }; - DDE82AD81209D955005C1756 /* GCHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = DDE82AD21209D955005C1756 /* GCHandle.h */; settings = {ATTRIBUTES = (Private, ); }; }; - DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */; }; + DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; }; DDF7ABD511F60ED200108E36 /* GCActivityCallbackCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDF7ABD311F60ED200108E36 /* GCActivityCallbackCF.cpp */; }; E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */ = {isa = PBXBuildFile; fileRef = E124A8F50E555775003091F1 /* OpaqueJSString.h */; settings = {ATTRIBUTES = (Private, ); }; }; E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E124A8F60E555775003091F1 /* OpaqueJSString.cpp */; }; @@ -638,15 +636,26 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 5D5D8ABA0E0D0A7300F9C692 /* Copy Into Framework */ = { + 5DBB1511131D0B130056AD36 /* Copy Support Script */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; - dstPath = JavaScriptCore.framework/Resources; + dstPath = ""; dstSubfolderSpec = 16; files = ( - 5D5D8AB60E0D0A7200F9C692 /* jsc in Copy Into Framework */, + 5DBB151B131D0B310056AD36 /* testapi.js in Copy Support Script */, ); - name = "Copy Into Framework"; + name = "Copy Support Script"; + runOnlyForDeploymentPostprocessing = 0; + }; + 5DBB1524131D0BA10056AD36 /* Copy Support Script */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + 5DBB1525131D0BD70056AD36 /* minidom.js in Copy Support Script */, + ); + name = "Copy Support Script"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -708,6 +717,7 @@ 1440F8AD0A508D200005F061 /* JSCallbackConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCallbackConstructor.cpp; sourceTree = "<group>"; }; 1440FCE10A51E46B0005F061 /* JSClassRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClassRef.h; sourceTree = "<group>"; }; 1440FCE20A51E46B0005F061 /* JSClassRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClassRef.cpp; sourceTree = "<group>"; }; + 14456A311314657800212CA3 /* DoublyLinkedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DoublyLinkedList.h; sourceTree = "<group>"; }; 145C507F0D9DF63B0088F6B9 /* CallData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallData.h; sourceTree = "<group>"; }; 146AAB2A0B66A84900E55F16 /* JSStringRefCF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSStringRefCF.h; sourceTree = "<group>"; }; 146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSStringRefCF.cpp; sourceTree = "<group>"; }; @@ -840,6 +850,8 @@ 65EA73620BAE35D1001BB560 /* CommonIdentifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommonIdentifiers.cpp; sourceTree = "<group>"; }; 65EA73630BAE35D1001BB560 /* CommonIdentifiers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommonIdentifiers.h; sourceTree = "<group>"; }; 704FD35305697E6D003DBED9 /* BooleanObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BooleanObject.h; sourceTree = "<group>"; tabWidth = 8; }; + 76FB9F0E12E851860051A2EB /* SHA1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SHA1.h; sourceTree = "<group>"; }; + 76FB9F1012E851960051A2EB /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SHA1.cpp; sourceTree = "<group>"; }; 7E2C6C980D31C6B6002D44E2 /* ScopeChainMark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopeChainMark.h; sourceTree = "<group>"; }; 7E4EE7080EBB7963005934AA /* StructureChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureChain.h; sourceTree = "<group>"; }; 7E4EE70E0EBB7A5B005934AA /* StructureChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureChain.cpp; sourceTree = "<group>"; }; @@ -1019,7 +1031,6 @@ A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMv7Assembler.cpp; sourceTree = "<group>"; }; A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic32_64.cpp; sourceTree = "<group>"; }; A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = "<group>"; }; - A76EE6580FAE59D5003F069A /* NativeFunctionWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeFunctionWrapper.h; sourceTree = "<group>"; }; A779558F101A74D500114E55 /* MarkStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkStack.h; sourceTree = "<group>"; }; A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSObjectWithGlobalObject.h; sourceTree = "<group>"; }; A783A2AA11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSObjectWithGlobalObject.cpp; sourceTree = "<group>"; }; @@ -1035,6 +1046,9 @@ A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutableAllocator.h; sourceTree = "<group>"; }; A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocator.cpp; sourceTree = "<group>"; }; A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess32_64.cpp; sourceTree = "<group>"; }; + A7C40C07130B057D00D002A1 /* BlockStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockStack.h; sourceTree = "<group>"; }; + A7C40C08130B057D00D002A1 /* SentinelLinkedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentinelLinkedList.h; sourceTree = "<group>"; }; + A7C40C09130B057D00D002A1 /* SinglyLinkedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinglyLinkedList.h; sourceTree = "<group>"; }; A7C530E3102A3813005BC741 /* MarkStackPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkStackPosix.cpp; sourceTree = "<group>"; }; A7D649A91015224E009B2E1B /* PossiblyNull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PossiblyNull.h; sourceTree = "<group>"; }; A7DCB77912E3D90500911940 /* WriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrier.h; sourceTree = "<group>"; }; @@ -1042,6 +1056,10 @@ A7E2EA6A0FB460CF00601F06 /* LiteralParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LiteralParser.cpp; sourceTree = "<group>"; }; A7E42C180E3938830065A544 /* JSStaticScopeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStaticScopeObject.h; sourceTree = "<group>"; }; A7E42C190E3938830065A544 /* JSStaticScopeObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStaticScopeObject.cpp; sourceTree = "<group>"; }; + A7E4FC8712F8E4CA00AF4CF4 /* Global.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Global.h; path = collector/handles/Global.h; sourceTree = "<group>"; }; + A7E4FC8812F8E4CA00AF4CF4 /* Handle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Handle.h; path = collector/handles/Handle.h; sourceTree = "<group>"; }; + A7E4FC8912F8E4CA00AF4CF4 /* HandleHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HandleHeap.cpp; path = collector/handles/HandleHeap.cpp; sourceTree = "<group>"; }; + A7E4FC8A12F8E4CA00AF4CF4 /* HandleHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HandleHeap.h; path = collector/handles/HandleHeap.h; sourceTree = "<group>"; }; A7F19ECD11DD490900931E70 /* FixedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FixedArray.h; sourceTree = "<group>"; }; A7F8690E0F9584A100558697 /* CachedCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedCall.h; sourceTree = "<group>"; }; A7F869EC0F95C2EC00558697 /* CallFrameClosure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallFrameClosure.h; sourceTree = "<group>"; }; @@ -1089,10 +1107,6 @@ BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSVariableObject.cpp; sourceTree = "<group>"; }; BC257DE50E1F51C50016B6C9 /* Arguments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Arguments.cpp; sourceTree = "<group>"; }; BC257DE60E1F51C50016B6C9 /* Arguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Arguments.h; sourceTree = "<group>"; }; - BC257DED0E1F52ED0016B6C9 /* GlobalEvalFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalEvalFunction.cpp; sourceTree = "<group>"; }; - BC257DEE0E1F52ED0016B6C9 /* GlobalEvalFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalEvalFunction.h; sourceTree = "<group>"; }; - BC257DF10E1F53740016B6C9 /* PrototypeFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrototypeFunction.cpp; sourceTree = "<group>"; }; - BC257DF20E1F53740016B6C9 /* PrototypeFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrototypeFunction.h; sourceTree = "<group>"; }; BC2680C00E16D4E900A06E92 /* FunctionConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionConstructor.cpp; sourceTree = "<group>"; }; BC2680C10E16D4E900A06E92 /* FunctionConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionConstructor.h; sourceTree = "<group>"; }; BC2680C20E16D4E900A06E92 /* NumberConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NumberConstructor.cpp; sourceTree = "<group>"; }; @@ -1156,8 +1170,6 @@ D21202280AD4310C00ED79B6 /* DateConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateConversion.cpp; sourceTree = "<group>"; }; D21202290AD4310C00ED79B6 /* DateConversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DateConversion.h; sourceTree = "<group>"; }; DD377CBB12072C18006A2517 /* Bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bitmap.h; sourceTree = "<group>"; }; - DDE82AD11209D955005C1756 /* GCHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCHandle.cpp; sourceTree = "<group>"; }; - DDE82AD21209D955005C1756 /* GCHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCHandle.h; sourceTree = "<group>"; }; DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCActivityCallback.h; sourceTree = "<group>"; }; DDF7ABD311F60ED200108E36 /* GCActivityCallbackCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallbackCF.cpp; sourceTree = "<group>"; }; E11D51750B2E798D0056C188 /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = "<group>"; }; @@ -1248,9 +1260,9 @@ buildActionMask = 2147483647; files = ( 932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */, - 932F5BD50822A1C700736975 /* Foundation.framework in Frameworks */, 932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */, 932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */, + A731B25A130093880040A7FA /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1303,6 +1315,7 @@ 9688CB120ED12B4E001D649F /* assembler */, 969A078F0ED1D3AE00F1F681 /* bytecode */, 7E39D81D0EC38EFA003AF11A /* bytecompiler */, + A7E4FC8312F8E4A300AF4CF4 /* collector */, 1480DB9A0DDC2231003CFDF2 /* debugger */, 1429D77A0ED20D7300B89619 /* interpreter */, 1429D92C0ED22D7000B89619 /* jit */, @@ -1510,6 +1523,9 @@ 65162EF108E6A21C007556CD /* wtf */ = { isa = PBXGroup; children = ( + A7C40C07130B057D00D002A1 /* BlockStack.h */, + A7C40C08130B057D00D002A1 /* SentinelLinkedList.h */, + A7C40C09130B057D00D002A1 /* SinglyLinkedList.h */, 5135FAD512D26856003C083B /* Decoder.h */, 5135FAD612D26856003C083B /* Encoder.h */, 93AA4F770957251F0084B3A7 /* AlwaysInline.h */, @@ -1534,6 +1550,7 @@ 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */, 5186111D0CC824830081412B /* Deque.h */, 938C4F6B0CA06BCE00D9310A /* DisallowCType.h */, + 14456A311314657800212CA3 /* DoublyLinkedList.h */, 651F6412039D5B5F0078395C /* dtoa.cpp */, 651F6413039D5B5F0078395C /* dtoa.h */, E48E0F2C0F82151700A8CA37 /* FastAllocBase.h */, @@ -1596,6 +1613,8 @@ 148A1ECD0D10C23B0069A47C /* RefPtrHashMap.h */, 51F648D60BB4E2CA0033D760 /* RetainPtr.h */, 969A07290ED1CE6900F1F681 /* SegmentedVector.h */, + 76FB9F1012E851960051A2EB /* SHA1.cpp */, + 76FB9F0E12E851860051A2EB /* SHA1.h */, 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */, 86D87DA512BC4B14008E73A1 /* StackBounds.cpp */, 86D87DA612BC4B14008E73A1 /* StackBounds.h */, @@ -1732,12 +1751,8 @@ F692A85D0255597D01FF60F7 /* FunctionPrototype.h */, DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */, DDF7ABD311F60ED200108E36 /* GCActivityCallbackCF.cpp */, - DDE82AD11209D955005C1756 /* GCHandle.cpp */, - DDE82AD21209D955005C1756 /* GCHandle.h */, BC02E9B80E184545000F9297 /* GetterSetter.cpp */, BC337BDE0E1AF0B80076918A /* GetterSetter.h */, - BC257DED0E1F52ED0016B6C9 /* GlobalEvalFunction.cpp */, - BC257DEE0E1F52ED0016B6C9 /* GlobalEvalFunction.h */, 140CDE6C12DE977E0013CFC5 /* Heap.cpp */, 140CDE6D12DE977E0013CFC5 /* Heap.h */, 933A349D038AE80F008635CE /* Identifier.cpp */, @@ -1814,7 +1829,6 @@ BC02E9090E1839DB000F9297 /* NativeErrorConstructor.h */, BC02E90A0E1839DB000F9297 /* NativeErrorPrototype.cpp */, BC02E90B0E1839DB000F9297 /* NativeErrorPrototype.h */, - A76EE6580FAE59D5003F069A /* NativeFunctionWrapper.h */, BC2680C20E16D4E900A06E92 /* NumberConstructor.cpp */, BC2680C30E16D4E900A06E92 /* NumberConstructor.h */, F692A8700255597D01FF60F7 /* NumberObject.cpp */, @@ -1836,8 +1850,6 @@ 65621E6B089E859700760F35 /* PropertySlot.cpp */, 65621E6C089E859700760F35 /* PropertySlot.h */, 65C02FBB0637462A003E7EE6 /* Protect.h */, - BC257DF10E1F53740016B6C9 /* PrototypeFunction.cpp */, - BC257DF20E1F53740016B6C9 /* PrototypeFunction.h */, 147B84620E6DE6B1004775A4 /* PutPropertySlot.h */, F692A87D0255597D01FF60F7 /* RegExp.cpp */, F692A87E0255597D01FF60F7 /* RegExp.h */, @@ -2047,6 +2059,25 @@ name = api; sourceTree = "<group>"; }; + A7E4FC8312F8E4A300AF4CF4 /* collector */ = { + isa = PBXGroup; + children = ( + A7E4FC8512F8E4B100AF4CF4 /* handles */, + ); + name = collector; + sourceTree = "<group>"; + }; + A7E4FC8512F8E4B100AF4CF4 /* handles */ = { + isa = PBXGroup; + children = ( + A7E4FC8712F8E4CA00AF4CF4 /* Global.h */, + A7E4FC8812F8E4CA00AF4CF4 /* Handle.h */, + A7E4FC8912F8E4CA00AF4CF4 /* HandleHeap.cpp */, + A7E4FC8A12F8E4CA00AF4CF4 /* HandleHeap.h */, + ); + name = handles; + sourceTree = "<group>"; + }; E195678D09E7CF1200B89D13 /* unicode */ = { isa = PBXGroup; children = ( @@ -2082,7 +2113,6 @@ 144007570A5370D20005F061 /* JSNodeList.h in Headers */, 144005CC0A5338F80005F061 /* Node.h in Headers */, 1440074A0A536CC20005F061 /* NodeList.h in Headers */, - DDE82AD61209D955005C1756 /* GCHandle.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2148,6 +2178,7 @@ 5135FAF212D26ACE003C083B /* Decoder.h in Headers */, BC18C3FC0E16F5CD00B34460 /* Deque.h in Headers */, BC18C3FD0E16F5CD00B34460 /* DisallowCType.h in Headers */, + 14456A321314657800212CA3 /* DoublyLinkedList.h in Headers */, BC18C3FE0E16F5CD00B34460 /* dtoa.h in Headers */, 5135FAF312D26AD1003C083B /* Encoder.h in Headers */, BC3046070E1F497F003232CF /* Error.h in Headers */, @@ -2165,9 +2196,7 @@ BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */, BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */, DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */, - DDE82AD81209D955005C1756 /* GCHandle.h in Headers */, BC18C4060E16F5CD00B34460 /* GetPtr.h in Headers */, - BC257DF00E1F52ED0016B6C9 /* GlobalEvalFunction.h in Headers */, BC18C4080E16F5CD00B34460 /* HashCountedSet.h in Headers */, BC18C4090E16F5CD00B34460 /* HashFunctions.h in Headers */, BC18C40A0E16F5CD00B34460 /* HashIterators.h in Headers */, @@ -2266,7 +2295,6 @@ 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */, BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */, BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */, - A76EE6590FAE59D5003F069A /* NativeFunctionWrapper.h in Headers */, 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */, BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */, BC18C4400E16F5CD00B34460 /* Noncopyable.h in Headers */, @@ -2310,7 +2338,6 @@ BC18C4540E16F5CD00B34460 /* PropertyNameArray.h in Headers */, BC18C4550E16F5CD00B34460 /* PropertySlot.h in Headers */, BC18C4560E16F5CD00B34460 /* Protect.h in Headers */, - BC257DF40E1F53740016B6C9 /* PrototypeFunction.h in Headers */, 147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */, 088FA5BC0EF76D4300578E6F /* RandomNumber.h in Headers */, 08E279E90EF83B10007DB523 /* RandomNumberSeed.h in Headers */, @@ -2337,6 +2364,7 @@ 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */, BC18C4610E16F5CD00B34460 /* ScopeChain.h in Headers */, 969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */, + 76FB9F0F12E851860051A2EB /* SHA1.h in Headers */, 933040040E6A749400786E6A /* SmallStrings.h in Headers */, BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */, BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */, @@ -2415,6 +2443,12 @@ E4D8CEFB12FC439600BC9F5A /* BloomFilter.h in Headers */, 97941A5A13029ACC004A3447 /* OSRandomSource.h in Headers */, 97941A7F1302A098004A3447 /* CryptographicallyRandomNumber.h in Headers */, + A7E4FC8F12F8E4CA00AF4CF4 /* Global.h in Headers */, + A7E4FC9012F8E4CA00AF4CF4 /* Handle.h in Headers */, + A7E4FC9212F8E4CA00AF4CF4 /* HandleHeap.h in Headers */, + A7C40C0A130B057D00D002A1 /* BlockStack.h in Headers */, + A7C40C0B130B057D00D002A1 /* SentinelLinkedList.h in Headers */, + A7C40C0C130B057D00D002A1 /* SinglyLinkedList.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2426,9 +2460,9 @@ buildConfigurationList = 141211390A48798400480255 /* Build configuration list for PBXNativeTarget "minidom" */; buildPhases = ( 1412111D0A48793C00480255 /* Sources */, - 1440025E0A52563F0005F061 /* ShellScript */, 1412111E0A48793C00480255 /* Frameworks */, 144005C70A5338C60005F061 /* Headers */, + 5DBB1524131D0BA10056AD36 /* Copy Support Script */, ); buildRules = ( ); @@ -2445,8 +2479,8 @@ buildConfigurationList = 14BD59D60A3E8FC900BAF59C /* Build configuration list for PBXNativeTarget "testapi" */; buildPhases = ( 14BD59BC0A3E8F9000BAF59C /* Sources */, - 14D857B50A469C100032146C /* ShellScript */, 14BD59BD0A3E8F9000BAF59C /* Frameworks */, + 5DBB1511131D0B130056AD36 /* Copy Support Script */, ); buildRules = ( ); @@ -2487,8 +2521,7 @@ buildPhases = ( 932F5BDC0822A1C700736975 /* Sources */, 932F5BDE0822A1C700736975 /* Frameworks */, - 5D5D8ABA0E0D0A7300F9C692 /* Copy Into Framework */, - 5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */, + 5D5D8ABF0E0D0B0300F9C692 /* Copy Into Framework */, ); buildRules = ( ); @@ -2506,8 +2539,11 @@ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + }; buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.1"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( @@ -2532,32 +2568,6 @@ /* End PBXProject section */ /* Begin PBXShellScriptBuildPhase section */ - 1440025E0A52563F0005F061 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cp \"${SRCROOT}/API/tests/minidom.js\" \"${BUILT_PRODUCTS_DIR}\""; - }; - 14D857B50A469C100032146C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cp \"${SRCROOT}/API/tests/testapi.js\" \"${BUILT_PRODUCTS_DIR}\""; - }; 5D29D8BE0E9860B400C3D2D0 /* Check For Weak VTables and Externals */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2605,7 +2615,7 @@ shellPath = /bin/sh; shellScript = "TRACING_D=\"$SRCROOT/runtime/Tracing.d\";\nTRACING_H=\"$BUILT_PRODUCTS_DIR/DerivedSources/JavaScriptCore/TracingDtrace.h\";\n\nif [[ \"$HAVE_DTRACE\" = \"1\" && \"$TRACING_D\" -nt \"$TRACING_H\" ]];\nthen\n\tdtrace -h -o \"$TRACING_H\" -s \"$TRACING_D\";\nfi;\n"; }; - 5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */ = { + 5D5D8ABF0E0D0B0300F9C692 /* Copy Into Framework */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -2613,12 +2623,12 @@ inputPaths = ( "$(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/Resources/jsc", ); - name = "Fix Framework Reference"; + name = "Copy Into Framework"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Update the copied jsc binary to refer to JavaScriptcore.framework relative to its location\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\n"; + shellScript = "# Skip for Production builds.\nif [[ ${CONFIGURATION:=Debug} == \"Production\" ]]; then\n exit\nfi\n\n# Copy and update the jsc binary to refer to JavaScriptcore.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\n"; }; 65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = { isa = PBXShellScriptBuildPhase; @@ -2676,7 +2686,6 @@ 141211340A48795800480255 /* minidom.c in Sources */, 1440063F0A53598A0005F061 /* Node.c in Sources */, 1440074B0A536CC20005F061 /* NodeList.c in Sources */, - DDE82AD51209D955005C1756 /* GCHandle.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2685,7 +2694,6 @@ buildActionMask = 2147483647; files = ( 1440F6100A4F85670005F061 /* testapi.c in Sources */, - DDE82AD41209D955005C1756 /* GCHandle.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2739,9 +2747,7 @@ 147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */, 147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */, DDF7ABD511F60ED200108E36 /* GCActivityCallbackCF.cpp in Sources */, - DDE82AD71209D955005C1756 /* GCHandle.cpp in Sources */, 14280855107EC0E70013E7B2 /* GetterSetter.cpp in Sources */, - 147F39CD107EC37600427A48 /* GlobalEvalFunction.cpp in Sources */, 65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */, 140CDE7012DE97A00013CFC5 /* Heap.cpp in Sources */, 147F39CE107EC37600427A48 /* Identifier.cpp in Sources */, @@ -2835,7 +2841,6 @@ A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */, 14469DE7107EC7E700650446 /* PropertyNameArray.cpp in Sources */, 14469DE8107EC7E700650446 /* PropertySlot.cpp in Sources */, - 14469DE9107EC7E700650446 /* PrototypeFunction.cpp in Sources */, 088FA5BB0EF76D4300578E6F /* RandomNumber.cpp in Sources */, 905B02AE0E28640F006DF882 /* RefCountedLeakCounter.cpp in Sources */, 14280841107EC0930013E7B2 /* RegExp.cpp in Sources */, @@ -2847,6 +2852,7 @@ 86B99AB8117E391E00DF5A90 /* RopeImpl.cpp in Sources */, 1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */, 14469DEA107EC7E700650446 /* ScopeChain.cpp in Sources */, + 76FB9F1112E851960051A2EB /* SHA1.cpp in Sources */, 0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */, 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */, 86D87DAE12BCA7D1008E73A1 /* StackBounds.cpp in Sources */, @@ -2878,9 +2884,10 @@ 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */, 86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */, E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */, - 14C824AB12F7C77E008F35E0 /* MarkedBlock.cpp in Sources */, 97941A5713029AAB004A3447 /* OSRandomSource.cpp in Sources */, 97941A7E1302A098004A3447 /* CryptographicallyRandomNumber.cpp in Sources */, + A7E4FC9112F8E4CA00AF4CF4 /* HandleHeap.cpp in Sources */, + A7AC25BD1304D146003396DE /* MarkedBlock.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2889,9 +2896,6 @@ buildActionMask = 2147483647; files = ( 932F5BDD0822A1C700736975 /* jsc.cpp in Sources */, - DDE82AD31209D955005C1756 /* GCHandle.cpp in Sources */, - 972A485F12661E0800F4514F /* URLCharacterTypes.cpp in Sources */, - 972A48771266256F00F4514F /* URLEscape.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3003,6 +3007,7 @@ 149C276B08902AFE008A9EFC /* Production */ = { isa = XCBuildConfiguration; buildSettings = { + INSTALL_PATH = "$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources"; PRODUCT_NAME = jsc; }; name = Production; diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h index 77ec60f..a711d56 100644 --- a/Source/JavaScriptCore/assembler/ARMAssembler.h +++ b/Source/JavaScriptCore/assembler/ARMAssembler.h @@ -250,7 +250,7 @@ namespace JSC { ASSERT(m_offset == offset); } - int m_offset : 31; + signed int m_offset : 31; int m_used : 1; }; @@ -786,17 +786,6 @@ namespace JSC { patchPointerInternal(reinterpret_cast<intptr_t>(from), to); } - static void repatchLoadPtrToLEA(void* from) - { - // On arm, this is a patch from LDR to ADD. It is restricted conversion, - // from special case to special case, altough enough for its purpose - ARMWord* insn = reinterpret_cast<ARMWord*>(from); - ASSERT((*insn & 0x0ff00f00) == 0x05900000); - - *insn = (*insn & 0xf00ff0ff) | 0x02800000; - ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); - } - // Linkers static intptr_t getAbsoluteJumpAddress(void* base, int offset = 0) { diff --git a/Source/JavaScriptCore/assembler/ARMv7Assembler.h b/Source/JavaScriptCore/assembler/ARMv7Assembler.h index f584883..f03e554 100644 --- a/Source/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/Source/JavaScriptCore/assembler/ARMv7Assembler.h @@ -369,40 +369,6 @@ private: ThumbImmediateValue m_value; }; -class VFPImmediate { -public: - VFPImmediate(double d) - : m_value(-1) - { - union { - uint64_t i; - double d; - } u; - - u.d = d; - - int sign = static_cast<int>(u.i >> 63); - int exponent = static_cast<int>(u.i >> 52) & 0x7ff; - uint64_t mantissa = u.i & 0x000fffffffffffffull; - - if ((exponent >= 0x3fc) && (exponent <= 0x403) && !(mantissa & 0x0000ffffffffffffull)) - m_value = (sign << 7) | ((exponent & 7) << 4) | (int)(mantissa >> 48); - } - - bool isValid() - { - return m_value != -1; - } - - uint8_t value() - { - return (uint8_t)m_value; - } - -private: - int m_value; -}; - typedef enum { SRType_LSL, SRType_LSR, @@ -412,7 +378,6 @@ typedef enum { SRType_RRX = SRType_ROR } ARMShiftType; -class ARMv7Assembler; class ShiftTypeAndAmount { friend class ARMv7Assembler; @@ -563,7 +528,7 @@ public: ASSERT(m_offset == offset); } - int m_offset : 31; + signed int m_offset : 31; int m_used : 1; }; @@ -1880,22 +1845,6 @@ public: setPointer(where, value); } - static void repatchLoadPtrToLEA(void* where) - { - ASSERT(!(reinterpret_cast<intptr_t>(where) & 1)); - uint16_t* loadOp = reinterpret_cast<uint16_t*>(where) + 4; - - ASSERT((loadOp[0] & 0xfff0) == OP_LDR_reg_T2); - ASSERT((loadOp[1] & 0x0ff0) == 0); - int rn = loadOp[0] & 0xf; - int rt = loadOp[1] >> 12; - int rm = loadOp[1] & 0xf; - - loadOp[0] = OP_ADD_reg_T3 | rn; - loadOp[1] = rt << 8 | rm; - ExecutableAllocator::cacheFlush(loadOp, sizeof(uint32_t)); - } - private: // VFP operations commonly take one or more 5-bit operands, typically representing a // floating point register number. This will commonly be encoded in the instruction diff --git a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h index 07bd702..5ebc572 100644 --- a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -535,11 +535,6 @@ protected: { AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); } - - static void repatchLoadPtrToLEA(CodeLocationInstruction instruction) - { - AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); - } }; } // namespace JSC diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h index f7bea6c..6030680 100644 --- a/Source/JavaScriptCore/assembler/MIPSAssembler.h +++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h @@ -811,19 +811,7 @@ public: repatchInt32(from, reinterpret_cast<int32_t>(to)); } - static void repatchLoadPtrToLEA(void* from) - { - MIPSWord* insn = reinterpret_cast<MIPSWord*>(from); - insn = insn + 3; - ASSERT((*insn & 0xfc000000) == 0x8c000000); // lw - /* lw -> addiu */ - *insn = 0x24000000 | (*insn & 0x03ffffff); - - ExecutableAllocator::cacheFlush(insn, sizeof(MIPSWord)); - } - private: - /* Update each jump in the buffer of newBase. */ void relocateJumps(void* oldBase, void* newBase) { diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h index 3fcfec8..66814b5 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -271,13 +271,6 @@ public: return dataLabel; } - Label loadPtrWithPatchToLEA(Address address, RegisterID dest) - { - Label label(this); - load32(address, dest); - return label; - } - void load16(BaseIndex address, RegisterID dest) { m_assembler.add_r(ARMRegisters::S1, address.base, m_assembler.lsl(address.index, address.scale)); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h index a3c1301..450a34c 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -478,14 +478,6 @@ public: return label; } - Label loadPtrWithPatchToLEA(Address address, RegisterID dest) - { - Label label(this); - moveFixedWidthEncoding(Imm32(address.offset), dataTempRegister); - load32(ArmAddress(address.base, dataTempRegister), dest); - return label; - } - void load16(BaseIndex address, RegisterID dest) { m_assembler.ldrh(dest, makeBaseIndexBase(address), address.index, address.scale); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h index fcfbcda..4697dfc 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h @@ -608,23 +608,6 @@ public: return dataLabel; } - Label loadPtrWithPatchToLEA(Address address, RegisterID dest) - { - m_fixedWidth = true; - /* - lui addrTemp, address.offset >> 16 - ori addrTemp, addrTemp, address.offset & 0xffff - addu addrTemp, addrTemp, address.base - lw dest, 0(addrTemp) - */ - Label label(this); - move(Imm32(address.offset), addrTempRegister); - m_assembler.addu(addrTempRegister, addrTempRegister, address.base); - m_assembler.lw(dest, addrTempRegister, 0); - m_fixedWidth = false; - return label; - } - /* Need to use zero-extened load half-word for load16. */ void load16(ImplicitAddress address, RegisterID dest) { diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86.h index 0918996..92da5f0 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86.h @@ -162,13 +162,6 @@ public: return DataLabelPtr(this); } - Label loadPtrWithPatchToLEA(Address address, RegisterID dest) - { - Label label(this); - load32(address, dest); - return label; - } - bool supportsFloatingPoint() const { return m_isSSE2Present; } // See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate() bool supportsFloatingPointTruncate() const { return m_isSSE2Present; } diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h index 168c93f..ebbe0bd 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h @@ -417,13 +417,6 @@ public: return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask); } - Label loadPtrWithPatchToLEA(Address address, RegisterID dest) - { - Label label(this); - loadPtr(address, dest); - return label; - } - bool supportsFloatingPoint() const { return true; } // See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate() bool supportsFloatingPointTruncate() const { return true; } diff --git a/Source/JavaScriptCore/assembler/RepatchBuffer.h b/Source/JavaScriptCore/assembler/RepatchBuffer.h index 72cf6b2..e9feb65 100644 --- a/Source/JavaScriptCore/assembler/RepatchBuffer.h +++ b/Source/JavaScriptCore/assembler/RepatchBuffer.h @@ -92,11 +92,6 @@ public: MacroAssembler::repatchPointer(dataLabelPtr, value); } - void repatchLoadPtrToLEA(CodeLocationInstruction instruction) - { - MacroAssembler::repatchLoadPtrToLEA(instruction); - } - void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label) { relink(CodeLocationCall(CodePtr(returnAddress)), label); diff --git a/Source/JavaScriptCore/assembler/X86Assembler.h b/Source/JavaScriptCore/assembler/X86Assembler.h index b352ad4..587d900 100644 --- a/Source/JavaScriptCore/assembler/X86Assembler.h +++ b/Source/JavaScriptCore/assembler/X86Assembler.h @@ -1580,16 +1580,6 @@ public: setPointer(where, value); } - static void repatchLoadPtrToLEA(void* where) - { -#if CPU(X86_64) - // On x86-64 pointer memory accesses require a 64-bit operand, and as such a REX prefix. - // Skip over the prefix byte. - where = reinterpret_cast<char*>(where) + 1; -#endif - *reinterpret_cast<unsigned char*>(where) = static_cast<unsigned char>(OP_LEA); - } - static unsigned getCallReturnOffset(JmpSrc call) { ASSERT(call.m_offset >= 0); diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp index 5fba8bb..2d235df 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp @@ -1697,7 +1697,7 @@ void CodeBlock::createActivation(CallFrame* callFrame) ASSERT(!callFrame->uncheckedR(activationRegister()).jsValue()); JSActivation* activation = new (callFrame) JSActivation(callFrame, static_cast<FunctionExecutable*>(ownerExecutable())); callFrame->uncheckedR(activationRegister()) = JSValue(activation); - callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation)); + callFrame->setScopeChain(callFrame->scopeChain()->push(activation)); } } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h index f8498b4..bef4561 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.h +++ b/Source/JavaScriptCore/bytecode/CodeBlock.h @@ -603,7 +603,7 @@ namespace JSC { Vector<CallReturnOffsetToBytecodeOffset> m_callReturnIndexVector; #endif }; -#if PLATFORM(WIN) +#if COMPILER(MSVC) friend void WTF::deleteOwnedPtr<RareData>(RareData*); #endif OwnPtr<RareData> m_rareData; diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp index 018d832..5ec2a3f 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "StructureStubInfo.h" +#include "ScopeChain.h" + namespace JSC { #if ENABLE(JIT) diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 0964344..08f4bd4 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -31,9 +31,9 @@ #include "BytecodeGenerator.h" #include "BatchedTransitionOptimizer.h" -#include "PrototypeFunction.h" #include "JSFunction.h" #include "Interpreter.h" +#include "ScopeChain.h" #include "UString.h" using namespace std; @@ -147,7 +147,7 @@ JSObject* BytecodeGenerator::generate() m_codeBlock->setInstructionCount(m_codeBlock->instructions().size()); if (s_dumpsGeneratedCode) - m_codeBlock->dump(m_scopeChain->globalObject()->globalExec()); + m_codeBlock->dump(m_scopeChain->globalObject->globalExec()); #endif if ((m_codeType == FunctionCode && !m_codeBlock->needsFullScopeChain() && !m_codeBlock->usesArguments()) || m_codeType == EvalCode) @@ -156,7 +156,7 @@ JSObject* BytecodeGenerator::generate() m_codeBlock->shrinkToFit(); if (m_expressionTooDeep) - return createOutOfMemoryError(m_scopeChain->globalObject()); + return createOutOfMemoryError(m_scopeChain->globalObject.get()); return 0; } @@ -198,11 +198,11 @@ void BytecodeGenerator::preserveLastVar() m_lastVar = &m_calleeRegisters.last(); } -BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& scopeChain, SymbolTable* symbolTable, ProgramCodeBlock* codeBlock) - : m_shouldEmitDebugHooks(scopeChain.globalObject()->debugger()) - , m_shouldEmitProfileHooks(scopeChain.globalObject()->supportsProfiling()) - , m_shouldEmitRichSourceInfo(scopeChain.globalObject()->supportsRichSourceInfo()) - , m_scopeChain(&scopeChain) +BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* scopeChain, SymbolTable* symbolTable, ProgramCodeBlock* codeBlock) + : m_shouldEmitDebugHooks(scopeChain->globalObject->debugger()) + , m_shouldEmitProfileHooks(scopeChain->globalObject->supportsProfiling()) + , m_shouldEmitRichSourceInfo(scopeChain->globalObject->supportsRichSourceInfo()) + , m_scopeChain(*scopeChain->globalData, scopeChain) , m_symbolTable(symbolTable) , m_scopeNode(programNode) , m_codeBlock(codeBlock) @@ -217,7 +217,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&scopeChain.globalObject()->globalData()) + , m_globalData(scopeChain->globalData) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) @@ -238,7 +238,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& m_codeBlock->m_numParameters = 1; // Allocate space for "this" - JSGlobalObject* globalObject = scopeChain.globalObject(); + JSGlobalObject* globalObject = scopeChain->globalObject.get(); ExecState* exec = globalObject->globalExec(); RegisterFile* registerFile = &exec->globalData().interpreter->registerFile(); @@ -260,6 +260,8 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& // Shift new symbols so they get stored prior to existing symbols. m_nextGlobalIndex -= symbolTable->size(); + size_t oldSymbolTableSize = symbolTable->size(); + for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; globalObject->removeDirect(function->ident()); // Make sure our new function is not shadowed by an old property. @@ -267,9 +269,13 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& } Vector<RegisterID*, 32> newVars; - for (size_t i = 0; i < varStack.size(); ++i) - if (!globalObject->hasProperty(exec, *varStack[i].first)) - newVars.append(addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); + for (size_t i = 0; i < varStack.size(); ++i) { + if (globalObject->symbolTableHasProperty(*varStack[i].first) || globalObject->hasProperty(exec, *varStack[i].first)) + continue; + newVars.append(addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); + } + + globalObject->resizeRegisters(oldSymbolTableSize, symbolTable->size()); preserveLastVar(); @@ -278,10 +284,10 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& } else { for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; - globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(exec, function), scopeChain.node()), DontDelete); + globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(exec, function), scopeChain), DontDelete); } for (size_t i = 0; i < varStack.size(); ++i) { - if (globalObject->hasProperty(exec, *varStack[i].first)) + if (globalObject->symbolTableHasProperty(*varStack[i].first) || globalObject->hasProperty(exec, *varStack[i].first)) continue; int attributes = DontDelete; if (varStack[i].second & DeclarationStacks::IsConstant) @@ -294,11 +300,11 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const ScopeChain& codeBlock->m_numCapturedVars = codeBlock->m_numVars; } -BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const ScopeChain& scopeChain, SymbolTable* symbolTable, CodeBlock* codeBlock) - : m_shouldEmitDebugHooks(scopeChain.globalObject()->debugger()) - , m_shouldEmitProfileHooks(scopeChain.globalObject()->supportsProfiling()) - , m_shouldEmitRichSourceInfo(scopeChain.globalObject()->supportsRichSourceInfo()) - , m_scopeChain(&scopeChain) +BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, ScopeChainNode* scopeChain, SymbolTable* symbolTable, CodeBlock* codeBlock) + : m_shouldEmitDebugHooks(scopeChain->globalObject->debugger()) + , m_shouldEmitProfileHooks(scopeChain->globalObject->supportsProfiling()) + , m_shouldEmitRichSourceInfo(scopeChain->globalObject->supportsRichSourceInfo()) + , m_scopeChain(*scopeChain->globalData, scopeChain) , m_symbolTable(symbolTable) , m_scopeNode(functionBody) , m_codeBlock(codeBlock) @@ -312,7 +318,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Scope , m_hasCreatedActivation(false) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&scopeChain.globalObject()->globalData()) + , m_globalData(scopeChain->globalData) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) @@ -460,11 +466,11 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Scope } } -BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const ScopeChain& scopeChain, SymbolTable* symbolTable, EvalCodeBlock* codeBlock) - : m_shouldEmitDebugHooks(scopeChain.globalObject()->debugger()) - , m_shouldEmitProfileHooks(scopeChain.globalObject()->supportsProfiling()) - , m_shouldEmitRichSourceInfo(scopeChain.globalObject()->supportsRichSourceInfo()) - , m_scopeChain(&scopeChain) +BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, ScopeChainNode* scopeChain, SymbolTable* symbolTable, EvalCodeBlock* codeBlock) + : m_shouldEmitDebugHooks(scopeChain->globalObject->debugger()) + , m_shouldEmitProfileHooks(scopeChain->globalObject->supportsProfiling()) + , m_shouldEmitRichSourceInfo(scopeChain->globalObject->supportsRichSourceInfo()) + , m_scopeChain(*scopeChain->globalData, scopeChain) , m_symbolTable(symbolTable) , m_scopeNode(evalNode) , m_codeBlock(codeBlock) @@ -478,7 +484,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const ScopeChain& scope , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&scopeChain.globalObject()->globalData()) + , m_globalData(scopeChain->globalData) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) @@ -903,7 +909,7 @@ PassRefPtr<Label> BytecodeGenerator::emitJumpIfNotFunctionCall(RegisterID* cond, emitOpcode(op_jneq_ptr); instructions().append(cond->index()); - instructions().append(m_scopeChain->globalObject()->d()->callFunction.get()); + instructions().append(m_scopeChain->globalObject->d()->callFunction.get()); instructions().append(target->bind(begin, instructions().size())); return target; } @@ -914,7 +920,7 @@ PassRefPtr<Label> BytecodeGenerator::emitJumpIfNotFunctionApply(RegisterID* cond emitOpcode(op_jneq_ptr); instructions().append(cond->index()); - instructions().append(m_scopeChain->globalObject()->d()->applyFunction.get()); + instructions().append(m_scopeChain->globalObject->d()->applyFunction.get()); instructions().append(target->bind(begin, instructions().size())); return target; } diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h index de16f8e..b3851c7 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -47,8 +47,7 @@ namespace JSC { class Identifier; - class ScopeChain; - class ScopeNode; + class ScopeChainNode; class CallArguments { public: @@ -93,9 +92,9 @@ namespace JSC { static void setDumpsGeneratedCode(bool dumpsGeneratedCode); static bool dumpsGeneratedCode(); - BytecodeGenerator(ProgramNode*, const ScopeChain&, SymbolTable*, ProgramCodeBlock*); - BytecodeGenerator(FunctionBodyNode*, const ScopeChain&, SymbolTable*, CodeBlock*); - BytecodeGenerator(EvalNode*, const ScopeChain&, SymbolTable*, EvalCodeBlock*); + BytecodeGenerator(ProgramNode*, ScopeChainNode*, SymbolTable*, ProgramCodeBlock*); + BytecodeGenerator(FunctionBodyNode*, ScopeChainNode*, SymbolTable*, CodeBlock*); + BytecodeGenerator(EvalNode*, ScopeChainNode*, SymbolTable*, EvalCodeBlock*); JSGlobalData* globalData() const { return m_globalData; } const CommonIdentifiers& propertyNames() const { return *m_globalData->propertyNames; } @@ -520,7 +519,7 @@ namespace JSC { bool m_shouldEmitProfileHooks; bool m_shouldEmitRichSourceInfo; - const ScopeChain* m_scopeChain; + Global<ScopeChainNode> m_scopeChain; SymbolTable* m_symbolTable; ScopeNode* m_scopeNode; diff --git a/Source/JavaScriptCore/collector/handles/Global.h b/Source/JavaScriptCore/collector/handles/Global.h new file mode 100644 index 0000000..571fe31 --- /dev/null +++ b/Source/JavaScriptCore/collector/handles/Global.h @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef Global_h +#define Global_h + +#include "Assertions.h" +#include "Handle.h" +#include "HandleHeap.h" +#include "JSGlobalData.h" + +namespace JSC { + +/* + A Global is a persistent handle whose lifetime is not limited to any given + scope. Use Globals for data members and global variables. +*/ + +template <typename T> class Global : public Handle<T> { +public: + typedef typename Handle<T>::ExternalType ExternalType; + Global(JSGlobalData& globalData, ExternalType ptr = ExternalType()) + : Handle<T>(globalData.allocateGlobalHandle()) + { + internalSet(ptr); + } + + Global(JSGlobalData& globalData, Handle<T> handle) + : Handle<T>(globalData.allocateGlobalHandle()) + { + internalSet(handle.get()); + } + + enum EmptyValueTag { EmptyValue }; + Global(EmptyValueTag) + : Handle<T>(0, HandleBase::DontNullCheckSlot) + { + } + + ~Global() + { + HandleSlot slot = this->slot(); + if (slot) + HandleHeap::heapFor(slot)->deallocate(slot); + } + + void set(JSGlobalData& globalData, ExternalType value) + { + if (!value) { + clear(); + return; + } + if (!this->slot()) + this->setSlot(globalData.allocateGlobalHandle()); + internalSet(value); + } + + template <typename U> Global& operator=(const Global<U>& handle) + { + if (handle.slot()) { + if (!this->slot()) + this->setSlot(HandleHeap::heapFor(handle.slot())->allocate()); + internalSet(handle.get()); + } else + clear(); + + return *this; + } + + Global& operator=(const Global& handle) + { + if (handle.slot()) { + if (!this->slot()) + this->setSlot(HandleHeap::heapFor(handle.slot())->allocate()); + internalSet(handle.get()); + } else + clear(); + + return *this; + } + + void clear() + { + if (this->slot()) + internalSet(ExternalType()); + } + + enum HashTableDeletedValueType { HashTableDeletedValue }; + const static intptr_t HashTableDeletedValueTag = 0x1; + Global(HashTableDeletedValueType) + : Handle<T>(reinterpret_cast<HandleSlot>(HashTableDeletedValueTag)) + { + } + bool isHashTableDeletedValue() const { return slot() == reinterpret_cast<HandleSlot>(HashTableDeletedValueTag); } + + template <typename U> Global(const Global<U>& other) + : Handle<T>(other.slot() ? HandleHeap::heapFor(other.slot())->allocate() : 0, Handle<T>::DontNullCheckSlot) + { + if (other.slot()) + internalSet(other.get()); + } + + Global(const Global& other) + : Handle<T>(other.slot() ? HandleHeap::heapFor(other.slot())->allocate() : 0, Handle<T>::DontNullCheckSlot) + { + if (other.slot()) + internalSet(other.get()); + } + +protected: + void internalSet(ExternalType value) + { + JSValue newValue(HandleTypes<T>::toJSValue(value)); + HandleSlot slot = this->slot(); + ASSERT(slot); + HandleHeap::heapFor(slot)->writeBarrier(slot, newValue); + *slot = newValue; + } + + using Handle<T>::slot; + +}; + +} + +namespace WTF { + +template<typename P> struct HashTraits<JSC::Global<P> > : GenericHashTraits<JSC::Global<P> > { + static const bool emptyValueIsZero = true; + static JSC::Global<P> emptyValue() { return JSC::Global<P>(JSC::Global<P>::EmptyValue); } + static void constructDeletedValue(JSC::Global<P>& slot) { new (&slot) JSC::Global<P>(JSC::Global<P>::HashTableDeletedValue); } + static bool isDeletedValue(const JSC::Global<P>& value) { return value.isHashTableDeletedValue(); } +}; + +} + +#endif // Global_h diff --git a/Source/JavaScriptCore/collector/handles/Handle.h b/Source/JavaScriptCore/collector/handles/Handle.h new file mode 100644 index 0000000..98c60ec --- /dev/null +++ b/Source/JavaScriptCore/collector/handles/Handle.h @@ -0,0 +1,189 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef Handle_h +#define Handle_h + +#include "WriteBarrier.h" + +#include <wtf/Assertions.h> + +namespace JSC { + +/* + A Handle is a smart pointer that updates automatically when the garbage + collector moves the object to which it points. + + The base Handle class represents a temporary reference to a pointer whose + lifetime is guaranteed by something else. +*/ + +template <class T> class Handle; + +// Creating a JSValue Handle is invalid +template <> class Handle<JSValue>; + +class HandleBase { + friend class HandleHeap; + +public: + bool operator!() const { return isEmpty(); } + + // This conversion operator allows implicit conversion to bool but not to other integer types. + typedef JSValue (HandleBase::*UnspecifiedBoolType); + operator UnspecifiedBoolType*() const { return (m_slot && *m_slot) ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; } + + bool isEmpty() const { return !m_slot || !*m_slot; } + +protected: + HandleBase(HandleSlot slot) + : m_slot(slot) + { + ASSERT(slot); + } + + enum DontNullCheckSlotTag { DontNullCheckSlot }; + HandleBase(HandleSlot slot, DontNullCheckSlotTag) + : m_slot(slot) + { + } + + HandleSlot slot() const { return m_slot; } + void invalidate() + { + // It is unsafe to use a handle after invalidating it. + m_slot = 0; + } + + // needed by Global<>::operator= and Global<>::set if it's an empty handle + void setSlot(HandleSlot slot) + { + ASSERT(!m_slot); + ASSERT(slot); + m_slot = slot; + } + +private: + HandleSlot m_slot; +}; + +template <typename T> struct HandleTypes { + typedef T* ExternalType; + static ExternalType getFromSlot(HandleSlot slot) { return (slot && *slot) ? reinterpret_cast<ExternalType>(slot->asCell()) : 0; } + static JSValue toJSValue(T* cell) { return reinterpret_cast<JSCell*>(cell); } + template <typename U> static void validateUpcast() { T* temp; temp = (U*)0; } +}; + +template <> struct HandleTypes<Unknown> { + typedef JSValue ExternalType; + static ExternalType getFromSlot(HandleSlot slot) { return slot ? *slot : JSValue(); } + static JSValue toJSValue(const JSValue& v) { return v; } + template <typename U> static void validateUpcast() {} +}; + +template <typename Base, typename T> struct HandleConverter { + T* operator->() { return static_cast<Base*>(this)->get(); } + const T* operator->() const { return static_cast<const Base*>(this)->get(); } + T* operator*() { return static_cast<Base*>(this)->get(); } + const T* operator*() const { return static_cast<const Base*>(this)->get(); } +}; + +template <typename Base> struct HandleConverter<Base, Unknown> { +}; + +template <typename T> class Handle : public HandleBase, public HandleConverter<Handle<T>, T> { +public: + typedef typename HandleTypes<T>::ExternalType ExternalType; + template <typename U> Handle(Handle<U> o) + { + typename HandleTypes<T>::template validateUpcast<U>(); + m_slot = o.slot(); + } + + ExternalType get() const { return HandleTypes<T>::getFromSlot(this->slot()); } + +protected: + + Handle(HandleSlot slot) + : HandleBase(slot) + { + } + Handle(HandleSlot slot, HandleBase::DontNullCheckSlotTag) + : HandleBase(slot, HandleBase::DontNullCheckSlot) + { + } + +private: + friend class HandleHeap; + + static Handle<T> wrapSlot(HandleSlot slot) + { + return Handle<T>(slot); + } +}; + +template <typename T, typename U> inline bool operator==(const Handle<T>& a, const Handle<U>& b) +{ + return a.get() == b.get(); +} + +template <typename T, typename U> inline bool operator==(const Handle<T>& a, U* b) +{ + return a.get() == b; +} + +template <typename T, typename U> inline bool operator==(T* a, const Handle<U>& b) +{ + return a == b.get(); +} + +template <typename T, typename U> inline bool operator!=(const Handle<T>& a, const Handle<U>& b) +{ + return a.get() != b.get(); +} + +template <typename T, typename U> inline bool operator!=(const Handle<T>& a, U* b) +{ + return a.get() != b; +} + +template <typename T, typename U> inline bool operator!=(T* a, const Handle<U>& b) +{ + return a != b.get(); +} + +template <typename T, typename U> inline bool operator!=(const Handle<T>& a, JSValue b) +{ + return a.get() != b; +} + +template <typename T, typename U> inline bool operator!=(JSValue a, const Handle<U>& b) +{ + return a != b.get(); +} + +} + +#endif diff --git a/Source/JavaScriptCore/collector/handles/HandleHeap.cpp b/Source/JavaScriptCore/collector/handles/HandleHeap.cpp new file mode 100644 index 0000000..32fa42d --- /dev/null +++ b/Source/JavaScriptCore/collector/handles/HandleHeap.cpp @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include "HandleHeap.h" + +#include "JSObject.h" + +namespace JSC { + +HandleHeap::HandleHeap(JSGlobalData* globalData) + : m_globalData(globalData) + , m_nextToFinalize(0) +#if !ASSERT_DISABLED + , m_handlingFinalizers(false) +#endif +{ + grow(); +} + +void HandleHeap::grow() +{ + Node* block = m_blockStack.grow(); + for (int i = m_blockStack.blockLength - 1; i >= 0; --i) { + Node* node = &block[i]; + new (node) Node(this); + m_freeList.push(node); + } +} + +void HandleHeap::markStrongHandles(MarkStack& markStack) +{ + Node* end = m_strongList.end(); + for (Node* node = m_strongList.begin(); node != end; node = node->next()) + markStack.deprecatedAppend(node->slot()); +} + +void HandleHeap::updateAfterMark() +{ + clearWeakPointers(); +} + +void HandleHeap::clearWeakPointers() +{ +#if !ASSERT_DISABLED + m_handlingFinalizers = true; +#endif + Node* end = m_weakList.end(); + for (Node* node = m_weakList.begin(); node != end;) { + Node* current = node; + node = current->next(); + + JSValue value = *current->slot(); + if (!value || !value.isCell()) + continue; + + JSCell* cell = value.asCell(); + ASSERT(!cell || cell->structure()); + + if (Heap::isMarked(cell)) + continue; + + if (Finalizer* finalizer = current->finalizer()) { + m_nextToFinalize = node; + finalizer->finalize(Handle<Unknown>::wrapSlot(current->slot()), current->finalizerContext()); + node = m_nextToFinalize; + m_nextToFinalize = 0; + } + + if (current->isSelfDestroying()) { + ASSERT(node != current); + ASSERT(current->next() == node); + deallocate(toHandle(current)); + } else if (current->next() == node) { // if current->next() != node, then current has been deallocated + SentinelLinkedList<Node>::remove(current); + *current->slot() = JSValue(); + m_immediateList.push(current); + } + } +#if !ASSERT_DISABLED + m_handlingFinalizers = false; +#endif +} + +void HandleHeap::writeBarrier(HandleSlot slot, const JSValue& value) +{ + ASSERT(!m_handlingFinalizers); + if (slot->isCell() == value.isCell() && !value == !*slot) + return; + Node* node = toNode(slot); + SentinelLinkedList<Node>::remove(node); + if (!value.isCell() || !value) { + m_immediateList.push(node); + return; + } + if (node->isWeak()) + m_weakList.push(node); + else + m_strongList.push(node); +} + +unsigned HandleHeap::protectedGlobalObjectCount() +{ + unsigned count = 0; + Node* end = m_strongList.end(); + for (Node* node = m_strongList.begin(); node != end; node = node->next()) { + JSValue value = *node->slot(); + if (value.isObject() && asObject(value.asCell())->isGlobalObject()) + count++; + } + return count; +} + +} diff --git a/Source/JavaScriptCore/collector/handles/HandleHeap.h b/Source/JavaScriptCore/collector/handles/HandleHeap.h new file mode 100644 index 0000000..4bb9b00 --- /dev/null +++ b/Source/JavaScriptCore/collector/handles/HandleHeap.h @@ -0,0 +1,273 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef HandleHeap_h +#define HandleHeap_h + +#include "BlockStack.h" +#include "Handle.h" +#include "SentinelLinkedList.h" +#include "SinglyLinkedList.h" + +namespace JSC { + +class HandleHeap; +class JSGlobalData; +class JSValue; +class MarkStack; + +class Finalizer { +public: + virtual void finalize(Handle<Unknown>, void*) = 0; + virtual ~Finalizer() {} +}; + +class HandleHeap { +public: + static HandleHeap* heapFor(HandleSlot); + + HandleHeap(JSGlobalData*); + + HandleSlot allocate(); + void deallocate(HandleSlot); + + void makeWeak(HandleSlot, Finalizer*, void* context); + void makeSelfDestroying(HandleSlot, Finalizer*, void* context); + + void markStrongHandles(MarkStack&); + void updateAfterMark(); + + // Should only be called during teardown. + void clearWeakPointers(); + + void writeBarrier(HandleSlot, const JSValue&); + +#if !ASSERT_DISABLED + Finalizer* getFinalizer(HandleSlot handle) + { + return toNode(handle)->finalizer(); + } +#endif + + unsigned protectedGlobalObjectCount(); + +private: + typedef uintptr_t HandleHeapWithFlags; + enum { FlagsMask = 3, WeakFlag = 1, SelfDestroyingFlag = 2 }; + class Node { + public: + Node(WTF::SentinelTag); + Node(HandleHeap*); + + HandleSlot slot(); + HandleHeap* handleHeap(); + + void setFinalizer(Finalizer*, void* context); + Finalizer* finalizer(); + void* finalizerContext(); + + void setPrev(Node*); + Node* prev(); + + void setNext(Node*); + Node* next(); + + bool isWeak(); + void makeWeak(); + + bool isSelfDestroying(); + void makeSelfDestroying(); + + private: + JSValue m_value; + HandleHeapWithFlags m_handleHeapWithFlags; + Finalizer* m_finalizer; + void* m_finalizerContext; + Node* m_prev; + Node* m_next; + }; + + static HandleSlot toHandle(Node*); + static Node* toNode(HandleSlot); + + void grow(); + + JSGlobalData* m_globalData; + BlockStack<Node> m_blockStack; + + SentinelLinkedList<Node> m_strongList; + SentinelLinkedList<Node> m_weakList; + SentinelLinkedList<Node> m_immediateList; + SinglyLinkedList<Node> m_freeList; + Node* m_nextToFinalize; + +#if !ASSERT_DISABLED + bool m_handlingFinalizers; +#endif +}; + +inline HandleHeap* HandleHeap::heapFor(HandleSlot handle) +{ + return toNode(handle)->handleHeap(); +} + +inline HandleSlot HandleHeap::toHandle(Node* node) +{ + return reinterpret_cast<HandleSlot>(node); +} + +inline HandleHeap::Node* HandleHeap::toNode(HandleSlot handle) +{ + return reinterpret_cast<Node*>(handle); +} + +inline HandleSlot HandleHeap::allocate() +{ + if (m_freeList.isEmpty()) + grow(); + + Node* node = m_freeList.pop(); + new (node) Node(this); + m_immediateList.push(node); + return toHandle(node); +} + +inline void HandleHeap::deallocate(HandleSlot handle) +{ + Node* node = toNode(handle); + if (m_nextToFinalize == node) { + m_nextToFinalize = node->next(); + ASSERT(m_nextToFinalize->next()); + } + SentinelLinkedList<Node>::remove(node); + m_freeList.push(node); +} + +inline void HandleHeap::makeWeak(HandleSlot handle, Finalizer* finalizer, void* context) +{ + Node* node = toNode(handle); + SentinelLinkedList<Node>::remove(node); + node->setFinalizer(finalizer, context); + node->makeWeak(); + if (handle->isCell() && *handle) + m_weakList.push(node); + else + m_immediateList.push(node); +} + +inline void HandleHeap::makeSelfDestroying(HandleSlot handle, Finalizer* finalizer, void* context) +{ + makeWeak(handle, finalizer, context); + Node* node = toNode(handle); + node->makeSelfDestroying(); +} + +inline HandleHeap::Node::Node(HandleHeap* handleHeap) + : m_handleHeapWithFlags(reinterpret_cast<uintptr_t>(handleHeap)) + , m_finalizer(0) + , m_finalizerContext(0) +{ +} + +inline HandleHeap::Node::Node(WTF::SentinelTag) + : m_handleHeapWithFlags(0) + , m_finalizer(0) + , m_finalizerContext(0) +{ +} + +inline HandleSlot HandleHeap::Node::slot() +{ + return &m_value; +} + +inline HandleHeap* HandleHeap::Node::handleHeap() +{ + return reinterpret_cast<HandleHeap*>(m_handleHeapWithFlags & ~FlagsMask); +} + +inline void HandleHeap::Node::setFinalizer(Finalizer* finalizer, void* context) +{ + m_finalizer = finalizer; + m_finalizerContext = context; +} + +inline void HandleHeap::Node::makeWeak() +{ + ASSERT(!(m_handleHeapWithFlags & WeakFlag)); + m_handleHeapWithFlags |= WeakFlag; +} + +inline bool HandleHeap::Node::isWeak() +{ + return !!(m_handleHeapWithFlags & WeakFlag); +} + +inline void HandleHeap::Node::makeSelfDestroying() +{ + ASSERT(m_handleHeapWithFlags & WeakFlag); + ASSERT(!(m_handleHeapWithFlags & SelfDestroyingFlag)); + m_handleHeapWithFlags |= SelfDestroyingFlag; +} + +inline bool HandleHeap::Node::isSelfDestroying() +{ + return !!(m_handleHeapWithFlags & SelfDestroyingFlag); +} + +inline Finalizer* HandleHeap::Node::finalizer() +{ + return m_finalizer; +} + +inline void* HandleHeap::Node::finalizerContext() +{ + ASSERT(m_finalizer); + return m_finalizerContext; +} + +inline void HandleHeap::Node::setPrev(Node* prev) +{ + m_prev = prev; +} + +inline HandleHeap::Node* HandleHeap::Node::prev() +{ + return m_prev; +} + +inline void HandleHeap::Node::setNext(Node* next) +{ + m_next = next; +} + +inline HandleHeap::Node* HandleHeap::Node::next() +{ + return m_next; +} + +} + +#endif diff --git a/Source/JavaScriptCore/debugger/Debugger.cpp b/Source/JavaScriptCore/debugger/Debugger.cpp index 20a8485..b999446 100644 --- a/Source/JavaScriptCore/debugger/Debugger.cpp +++ b/Source/JavaScriptCore/debugger/Debugger.cpp @@ -62,7 +62,7 @@ inline Recompiler::~Recompiler() inline void Recompiler::operator()(JSCell* cell) { - if (!cell->inherits(&JSFunction::info)) + if (!cell->inherits(&JSFunction::s_info)) return; JSFunction* function = asFunction(cell); @@ -76,9 +76,9 @@ inline void Recompiler::operator()(JSCell* cell) if (!m_functionExecutables.add(executable).second) return; - ExecState* exec = function->scope().globalObject()->JSGlobalObject::globalExec(); + ExecState* exec = function->scope()->globalObject->JSGlobalObject::globalExec(); executable->discardCode(); - if (m_debugger == function->scope().globalObject()->debugger()) + if (m_debugger == function->scope()->globalObject->debugger()) m_sourceProviders.add(executable->source().provider(), exec); } diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp index fcd257c..62a2e54 100644 --- a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp +++ b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp @@ -31,7 +31,7 @@ namespace JSC { DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activation) - : JSObject(DebuggerActivation::createStructure(jsNull())) + : JSNonFinalObject(DebuggerActivation::createStructure(jsNull())) { ASSERT(activation); ASSERT(activation->isActivationObject()); diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.h b/Source/JavaScriptCore/debugger/DebuggerActivation.h index b64060d..01a4907 100644 --- a/Source/JavaScriptCore/debugger/DebuggerActivation.h +++ b/Source/JavaScriptCore/debugger/DebuggerActivation.h @@ -32,7 +32,7 @@ namespace JSC { class JSActivation; - class DebuggerActivation : public JSObject { + class DebuggerActivation : public JSNonFinalObject { public: DebuggerActivation(JSGlobalData&, JSObject*); @@ -51,7 +51,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: diff --git a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp index cb4592c..d778bd5 100644 --- a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp +++ b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp @@ -45,7 +45,7 @@ const UString* DebuggerCallFrame::functionName() const return 0; JSObject* function = m_callFrame->callee(); - if (!function || !function->inherits(&JSFunction::info)) + if (!function || !function->inherits(&JSFunction::s_info)) return 0; return &asFunction(function)->name(m_callFrame); } @@ -56,7 +56,7 @@ UString DebuggerCallFrame::calculatedFunctionName() const return UString(); JSObject* function = m_callFrame->callee(); - if (!function || !function->inherits(&JSFunction::info)) + if (!function || !function->inherits(&JSFunction::s_info)) return UString(); return asFunction(function)->calculatedDisplayName(m_callFrame); diff --git a/Source/JavaScriptCore/debugger/DebuggerCallFrame.h b/Source/JavaScriptCore/debugger/DebuggerCallFrame.h index 9d377ef..f6b415c 100644 --- a/Source/JavaScriptCore/debugger/DebuggerCallFrame.h +++ b/Source/JavaScriptCore/debugger/DebuggerCallFrame.h @@ -49,7 +49,7 @@ namespace JSC { } JSGlobalObject* dynamicGlobalObject() const { return m_callFrame->dynamicGlobalObject(); } - const ScopeChainNode* scopeChain() const { return m_callFrame->scopeChain(); } + ScopeChainNode* scopeChain() const { return m_callFrame->scopeChain(); } const UString* functionName() const; UString calculatedFunctionName() const; Type type() const; diff --git a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp new file mode 100644 index 0000000..1e46094 --- /dev/null +++ b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp @@ -0,0 +1,216 @@ +{ + 'includes': [ + '../../gyp/common.gypi', + '../JavaScriptCore.gypi', + ], + 'xcode_config_file': '<(DEPTH)/JavaScriptCore/Configurations/DebugRelease.xcconfig', + 'variables': { + # FIXME: We should use a header map instead of listing these explicitly. + 'javascriptcore_include_dirs': [ + '<(DEPTH)', # Some paths in API include JavaScriptCore/ + '<(DEPTH)/JavaScriptCore', + '<(DEPTH)/JavaScriptCore/ForwardingHeaders', + '<(DEPTH)/JavaScriptCore/API', + '<(DEPTH)/JavaScriptCore/assembler', + '<(DEPTH)/JavaScriptCore/collector/handles', + '<(DEPTH)/JavaScriptCore/bytecode', + '<(DEPTH)/JavaScriptCore/bytecompiler', + '<(DEPTH)/JavaScriptCore/debugger', + '<(DEPTH)/JavaScriptCore/icu', + '<(DEPTH)/JavaScriptCore/interpreter', + '<(DEPTH)/JavaScriptCore/jit', + '<(DEPTH)/JavaScriptCore/parser', + '<(DEPTH)/JavaScriptCore/profiler', + '<(DEPTH)/JavaScriptCore/runtime', + '<(DEPTH)/JavaScriptCore/wtf', + '<(DEPTH)/JavaScriptCore/wtf/unicode', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore', + ], + }, + 'targets': [ + { + 'target_name': 'JavaScriptCore', + 'type': 'shared_library', + 'dependencies': [ + 'Derived Sources', + 'Update Version', + ], + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(javascriptcore_files)', + '<@(javascriptcore_publicheader_files)', + '<@(javascriptcore_privateheader_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + 'libicucore.dylib', + 'libobjc.dylib', + ], + 'mac_framework_headers': [ + '<@(javascriptcore_publicheader_files)', + ], + 'mac_framework_private_headers': [ + '<@(javascriptcore_privateheader_files)', + ], + 'xcode_config_file': '<(DEPTH)/JavaScriptCore/Configurations/JavaScriptCore.xcconfig', + 'sources/': [ + ['exclude', 'qt'], + ['exclude', 'os-win32'], + ['exclude', 'wtf/android'], + ['exclude', 'wtf/brew'], + ['exclude', 'wtf/efl'], + ['exclude', 'wtf/gtk'], + ['exclude', 'wtf/qt'], + ['exclude', 'wtf/haiku'], + ['exclude', 'API/tests'], + ['exclude', 'wtf/url'], + ['exclude', 'wtf/wince'], + ['exclude', 'wtf/wx'], + ['exclude', 'wtf/unicode/brew'], + ['exclude', 'wtf/unicode/wince'], + ['exclude', 'wtf/unicode/glib'], + ['exclude', 'wtf/unicode/qt4'], + ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'], + ['exclude', '(Default|Gtk|Chromium|None|Qt|Win|Wx|Symbian)\\.(cpp|mm|h)$'], + ['exclude', 'GCActivityCallback\.cpp'], + ['exclude', '.*BSTR.*$'], + ['exclude', 'jsc.cpp$'], + ], + 'postbuilds': [ + { + 'postbuild_name': 'Check For Global Initializers', + 'action': [ + 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' + ], + }, + { + 'postbuild_name': 'Check For Exit Time Destructors', + 'action': [ + 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors' + ], + }, + { + 'postbuild_name': 'Check For Weak VTables and Externals', + 'action': [ + 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' + ], + }, + ], + 'conditions': [ + ['OS=="mac"', { + 'mac_bundle': 1, + 'xcode_settings': { + # FIXME: Remove these overrides once JavaScriptCore.xcconfig is + # used only by this project. + 'GCC_PREFIX_HEADER': '<(DEPTH)/JavaScriptCore/JavaScriptCorePrefix.h', + 'INFOPLIST_FILE': '<(DEPTH)/JavaScriptCore/Info.plist', + # This setting mirrors the setting in Base.xcconfig, with + # one difference noted below. + 'WARNING_CFLAGS_BASE': [ + '-Wall', + '-Wextra', + '-Wcast-qual', + '-Wchar-subscripts', + '-Wextra-tokens', + '-Wformat=2', + '-Winit-self', + # FIXME: For some reason, -Wmissing-format-attribute causes a + # build error in Assertions.cpp in the GYP build but not in the + # non-GYP build. + # '-Wmissing-format-attribute', + '-Wmissing-noreturn', + '-Wpacked', + '-Wpointer-arith', + '-Wredundant-decls', + '-Wundef', + '-Wwrite-strings', + ], + }, + }], + ], + }, + { + 'target_name': 'Derived Sources', + 'type': 'none', + 'actions': [{ + 'action_name': 'Generate Derived Sources', + 'inputs': [], + 'outputs': [], + 'action': [ + 'sh', 'generate-derived-sources.sh', + ], + }], + }, + { + 'target_name': 'Update Version', + 'type': 'none', + 'actions': [{ + 'action_name': 'Update Info.plist with version information', + 'inputs': [], + 'outputs': [], + 'action': [ + 'sh', '<(DEPTH)/gyp/update-info-plist.sh', '<(DEPTH)/JavaScriptCore/Info.plist' + ] + }], + }, + { + 'target_name': 'minidom', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(minidom_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + ], + 'copies': [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<@(minidom_support_files)', + ], + }], + }, + { + 'target_name': 'testapi', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(testapi_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + ], + 'copies': [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<@(testapi_support_files)', + ], + }], + }, + { + 'target_name': 'jsc', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(jsc_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + 'libedit.dylib', + ], + }, + ], # targets +} diff --git a/Source/JavaScriptCore/gyp/generate-derived-sources.sh b/Source/JavaScriptCore/gyp/generate-derived-sources.sh new file mode 100755 index 0000000..fcd3056 --- /dev/null +++ b/Source/JavaScriptCore/gyp/generate-derived-sources.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/docs" +cd "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" + +/bin/ln -sfh "${SRCROOT}/.." JavaScriptCore +export JavaScriptCore="JavaScriptCore" + +make -f "JavaScriptCore/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.ncpu` diff --git a/Source/JavaScriptCore/interpreter/CachedCall.h b/Source/JavaScriptCore/interpreter/CachedCall.h index 740001d..05e9056 100644 --- a/Source/JavaScriptCore/interpreter/CachedCall.h +++ b/Source/JavaScriptCore/interpreter/CachedCall.h @@ -38,10 +38,10 @@ namespace JSC { CachedCall(CallFrame* callFrame, JSFunction* function, int argCount) : m_valid(false) , m_interpreter(callFrame->interpreter()) - , m_globalObjectScope(callFrame, function->scope().globalObject()) + , m_globalObjectScope(callFrame, function->scope()->globalObject.get()) { ASSERT(!function->isHostFunction()); - m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argCount, function->scope().node()); + m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argCount, function->scope()); m_valid = !callFrame->hadException(); } diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h index 190a7c1..e73e13a 100644 --- a/Source/JavaScriptCore/interpreter/CallFrame.h +++ b/Source/JavaScriptCore/interpreter/CallFrame.h @@ -26,13 +26,13 @@ #include "JSGlobalData.h" #include "MacroAssemblerCodeRef.h" #include "RegisterFile.h" -#include "ScopeChain.h" namespace JSC { class Arguments; class JSActivation; class Interpreter; + class ScopeChainNode; // Represents the current state of script execution. // Passed as the first argument to most functions. @@ -51,23 +51,13 @@ namespace JSC { // Global object in which the currently executing code was defined. // Differs from dynamicGlobalObject() during function calls across web browser frames. - JSGlobalObject* lexicalGlobalObject() const - { - return scopeChain()->globalObject; - } + inline JSGlobalObject* lexicalGlobalObject() const; // Differs from lexicalGlobalObject because this will have DOM window shell rather than // the actual DOM window, which can't be "this" for security reasons. - JSObject* globalThisValue() const - { - return scopeChain()->globalThis; - } + inline JSObject* globalThisValue() const; - JSGlobalData& globalData() const - { - ASSERT(scopeChain()->globalData); - return *scopeChain()->globalData; - } + inline JSGlobalData& globalData() const; // Convenience functions for access to global data. // It takes a few memory references to get from a call frame to the global data @@ -90,6 +80,7 @@ namespace JSC { static const HashTable* jsonTable(CallFrame* callFrame) { return callFrame->globalData().jsonTable; } static const HashTable* mathTable(CallFrame* callFrame) { return callFrame->globalData().mathTable; } static const HashTable* numberTable(CallFrame* callFrame) { return callFrame->globalData().numberTable; } + static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->globalData().objectConstructorTable; } static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->globalData().regExpTable; } static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->globalData().regExpConstructorTable; } static const HashTable* stringTable(CallFrame* callFrame) { return callFrame->globalData().stringTable; } diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp index c2612ac..b9a9c40 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp @@ -42,7 +42,6 @@ #include "EvalCodeCache.h" #include "ExceptionHelpers.h" #include "GetterSetter.h" -#include "GlobalEvalFunction.h" #include "JSActivation.h" #include "JSArray.h" #include "JSByteArray.h" @@ -77,11 +76,11 @@ using namespace std; namespace JSC { // Returns the depth of the scope chain within a given call frame. -static int depth(CodeBlock* codeBlock, ScopeChain& sc) +static int depth(CodeBlock* codeBlock, ScopeChainNode* sc) { if (!codeBlock->needsFullScopeChain()) return 0; - return sc.localDepth(); + return sc->localDepth(); } #if ENABLE(INTERPRETER) @@ -419,9 +418,10 @@ NEVER_INLINE JSValue Interpreter::callEval(CallFrame* callFrame, RegisterFile* r return callFrame->globalData().interpreter->execute(eval.get(), callFrame, callFrame->uncheckedR(codeBlock->thisRegister()).jsValue().toThisObject(callFrame), callFrame->registers() - registerFile->start() + registerOffset, scopeChain); } -Interpreter::Interpreter() +Interpreter::Interpreter(JSGlobalData& globalData) : m_sampleEntryDepth(0) , m_reentryDepth(0) + , m_registerFile(globalData) { #if ENABLE(COMPUTED_GOTO_INTERPRETER) privateExecute(InitializeAndReturn, 0, 0); @@ -564,24 +564,21 @@ NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue ex oldCodeBlock->createActivation(callFrame); scopeChain = callFrame->scopeChain(); } - while (!scopeChain->object->inherits(&JSActivation::info)) + while (!scopeChain->object->inherits(&JSActivation::s_info)) scopeChain = scopeChain->pop(); callFrame->setScopeChain(scopeChain); JSActivation* activation = asActivation(scopeChain->object.get()); - activation->copyRegisters(); + activation->copyRegisters(*scopeChain->globalData); if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue()) { if (!oldCodeBlock->isStrictMode()) asArguments(arguments)->setActivation(callFrame->globalData(), activation); } } else if (oldCodeBlock->usesArguments() && !oldCodeBlock->isStrictMode()) { if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue()) - asArguments(arguments)->copyRegisters(); + asArguments(arguments)->copyRegisters(callFrame->globalData()); } - if (oldCodeBlock->needsFullScopeChain()) - scopeChain->deref(); - CallFrame* callerFrame = callFrame->callerFrame(); if (callerFrame->hasHostCallFrameFlag()) return false; @@ -645,7 +642,7 @@ static void appendSourceToError(CallFrame* callFrame, ErrorInstance* exception, start++; while (stop < dataLength && (stop - expressionStart < 20) && data[stop] != '\n') stop++; - while (stop > expressionStart && isStrWhiteSpace(data[stop])) + while (stop > expressionStart && isStrWhiteSpace(data[stop - 1])) stop--; message = makeUString(message, " (near '...", codeBlock->source()->getRange(start, stop), "...')"); } @@ -710,11 +707,10 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV // Unwind the scope chain within the exception handler's call frame. ScopeChainNode* scopeChain = callFrame->scopeChain(); - ScopeChain sc(scopeChain); int scopeDelta = 0; if (!codeBlock->needsFullScopeChain() || codeBlock->codeType() != FunctionCode || callFrame->uncheckedR(codeBlock->activationRegister()).jsValue()) - scopeDelta = depth(codeBlock, sc) - handler->scopeDepth; + scopeDelta = depth(codeBlock, scopeChain) - handler->scopeDepth; ASSERT(scopeDelta >= 0); while (scopeDelta--) scopeChain = scopeChain->pop(); @@ -761,10 +757,7 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock->m_numParameters, 0); newCallFrame->uncheckedR(newCallFrame->hostThisRegister()) = JSValue(thisObj); - if (codeBlock->needsFullScopeChain()) - scopeChain->ref(); - - DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject.get()); Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) @@ -835,7 +828,7 @@ JSValue Interpreter::executeCall(CallFrame* callFrame, JSObject* function, CallT newCallFrame->init(newCodeBlock, 0, callDataScopeChain, callFrame->addHostCallFrameFlag(), argCount, function); - DynamicGlobalObjectScope globalObjectScope(newCallFrame, callDataScopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(newCallFrame, callDataScopeChain->globalObject.get()); Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) @@ -867,7 +860,7 @@ JSValue Interpreter::executeCall(CallFrame* callFrame, JSObject* function, CallT newCallFrame = CallFrame::create(newCallFrame->registers() + registerOffset); newCallFrame->init(0, 0, scopeChain, callFrame->addHostCallFrameFlag(), argCount, function); - DynamicGlobalObjectScope globalObjectScope(newCallFrame, scopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(newCallFrame, scopeChain->globalObject.get()); Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) @@ -924,7 +917,7 @@ JSObject* Interpreter::executeConstruct(CallFrame* callFrame, JSObject* construc newCallFrame->init(newCodeBlock, 0, constructDataScopeChain, callFrame->addHostCallFrameFlag(), argCount, constructor); - DynamicGlobalObjectScope globalObjectScope(newCallFrame, constructDataScopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(newCallFrame, constructDataScopeChain->globalObject.get()); Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) @@ -959,7 +952,7 @@ JSObject* Interpreter::executeConstruct(CallFrame* callFrame, JSObject* construc newCallFrame = CallFrame::create(newCallFrame->registers() + registerOffset); newCallFrame->init(0, 0, scopeChain, callFrame->addHostCallFrameFlag(), argCount, constructor); - DynamicGlobalObjectScope globalObjectScope(newCallFrame, scopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(newCallFrame, scopeChain->globalObject.get()); Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) @@ -1076,7 +1069,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec if (m_reentryDepth >= MaxSmallThreadReentryDepth && m_reentryDepth >= callFrame->globalData().maxReentryDepth) return checkedReturn(throwStackOverflowError(callFrame)); - DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject); + DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject.get()); JSObject* compileError = eval->compile(callFrame, scopeChain); if (UNLIKELY(!!compileError)) @@ -1084,7 +1077,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec EvalCodeBlock* codeBlock = &eval->generatedBytecode(); JSObject* variableObject; - for (ScopeChainNode* node = scopeChain; ; node = node->next) { + for (ScopeChainNode* node = scopeChain; ; node = node->next.get()) { ASSERT(node); if (node->object->isVariableObject()) { variableObject = static_cast<JSVariableObject*>(node->object.get()); @@ -1133,9 +1126,6 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->m_numParameters, 0); newCallFrame->uncheckedR(newCallFrame->hostThisRegister()) = JSValue(thisObj); - if (codeBlock->needsFullScopeChain()) - scopeChain->ref(); - Profiler** profiler = Profiler::enabledProfilerReference(); if (*profiler) (*profiler)->willExecute(callFrame, eval->sourceURL(), eval->lineNo()); @@ -2366,7 +2356,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT(scope->isGlobalObject()); int index = vPC[2].u.operand; - callFrame->uncheckedR(dst) = scope->registerAt(index); + callFrame->uncheckedR(dst) = scope->registerAt(index).get(); vPC += OPCODE_LENGTH(op_get_global_var); NEXT_INSTRUCTION(); } @@ -2380,7 +2370,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int index = vPC[1].u.operand; int value = vPC[2].u.operand; - scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); + scope->registerAt(index).set(*globalData, scope, callFrame->r(value).jsValue()); vPC += OPCODE_LENGTH(op_put_global_var); NEXT_INSTRUCTION(); } @@ -2411,7 +2401,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } ASSERT((*iter)->isVariableObject()); JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get()); - callFrame->uncheckedR(dst) = scope->registerAt(index); + callFrame->uncheckedR(dst) = scope->registerAt(index).get(); ASSERT(callFrame->r(dst).jsValue()); vPC += OPCODE_LENGTH(op_get_scoped_var); NEXT_INSTRUCTION(); @@ -2443,19 +2433,21 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT((*iter)->isVariableObject()); JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get()); ASSERT(callFrame->r(value).jsValue()); - scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); + scope->registerAt(index).set(*globalData, scope, callFrame->r(value).jsValue()); vPC += OPCODE_LENGTH(op_put_scoped_var); NEXT_INSTRUCTION(); } DEFINE_OPCODE(op_resolve_base) { - /* resolve_base dst(r) property(id) + /* resolve_base dst(r) property(id) isStrict(bool) Searches the scope chain for an object containing identifier property, and if one is found, writes it to - register dst. If none is found, the outermost scope (which - will be the global object) is stored in register dst. + register dst. If none is found and isStrict is false, the + outermost scope (which will be the global object) is + stored in register dst. */ resolveBase(callFrame, vPC); + CHECK_FOR_EXCEPTION(); vPC += OPCODE_LENGTH(op_resolve_base); NEXT_INSTRUCTION(); @@ -2476,6 +2468,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi exceptionValue = createErrorForInvalidGlobalAssignment(callFrame, ident.ustring()); goto vm_throw; } + + vPC += OPCODE_LENGTH(op_ensure_property_exists); NEXT_INSTRUCTION(); } DEFINE_OPCODE(op_resolve_with_base) { @@ -3803,7 +3797,7 @@ skip_id_custom_self: */ if (!function->name().isNull()) { JSStaticScopeObject* functionScopeObject = new (callFrame) JSStaticScopeObject(callFrame, function->name(), func, ReadOnly | DontDelete); - func->scope().push(functionScopeObject); + func->setScope(*globalData, func->scope()->push(functionScopeObject)); } callFrame->uncheckedR(dst) = JSValue(func); @@ -3833,7 +3827,7 @@ skip_id_custom_self: Register* newCallFrame = callFrame->registers() + registerOffset; Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; JSValue thisValue = argv[0].jsValue(); - JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject; + JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject.get(); if (thisValue == globalObject && funcVal == globalObject->evalFunction()) { JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset); @@ -3959,7 +3953,7 @@ skip_id_custom_self: exceptionValue = createInvalidParamError(callFrame, "Function.prototype.apply", arguments); goto vm_throw; } - if (asObject(arguments)->classInfo() == &Arguments::info) { + if (asObject(arguments)->classInfo() == &Arguments::s_info) { Arguments* args = asArguments(arguments); argCount = args->numProvidedArguments(callFrame); argCount = min<uint32_t>(argCount, Arguments::MaxArguments); @@ -3981,7 +3975,7 @@ skip_id_custom_self: goto vm_throw; } array->copyToRegisters(callFrame, callFrame->registers() + argsOffset, argCount); - } else if (asObject(arguments)->inherits(&JSArray::info)) { + } else if (asObject(arguments)->inherits(&JSArray::s_info)) { JSObject* argObject = asObject(arguments); argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame); argCount = min<uint32_t>(argCount, Arguments::MaxArguments); @@ -4101,7 +4095,7 @@ skip_id_custom_self: ASSERT(codeBlock->needsFullScopeChain()); JSValue activationValue = callFrame->r(activation).jsValue(); if (activationValue) { - asActivation(activationValue)->copyRegisters(); + asActivation(activationValue)->copyRegisters(*globalData); if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { if (!codeBlock->isStrictMode()) @@ -4109,7 +4103,7 @@ skip_id_custom_self: } } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { if (!codeBlock->isStrictMode()) - asArguments(argumentsValue)->copyRegisters(); + asArguments(argumentsValue)->copyRegisters(*globalData); } vPC += OPCODE_LENGTH(op_tear_off_activation); @@ -4131,7 +4125,7 @@ skip_id_custom_self: ASSERT(!codeBlock->needsFullScopeChain() && codeBlock->ownerExecutable()->usesArguments()); if (JSValue arguments = callFrame->r(unmodifiedArgumentsRegister(src1)).jsValue()) - asArguments(arguments)->copyRegisters(); + asArguments(arguments)->copyRegisters(*globalData); vPC += OPCODE_LENGTH(op_tear_off_arguments); NEXT_INSTRUCTION(); @@ -4148,9 +4142,6 @@ skip_id_custom_self: int result = vPC[1].u.operand; - if (callFrame->codeBlock()->needsFullScopeChain() && callFrame->r(codeBlock->activationRegister()).jsValue()) - callFrame->scopeChain()->deref(); - JSValue returnValue = callFrame->r(result).jsValue(); vPC = callFrame->returnVPC(); @@ -4189,9 +4180,6 @@ skip_id_custom_self: int result = vPC[1].u.operand; - if (codeBlock->needsFullScopeChain() && callFrame->r(codeBlock->activationRegister()).jsValue()) - callFrame->scopeChain()->deref(); - JSValue returnValue = callFrame->r(result).jsValue(); if (UNLIKELY(!returnValue.isObject())) @@ -4236,7 +4224,7 @@ skip_id_custom_self: if (!callFrame->r(activationReg).jsValue()) { JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionExecutable*>(codeBlock->ownerExecutable())); callFrame->r(activationReg) = JSValue(activation); - callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation)); + callFrame->setScopeChain(callFrame->scopeChain()->push(activation)); } vPC += OPCODE_LENGTH(op_create_activation); NEXT_INSTRUCTION(); @@ -4275,8 +4263,8 @@ skip_id_custom_self: if (proto.isObject()) structure = asObject(proto)->inheritorID(); else - structure = constructor->scope().node()->globalObject->emptyObjectStructure(); - callFrame->uncheckedR(thisRegister) = JSValue(new (&callFrame->globalData()) JSObject(structure)); + structure = constructor->scope()->globalObject->emptyObjectStructure(); + callFrame->uncheckedR(thisRegister) = constructEmptyObject(callFrame, structure); vPC += OPCODE_LENGTH(op_create_this); NEXT_INSTRUCTION(); @@ -4641,11 +4629,6 @@ skip_id_custom_self: program. Return control to the calling native code. */ - if (codeBlock->needsFullScopeChain()) { - ScopeChainNode* scopeChain = callFrame->scopeChain(); - ASSERT(scopeChain->refCount > 1); - scopeChain->deref(); - } int result = vPC[1].u.operand; return callFrame->r(result).jsValue(); } @@ -4775,9 +4758,13 @@ skip_id_custom_self: // cannot fathom if we don't assign to the exceptionValue before branching) exceptionValue = createInterruptedExecutionException(globalData); } + JSGlobalObject* globalObject = callFrame->lexicalGlobalObject(); handler = throwException(callFrame, exceptionValue, vPC - codeBlock->instructions().begin()); - if (!handler) - return throwError(callFrame, exceptionValue); + if (!handler) { + // Can't use the callframe at this point as the scopechain, etc have + // been released. + return throwError(globalObject->globalExec(), exceptionValue); + } codeBlock = callFrame->codeBlock(); vPC = codeBlock->instructions().begin() + handler->target; @@ -4814,7 +4801,7 @@ JSValue Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* functio } Arguments* arguments = new (functionCallFrame) Arguments(functionCallFrame); - arguments->copyRegisters(); + arguments->copyRegisters(functionCallFrame->globalData()); return arguments; } diff --git a/Source/JavaScriptCore/interpreter/Interpreter.h b/Source/JavaScriptCore/interpreter/Interpreter.h index 753d90e..8f29f60 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.h +++ b/Source/JavaScriptCore/interpreter/Interpreter.h @@ -69,7 +69,7 @@ namespace JSC { friend class JIT; friend class CachedCall; public: - Interpreter(); + Interpreter(JSGlobalData&); RegisterFile& registerFile() { return m_registerFile; } diff --git a/Source/JavaScriptCore/interpreter/RegisterFile.cpp b/Source/JavaScriptCore/interpreter/RegisterFile.cpp index 4c37676..47f0c18 100644 --- a/Source/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/Source/JavaScriptCore/interpreter/RegisterFile.cpp @@ -29,6 +29,8 @@ #include "config.h" #include "RegisterFile.h" +#include "Interpreter.h" +#include "JSGlobalData.h" #include "JSGlobalObject.h" namespace JSC { @@ -59,12 +61,24 @@ void RegisterFile::releaseExcessCapacity() void RegisterFile::setGlobalObject(JSGlobalObject* globalObject) { - m_globalObject = globalObject; + m_globalObject.set(globalObject->globalData(), globalObject, RegisterFile::globalObjectCollectedNotifier()); } -bool RegisterFile::clearGlobalObject(JSGlobalObject* globalObject) +class GlobalObjectNotifier : public Finalizer { +public: + void finalize(Handle<Unknown> value, void*) + { + JSGlobalObject* globalObject = asGlobalObject(value.get()); + globalObject->globalData().interpreter->registerFile().setNumGlobals(0); + } +}; + +Finalizer* RegisterFile::globalObjectCollectedNotifier() { - return m_globalObject.clear(globalObject); + // This will leak alas, but we only create one of them, and it doesn't + // take up any significant amount of space. + static GlobalObjectNotifier* notifier = new GlobalObjectNotifier; + return notifier; } JSGlobalObject* RegisterFile::globalObject() diff --git a/Source/JavaScriptCore/interpreter/RegisterFile.h b/Source/JavaScriptCore/interpreter/RegisterFile.h index e9c6df1..bb42902 100644 --- a/Source/JavaScriptCore/interpreter/RegisterFile.h +++ b/Source/JavaScriptCore/interpreter/RegisterFile.h @@ -112,7 +112,7 @@ namespace JSC { // Allow 8k of excess registers before we start trying to reap the registerfile static const ptrdiff_t maxExcessCapacity = 8 * 1024; - RegisterFile(size_t capacity = defaultCapacity, size_t maxGlobals = defaultMaxGlobals); + RegisterFile(JSGlobalData&, size_t capacity = defaultCapacity, size_t maxGlobals = defaultMaxGlobals); ~RegisterFile(); Register* start() const { return m_start; } @@ -120,7 +120,6 @@ namespace JSC { size_t size() const { return m_end - m_start; } void setGlobalObject(JSGlobalObject*); - bool clearGlobalObject(JSGlobalObject*); JSGlobalObject* globalObject(); bool grow(Register* newEnd); @@ -135,6 +134,8 @@ namespace JSC { static size_t committedByteCount(); static void initializeThreading(); + static Finalizer* globalObjectCollectedNotifier(); + private: void releaseExcessCapacity(); void addToCommittedByteCount(long); @@ -150,16 +151,16 @@ namespace JSC { WeakGCPtr<JSGlobalObject> m_globalObject; // The global object whose vars are currently stored in the register file. }; - inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals) + inline RegisterFile::RegisterFile(JSGlobalData& globalData, size_t capacity, size_t maxGlobals) : m_numGlobals(0) , m_maxGlobals(maxGlobals) , m_start(0) , m_end(0) , m_max(0) + , m_globalObject(globalData, RegisterFile::globalObjectCollectedNotifier()) { ASSERT(maxGlobals && isPageAligned(maxGlobals)); ASSERT(capacity && isPageAligned(capacity)); - size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); m_reservation = PageReservation::reserve(roundUpAllocationSize(bufferLength, commitSize), OSAllocator::JSVMStackPages); void* base = m_reservation.base(); diff --git a/Source/JavaScriptCore/jit/ExecutableAllocator.h b/Source/JavaScriptCore/jit/ExecutableAllocator.h index 57ee054..77a2567 100644 --- a/Source/JavaScriptCore/jit/ExecutableAllocator.h +++ b/Source/JavaScriptCore/jit/ExecutableAllocator.h @@ -47,6 +47,13 @@ #include <sys/cachectl.h> #endif +#if CPU(SH4) && OS(LINUX) +#include <asm/cachectl.h> +#include <asm/unistd.h> +#include <sys/syscall.h> +#include <unistd.h> +#endif + #if OS(WINCE) // From pkfuncs.h (private header file from the Platform Builder) #define CACHE_SYNC_ALL 0x07F @@ -310,6 +317,15 @@ public: IMemCache1_ClearCache(memCache.get(), reinterpret_cast<uint32>(code), size, MEMSPACE_CACHE_FLUSH, MEMSPACE_DATACACHE); IMemCache1_ClearCache(memCache.get(), reinterpret_cast<uint32>(code), size, MEMSPACE_CACHE_INVALIDATE, MEMSPACE_INSTCACHE); } +#elif CPU(SH4) && OS(LINUX) + static void cacheFlush(void* code, size_t size) + { +#ifdef CACHEFLUSH_D_L2 + syscall(__NR_cacheflush, reinterpret_cast<unsigned>(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I | CACHEFLUSH_D_L2); +#else + syscall(__NR_cacheflush, reinterpret_cast<unsigned>(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I); +#endif + } #else #error "The cacheFlush support is missing on this platform." #endif diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h index dc1650d..f98158c 100644 --- a/Source/JavaScriptCore/jit/JIT.h +++ b/Source/JavaScriptCore/jit/JIT.h @@ -36,7 +36,7 @@ #define JIT_CLASS_ALIGNMENT #endif -#define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(actual), static_cast<int>(expected)); +#define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual)); #include "CodeBlock.h" #include "Interpreter.h" @@ -332,8 +332,8 @@ namespace JSC { void compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter, bool isMethodCheck = false); #endif void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, Structure* structure, size_t cachedOffset); - void compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset); - void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset); + void compileGetDirectOffset(JSObject* base, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset); + void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID offset); void compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterID valuePayload, Structure* structure, size_t cachedOffset); // Arithmetic opcode helpers @@ -344,15 +344,11 @@ namespace JSC { #if CPU(X86) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 7; - static const int patchOffsetPutByIdExternalLoad = 13; - static const int patchLengthPutByIdExternalLoad = 3; static const int patchOffsetPutByIdPropertyMapOffset1 = 22; static const int patchOffsetPutByIdPropertyMapOffset2 = 28; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 7; static const int patchOffsetGetByIdBranchToSlowCase = 13; - static const int patchOffsetGetByIdExternalLoad = 13; - static const int patchLengthGetByIdExternalLoad = 3; static const int patchOffsetGetByIdPropertyMapOffset1 = 22; static const int patchOffsetGetByIdPropertyMapOffset2 = 28; static const int patchOffsetGetByIdPutResult = 28; @@ -369,15 +365,11 @@ namespace JSC { #elif CPU(ARM_TRADITIONAL) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 4; - static const int patchOffsetPutByIdExternalLoad = 16; - static const int patchLengthPutByIdExternalLoad = 4; static const int patchOffsetPutByIdPropertyMapOffset1 = 20; static const int patchOffsetPutByIdPropertyMapOffset2 = 28; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 4; static const int patchOffsetGetByIdBranchToSlowCase = 16; - static const int patchOffsetGetByIdExternalLoad = 16; - static const int patchLengthGetByIdExternalLoad = 4; static const int patchOffsetGetByIdPropertyMapOffset1 = 20; static const int patchOffsetGetByIdPropertyMapOffset2 = 28; static const int patchOffsetGetByIdPutResult = 36; @@ -410,18 +402,14 @@ namespace JSC { #elif CPU(ARM_THUMB2) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 10; - static const int patchOffsetPutByIdExternalLoad = 26; - static const int patchLengthPutByIdExternalLoad = 12; - static const int patchOffsetPutByIdPropertyMapOffset1 = 46; - static const int patchOffsetPutByIdPropertyMapOffset2 = 58; + static const int patchOffsetPutByIdPropertyMapOffset1 = 36; + static const int patchOffsetPutByIdPropertyMapOffset2 = 48; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 10; static const int patchOffsetGetByIdBranchToSlowCase = 26; - static const int patchOffsetGetByIdExternalLoad = 26; - static const int patchLengthGetByIdExternalLoad = 12; - static const int patchOffsetGetByIdPropertyMapOffset1 = 46; - static const int patchOffsetGetByIdPropertyMapOffset2 = 58; - static const int patchOffsetGetByIdPutResult = 62; + static const int patchOffsetGetByIdPropertyMapOffset1 = 36; + static const int patchOffsetGetByIdPropertyMapOffset2 = 48; + static const int patchOffsetGetByIdPutResult = 52; #if ENABLE(OPCODE_SAMPLING) #error "OPCODE_SAMPLING is not yet supported" #else @@ -451,17 +439,13 @@ namespace JSC { #elif CPU(MIPS) #if WTF_MIPS_ISA(1) static const int patchOffsetPutByIdStructure = 16; - static const int patchOffsetPutByIdExternalLoad = 48; - static const int patchLengthPutByIdExternalLoad = 20; - static const int patchOffsetPutByIdPropertyMapOffset1 = 68; - static const int patchOffsetPutByIdPropertyMapOffset2 = 84; + static const int patchOffsetPutByIdPropertyMapOffset1 = 56; + static const int patchOffsetPutByIdPropertyMapOffset2 = 72; static const int patchOffsetGetByIdStructure = 16; static const int patchOffsetGetByIdBranchToSlowCase = 48; - static const int patchOffsetGetByIdExternalLoad = 48; - static const int patchLengthGetByIdExternalLoad = 20; - static const int patchOffsetGetByIdPropertyMapOffset1 = 68; - static const int patchOffsetGetByIdPropertyMapOffset2 = 88; - static const int patchOffsetGetByIdPutResult = 108; + static const int patchOffsetGetByIdPropertyMapOffset1 = 56; + static const int patchOffsetGetByIdPropertyMapOffset2 = 76; + static const int patchOffsetGetByIdPutResult = 96; #if ENABLE(OPCODE_SAMPLING) #error "OPCODE_SAMPLING is not yet supported" #else @@ -473,17 +457,13 @@ namespace JSC { static const int patchOffsetMethodCheckPutFunction = 88; #else // WTF_MIPS_ISA(1) static const int patchOffsetPutByIdStructure = 12; - static const int patchOffsetPutByIdExternalLoad = 44; - static const int patchLengthPutByIdExternalLoad = 16; - static const int patchOffsetPutByIdPropertyMapOffset1 = 60; - static const int patchOffsetPutByIdPropertyMapOffset2 = 76; + static const int patchOffsetPutByIdPropertyMapOffset1 = 48; + static const int patchOffsetPutByIdPropertyMapOffset2 = 64; static const int patchOffsetGetByIdStructure = 12; static const int patchOffsetGetByIdBranchToSlowCase = 44; - static const int patchOffsetGetByIdExternalLoad = 44; - static const int patchLengthGetByIdExternalLoad = 16; - static const int patchOffsetGetByIdPropertyMapOffset1 = 60; - static const int patchOffsetGetByIdPropertyMapOffset2 = 76; - static const int patchOffsetGetByIdPutResult = 92; + static const int patchOffsetGetByIdPropertyMapOffset1 = 48; + static const int patchOffsetGetByIdPropertyMapOffset2 = 64; + static const int patchOffsetGetByIdPutResult = 80; #if ENABLE(OPCODE_SAMPLING) #error "OPCODE_SAMPLING is not yet supported" #else @@ -551,21 +531,17 @@ namespace JSC { void compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter, bool isMethodCheck = false); #endif void compileGetDirectOffset(RegisterID base, RegisterID result, Structure* structure, size_t cachedOffset); - void compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset); - void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch); + void compileGetDirectOffset(JSObject* base, RegisterID result, size_t cachedOffset); + void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID offset, RegisterID scratch); void compilePutDirectOffset(RegisterID base, RegisterID value, Structure* structure, size_t cachedOffset); #if CPU(X86_64) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 10; - static const int patchOffsetPutByIdExternalLoad = 20; - static const int patchLengthPutByIdExternalLoad = 4; static const int patchOffsetPutByIdPropertyMapOffset = 31; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 10; static const int patchOffsetGetByIdBranchToSlowCase = 20; - static const int patchOffsetGetByIdExternalLoad = 20; - static const int patchLengthGetByIdExternalLoad = 4; static const int patchOffsetGetByIdPropertyMapOffset = 31; static const int patchOffsetGetByIdPutResult = 31; #if ENABLE(OPCODE_SAMPLING) @@ -581,14 +557,10 @@ namespace JSC { #elif CPU(X86) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 7; - static const int patchOffsetPutByIdExternalLoad = 13; - static const int patchLengthPutByIdExternalLoad = 3; static const int patchOffsetPutByIdPropertyMapOffset = 22; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 7; static const int patchOffsetGetByIdBranchToSlowCase = 13; - static const int patchOffsetGetByIdExternalLoad = 13; - static const int patchLengthGetByIdExternalLoad = 3; static const int patchOffsetGetByIdPropertyMapOffset = 22; static const int patchOffsetGetByIdPutResult = 22; #if ENABLE(OPCODE_SAMPLING) @@ -604,14 +576,10 @@ namespace JSC { #elif CPU(ARM_THUMB2) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 10; - static const int patchOffsetPutByIdExternalLoad = 26; - static const int patchLengthPutByIdExternalLoad = 12; static const int patchOffsetPutByIdPropertyMapOffset = 46; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 10; static const int patchOffsetGetByIdBranchToSlowCase = 26; - static const int patchOffsetGetByIdExternalLoad = 26; - static const int patchLengthGetByIdExternalLoad = 12; static const int patchOffsetGetByIdPropertyMapOffset = 46; static const int patchOffsetGetByIdPutResult = 50; #if ENABLE(OPCODE_SAMPLING) @@ -627,14 +595,10 @@ namespace JSC { #elif CPU(ARM_TRADITIONAL) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 4; - static const int patchOffsetPutByIdExternalLoad = 16; - static const int patchLengthPutByIdExternalLoad = 4; static const int patchOffsetPutByIdPropertyMapOffset = 20; // These architecture specific value are used to enable patching - see comment on op_get_by_id. static const int patchOffsetGetByIdStructure = 4; static const int patchOffsetGetByIdBranchToSlowCase = 16; - static const int patchOffsetGetByIdExternalLoad = 16; - static const int patchLengthGetByIdExternalLoad = 4; static const int patchOffsetGetByIdPropertyMapOffset = 20; static const int patchOffsetGetByIdPutResult = 28; #if ENABLE(OPCODE_SAMPLING) @@ -666,13 +630,9 @@ namespace JSC { #elif CPU(MIPS) #if WTF_MIPS_ISA(1) static const int patchOffsetPutByIdStructure = 16; - static const int patchOffsetPutByIdExternalLoad = 48; - static const int patchLengthPutByIdExternalLoad = 20; static const int patchOffsetPutByIdPropertyMapOffset = 68; static const int patchOffsetGetByIdStructure = 16; static const int patchOffsetGetByIdBranchToSlowCase = 48; - static const int patchOffsetGetByIdExternalLoad = 48; - static const int patchLengthGetByIdExternalLoad = 20; static const int patchOffsetGetByIdPropertyMapOffset = 68; static const int patchOffsetGetByIdPutResult = 88; #if ENABLE(OPCODE_SAMPLING) @@ -686,13 +646,9 @@ namespace JSC { static const int patchOffsetMethodCheckPutFunction = 88; #else // WTF_MIPS_ISA(1) static const int patchOffsetPutByIdStructure = 12; - static const int patchOffsetPutByIdExternalLoad = 44; - static const int patchLengthPutByIdExternalLoad = 16; static const int patchOffsetPutByIdPropertyMapOffset = 60; static const int patchOffsetGetByIdStructure = 12; static const int patchOffsetGetByIdBranchToSlowCase = 44; - static const int patchOffsetGetByIdExternalLoad = 44; - static const int patchLengthGetByIdExternalLoad = 16; static const int patchOffsetGetByIdPropertyMapOffset = 60; static const int patchOffsetGetByIdPutResult = 76; #if ENABLE(OPCODE_SAMPLING) diff --git a/Source/JavaScriptCore/jit/JITCall.cpp b/Source/JavaScriptCore/jit/JITCall.cpp index fdd0d47..524e576 100644 --- a/Source/JavaScriptCore/jit/JITCall.cpp +++ b/Source/JavaScriptCore/jit/JITCall.cpp @@ -49,7 +49,7 @@ namespace JSC { void JIT::compileOpCallInitializeCallFrame() { store32(regT1, Address(callFrameRegister, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register)))); - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT3); // newScopeChain + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT3); // newScopeChain storePtr(regT0, Address(callFrameRegister, RegisterFile::Callee * static_cast<int>(sizeof(Register)))); storePtr(regT3, Address(callFrameRegister, RegisterFile::ScopeChain * static_cast<int>(sizeof(Register)))); } @@ -198,7 +198,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned ca // Fast version of stack frame initialization, directly relative to edi. // Note that this omits to set up RegisterFile::CodeBlock, which is set in the callee - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT1); // newScopeChain + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT1); // newScopeChain store32(Imm32(argCount), Address(callFrameRegister, (registerOffset + RegisterFile::ArgumentCount) * static_cast<int>(sizeof(Register)))); storePtr(callFrameRegister, Address(callFrameRegister, (registerOffset + RegisterFile::CallerFrame) * static_cast<int>(sizeof(Register)))); diff --git a/Source/JavaScriptCore/jit/JITCall32_64.cpp b/Source/JavaScriptCore/jit/JITCall32_64.cpp index daf5d2d..ac231a9 100644 --- a/Source/JavaScriptCore/jit/JITCall32_64.cpp +++ b/Source/JavaScriptCore/jit/JITCall32_64.cpp @@ -50,7 +50,7 @@ void JIT::compileOpCallInitializeCallFrame() { // regT0 holds callee, regT1 holds argCount store32(regT1, Address(callFrameRegister, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register)))); - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT3); // scopeChain + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT3); // scopeChain storePtr(regT0, Address(callFrameRegister, RegisterFile::Callee * static_cast<int>(sizeof(Register)))); // callee storePtr(regT3, Address(callFrameRegister, RegisterFile::ScopeChain * static_cast<int>(sizeof(Register)))); // scopeChain } @@ -107,12 +107,6 @@ void JIT::emit_op_ret(Instruction* currentInstruction) { unsigned dst = currentInstruction[1].u.operand; - // We could JIT generate the deref, only calling out to C when the refcount hits zero. - if (m_codeBlock->needsFullScopeChain()) { - Jump activationNotCreated = branch32(Equal, tagFor(m_codeBlock->activationRegister()), Imm32(JSValue::EmptyValueTag)); - JITStubCall(this, cti_op_ret_scopeChain).call(); - activationNotCreated.link(this); - } emitLoad(dst, regT1, regT0); emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT2); emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister); @@ -126,13 +120,6 @@ void JIT::emit_op_ret_object_or_this(Instruction* currentInstruction) unsigned result = currentInstruction[1].u.operand; unsigned thisReg = currentInstruction[2].u.operand; - // We could JIT generate the deref, only calling out to C when the refcount hits zero. - if (m_codeBlock->needsFullScopeChain()) { - Jump activationNotCreated = branch32(Equal, tagFor(m_codeBlock->activationRegister()), Imm32(JSValue::EmptyValueTag)); - JITStubCall(this, cti_op_ret_scopeChain).call(); - activationNotCreated.link(this); - } - emitLoad(result, regT1, regT0); Jump notJSCell = branch32(NotEqual, regT1, Imm32(JSValue::CellTag)); loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2); @@ -282,7 +269,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned ca END_UNINTERRUPTED_SEQUENCE(sequenceOpCall); addSlowCase(jumpToSlow); - ASSERT(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow) == patchOffsetOpCallCompareToJump); + ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow), patchOffsetOpCallCompareToJump); m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck; addSlowCase(branch32(NotEqual, regT1, Imm32(JSValue::CellTag))); @@ -291,7 +278,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned ca // Fast version of stack frame initialization, directly relative to edi. // Note that this omits to set up RegisterFile::CodeBlock, which is set in the callee - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT2); + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_scopeChain)), regT2); store32(Imm32(argCount), Address(callFrameRegister, (registerOffset + RegisterFile::ArgumentCount) * static_cast<int>(sizeof(Register)))); storePtr(callFrameRegister, Address(callFrameRegister, (registerOffset + RegisterFile::CallerFrame) * static_cast<int>(sizeof(Register)))); diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp index f458ea2..fc769db 100644 --- a/Source/JavaScriptCore/jit/JITOpcodes.cpp +++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp @@ -330,9 +330,6 @@ void JIT::emit_op_mov(Instruction* currentInstruction) void JIT::emit_op_end(Instruction* currentInstruction) { - if (m_codeBlock->needsFullScopeChain()) - JITStubCall(this, cti_op_end).call(); - ASSERT(returnValueRegister != callFrameRegister); emitGetVirtualRegister(currentInstruction[1].u.operand, returnValueRegister); restoreReturnAddressBeforeReturn(Address(callFrameRegister, RegisterFile::ReturnPC * static_cast<int>(sizeof(Register)))); @@ -543,12 +540,6 @@ void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction) void JIT::emit_op_ret(Instruction* currentInstruction) { - // We could JIT generate the deref, only calling out to C when the refcount hits zero. - if (m_codeBlock->needsFullScopeChain()) { - Jump activationNotCreated = branchTestPtr(Zero, addressFor(m_codeBlock->activationRegister())); - JITStubCall(this, cti_op_ret_scopeChain).call(); - activationNotCreated.link(this); - } ASSERT(callFrameRegister != regT1); ASSERT(regT1 != returnValueRegister); ASSERT(returnValueRegister != callFrameRegister); @@ -569,13 +560,6 @@ void JIT::emit_op_ret(Instruction* currentInstruction) void JIT::emit_op_ret_object_or_this(Instruction* currentInstruction) { - // We could JIT generate the deref, only calling out to C when the refcount hits zero. - if (m_codeBlock->needsFullScopeChain()) { - Jump activationNotCreated = branchTestPtr(Zero, addressFor(m_codeBlock->activationRegister())); - JITStubCall(this, cti_op_ret_scopeChain).call(); - activationNotCreated.link(this); - } - ASSERT(callFrameRegister != regT1); ASSERT(regT1 != returnValueRegister); ASSERT(returnValueRegister != callFrameRegister); @@ -689,7 +673,7 @@ void JIT::emit_op_resolve_global(Instruction* currentInstruction, bool) // Load cached property // Assume that the global object always uses external storage. - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_externalStorage)), regT0); + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_propertyStorage)), regT0); load32(offsetAddr, regT1); loadPtr(BaseIndex(regT0, regT1, ScalePtr), regT0); emitPutVirtualRegister(currentInstruction[1].u.operand); diff --git a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp index dda74c8..0c8402b 100644 --- a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp +++ b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp @@ -448,8 +448,6 @@ void JIT::emit_op_mov(Instruction* currentInstruction) void JIT::emit_op_end(Instruction* currentInstruction) { - if (m_codeBlock->needsFullScopeChain()) - JITStubCall(this, cti_op_end).call(); ASSERT(returnValueRegister != callFrameRegister); emitLoad(currentInstruction[1].u.operand, regT1, regT0); restoreReturnAddressBeforeReturn(Address(callFrameRegister, RegisterFile::ReturnPC * static_cast<int>(sizeof(Register)))); @@ -804,7 +802,7 @@ void JIT::emit_op_resolve_global(Instruction* currentInstruction, bool dynamic) addSlowCase(branchPtr(NotEqual, regT1, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)))); // Load property. - loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_externalStorage)), regT2); + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSGlobalObject, m_propertyStorage)), regT2); load32(offsetAddr, regT3); load32(BaseIndex(regT2, regT3, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT0); // payload load32(BaseIndex(regT2, regT3, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), regT1); // tag diff --git a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp index 1b95eec..b497319 100644 --- a/Source/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/Source/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -138,18 +138,10 @@ void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCas stubCall.call(dst); } -void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID structure, RegisterID offset, RegisterID scratch) +void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID offset, RegisterID scratch) { - ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); - ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); - - Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); - loadPtr(BaseIndex(base, offset, ScalePtr, OBJECT_OFFSETOF(JSObject, m_inlineStorage)), result); - Jump finishedLoad = jump(); - notUsingInlineStorage.link(this); - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), scratch); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), scratch); loadPtr(BaseIndex(scratch, offset, ScalePtr, 0), result); - finishedLoad.link(this); } void JIT::emit_op_get_by_pname(Instruction* currentInstruction) @@ -172,7 +164,7 @@ void JIT::emit_op_get_by_pname(Instruction* currentInstruction) load32(addressFor(i), regT3); sub32(Imm32(1), regT3); addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); - compileGetDirectOffset(regT0, regT0, regT2, regT3, regT1); + compileGetDirectOffset(regT0, regT0, regT3, regT1); emitPutVirtualRegister(dst, regT0); } @@ -427,11 +419,7 @@ void JIT::compileGetByIdHotPath(int, int baseVReg, Identifier*, unsigned propert ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure); ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureCheck), patchOffsetGetByIdBranchToSlowCase) - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); - Label externalLoadComplete(this); - ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetGetByIdExternalLoad); - ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthGetByIdExternalLoad); - + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT0); DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0); ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel), patchOffsetGetByIdPropertyMapOffset); @@ -507,12 +495,7 @@ void JIT::emit_op_put_by_id(Instruction* currentInstruction) addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure); - // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); - Label externalLoadComplete(this); - ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetPutByIdExternalLoad); - ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthPutByIdExternalLoad); - + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT0); DataLabel32 displacementLabel = storePtrWithAddressOffsetPatch(regT1, Address(regT0, patchGetByIdDefaultOffset)); END_UNINTERRUPTED_SEQUENCE(sequencePutById); @@ -547,9 +530,9 @@ void JIT::compilePutDirectOffset(RegisterID base, RegisterID value, Structure* s { int offset = cachedOffset * sizeof(JSValue); if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage); + offset += JSObject::offsetOfInlineStorage(); else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), base); storePtr(value, Address(base, offset)); } @@ -557,22 +540,18 @@ void JIT::compilePutDirectOffset(RegisterID base, RegisterID value, Structure* s void JIT::compileGetDirectOffset(RegisterID base, RegisterID result, Structure* structure, size_t cachedOffset) { int offset = cachedOffset * sizeof(JSValue); - if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage); - else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); - loadPtr(Address(base, offset), result); + if (structure->isUsingInlineStorage()) { + offset += JSObject::offsetOfInlineStorage(); + loadPtr(Address(base, offset), result); + } else { + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), result); + loadPtr(Address(result, offset), result); + } } -void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID result, size_t cachedOffset) +void JIT::compileGetDirectOffset(JSObject* base, RegisterID result, size_t cachedOffset) { - if (base->isUsingInlineStorage()) - loadPtr(static_cast<void*>(&base->m_inlineStorage[cachedOffset]), result); - else { - PropertyStorage* protoPropertyStorage = &base->m_externalStorage; - loadPtr(static_cast<void*>(protoPropertyStorage), temp); - loadPtr(Address(temp, cachedOffset * sizeof(JSValue)), result); - } + loadPtr(static_cast<void*>(&base->m_propertyStorage[cachedOffset]), result); } void JIT::testPrototype(JSValue prototype, JumpList& failureCases) @@ -668,11 +647,6 @@ void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, St int offset = sizeof(JSValue) * cachedOffset; - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad)); - // Patch the offset into the propoerty map to load from, then patch the Structure to look for. repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetGetByIdStructure), structure); repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset), offset); @@ -708,11 +682,6 @@ void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, int offset = sizeof(JSValue) * cachedOffset; - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetPutByIdExternalLoad)); - // Patch the offset into the propoerty map to load from, then patch the Structure to look for. repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetPutByIdStructure), structure); repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset), offset); @@ -779,7 +748,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str // Checks out okay! if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT1, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -794,7 +763,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT0, cachedOffset); Jump success = jump(); LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0); @@ -831,11 +800,7 @@ void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Polymorphic bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - if (!structure->isUsingInlineStorage()) { - move(regT0, regT1); - compileGetDirectOffset(regT1, regT1, structure, cachedOffset); - } else - compileGetDirectOffset(regT0, regT1, structure, cachedOffset); + compileGetDirectOffset(regT0, regT1, structure, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -905,7 +870,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT1, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -920,7 +885,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT0, cachedOffset); Jump success = jump(); @@ -975,7 +940,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT1, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -990,7 +955,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT0, cachedOffset); Jump success = jump(); LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0); @@ -1045,7 +1010,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT1, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -1060,7 +1025,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT0, cachedOffset); Jump success = jump(); LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0); diff --git a/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp b/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp index 710a155..3562200 100644 --- a/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp +++ b/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp @@ -225,9 +225,9 @@ void JIT::emit_op_method_check(Instruction* currentInstruction) move(Imm32(JSValue::CellTag), regT1); Jump match = jump(); - ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); - ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct); - ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoStructureToCompare), patchOffsetMethodCheckProtoStruct); + ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction); // Link the failure cases here. structureCheck.link(this); @@ -431,21 +431,17 @@ void JIT::compileGetByIdHotPath() DataLabelPtr structureToCompare; Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); addSlowCase(structureCheck); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); - ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase); - - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT2); - Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureCheck), patchOffsetGetByIdBranchToSlowCase); + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT2); DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload - ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel1), patchOffsetGetByIdPropertyMapOffset1); DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag - ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel2), patchOffsetGetByIdPropertyMapOffset2); Label putResult(this); - ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, putResult), patchOffsetGetByIdPutResult); END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); } @@ -481,7 +477,7 @@ void JIT::compileGetByIdSlowCase(int dst, int base, Identifier* ident, Vector<Sl END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); - ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall); + ASSERT_JIT_OFFSET(differenceBetween(coldPathBegin, call), patchOffsetGetByIdSlowCaseCall); // Track the location of the call; this will be used to recover patch information. m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].callReturnLocation = call; @@ -510,21 +506,16 @@ void JIT::emit_op_put_by_id(Instruction* currentInstruction) // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. DataLabelPtr structureToCompare; addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); - ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); - - // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. - Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); - Label externalLoadComplete(this); - ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad); - ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure); + loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT0); DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag END_UNINTERRUPTED_SEQUENCE(sequencePutById); - ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1); - ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel1), patchOffsetPutByIdPropertyMapOffset1); + ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel2), patchOffsetPutByIdPropertyMapOffset2); } void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) @@ -552,9 +543,9 @@ void JIT::compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterI { int offset = cachedOffset; if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); + offset += JSObject::offsetOfInlineStorage() / sizeof(Register); else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), base); emitStore(offset, valueTag, valuePayload, base); } @@ -562,27 +553,20 @@ void JIT::compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterI void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, Structure* structure, size_t cachedOffset) { int offset = cachedOffset; - if (structure->isUsingInlineStorage()) - offset += OBJECT_OFFSETOF(JSObject, m_inlineStorage) / sizeof(Register); - else - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); - emitLoad(offset, resultTag, resultPayload, base); + if (structure->isUsingInlineStorage()) { + offset += JSObject::offsetOfInlineStorage() / sizeof(Register); + emitLoad(offset, resultTag, resultPayload, base); + } else { + RegisterID temp = resultPayload; + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), temp); + emitLoad(offset, resultTag, resultPayload, temp); + } } -void JIT::compileGetDirectOffset(JSObject* base, RegisterID temp, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset) +void JIT::compileGetDirectOffset(JSObject* base, RegisterID resultTag, RegisterID resultPayload, size_t cachedOffset) { - if (base->isUsingInlineStorage()) { - load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload), resultPayload); - load32(reinterpret_cast<char*>(&base->m_inlineStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag), resultTag); - return; - } - - size_t offset = cachedOffset * sizeof(JSValue); - - PropertyStorage* protoPropertyStorage = &base->m_externalStorage; - loadPtr(static_cast<void*>(protoPropertyStorage), temp); - load32(Address(temp, offset + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); - load32(Address(temp, offset + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); + load32(reinterpret_cast<char*>(&base->m_propertyStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload), resultPayload); + load32(reinterpret_cast<char*>(&base->m_propertyStorage[cachedOffset]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag), resultTag); } void JIT::testPrototype(JSValue prototype, JumpList& failureCases) @@ -683,12 +667,7 @@ void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, St repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_self_fail)); int offset = sizeof(JSValue) * cachedOffset; - - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad)); - + // Patch the offset into the propoerty map to load from, then patch the Structure to look for. repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetGetByIdStructure), structure); repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset1), offset + OBJECT_OFFSETOF(JSValue, u.asBits.payload)); // payload @@ -724,12 +703,7 @@ void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic)); int offset = sizeof(JSValue) * cachedOffset; - - // If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load - // and makes the subsequent load's offset automatically correct - if (structure->isUsingInlineStorage()) - repatchBuffer.repatchLoadPtrToLEA(stubInfo->hotPathBegin.instructionAtOffset(patchOffsetPutByIdExternalLoad)); - + // Patch the offset into the propoerty map to load from, then patch the Structure to look for. repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetPutByIdStructure), structure); repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset1), offset + OBJECT_OFFSETOF(JSValue, u.asBits.payload)); // payload @@ -799,7 +773,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str // Checks out okay! if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT2, regT2, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT2, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -814,7 +788,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); Jump success = jump(); @@ -856,11 +830,7 @@ void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Polymorphic bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - if (!structure->isUsingInlineStorage()) { - move(regT0, regT1); - compileGetDirectOffset(regT1, regT2, regT1, structure, cachedOffset); - } else - compileGetDirectOffset(regT0, regT2, regT1, structure, cachedOffset); + compileGetDirectOffset(regT0, regT2, regT1, structure, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -930,7 +900,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT2, regT2, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT2, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -945,7 +915,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); Jump success = jump(); @@ -999,7 +969,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT2, regT2, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT2, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -1014,7 +984,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); Jump success = jump(); @@ -1069,7 +1039,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str bool needsStubLink = false; if (slot.cachedPropertyType() == PropertySlot::Getter) { needsStubLink = true; - compileGetDirectOffset(protoObject, regT2, regT2, regT1, cachedOffset); + compileGetDirectOffset(protoObject, regT2, regT1, cachedOffset); JITStubCall stubCall(this, cti_op_get_by_id_getter_stub); stubCall.addArgument(regT1); stubCall.addArgument(regT0); @@ -1084,7 +1054,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str stubCall.addArgument(ImmPtr(stubInfo->callReturnLocation.executableAddress())); stubCall.call(); } else - compileGetDirectOffset(protoObject, regT2, regT1, regT0, cachedOffset); + compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset); Jump success = jump(); LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0); @@ -1117,21 +1087,13 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str #endif // !ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) -void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID structure, RegisterID offset) +void JIT::compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID offset) { - ASSERT(sizeof(((Structure*)0)->m_propertyStorageCapacity) == sizeof(int32_t)); - ASSERT(sizeof(JSObject::inlineStorageCapacity) == sizeof(int32_t)); ASSERT(sizeof(JSValue) == 8); - Jump notUsingInlineStorage = branch32(NotEqual, Address(structure, OBJECT_OFFSETOF(Structure, m_propertyStorageCapacity)), Imm32(JSObject::inlineStorageCapacity)); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); - loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSObject, m_inlineStorage) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); - Jump finishedLoad = jump(); - notUsingInlineStorage.link(this); - loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_externalStorage)), base); + loadPtr(Address(base, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), base); loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayload); loadPtr(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTag); - finishedLoad.link(this); } void JIT::emit_op_get_by_pname(Instruction* currentInstruction) @@ -1156,7 +1118,7 @@ void JIT::emit_op_get_by_pname(Instruction* currentInstruction) load32(addressFor(i), regT3); sub32(Imm32(1), regT3); addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots)))); - compileGetDirectOffset(regT2, regT1, regT0, regT0, regT3); + compileGetDirectOffset(regT2, regT1, regT0, regT3); emitStore(dst, regT1, regT0); map(m_bytecodeOffset + OPCODE_LENGTH(op_get_by_pname), dst, regT1, regT0); diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp index 74f505f..95bf52c 100644 --- a/Source/JavaScriptCore/jit/JITStubs.cpp +++ b/Source/JavaScriptCore/jit/JITStubs.cpp @@ -40,7 +40,6 @@ #include "Debugger.h" #include "ExceptionHelpers.h" #include "GetterSetter.h" -#include "GlobalEvalFunction.h" #include "JIT.h" #include "JSActivation.h" #include "JSArray.h" @@ -717,7 +716,7 @@ JITThunks::JITThunks(JSGlobalData* globalData) ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == THUNK_RETURN_ADDRESS_OFFSET); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, registerFile) == REGISTER_FILE_OFFSET); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, callFrame) == CALLFRAME_OFFSET); - ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, exception) == EXCEPTION_OFFSET); + ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, unused1) == EXCEPTION_OFFSET); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, enabledProfilerReference) == ENABLE_PROFILER_REFERENCE_OFFSET); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, globalData) == GLOBAL_DATA_OFFSET); @@ -1175,8 +1174,8 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_create_this) if (proto.isObject()) structure = asObject(proto)->inheritorID(); else - structure = constructor->scope().node()->globalObject->emptyObjectStructure(); - JSValue result = new (&callFrame->globalData()) JSObject(structure); + structure = constructor->scope()->globalObject->emptyObjectStructure(); + JSValue result = constructEmptyObject(callFrame, structure); return JSValue::encode(result); } @@ -1205,15 +1204,6 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_convert_this_strict) return JSValue::encode(result); } -DEFINE_STUB_FUNCTION(void, op_end) -{ - STUB_INIT_STACK_FRAME(stackFrame); - - ScopeChainNode* scopeChain = stackFrame.callFrame->scopeChain(); - ASSERT(scopeChain->refCount > 1); - scopeChain->deref(); -} - DEFINE_STUB_FUNCTION(EncodedJSValue, op_add) { STUB_INIT_STACK_FRAME(stackFrame); @@ -1848,7 +1838,7 @@ DEFINE_STUB_FUNCTION(void*, op_call_jitCompile) JSFunction* function = asFunction(stackFrame.callFrame->callee()); ASSERT(!function->isHostFunction()); FunctionExecutable* executable = function->jsExecutable(); - ScopeChainNode* callDataScopeChain = function->scope().node(); + ScopeChainNode* callDataScopeChain = function->scope(); JSObject* error = executable->compileForCall(stackFrame.callFrame, callDataScopeChain); if (error) { stackFrame.callFrame->globalData().exception = error; @@ -1869,7 +1859,7 @@ DEFINE_STUB_FUNCTION(void*, op_construct_jitCompile) JSFunction* function = asFunction(stackFrame.callFrame->callee()); ASSERT(!function->isHostFunction()); FunctionExecutable* executable = function->jsExecutable(); - ScopeChainNode* callDataScopeChain = function->scope().node(); + ScopeChainNode* callDataScopeChain = function->scope(); JSObject* error = executable->compileForConstruct(stackFrame.callFrame, callDataScopeChain); if (error) { stackFrame.callFrame->globalData().exception = error; @@ -1930,7 +1920,7 @@ DEFINE_STUB_FUNCTION(void*, op_call_arityCheck) callFrame->setCallerFrame(oldCallFrame); callFrame->setArgumentCountIncludingThis(argCount); callFrame->setCallee(callee); - callFrame->setScopeChain(callee->scope().node()); + callFrame->setScopeChain(callee->scope()); callFrame->setReturnPC(pc.value()); ASSERT((void*)callFrame <= stackFrame.registerFile->end()); @@ -1989,7 +1979,7 @@ DEFINE_STUB_FUNCTION(void*, op_construct_arityCheck) callFrame->setCallerFrame(oldCallFrame); callFrame->setArgumentCountIncludingThis(argCount); callFrame->setCallee(callee); - callFrame->setScopeChain(callee->scope().node()); + callFrame->setScopeChain(callee->scope()); callFrame->setReturnPC(pc.value()); ASSERT((void*)callFrame <= stackFrame.registerFile->end()); @@ -2010,7 +2000,7 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkCall) codePtr = executable->generatedJITCodeForCall().addressForCall(); else { FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); - JSObject* error = functionExecutable->compileForCall(callFrame, callee->scope().node()); + JSObject* error = functionExecutable->compileForCall(callFrame, callee->scope()); if (error) { callFrame->globalData().exception = createStackOverflowError(callFrame); return 0; @@ -2044,7 +2034,7 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkConstruct) codePtr = executable->generatedJITCodeForConstruct().addressForCall(); else { FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); - JSObject* error = functionExecutable->compileForConstruct(callFrame, callee->scope().node()); + JSObject* error = functionExecutable->compileForConstruct(callFrame, callee->scope()); if (error) { throwStackOverflowError(callFrame, stackFrame.globalData, ReturnAddressPtr(callFrame->returnPC()), STUB_RETURN_ADDRESS); return 0; @@ -2071,7 +2061,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_push_activation) STUB_INIT_STACK_FRAME(stackFrame); JSActivation* activation = new (stackFrame.globalData) JSActivation(stackFrame.callFrame, static_cast<FunctionExecutable*>(stackFrame.callFrame->codeBlock()->ownerExecutable())); - stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->copy()->push(activation)); + stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->push(activation)); return activation; } @@ -2139,12 +2129,12 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_activation) if (!activationValue) { if (JSValue v = stackFrame.args[1].jsValue()) { if (!stackFrame.callFrame->codeBlock()->isStrictMode()) - asArguments(v)->copyRegisters(); + asArguments(v)->copyRegisters(*stackFrame.globalData); } return; } JSActivation* activation = asActivation(stackFrame.args[0].jsValue()); - activation->copyRegisters(); + activation->copyRegisters(*stackFrame.globalData); if (JSValue v = stackFrame.args[1].jsValue()) { if (!stackFrame.callFrame->codeBlock()->isStrictMode()) asArguments(v)->setActivation(*stackFrame.globalData, activation); @@ -2156,7 +2146,7 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_arguments) STUB_INIT_STACK_FRAME(stackFrame); ASSERT(stackFrame.callFrame->codeBlock()->usesArguments() && !stackFrame.callFrame->codeBlock()->needsFullScopeChain()); - asArguments(stackFrame.args[0].jsValue())->copyRegisters(); + asArguments(stackFrame.args[0].jsValue())->copyRegisters(*stackFrame.globalData); } DEFINE_STUB_FUNCTION(void, op_profile_will_call) @@ -2175,14 +2165,6 @@ DEFINE_STUB_FUNCTION(void, op_profile_did_call) (*stackFrame.enabledProfilerReference)->didExecute(stackFrame.callFrame, stackFrame.args[0].jsValue()); } -DEFINE_STUB_FUNCTION(void, op_ret_scopeChain) -{ - STUB_INIT_STACK_FRAME(stackFrame); - - ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain()); - stackFrame.callFrame->scopeChain()->deref(); -} - DEFINE_STUB_FUNCTION(JSObject*, op_new_array) { STUB_INIT_STACK_FRAME(stackFrame); @@ -2525,7 +2507,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs) stackFrame.globalData->exception = createInvalidParamError(callFrame, "Function.prototype.apply", arguments); VM_THROW_EXCEPTION(); } - if (asObject(arguments)->classInfo() == &Arguments::info) { + if (asObject(arguments)->classInfo() == &Arguments::s_info) { Arguments* argsObject = asArguments(arguments); argCount = argsObject->numProvidedArguments(callFrame); argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments)); @@ -2547,7 +2529,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs) VM_THROW_EXCEPTION(); } array->copyToRegisters(callFrame, callFrame->registers() + argsOffset, argCount); - } else if (asObject(arguments)->inherits(&JSArray::info)) { + } else if (asObject(arguments)->inherits(&JSArray::s_info)) { JSObject* argObject = asObject(arguments); argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame); argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments)); @@ -3009,7 +2991,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_new_func_exp) */ if (!function->name().isNull()) { JSStaticScopeObject* functionScopeObject = new (callFrame) JSStaticScopeObject(callFrame, function->name(), func, ReadOnly | DontDelete); - func->scope().push(functionScopeObject); + func->setScope(callFrame->globalData(), func->scope()->push(functionScopeObject)); } return func; @@ -3119,7 +3101,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_eval) Register* newCallFrame = callFrame->registers() + registerOffset; Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; JSValue baseValue = argv[0].jsValue(); - JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject; + JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject.get(); if (baseValue == globalObject && funcVal == globalObject->evalFunction()) { JSValue result = interpreter->callEval(callFrame, registerFile, argv, argCount, registerOffset); diff --git a/Source/JavaScriptCore/jit/JITStubs.h b/Source/JavaScriptCore/jit/JITStubs.h index 66edf45..65f6a55 100644 --- a/Source/JavaScriptCore/jit/JITStubs.h +++ b/Source/JavaScriptCore/jit/JITStubs.h @@ -390,7 +390,6 @@ extern "C" { void JIT_STUB cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_put_getter(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_put_setter(STUB_ARGS_DECLARATION); - void JIT_STUB cti_op_ret_scopeChain(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_tear_off_activation(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_tear_off_arguments(STUB_ARGS_DECLARATION); void JIT_STUB cti_op_throw_reference_error(STUB_ARGS_DECLARATION); diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp index 912b51a..1873659 100644 --- a/Source/JavaScriptCore/jsc.cpp +++ b/Source/JavaScriptCore/jsc.cpp @@ -31,7 +31,6 @@ #include "JSFunction.h" #include "JSLock.h" #include "JSString.h" -#include "PrototypeFunction.h" #include "SamplingTool.h" #include <math.h> #include <stdio.h> @@ -151,19 +150,19 @@ ASSERT_CLASS_FITS_IN_CELL(GlobalObject); GlobalObject::GlobalObject(const Vector<UString>& arguments) : JSGlobalObject() { - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "print"), functionPrint)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 0, Identifier(globalExec(), "quit"), functionQuit)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 0, Identifier(globalExec(), "gc"), functionGC)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "version"), functionVersion)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "run"), functionRun)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "load"), functionLoad)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "checkSyntax"), functionCheckSyntax)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 0, Identifier(globalExec(), "readline"), functionReadline)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "print"), functionPrint)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 0, Identifier(globalExec(), "quit"), functionQuit)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 0, Identifier(globalExec(), "gc"), functionGC)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "version"), functionVersion)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "run"), functionRun)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "load"), functionLoad)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "checkSyntax"), functionCheckSyntax)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 0, Identifier(globalExec(), "readline"), functionReadline)); #if ENABLE(SAMPLING_FLAGS) - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "setSamplingFlags"), functionSetSamplingFlags)); - putDirectFunction(globalExec(), new (globalExec()) NativeFunctionWrapper(globalExec(), this, prototypeFunctionStructure(), 1, Identifier(globalExec(), "clearSamplingFlags"), functionClearSamplingFlags)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "setSamplingFlags"), functionSetSamplingFlags)); + putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "clearSamplingFlags"), functionClearSamplingFlags)); #endif JSObject* array = constructEmptyArray(globalExec()); @@ -325,7 +324,15 @@ int jscmain(int argc, char** argv, JSGlobalData*); int main(int argc, char** argv) { -#if defined(_DEBUG) && OS(WINDOWS) +#if OS(WINDOWS) +#if !OS(WINCE) + // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for + // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the + // error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>. + ::SetErrorMode(0); +#endif + +#if defined(_DEBUG) _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); @@ -334,7 +341,6 @@ int main(int argc, char** argv) _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); #endif -#if COMPILER(MSVC) && !OS(WINCE) timeBeginPeriod(1); #endif diff --git a/Source/JavaScriptCore/jsc.pro b/Source/JavaScriptCore/jsc.pro index b4db812..a550c48 100644 --- a/Source/JavaScriptCore/jsc.pro +++ b/Source/JavaScriptCore/jsc.pro @@ -15,14 +15,9 @@ unix:!mac:!symbian:CONFIG += link_pkgconfig QMAKE_RPATHDIR += $$OUTPUT_DIR/lib -!CONFIG(release, debug|release) { - OBJECTS_DIR = obj/debug -} else { # Release - OBJECTS_DIR = obj/release -} OBJECTS_DIR_WTR = $$OBJECTS_DIR$${QMAKE_DIR_SEP} include($$PWD/JavaScriptCore.pri) -addJavaScriptCoreLib(.) +prependJavaScriptCoreLib(.) symbian { TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices diff --git a/Source/JavaScriptCore/parser/ASTBuilder.h b/Source/JavaScriptCore/parser/ASTBuilder.h index 0e18d1d..9ab0f9d 100644 --- a/Source/JavaScriptCore/parser/ASTBuilder.h +++ b/Source/JavaScriptCore/parser/ASTBuilder.h @@ -76,9 +76,9 @@ public: ASTBuilder(JSGlobalData* globalData, Lexer* lexer) : m_globalData(globalData) , m_lexer(lexer) + , m_scope(globalData) , m_evalCount(0) { - m_scopes.append(Scope(globalData)); } struct BinaryExprContext { @@ -115,10 +115,10 @@ public: JSC::SourceElements* createSourceElements() { return new (m_globalData) JSC::SourceElements(m_globalData); } - ParserArenaData<DeclarationStacks::VarStack>* varDeclarations() { return m_scopes.last().m_varDeclarations; } - ParserArenaData<DeclarationStacks::FunctionStack>* funcDeclarations() { return m_scopes.last().m_funcDeclarations; } - int features() const { return m_scopes.last().m_features; } - int numConstants() const { return m_scopes.last().m_numConstants; } + ParserArenaData<DeclarationStacks::VarStack>* varDeclarations() { return m_scope.m_varDeclarations; } + ParserArenaData<DeclarationStacks::FunctionStack>* funcDeclarations() { return m_scope.m_funcDeclarations; } + int features() const { return m_scope.m_features; } + int numConstants() const { return m_scope.m_numConstants; } void appendToComma(CommaNode* commaNode, ExpressionNode* expr) { commaNode->append(expr); } @@ -300,7 +300,7 @@ public: FuncDeclNode* decl = new (m_globalData) FuncDeclNode(m_globalData, *name, body, m_lexer->sourceCode(openBracePos, closeBracePos, bodyStartLine), parameters); if (*name == m_globalData->propertyNames->arguments) usesArguments(); - m_scopes.last().m_funcDeclarations->data.append(decl->body()); + m_scope.m_funcDeclarations->data.append(decl->body()); body->setLoc(bodyStartLine, bodyEndLine); return decl; } @@ -494,7 +494,7 @@ public: { if (m_globalData->propertyNames->arguments == *ident) usesArguments(); - m_scopes.last().m_varDeclarations->data.append(std::make_pair(ident, attrs)); + m_scope.m_varDeclarations->data.append(std::make_pair(ident, attrs)); } ExpressionNode* combineCommaNodes(ExpressionNode* list, ExpressionNode* init) @@ -611,17 +611,17 @@ private: node->setExceptionSourceCode(divot, divot - start, end - divot); } - void incConstants() { m_scopes.last().m_numConstants++; } - void usesThis() { m_scopes.last().m_features |= ThisFeature; } - void usesCatch() { m_scopes.last().m_features |= CatchFeature; } - void usesClosures() { m_scopes.last().m_features |= ClosureFeature; } - void usesArguments() { m_scopes.last().m_features |= ArgumentsFeature; } - void usesAssignment() { m_scopes.last().m_features |= AssignFeature; } - void usesWith() { m_scopes.last().m_features |= WithFeature; } + void incConstants() { m_scope.m_numConstants++; } + void usesThis() { m_scope.m_features |= ThisFeature; } + void usesCatch() { m_scope.m_features |= CatchFeature; } + void usesClosures() { m_scope.m_features |= ClosureFeature; } + void usesArguments() { m_scope.m_features |= ArgumentsFeature; } + void usesAssignment() { m_scope.m_features |= AssignFeature; } + void usesWith() { m_scope.m_features |= WithFeature; } void usesEval() { m_evalCount++; - m_scopes.last().m_features |= EvalFeature; + m_scope.m_features |= EvalFeature; } ExpressionNode* createNumber(double d) { @@ -630,7 +630,7 @@ private: JSGlobalData* m_globalData; Lexer* m_lexer; - Vector<Scope> m_scopes; + Scope m_scope; Vector<BinaryOperand, 10> m_binaryOperandStack; Vector<AssignmentInfo, 10> m_assignmentInfoStack; Vector<pair<int, int>, 10> m_binaryOperatorStack; diff --git a/Source/JavaScriptCore/parser/JSParser.cpp b/Source/JavaScriptCore/parser/JSParser.cpp index 993dd66..9245eb0 100644 --- a/Source/JavaScriptCore/parser/JSParser.cpp +++ b/Source/JavaScriptCore/parser/JSParser.cpp @@ -36,6 +36,7 @@ using namespace JSC; #include "SourceProvider.h" #include "SourceProviderCacheItem.h" #include <wtf/HashFunctions.h> +#include <wtf/OwnPtr.h> #include <wtf/WTFThreadData.h> #include <utility> @@ -293,7 +294,31 @@ private: , m_labels(0) { } - + + Scope(const Scope& rhs) + : m_globalData(rhs.m_globalData) + , m_shadowsArguments(rhs.m_shadowsArguments) + , m_usesEval(rhs.m_usesEval) + , m_needsFullActivation(rhs.m_needsFullActivation) + , m_allowsNewDecls(rhs.m_allowsNewDecls) + , m_strictMode(rhs.m_strictMode) + , m_isFunction(rhs.m_isFunction) + , m_isFunctionBoundary(rhs.m_isFunctionBoundary) + , m_isValidStrictMode(rhs.m_isValidStrictMode) + , m_loopDepth(rhs.m_loopDepth) + , m_switchDepth(rhs.m_switchDepth) + , m_labels(0) + { + if (rhs.m_labels) { + m_labels = adoptPtr(new LabelStack); + + typedef LabelStack::const_iterator iterator; + iterator end = rhs.m_labels->end(); + for (iterator it = rhs.m_labels->begin(); it != end; ++it) + m_labels->append(ScopeLabelInfo(it->m_ident, it->m_isLoop)); + } + } + void startSwitch() { m_switchDepth++; } void endSwitch() { m_switchDepth--; } void startLoop() { m_loopDepth++; } @@ -305,7 +330,7 @@ private: void pushLabel(const Identifier* label, bool isLoop) { if (!m_labels) - m_labels = new LabelStack; + m_labels = adoptPtr(new LabelStack); m_labels->append(ScopeLabelInfo(label->impl(), isLoop)); } @@ -465,13 +490,13 @@ private: int m_switchDepth; typedef Vector<ScopeLabelInfo, 2> LabelStack; - LabelStack* m_labels; + OwnPtr<LabelStack> m_labels; IdentifierSet m_declaredVariables; IdentifierSet m_usedVariables; IdentifierSet m_closedVariables; IdentifierSet m_writtenVariables; }; - + typedef Vector<Scope, 10> ScopeStack; struct ScopeRef { @@ -2140,3 +2165,8 @@ template <class TreeBuilder> TreeExpression JSParser::parseUnaryExpression(TreeB } } + +namespace WTF +{ + template <> struct VectorTraits<JSC::JSParser::Scope> : SimpleClassVectorTraits { }; +} diff --git a/Source/JavaScriptCore/profiler/Profiler.cpp b/Source/JavaScriptCore/profiler/Profiler.cpp index 9ac73fd..301dc0c 100644 --- a/Source/JavaScriptCore/profiler/Profiler.cpp +++ b/Source/JavaScriptCore/profiler/Profiler.cpp @@ -150,14 +150,14 @@ CallIdentifier Profiler::createCallIdentifier(ExecState* exec, JSValue functionV return CallIdentifier(GlobalCodeExecution, defaultSourceURL, defaultLineNumber); if (!functionValue.isObject()) return CallIdentifier("(unknown)", defaultSourceURL, defaultLineNumber); - if (asObject(functionValue)->inherits(&JSFunction::info)) { + if (asObject(functionValue)->inherits(&JSFunction::s_info)) { JSFunction* function = asFunction(functionValue); if (!function->executable()->isHostFunction()) return createCallIdentifierFromFunctionImp(exec, function); } - if (asObject(functionValue)->inherits(&JSFunction::info)) + if (asObject(functionValue)->inherits(&JSFunction::s_info)) return CallIdentifier(static_cast<JSFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber); - if (asObject(functionValue)->inherits(&InternalFunction::info)) + if (asObject(functionValue)->inherits(&InternalFunction::s_info)) return CallIdentifier(static_cast<InternalFunction*>(asObject(functionValue))->name(exec), defaultSourceURL, defaultLineNumber); return CallIdentifier(makeUString("(", asObject(functionValue)->className(), " object)"), defaultSourceURL, defaultLineNumber); } diff --git a/Source/JavaScriptCore/qt/ChangeLog b/Source/JavaScriptCore/qt/ChangeLog index 11018b4..22484b7 100644 --- a/Source/JavaScriptCore/qt/ChangeLog +++ b/Source/JavaScriptCore/qt/ChangeLog @@ -1,3 +1,23 @@ +2011-03-01 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt] Clean up the project files and move common options to WebKit.pri. + + * api/QtScript.pro: Deduplicate options. + +2011-02-24 Andras Becsi <abecsi@webkit.org> + + Reviewed by Laszlo Gombos. + + [Qt] MinGW build fails to link + https://bugs.webkit.org/show_bug.cgi?id=55050 + + Prepend the libraries of subcomponents instead of appending them + to fix the library order according to the dependency of the libraries + + * api/QtScript.pro: + 2010-09-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed by Andreas Kling. diff --git a/Source/JavaScriptCore/qt/api/QtScript.pro b/Source/JavaScriptCore/qt/api/QtScript.pro index 490758c..22e8b0c 100644 --- a/Source/JavaScriptCore/qt/api/QtScript.pro +++ b/Source/JavaScriptCore/qt/api/QtScript.pro @@ -7,17 +7,12 @@ INCLUDEPATH += $$PWD CONFIG += building-libs isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../../generated -!CONFIG(release, debug|release) { - OBJECTS_DIR = obj/debug -} else { # Release - OBJECTS_DIR = obj/release -} isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../.. include($$PWD/../../../WebKit.pri) include($$PWD/../../JavaScriptCore.pri) -addJavaScriptCoreLib(../..) +prependJavaScriptCoreLib(../..) INCLUDEPATH += $$PWD/../../API diff --git a/Source/JavaScriptCore/runtime/ArgList.cpp b/Source/JavaScriptCore/runtime/ArgList.cpp index a862ea0..25a8916 100644 --- a/Source/JavaScriptCore/runtime/ArgList.cpp +++ b/Source/JavaScriptCore/runtime/ArgList.cpp @@ -23,6 +23,7 @@ #include "JSValue.h" #include "JSCell.h" +#include "ScopeChain.h" using std::min; diff --git a/Source/JavaScriptCore/runtime/ArgList.h b/Source/JavaScriptCore/runtime/ArgList.h index 57e3c20..5564d5b 100644 --- a/Source/JavaScriptCore/runtime/ArgList.h +++ b/Source/JavaScriptCore/runtime/ArgList.h @@ -67,12 +67,12 @@ namespace JSC { { } - void initialize(Register* buffer, size_t size) + void initialize(WriteBarrier<Unknown>* buffer, size_t size) { ASSERT(!m_markSet); ASSERT(isEmpty()); - m_buffer = buffer; + m_buffer = reinterpret_cast<Register*>(buffer); m_size = size; #ifndef NDEBUG m_isReadOnly = true; diff --git a/Source/JavaScriptCore/runtime/Arguments.cpp b/Source/JavaScriptCore/runtime/Arguments.cpp index 305b247..e201b91 100644 --- a/Source/JavaScriptCore/runtime/Arguments.cpp +++ b/Source/JavaScriptCore/runtime/Arguments.cpp @@ -35,7 +35,7 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(Arguments); -const ClassInfo Arguments::info = { "Arguments", 0, 0, 0 }; +const ClassInfo Arguments::s_info = { "Arguments", &JSNonFinalObject::s_info, 0, 0 }; Arguments::~Arguments() { @@ -48,11 +48,11 @@ void Arguments::markChildren(MarkStack& markStack) JSObject::markChildren(markStack); if (d->registerArray) - markStack.deprecatedAppendValues(d->registerArray.get(), d->numParameters); + markStack.appendValues(d->registerArray.get(), d->numParameters); if (d->extraArguments) { unsigned numExtraArguments = d->numArguments - d->numParameters; - markStack.deprecatedAppendValues(d->extraArguments, numExtraArguments); + markStack.appendValues(d->extraArguments, numExtraArguments); } markStack.append(&d->callee); @@ -74,9 +74,9 @@ void Arguments::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxS unsigned parametersLength = min(min(d->numParameters, d->numArguments), maxSize); unsigned i = 0; for (; i < parametersLength; ++i) - buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); + buffer[i] = d->registers[d->firstParameterIndex + i].get(); for (; i < d->numArguments; ++i) - buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); + buffer[i] = d->extraArguments[i - d->numParameters].get(); return; } @@ -84,13 +84,13 @@ void Arguments::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxS unsigned i = 0; for (; i < parametersLength; ++i) { if (!d->deletedArguments[i]) - buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); + buffer[i] = d->registers[d->firstParameterIndex + i].get(); else buffer[i] = get(exec, i); } for (; i < d->numArguments; ++i) { if (!d->deletedArguments[i]) - buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); + buffer[i] = d->extraArguments[i - d->numParameters].get(); else buffer[i] = get(exec, i); } @@ -119,9 +119,9 @@ void Arguments::fillArgList(ExecState* exec, MarkedArgumentBuffer& args) unsigned parametersLength = min(d->numParameters, d->numArguments); unsigned i = 0; for (; i < parametersLength; ++i) - args.append(d->registers[d->firstParameterIndex + i].jsValue()); + args.append(d->registers[d->firstParameterIndex + i].get()); for (; i < d->numArguments; ++i) - args.append(d->extraArguments[i - d->numParameters].jsValue()); + args.append(d->extraArguments[i - d->numParameters].get()); return; } @@ -129,13 +129,13 @@ void Arguments::fillArgList(ExecState* exec, MarkedArgumentBuffer& args) unsigned i = 0; for (; i < parametersLength; ++i) { if (!d->deletedArguments[i]) - args.append(d->registers[d->firstParameterIndex + i].jsValue()); + args.append(d->registers[d->firstParameterIndex + i].get()); else args.append(get(exec, i)); } for (; i < d->numArguments; ++i) { if (!d->deletedArguments[i]) - args.append(d->extraArguments[i - d->numParameters].jsValue()); + args.append(d->extraArguments[i - d->numParameters].get()); else args.append(get(exec, i)); } @@ -145,9 +145,9 @@ bool Arguments::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& sl { if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { if (i < d->numParameters) { - slot.setRegisterSlot(&d->registers[d->firstParameterIndex + i]); + slot.setValue(d->registers[d->firstParameterIndex + i].get()); } else - slot.setValue(d->extraArguments[i - d->numParameters].jsValue()); + slot.setValue(d->extraArguments[i - d->numParameters].get()); return true; } @@ -184,9 +184,9 @@ bool Arguments::getOwnPropertySlot(ExecState* exec, const Identifier& propertyNa unsigned i = propertyName.toArrayIndex(isArrayIndex); if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { if (i < d->numParameters) { - slot.setRegisterSlot(&d->registers[d->firstParameterIndex + i]); + slot.setValue(d->registers[d->firstParameterIndex + i].get()); } else - slot.setValue(d->extraArguments[i - d->numParameters].jsValue()); + slot.setValue(d->extraArguments[i - d->numParameters].get()); return true; } @@ -215,9 +215,9 @@ bool Arguments::getOwnPropertyDescriptor(ExecState* exec, const Identifier& prop unsigned i = propertyName.toArrayIndex(isArrayIndex); if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { if (i < d->numParameters) { - descriptor.setDescriptor(d->registers[d->firstParameterIndex + i].jsValue(), DontEnum); + descriptor.setDescriptor(d->registers[d->firstParameterIndex + i].get(), DontEnum); } else - descriptor.setDescriptor(d->extraArguments[i - d->numParameters].jsValue(), DontEnum); + descriptor.setDescriptor(d->extraArguments[i - d->numParameters].get(), DontEnum); return true; } @@ -257,9 +257,9 @@ void Arguments::put(ExecState* exec, unsigned i, JSValue value) { if (i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { if (i < d->numParameters) - d->registers[d->firstParameterIndex + i] = JSValue(value); + d->registers[d->firstParameterIndex + i].set(exec->globalData(), d->activation ? static_cast<JSCell*>(d->activation.get()) : static_cast<JSCell*>(this), value); else - d->extraArguments[i - d->numParameters] = JSValue(value); + d->extraArguments[i - d->numParameters].set(exec->globalData(), this, value); return; } @@ -273,9 +273,9 @@ void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue val unsigned i = propertyName.toArrayIndex(isArrayIndex); if (isArrayIndex && i < d->numArguments && (!d->deletedArguments || !d->deletedArguments[i])) { if (i < d->numParameters) - d->registers[d->firstParameterIndex + i] = JSValue(value); + d->registers[d->firstParameterIndex + i].set(exec->globalData(), d->activation ? static_cast<JSCell*>(d->activation.get()) : static_cast<JSCell*>(this), value); else - d->extraArguments[i - d->numParameters] = JSValue(value); + d->extraArguments[i - d->numParameters].set(exec->globalData(), this, value); return; } diff --git a/Source/JavaScriptCore/runtime/Arguments.h b/Source/JavaScriptCore/runtime/Arguments.h index 658538b..007e0f1 100644 --- a/Source/JavaScriptCore/runtime/Arguments.h +++ b/Source/JavaScriptCore/runtime/Arguments.h @@ -29,7 +29,6 @@ #include "JSGlobalObject.h" #include "Interpreter.h" #include "ObjectConstructor.h" -#include "PrototypeFunction.h" namespace JSC { @@ -43,12 +42,12 @@ namespace JSC { ptrdiff_t firstParameterIndex; unsigned numArguments; - Register* registers; - OwnArrayPtr<Register> registerArray; + WriteBarrier<Unknown>* registers; + OwnArrayPtr<WriteBarrier<Unknown> > registerArray; - Register* extraArguments; + WriteBarrier<Unknown>* extraArguments; OwnArrayPtr<bool> deletedArguments; - Register extraArgumentsFixedBuffer[4]; + WriteBarrier<Unknown> extraArgumentsFixedBuffer[4]; WriteBarrier<JSFunction> callee; bool overrodeLength : 1; @@ -58,7 +57,7 @@ namespace JSC { }; - class Arguments : public JSObject { + class Arguments : public JSNonFinalObject { public: // Use an enum because otherwise gcc insists on doing a memory // read. @@ -70,7 +69,7 @@ namespace JSC { Arguments(CallFrame*, NoParametersType); virtual ~Arguments(); - static const ClassInfo info; + static const ClassInfo s_info; virtual void markChildren(MarkStack&); @@ -84,17 +83,18 @@ namespace JSC { } void copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize); - void copyRegisters(); + void copyRegisters(JSGlobalData&); bool isTornOff() const { return d->registerArray; } void setActivation(JSGlobalData& globalData, JSActivation* activation) { + ASSERT(!d->registerArray); d->activation.set(globalData, this, activation); d->registers = &activation->registerAt(0); } static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -113,8 +113,6 @@ namespace JSC { void createStrictModeCallerIfNecessary(ExecState*); void createStrictModeCalleeIfNecessary(ExecState*); - virtual const ClassInfo* classInfo() const { return &info; } - void init(CallFrame*); OwnPtr<ArgumentsData> d; @@ -124,7 +122,7 @@ namespace JSC { inline Arguments* asArguments(JSValue value) { - ASSERT(asObject(value)->inherits(&Arguments::info)); + ASSERT(asObject(value)->inherits(&Arguments::s_info)); return static_cast<Arguments*>(asObject(value)); } @@ -145,9 +143,11 @@ namespace JSC { } inline Arguments::Arguments(CallFrame* callFrame) - : JSObject(callFrame->lexicalGlobalObject()->argumentsStructure()) + : JSNonFinalObject(callFrame->lexicalGlobalObject()->argumentsStructure()) , d(adoptPtr(new ArgumentsData)) { + ASSERT(inherits(&s_info)); + JSFunction* callee; ptrdiff_t firstParameterIndex; Register* argv; @@ -158,19 +158,19 @@ namespace JSC { d->firstParameterIndex = firstParameterIndex; d->numArguments = numArguments; - d->registers = callFrame->registers(); + d->registers = reinterpret_cast<WriteBarrier<Unknown>*>(callFrame->registers()); - Register* extraArguments; + WriteBarrier<Unknown>* extraArguments; if (d->numArguments <= d->numParameters) extraArguments = 0; else { unsigned numExtraArguments = d->numArguments - d->numParameters; - if (numExtraArguments > sizeof(d->extraArgumentsFixedBuffer) / sizeof(Register)) - extraArguments = new Register[numExtraArguments]; + if (numExtraArguments > sizeof(d->extraArgumentsFixedBuffer) / sizeof(WriteBarrier<Unknown>)) + extraArguments = new WriteBarrier<Unknown>[numExtraArguments]; else extraArguments = d->extraArgumentsFixedBuffer; for (unsigned i = 0; i < numExtraArguments; ++i) - extraArguments[i] = argv[d->numParameters + i]; + extraArguments[i].set(callFrame->globalData(), this, argv[d->numParameters + i].jsValue()); } d->extraArguments = extraArguments; @@ -181,13 +181,14 @@ namespace JSC { d->overrodeCaller = false; d->isStrictMode = callFrame->codeBlock()->isStrictMode(); if (d->isStrictMode) - copyRegisters(); + copyRegisters(callFrame->globalData()); } inline Arguments::Arguments(CallFrame* callFrame, NoParametersType) - : JSObject(callFrame->lexicalGlobalObject()->argumentsStructure()) + : JSNonFinalObject(callFrame->lexicalGlobalObject()->argumentsStructure()) , d(adoptPtr(new ArgumentsData)) { + ASSERT(inherits(&s_info)); ASSERT(!asFunction(callFrame->callee())->jsExecutable()->parameterCount()); unsigned numArguments = callFrame->argumentCount(); @@ -195,15 +196,15 @@ namespace JSC { d->numParameters = 0; d->numArguments = numArguments; - Register* extraArguments; + WriteBarrier<Unknown>* extraArguments; if (numArguments > sizeof(d->extraArgumentsFixedBuffer) / sizeof(Register)) - extraArguments = new Register[numArguments]; + extraArguments = new WriteBarrier<Unknown>[numArguments]; else extraArguments = d->extraArgumentsFixedBuffer; Register* argv = callFrame->registers() - RegisterFile::CallFrameHeaderSize - numArguments - 1; for (unsigned i = 0; i < numArguments; ++i) - extraArguments[i] = argv[i]; + extraArguments[i].set(callFrame->globalData(), this, argv[i].jsValue()); d->extraArguments = extraArguments; @@ -213,10 +214,10 @@ namespace JSC { d->overrodeCaller = false; d->isStrictMode = callFrame->codeBlock()->isStrictMode(); if (d->isStrictMode) - copyRegisters(); + copyRegisters(callFrame->globalData()); } - inline void Arguments::copyRegisters() + inline void Arguments::copyRegisters(JSGlobalData& globalData) { ASSERT(!isTornOff()); @@ -226,14 +227,15 @@ namespace JSC { int registerOffset = d->numParameters + RegisterFile::CallFrameHeaderSize; size_t registerArraySize = d->numParameters; - OwnArrayPtr<Register> registerArray = adoptArrayPtr(new Register[registerArraySize]); - memcpy(registerArray.get(), d->registers - registerOffset, registerArraySize * sizeof(Register)); + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = adoptArrayPtr(new WriteBarrier<Unknown>[registerArraySize]); + for (size_t i = 0; i < registerArraySize; i++) + registerArray[i].set(globalData, this, d->registers[i - registerOffset].get()); d->registers = registerArray.get() + registerOffset; d->registerArray = registerArray.release(); } // This JSActivation function is defined here so it can get at Arguments::setRegisters. - inline void JSActivation::copyRegisters() + inline void JSActivation::copyRegisters(JSGlobalData& globalData) { ASSERT(!d()->registerArray); @@ -247,8 +249,8 @@ namespace JSC { int registerOffset = numParametersMinusThis + RegisterFile::CallFrameHeaderSize; size_t registerArraySize = numLocals + RegisterFile::CallFrameHeaderSize; - OwnArrayPtr<Register> registerArray = copyRegisterArray(d()->registers - registerOffset, registerArraySize); - Register* registers = registerArray.get() + registerOffset; + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = copyRegisterArray(globalData, d()->registers - registerOffset, registerArraySize); + WriteBarrier<Unknown>* registers = registerArray.get() + registerOffset; setRegisters(registers, registerArray.release()); } diff --git a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp index 5d0adbd..af2afc6 100644 --- a/Source/JavaScriptCore/runtime/ArrayConstructor.cpp +++ b/Source/JavaScriptCore/runtime/ArrayConstructor.cpp @@ -30,7 +30,6 @@ #include "JSArray.h" #include "JSFunction.h" #include "Lookup.h" -#include "PrototypeFunction.h" namespace JSC { @@ -38,7 +37,7 @@ ASSERT_CLASS_FITS_IN_CELL(ArrayConstructor); static EncodedJSValue JSC_HOST_CALL arrayConstructorIsArray(ExecState*); -ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, ArrayPrototype* arrayPrototype, Structure* prototypeFunctionStructure) +ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, ArrayPrototype* arrayPrototype, Structure* functionStructure) : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, arrayPrototype->classInfo()->className)) { // ECMA 15.4.3.1 Array.prototype @@ -48,7 +47,7 @@ ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete); // ES5 - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().isArray, arrayConstructorIsArray), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().isArray, arrayConstructorIsArray), DontEnum); } static inline JSObject* constructArrayWithSizeQuirk(ExecState* exec, const ArgList& args) @@ -94,7 +93,7 @@ CallType ArrayConstructor::getCallData(CallData& callData) EncodedJSValue JSC_HOST_CALL arrayConstructorIsArray(ExecState* exec) { - return JSValue::encode(jsBoolean(exec->argument(0).inherits(&JSArray::info))); + return JSValue::encode(jsBoolean(exec->argument(0).inherits(&JSArray::s_info))); } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp index 70c0d06..488effd 100644 --- a/Source/JavaScriptCore/runtime/ArrayPrototype.cpp +++ b/Source/JavaScriptCore/runtime/ArrayPrototype.cpp @@ -85,7 +85,7 @@ static inline bool isNumericCompareFunction(ExecState* exec, CallType callType, // ------------------------------ ArrayPrototype ---------------------------- -const ClassInfo ArrayPrototype::info = {"Array", &JSArray::info, 0, ExecState::arrayTable}; +const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecState::arrayTable}; /* Source for ArrayPrototype.lut.h @begin arrayTable 16 @@ -117,6 +117,7 @@ const ClassInfo ArrayPrototype::info = {"Array", &JSArray::info, 0, ExecState::a ArrayPrototype::ArrayPrototype(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) : JSArray(structure) { + ASSERT(inherits(&s_info)); putAnonymousValue(globalObject->globalData(), 0, globalObject); } @@ -165,7 +166,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); bool isRealArray = isJSArray(&exec->globalData(), thisValue); - if (!isRealArray && !thisValue.inherits(&JSArray::info)) + if (!isRealArray && !thisValue.inherits(&JSArray::s_info)) return throwVMTypeError(exec); JSArray* thisObj = asArray(thisValue); @@ -224,7 +225,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec) EncodedJSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&JSArray::info)) + if (!thisValue.inherits(&JSArray::s_info)) return throwVMTypeError(exec); JSObject* thisObj = asArray(thisValue); @@ -330,7 +331,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec) size_t i = 0; size_t argCount = exec->argumentCount(); while (1) { - if (curArg.inherits(&JSArray::info)) { + if (curArg.inherits(&JSArray::s_info)) { unsigned length = curArg.get(exec, exec->propertyNames().length).toUInt32(exec); JSObject* curObject = curArg.toObject(exec); for (unsigned k = 0; k < length; ++k) { @@ -470,7 +471,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState* exec) CallData callData; CallType callType = getCallData(function, callData); - if (thisObj->classInfo() == &JSArray::info) { + if (thisObj->classInfo() == &JSArray::s_info) { if (isNumericCompareFunction(exec, callType, callData)) asArray(thisObj)->sortNumeric(exec, function, callType, callData); else if (callType != CallTypeNone) diff --git a/Source/JavaScriptCore/runtime/ArrayPrototype.h b/Source/JavaScriptCore/runtime/ArrayPrototype.h index 42665e3..e41d8ca 100644 --- a/Source/JavaScriptCore/runtime/ArrayPrototype.h +++ b/Source/JavaScriptCore/runtime/ArrayPrototype.h @@ -33,12 +33,11 @@ namespace JSC { bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: diff --git a/Source/JavaScriptCore/runtime/BooleanObject.cpp b/Source/JavaScriptCore/runtime/BooleanObject.cpp index 71ff2d2..16c4669 100644 --- a/Source/JavaScriptCore/runtime/BooleanObject.cpp +++ b/Source/JavaScriptCore/runtime/BooleanObject.cpp @@ -25,11 +25,12 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(BooleanObject); -const ClassInfo BooleanObject::info = { "Boolean", 0, 0, 0 }; +const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0, 0 }; BooleanObject::BooleanObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure) : JSWrapperObject(globalData, structure) { + ASSERT(inherits(&s_info)); } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/BooleanObject.h b/Source/JavaScriptCore/runtime/BooleanObject.h index ff10ef6..e2af0c2 100644 --- a/Source/JavaScriptCore/runtime/BooleanObject.h +++ b/Source/JavaScriptCore/runtime/BooleanObject.h @@ -29,12 +29,11 @@ namespace JSC { public: explicit BooleanObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure>); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } }; @@ -42,7 +41,7 @@ namespace JSC { inline BooleanObject* asBooleanObject(JSValue value) { - ASSERT(asObject(value)->inherits(&BooleanObject::info)); + ASSERT(asObject(value)->inherits(&BooleanObject::s_info)); return static_cast<BooleanObject*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/BooleanPrototype.cpp b/Source/JavaScriptCore/runtime/BooleanPrototype.cpp index 54d621c..d0a64af 100644 --- a/Source/JavaScriptCore/runtime/BooleanPrototype.cpp +++ b/Source/JavaScriptCore/runtime/BooleanPrototype.cpp @@ -26,7 +26,6 @@ #include "JSFunction.h" #include "JSString.h" #include "ObjectPrototype.h" -#include "PrototypeFunction.h" namespace JSC { @@ -38,13 +37,13 @@ static EncodedJSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState*); // ECMA 15.6.4 -BooleanPrototype::BooleanPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure) +BooleanPrototype::BooleanPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure) : BooleanObject(exec->globalData(), structure) { setInternalValue(exec->globalData(), jsBoolean(false)); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, booleanProtoFuncToString), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().valueOf, booleanProtoFuncValueOf), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toString, booleanProtoFuncToString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().valueOf, booleanProtoFuncValueOf), DontEnum); } @@ -61,7 +60,7 @@ EncodedJSValue JSC_HOST_CALL booleanProtoFuncToString(ExecState* exec) if (thisValue == jsBoolean(true)) return JSValue::encode(jsNontrivialString(exec, "true")); - if (!thisValue.inherits(&BooleanObject::info)) + if (!thisValue.inherits(&BooleanObject::s_info)) return throwVMTypeError(exec); if (asBooleanObject(thisValue)->internalValue() == jsBoolean(false)) @@ -77,7 +76,7 @@ EncodedJSValue JSC_HOST_CALL booleanProtoFuncValueOf(ExecState* exec) if (thisValue.isBoolean()) return JSValue::encode(thisValue); - if (!thisValue.inherits(&BooleanObject::info)) + if (!thisValue.inherits(&BooleanObject::s_info)) return throwVMTypeError(exec); return JSValue::encode(asBooleanObject(thisValue)->internalValue()); diff --git a/Source/JavaScriptCore/runtime/BooleanPrototype.h b/Source/JavaScriptCore/runtime/BooleanPrototype.h index ddadc43..d6d3d9f 100644 --- a/Source/JavaScriptCore/runtime/BooleanPrototype.h +++ b/Source/JavaScriptCore/runtime/BooleanPrototype.h @@ -27,7 +27,7 @@ namespace JSC { class BooleanPrototype : public BooleanObject { public: - BooleanPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure); + BooleanPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure); }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/CallData.h b/Source/JavaScriptCore/runtime/CallData.h index 32e1094..b138f54 100644 --- a/Source/JavaScriptCore/runtime/CallData.h +++ b/Source/JavaScriptCore/runtime/CallData.h @@ -30,7 +30,6 @@ #define CallData_h #include "JSValue.h" -#include "NativeFunctionWrapper.h" namespace JSC { diff --git a/Source/JavaScriptCore/runtime/CommonIdentifiers.h b/Source/JavaScriptCore/runtime/CommonIdentifiers.h index 6587a8f..478a639 100644 --- a/Source/JavaScriptCore/runtime/CommonIdentifiers.h +++ b/Source/JavaScriptCore/runtime/CommonIdentifiers.h @@ -39,25 +39,18 @@ macro(compile) \ macro(configurable) \ macro(constructor) \ - macro(create) \ - macro(defineProperty) \ - macro(defineProperties) \ macro(enumerable) \ macro(eval) \ macro(exec) \ macro(fromCharCode) \ macro(global) \ macro(get) \ - macro(getPrototypeOf) \ - macro(getOwnPropertyDescriptor) \ - macro(getOwnPropertyNames) \ macro(hasOwnProperty) \ macro(ignoreCase) \ macro(index) \ macro(input) \ macro(isArray) \ macro(isPrototypeOf) \ - macro(keys) \ macro(length) \ macro(message) \ macro(multiline) \ diff --git a/Source/JavaScriptCore/runtime/Completion.cpp b/Source/JavaScriptCore/runtime/Completion.cpp index eeb8b0d..83d8bd8 100644 --- a/Source/JavaScriptCore/runtime/Completion.cpp +++ b/Source/JavaScriptCore/runtime/Completion.cpp @@ -47,19 +47,19 @@ Completion checkSyntax(ExecState* exec, const SourceCode& source) return Completion(Normal); } -Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& source, JSValue thisValue) +Completion evaluate(ExecState* exec, ScopeChainNode* scopeChain, const SourceCode& source, JSValue thisValue) { JSLock lock(exec); ASSERT(exec->globalData().identifierTable == wtfThreadData().currentIdentifierTable()); RefPtr<ProgramExecutable> program = ProgramExecutable::create(exec, source); - JSObject* error = program->compile(exec, scopeChain.node()); + JSObject* error = program->compile(exec, scopeChain); if (error) return Completion(Throw, error); JSObject* thisObj = (!thisValue || thisValue.isUndefinedOrNull()) ? exec->dynamicGlobalObject() : thisValue.toObject(exec); - JSValue result = exec->interpreter()->execute(program.get(), exec, scopeChain.node(), thisObj); + JSValue result = exec->interpreter()->execute(program.get(), exec, scopeChain, thisObj); if (exec->hadException()) { JSValue exception = exec->exception(); diff --git a/Source/JavaScriptCore/runtime/Completion.h b/Source/JavaScriptCore/runtime/Completion.h index 63b315e..1dd25fd 100644 --- a/Source/JavaScriptCore/runtime/Completion.h +++ b/Source/JavaScriptCore/runtime/Completion.h @@ -28,7 +28,7 @@ namespace JSC { class ExecState; - class ScopeChain; + class ScopeChainNode; class SourceCode; enum ComplType { Normal, Break, Continue, ReturnValue, Throw, Interrupted, Terminated }; @@ -56,7 +56,7 @@ namespace JSC { }; Completion checkSyntax(ExecState*, const SourceCode&); - Completion evaluate(ExecState*, ScopeChain&, const SourceCode&, JSValue thisValue = JSValue()); + Completion evaluate(ExecState*, ScopeChainNode*, const SourceCode&, JSValue thisValue = JSValue()); } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/DateConstructor.cpp b/Source/JavaScriptCore/runtime/DateConstructor.cpp index f1f3956..efaeb0f 100644 --- a/Source/JavaScriptCore/runtime/DateConstructor.cpp +++ b/Source/JavaScriptCore/runtime/DateConstructor.cpp @@ -30,7 +30,6 @@ #include "JSString.h" #include "JSStringBuilder.h" #include "ObjectPrototype.h" -#include "PrototypeFunction.h" #include <math.h> #include <time.h> #include <wtf/DateMath.h> @@ -58,16 +57,16 @@ static EncodedJSValue JSC_HOST_CALL dateParse(ExecState*); static EncodedJSValue JSC_HOST_CALL dateNow(ExecState*); static EncodedJSValue JSC_HOST_CALL dateUTC(ExecState*); -DateConstructor::DateConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure, DatePrototype* datePrototype) +DateConstructor::DateConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure, DatePrototype* datePrototype) : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, datePrototype->classInfo()->className)) { - putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly); + putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().parse, dateParse), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 7, exec->propertyNames().UTC, dateUTC), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().now, dateNow), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().parse, dateParse), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 7, exec->propertyNames().UTC, dateUTC), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().now, dateNow), DontEnum); - putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete); + putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete); } // ECMA 15.9.3 @@ -80,7 +79,7 @@ JSObject* constructDate(ExecState* exec, const ArgList& args) if (numArgs == 0) // new Date() ECMA 15.9.3.3 value = jsCurrentTime(); else if (numArgs == 1) { - if (args.at(0).inherits(&DateInstance::info)) + if (args.at(0).inherits(&DateInstance::s_info)) value = asDateInstance(args.at(0))->internalNumber(); else { JSValue primitive = args.at(0).toPrimitive(exec); diff --git a/Source/JavaScriptCore/runtime/DateConstructor.h b/Source/JavaScriptCore/runtime/DateConstructor.h index c8ca456..2adcd08 100644 --- a/Source/JavaScriptCore/runtime/DateConstructor.h +++ b/Source/JavaScriptCore/runtime/DateConstructor.h @@ -29,7 +29,7 @@ namespace JSC { class DateConstructor : public InternalFunction { public: - DateConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure, DatePrototype*); + DateConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure, DatePrototype*); private: virtual ConstructType getConstructData(ConstructData&); diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp index d4b8232..597f1e9 100644 --- a/Source/JavaScriptCore/runtime/DateConversion.cpp +++ b/Source/JavaScriptCore/runtime/DateConversion.cpp @@ -44,6 +44,7 @@ #include "DateConversion.h" #include "CallFrame.h" +#include "ScopeChain.h" #include "UString.h" #include <wtf/DateMath.h> #include <wtf/StringExtras.h> diff --git a/Source/JavaScriptCore/runtime/DateInstance.cpp b/Source/JavaScriptCore/runtime/DateInstance.cpp index 44e8b7d..95d5dc2 100644 --- a/Source/JavaScriptCore/runtime/DateInstance.cpp +++ b/Source/JavaScriptCore/runtime/DateInstance.cpp @@ -32,23 +32,26 @@ using namespace WTF; namespace JSC { -const ClassInfo DateInstance::info = {"Date", 0, 0, 0}; +const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0}; DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure) : JSWrapperObject(exec->globalData(), structure) { + ASSERT(inherits(&s_info)); setInternalValue(exec->globalData(), jsNaN()); } DateInstance::DateInstance(ExecState* exec, NonNullPassRefPtr<Structure> structure, double time) : JSWrapperObject(exec->globalData(), structure) { + ASSERT(inherits(&s_info)); setInternalValue(exec->globalData(), jsNumber(timeClip(time))); } DateInstance::DateInstance(ExecState* exec, double time) : JSWrapperObject(exec->globalData(), exec->lexicalGlobalObject()->dateStructure()) { + ASSERT(inherits(&s_info)); setInternalValue(exec->globalData(), jsNumber(timeClip(time))); } diff --git a/Source/JavaScriptCore/runtime/DateInstance.h b/Source/JavaScriptCore/runtime/DateInstance.h index 77d46de..627b9e7 100644 --- a/Source/JavaScriptCore/runtime/DateInstance.h +++ b/Source/JavaScriptCore/runtime/DateInstance.h @@ -37,7 +37,7 @@ namespace JSC { double internalNumber() const { return internalValue().uncheckedGetNumber(); } - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; const GregorianDateTime* gregorianDateTime(ExecState* exec) const { @@ -55,7 +55,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -64,7 +64,6 @@ namespace JSC { private: const GregorianDateTime* calculateGregorianDateTime(ExecState*) const; const GregorianDateTime* calculateGregorianDateTimeUTC(ExecState*) const; - virtual const ClassInfo* classInfo() const { return &info; } mutable RefPtr<DateInstanceData> m_data; }; @@ -73,7 +72,7 @@ namespace JSC { inline DateInstance* asDateInstance(JSValue value) { - ASSERT(asObject(value)->inherits(&DateInstance::info)); + ASSERT(asObject(value)->inherits(&DateInstance::s_info)); return static_cast<DateInstance*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/DatePrototype.cpp b/Source/JavaScriptCore/runtime/DatePrototype.cpp index 5838b60..314baa4 100644 --- a/Source/JavaScriptCore/runtime/DatePrototype.cpp +++ b/Source/JavaScriptCore/runtime/DatePrototype.cpp @@ -130,7 +130,7 @@ enum LocaleDateTimeFormat { LocaleDateAndTime, LocaleDate, LocaleTime }; #if PLATFORM(MAC) // FIXME: Since this is superior to the strftime-based version, why limit this to PLATFORM(MAC)? -// Instead we should consider using this whenever PLATFORM(CF) is true. +// Instead we should consider using this whenever USE(CF) is true. static CFDateFormatterStyle styleFromArgString(const UString& string, CFDateFormatterStyle defaultStyle) { @@ -374,7 +374,7 @@ static bool fillStructuresUsingDateArgs(ExecState *exec, int maxArgs, double *ms return ok; } -const ClassInfo DatePrototype::info = {"Date", &DateInstance::info, 0, ExecState::dateTable}; +const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecState::dateTable}; /* Source for DatePrototype.lut.h @begin dateTable @@ -432,6 +432,8 @@ const ClassInfo DatePrototype::info = {"Date", &DateInstance::info, 0, ExecState DatePrototype::DatePrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) : DateInstance(exec, structure) { + ASSERT(inherits(&s_info)); + // The constructor will be added later, after DateConstructor has been built. putAnonymousValue(exec->globalData(), 0, globalObject); } @@ -452,7 +454,7 @@ bool DatePrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& EncodedJSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -470,7 +472,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -488,7 +490,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToUTCString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -507,7 +509,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToISOString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -523,7 +525,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToDateString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -539,7 +541,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToTimeString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -549,7 +551,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -559,7 +561,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleDateString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -569,7 +571,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToLocaleTimeString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); return JSValue::encode(asDateInstance(thisValue)->internalValue()); @@ -578,7 +580,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTime(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -592,7 +594,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetFullYear(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -606,7 +608,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCFullYear(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -624,7 +626,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncToGMTString(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -638,7 +640,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMonth(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -652,7 +654,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMonth(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -666,7 +668,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDate(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -680,7 +682,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDate(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -694,7 +696,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetDay(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -708,7 +710,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCDay(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -722,7 +724,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetHours(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -736,7 +738,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCHours(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -750,7 +752,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMinutes(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -764,7 +766,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMinutes(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -778,7 +780,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetSeconds(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -792,7 +794,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCSeconds(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -808,7 +810,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -824,7 +826,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -838,7 +840,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncGetTimezoneOffset(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -852,7 +854,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetTime(ExecState* exec) static EncodedJSValue setNewValueFromTimeArgs(ExecState* exec, int numArgsToUse, bool inputIsUTC) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -889,7 +891,7 @@ static EncodedJSValue setNewValueFromTimeArgs(ExecState* exec, int numArgsToUse, static EncodedJSValue setNewValueFromDateArgs(ExecState* exec, int numArgsToUse, bool inputIsUTC) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -1013,7 +1015,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetUTCFullYear(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); @@ -1054,7 +1056,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec) EncodedJSValue JSC_HOST_CALL dateProtoFuncGetYear(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&DateInstance::info)) + if (!thisValue.inherits(&DateInstance::s_info)) return throwVMTypeError(exec); DateInstance* thisDateObj = asDateInstance(thisValue); diff --git a/Source/JavaScriptCore/runtime/DatePrototype.h b/Source/JavaScriptCore/runtime/DatePrototype.h index e3672aa..dca90e3 100644 --- a/Source/JavaScriptCore/runtime/DatePrototype.h +++ b/Source/JavaScriptCore/runtime/DatePrototype.h @@ -34,12 +34,11 @@ namespace JSC { virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: diff --git a/Source/JavaScriptCore/runtime/ErrorInstance.cpp b/Source/JavaScriptCore/runtime/ErrorInstance.cpp index a6208d5..0db2af8 100644 --- a/Source/JavaScriptCore/runtime/ErrorInstance.cpp +++ b/Source/JavaScriptCore/runtime/ErrorInstance.cpp @@ -23,19 +23,21 @@ namespace JSC { -const ClassInfo ErrorInstance::info = { "Error", 0, 0, 0 }; +const ClassInfo ErrorInstance::s_info = { "Error", &JSNonFinalObject::s_info, 0, 0 }; ErrorInstance::ErrorInstance(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + : JSNonFinalObject(structure) , m_appendSourceToMessage(false) { + ASSERT(inherits(&s_info)); putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, "")); } ErrorInstance::ErrorInstance(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure, const UString& message) - : JSObject(structure) + : JSNonFinalObject(structure) , m_appendSourceToMessage(false) { + ASSERT(inherits(&s_info)); putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message)); } diff --git a/Source/JavaScriptCore/runtime/ErrorInstance.h b/Source/JavaScriptCore/runtime/ErrorInstance.h index b3bebec..c1beef7 100644 --- a/Source/JavaScriptCore/runtime/ErrorInstance.h +++ b/Source/JavaScriptCore/runtime/ErrorInstance.h @@ -25,11 +25,14 @@ namespace JSC { - class ErrorInstance : public JSObject { + class ErrorInstance : public JSNonFinalObject { public: + static const ClassInfo s_info; - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } static ErrorInstance* create(JSGlobalData*, NonNullPassRefPtr<Structure>, const UString&); static ErrorInstance* create(ExecState* exec, NonNullPassRefPtr<Structure>, JSValue message); diff --git a/Source/JavaScriptCore/runtime/ErrorPrototype.cpp b/Source/JavaScriptCore/runtime/ErrorPrototype.cpp index b4e0a7c..e13251c 100644 --- a/Source/JavaScriptCore/runtime/ErrorPrototype.cpp +++ b/Source/JavaScriptCore/runtime/ErrorPrototype.cpp @@ -25,7 +25,6 @@ #include "JSString.h" #include "JSStringBuilder.h" #include "ObjectPrototype.h" -#include "PrototypeFunction.h" #include "StringRecursionChecker.h" #include "UString.h" @@ -36,13 +35,13 @@ ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype); static EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*); // ECMA 15.9.4 -ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure) +ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure) : ErrorInstance(&exec->globalData(), structure) { // The constructor will be added later in ErrorConstructor's constructor putDirectWithoutTransition(exec->globalData(), exec->propertyNames().name, jsNontrivialString(exec, "Error"), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, errorProtoFuncToString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toString, errorProtoFuncToString), DontEnum); } EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState* exec) diff --git a/Source/JavaScriptCore/runtime/ErrorPrototype.h b/Source/JavaScriptCore/runtime/ErrorPrototype.h index fce2742..3c2fed3 100644 --- a/Source/JavaScriptCore/runtime/ErrorPrototype.h +++ b/Source/JavaScriptCore/runtime/ErrorPrototype.h @@ -29,7 +29,7 @@ namespace JSC { class ErrorPrototype : public ErrorInstance { public: - ErrorPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure); + ErrorPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure); }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp index 4a58800..d3c637e 100644 --- a/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp +++ b/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp @@ -41,10 +41,10 @@ namespace JSC { -class InterruptedExecutionError : public JSObject { +class InterruptedExecutionError : public JSNonFinalObject { public: InterruptedExecutionError(JSGlobalData* globalData) - : JSObject(globalData->interruptedExecutionErrorStructure) + : JSNonFinalObject(globalData->interruptedExecutionErrorStructure) { } @@ -58,10 +58,10 @@ JSObject* createInterruptedExecutionException(JSGlobalData* globalData) return new (globalData) InterruptedExecutionError(globalData); } -class TerminatedExecutionError : public JSObject { +class TerminatedExecutionError : public JSNonFinalObject { public: TerminatedExecutionError(JSGlobalData* globalData) - : JSObject(globalData->terminatedExecutionErrorStructure) + : JSNonFinalObject(globalData->terminatedExecutionErrorStructure) { } diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp index 25c551b..607a2c2 100644 --- a/Source/JavaScriptCore/runtime/Executable.cpp +++ b/Source/JavaScriptCore/runtime/Executable.cpp @@ -35,11 +35,9 @@ namespace JSC { -#if ENABLE(JIT) NativeExecutable::~NativeExecutable() { } -#endif VPtrHackExecutable::~VPtrHackExecutable() { @@ -103,12 +101,11 @@ JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scope } recordParse(evalNode->features(), evalNode->hasCapturedVariables(), evalNode->lineNo(), evalNode->lastLine()); - ScopeChain scopeChain(scopeChainNode); - JSGlobalObject* globalObject = scopeChain.globalObject(); + JSGlobalObject* globalObject = scopeChainNode->globalObject.get(); ASSERT(!m_evalCodeBlock); - m_evalCodeBlock = adoptPtr(new EvalCodeBlock(this, globalObject, source().provider(), scopeChain.localDepth())); - OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(evalNode.get(), scopeChain, m_evalCodeBlock->symbolTable(), m_evalCodeBlock.get()))); + m_evalCodeBlock = adoptPtr(new EvalCodeBlock(this, globalObject, source().provider(), scopeChainNode->localDepth())); + OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(evalNode.get(), scopeChainNode, m_evalCodeBlock->symbolTable(), m_evalCodeBlock.get()))); if ((exception = generator->generate())) { m_evalCodeBlock.clear(); evalNode->destroyData(); @@ -156,11 +153,10 @@ JSObject* ProgramExecutable::compileInternal(ExecState* exec, ScopeChainNode* sc } recordParse(programNode->features(), programNode->hasCapturedVariables(), programNode->lineNo(), programNode->lastLine()); - ScopeChain scopeChain(scopeChainNode); - JSGlobalObject* globalObject = scopeChain.globalObject(); + JSGlobalObject* globalObject = scopeChainNode->globalObject.get(); m_programCodeBlock = adoptPtr(new ProgramCodeBlock(this, GlobalCode, globalObject, source().provider())); - OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(programNode.get(), scopeChain, &globalObject->symbolTable(), m_programCodeBlock.get()))); + OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(programNode.get(), scopeChainNode, &globalObject->symbolTable(), m_programCodeBlock.get()))); if ((exception = generator->generate())) { m_programCodeBlock.clear(); programNode->destroyData(); @@ -196,12 +192,11 @@ JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChain body->finishParsing(m_parameters, m_name); recordParse(body->features(), body->hasCapturedVariables(), body->lineNo(), body->lastLine()); - ScopeChain scopeChain(scopeChainNode); - JSGlobalObject* globalObject = scopeChain.globalObject(); + JSGlobalObject* globalObject = scopeChainNode->globalObject.get(); ASSERT(!m_codeBlockForCall); m_codeBlockForCall = adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), false)); - OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), scopeChain, m_codeBlockForCall->symbolTable(), m_codeBlockForCall.get()))); + OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), scopeChainNode, m_codeBlockForCall->symbolTable(), m_codeBlockForCall.get()))); if ((exception = generator->generate())) { m_codeBlockForCall.clear(); body->destroyData(); @@ -242,12 +237,11 @@ JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, Scope body->finishParsing(m_parameters, m_name); recordParse(body->features(), body->hasCapturedVariables(), body->lineNo(), body->lastLine()); - ScopeChain scopeChain(scopeChainNode); - JSGlobalObject* globalObject = scopeChain.globalObject(); + JSGlobalObject* globalObject = scopeChainNode->globalObject.get(); ASSERT(!m_codeBlockForConstruct); m_codeBlockForConstruct = adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), true)); - OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), scopeChain, m_codeBlockForConstruct->symbolTable(), m_codeBlockForConstruct.get()))); + OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), scopeChainNode, m_codeBlockForConstruct->symbolTable(), m_codeBlockForConstruct.get()))); if ((exception = generator->generate())) { m_codeBlockForConstruct.clear(); body->destroyData(); diff --git a/Source/JavaScriptCore/runtime/Executable.h b/Source/JavaScriptCore/runtime/Executable.h index 544e487..b2565a0 100644 --- a/Source/JavaScriptCore/runtime/Executable.h +++ b/Source/JavaScriptCore/runtime/Executable.h @@ -92,22 +92,29 @@ namespace JSC { #endif }; -#if ENABLE(JIT) class NativeExecutable : public ExecutableBase { friend class JIT; public: +#if ENABLE(JIT) static PassRefPtr<NativeExecutable> create(MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor) { if (!callThunk) return adoptRef(new NativeExecutable(JITCode(), function, JITCode(), constructor)); return adoptRef(new NativeExecutable(JITCode::HostFunction(callThunk), function, JITCode::HostFunction(constructThunk), constructor)); } +#else + static PassRefPtr<NativeExecutable> create(NativeFunction function, NativeFunction constructor) + { + return adoptRef(new NativeExecutable(function, constructor)); + } +#endif ~NativeExecutable(); NativeFunction function() { return m_function; } private: +#if ENABLE(JIT) NativeExecutable(JITCode callThunk, NativeFunction function, JITCode constructThunk, NativeFunction constructor) : ExecutableBase(NUM_PARAMETERS_IS_HOST) , m_function(function) @@ -118,13 +125,20 @@ namespace JSC { m_jitCodeForCallWithArityCheck = callThunk.addressForCall(); m_jitCodeForConstructWithArityCheck = constructThunk.addressForCall(); } +#else + NativeExecutable(NativeFunction function, NativeFunction constructor) + : ExecutableBase(NUM_PARAMETERS_IS_HOST) + , m_function(function) + , m_constructor(constructor) + { + } +#endif NativeFunction m_function; // Probably should be a NativeConstructor, but this will currently require rewriting the JIT // trampoline. It may be easier to make NativeFunction be passed 'this' as a part of the ArgList. NativeFunction m_constructor; }; -#endif class VPtrHackExecutable : public ExecutableBase { public: @@ -398,13 +412,11 @@ namespace JSC { return m_executable->isHostFunction(); } -#if ENABLE(JIT) inline NativeFunction JSFunction::nativeFunction() { ASSERT(isHostFunction()); return static_cast<NativeExecutable*>(m_executable.get())->function(); } -#endif } #endif diff --git a/Source/JavaScriptCore/runtime/FunctionConstructor.cpp b/Source/JavaScriptCore/runtime/FunctionConstructor.cpp index 933b11f..e642594 100644 --- a/Source/JavaScriptCore/runtime/FunctionConstructor.cpp +++ b/Source/JavaScriptCore/runtime/FunctionConstructor.cpp @@ -106,8 +106,8 @@ JSObject* constructFunction(ExecState* exec, const ArgList& args, const Identifi return throwError(exec, exception); } - ScopeChain scopeChain(globalObject, &globalData, globalObject, exec->globalThisValue()); - return new (exec) JSFunction(exec, function, scopeChain.node()); + ScopeChainNode* scopeChain = new (exec) ScopeChainNode(0, globalObject, &globalData, globalObject, exec->globalThisValue()); + return new (exec) JSFunction(exec, function, scopeChain); } // ECMA 15.3.2 The Function Constructor diff --git a/Source/JavaScriptCore/runtime/FunctionPrototype.cpp b/Source/JavaScriptCore/runtime/FunctionPrototype.cpp index e651538..c2d8ad3 100644 --- a/Source/JavaScriptCore/runtime/FunctionPrototype.cpp +++ b/Source/JavaScriptCore/runtime/FunctionPrototype.cpp @@ -28,7 +28,6 @@ #include "JSStringBuilder.h" #include "Interpreter.h" #include "Lexer.h" -#include "PrototypeFunction.h" namespace JSC { @@ -44,12 +43,12 @@ FunctionPrototype::FunctionPrototype(ExecState* exec, JSGlobalObject* globalObje putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum); } -void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeFunctionStructure, NativeFunctionWrapper** callFunction, NativeFunctionWrapper** applyFunction) +void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, Structure* functionStructure, JSFunction** callFunction, JSFunction** applyFunction) { - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, functionProtoFuncToString), DontEnum); - *applyFunction = new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().apply, functionProtoFuncApply); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toString, functionProtoFuncToString), DontEnum); + *applyFunction = new (exec) JSFunction(exec, globalObject, functionStructure, 2, exec->propertyNames().apply, functionProtoFuncApply); putDirectFunctionWithoutTransition(exec, *applyFunction, DontEnum); - *callFunction = new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().call, functionProtoFuncCall); + *callFunction = new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().call, functionProtoFuncCall); putDirectFunctionWithoutTransition(exec, *callFunction, DontEnum); } @@ -86,7 +85,7 @@ static inline void insertSemicolonIfNeeded(UString& functionBody) EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (thisValue.inherits(&JSFunction::info)) { + if (thisValue.inherits(&JSFunction::s_info)) { JSFunction* function = asFunction(thisValue); if (function->isHostFunction()) return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n [native code]\n}")); @@ -96,7 +95,7 @@ EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec) return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "(", executable->paramString(), ") ", sourceString)); } - if (thisValue.inherits(&InternalFunction::info)) { + if (thisValue.inherits(&InternalFunction::s_info)) { InternalFunction* function = asInternalFunction(thisValue); return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n [native code]\n}")); } @@ -118,11 +117,11 @@ EncodedJSValue JSC_HOST_CALL functionProtoFuncApply(ExecState* exec) if (!array.isUndefinedOrNull()) { if (!array.isObject()) return throwVMTypeError(exec); - if (asObject(array)->classInfo() == &Arguments::info) + if (asObject(array)->classInfo() == &Arguments::s_info) asArguments(array)->fillArgList(exec, applyArgs); else if (isJSArray(&exec->globalData(), array)) asArray(array)->fillArgList(exec, applyArgs); - else if (asObject(array)->inherits(&JSArray::info)) { + else if (asObject(array)->inherits(&JSArray::s_info)) { unsigned length = asArray(array)->get(exec, exec->propertyNames().length).toUInt32(exec); for (unsigned i = 0; i < length; ++i) applyArgs.append(asArray(array)->get(exec, i)); diff --git a/Source/JavaScriptCore/runtime/FunctionPrototype.h b/Source/JavaScriptCore/runtime/FunctionPrototype.h index 5661194..fb0bb48 100644 --- a/Source/JavaScriptCore/runtime/FunctionPrototype.h +++ b/Source/JavaScriptCore/runtime/FunctionPrototype.h @@ -25,16 +25,14 @@ namespace JSC { - class PrototypeFunction; - class FunctionPrototype : public InternalFunction { public: FunctionPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>); - void addFunctionProperties(ExecState*, JSGlobalObject*, Structure* prototypeFunctionStructure, NativeFunctionWrapper** callFunction, NativeFunctionWrapper** applyFunction); + void addFunctionProperties(ExecState*, JSGlobalObject*, Structure* functionStructure, JSFunction** callFunction, JSFunction** applyFunction); static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } private: diff --git a/Source/JavaScriptCore/runtime/GCActivityCallback.cpp b/Source/JavaScriptCore/runtime/GCActivityCallback.cpp index 161abfb..308d245 100644 --- a/Source/JavaScriptCore/runtime/GCActivityCallback.cpp +++ b/Source/JavaScriptCore/runtime/GCActivityCallback.cpp @@ -34,7 +34,7 @@ namespace JSC { struct DefaultGCActivityCallbackPlatformData { }; -DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap) +DefaultGCActivityCallback::DefaultGCActivityCallback(Heap*) { } diff --git a/Source/JavaScriptCore/runtime/GCActivityCallback.h b/Source/JavaScriptCore/runtime/GCActivityCallback.h index 9b6ef04..eabb4cc 100644 --- a/Source/JavaScriptCore/runtime/GCActivityCallback.h +++ b/Source/JavaScriptCore/runtime/GCActivityCallback.h @@ -32,7 +32,7 @@ #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> -#if PLATFORM(CF) +#if USE(CF) #include <CoreFoundation/CoreFoundation.h> #endif @@ -62,7 +62,7 @@ public: void operator()(); void synchronize(); -#if PLATFORM(CF) +#if USE(CF) protected: DefaultGCActivityCallback(Heap*, CFRunLoopRef); void commonConstructor(Heap*, CFRunLoopRef); diff --git a/Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp b/Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp index 211c423..a941cfa 100644 --- a/Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp +++ b/Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp @@ -33,10 +33,11 @@ #include "Heap.h" #include "JSGlobalData.h" #include "JSLock.h" +#include "ScopeChain.h" #include <wtf/RetainPtr.h> #include <wtf/WTFThreadData.h> -#if !PLATFORM(CF) +#if !USE(CF) #error "This file should only be used on CF platforms." #endif diff --git a/Source/JavaScriptCore/runtime/GCHandle.cpp b/Source/JavaScriptCore/runtime/GCHandle.cpp deleted file mode 100644 index 297de38..0000000 --- a/Source/JavaScriptCore/runtime/GCHandle.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "GCHandle.h" - -namespace JSC { - -WeakGCHandlePool* WeakGCHandle::pool() -{ - uintptr_t pool = (reinterpret_cast<uintptr_t>(this) & WeakGCHandlePool::poolMask); - return reinterpret_cast<WeakGCHandlePool*>(pool); -} - -WeakGCHandlePool::WeakGCHandlePool() -{ - ASSERT(sizeof(WeakGCHandlePool) <= WeakGCHandlePool::poolSize); - m_entriesSize = 0; - m_initialAlloc = 1; - m_entries[0].setNextInFreeList(0); -} - -WeakGCHandle* WeakGCHandlePool::allocate(JSCell* cell) -{ - ASSERT(cell); - ASSERT(m_entries[0].isNext()); - unsigned freeList = m_entries[0].getNextInFreeList(); - ASSERT(freeList < WeakGCHandlePool::numPoolEntries); - ASSERT(m_entriesSize < WeakGCHandlePool::numPoolEntries); - - if (m_entriesSize == WeakGCHandlePool::numPoolEntries - 1) - return 0; - - if (freeList) { - unsigned i = freeList; - freeList = m_entries[i].getNextInFreeList(); - m_entries[i].set(cell); - m_entries[0].setNextInFreeList(freeList); - ++m_entriesSize; - return &m_entries[i]; - } - - ASSERT(m_initialAlloc < WeakGCHandlePool::numPoolEntries); - - unsigned i = m_initialAlloc; - ++m_initialAlloc; - m_entries[i].set(cell); - ++m_entriesSize; - return &m_entries[i]; - -} - -void WeakGCHandlePool::free(WeakGCHandle* handle) -{ - ASSERT(handle->pool() == this); - ASSERT(m_entries[0].isNext()); - unsigned freeList = m_entries[0].getNextInFreeList(); - ASSERT(freeList < WeakGCHandlePool::numPoolEntries); - handle->setNextInFreeList(freeList); - m_entries[0].setNextInFreeList(handle - m_entries); - --m_entriesSize; -} - -} diff --git a/Source/JavaScriptCore/runtime/GCHandle.h b/Source/JavaScriptCore/runtime/GCHandle.h deleted file mode 100644 index 8818f79..0000000 --- a/Source/JavaScriptCore/runtime/GCHandle.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2010 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef GCHandle_h -#define GCHandle_h - -#include <wtf/Assertions.h> - -namespace JSC { - -class Heap; -class JSCell; -class WeakGCHandle; -class WeakGCHandlePool; - -class WeakGCHandle { - friend class WeakGCHandlePool; - -public: - // Because JSCell objects are aligned, we can use the lower two bits as - // status flags. The least significant bit is set when the handle is not a - // pointer, i.e. when it's used as a offset for the free list in - // WeakGCHandlePool. The second least significant bit is set when the object - // the pointer corresponds to has been deleted by a garbage collection - - bool isValidPtr() { return !(m_ptr & 3); } - bool isPtr() { return !(m_ptr & 1); } - bool isNext() { return (m_ptr & 3) == 1; } - - void invalidate() - { - ASSERT(isValidPtr()); - m_ptr |= 2; - } - - JSCell* get() - { - ASSERT(isPtr()); - return reinterpret_cast<JSCell*>(m_ptr & ~3); - } - - void set(JSCell* p) - { - m_ptr = reinterpret_cast<uintptr_t>(p); - ASSERT(isPtr()); - } - - WeakGCHandlePool* pool(); - -private: - uintptr_t getNextInFreeList() - { - ASSERT(isNext()); - return m_ptr >> 2; - } - - void setNextInFreeList(uintptr_t n) - { - m_ptr = (n << 2) | 1; - ASSERT(isNext()); - } - - uintptr_t m_ptr; -}; - -class WeakGCHandlePool { -public: - static const size_t poolSize = 32 * 1024; // 32k - static const size_t poolMask = ~(poolSize - 1); - static const size_t numPoolEntries = (poolSize - sizeof(Heap*) - 3 * sizeof(unsigned)) / sizeof(WeakGCHandle); - - WeakGCHandlePool(); - - WeakGCHandle* allocate(JSCell* cell); - void free(WeakGCHandle*); - - bool isFull() - { - ASSERT(m_entriesSize < WeakGCHandlePool::numPoolEntries); - return m_entriesSize == WeakGCHandlePool::numPoolEntries - 1; - } - - void update(); - -private: - Heap* m_heap; - unsigned m_entriesSize; - unsigned m_initialAlloc; - - WeakGCHandle m_entries[WeakGCHandlePool::numPoolEntries]; -}; - -} -#endif diff --git a/Source/JavaScriptCore/runtime/GetterSetter.h b/Source/JavaScriptCore/runtime/GetterSetter.h index ffab94d..68a8c70 100644 --- a/Source/JavaScriptCore/runtime/GetterSetter.h +++ b/Source/JavaScriptCore/runtime/GetterSetter.h @@ -49,7 +49,7 @@ namespace JSC { void setSetter(JSGlobalData& globalData, JSObject* setter) { m_setter.set(globalData, this, setter); } static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount, 0); } private: virtual bool isGetterSetter() const; diff --git a/Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp b/Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp deleted file mode 100644 index 27207e2..0000000 --- a/Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 1999-2002 Harri Porten (porten@kde.org) - * Copyright (C) 2001 Peter Kelly (pmk@post.com) - * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. - * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) - * Copyright (C) 2007 Maks Orlovich - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#include "config.h" -#include "GlobalEvalFunction.h" - -#include "JSGlobalObject.h" -#include <wtf/Assertions.h> - -namespace JSC { - -ASSERT_CLASS_FITS_IN_CELL(GlobalEvalFunction); - -GlobalEvalFunction::GlobalEvalFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int len, const Identifier& name, NativeFunction function, JSGlobalObject* cachedGlobalObject) - : PrototypeFunction(exec, globalObject, structure, len, name, function) - , m_cachedGlobalObject(exec->globalData(), this, cachedGlobalObject) -{ - ASSERT_ARG(cachedGlobalObject, cachedGlobalObject); -} - -void GlobalEvalFunction::markChildren(MarkStack& markStack) -{ - PrototypeFunction::markChildren(markStack); - markStack.append(&m_cachedGlobalObject); -} - -} // namespace JSC diff --git a/Source/JavaScriptCore/runtime/GlobalEvalFunction.h b/Source/JavaScriptCore/runtime/GlobalEvalFunction.h deleted file mode 100644 index 13f0946..0000000 --- a/Source/JavaScriptCore/runtime/GlobalEvalFunction.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. - * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) - * Copyright (C) 2007 Maks Orlovich - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef GlobalEvalFunction_h -#define GlobalEvalFunction_h - -#include "PrototypeFunction.h" - -namespace JSC { - - class JSGlobalObject; - - class GlobalEvalFunction : public PrototypeFunction { - public: - GlobalEvalFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int len, const Identifier&, NativeFunction, JSGlobalObject* expectedThisObject); - JSGlobalObject* cachedGlobalObject() const { return m_cachedGlobalObject.get(); } - - static PassRefPtr<Structure> createStructure(JSValue prototype) - { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); - } - - protected: - static const unsigned StructureFlags = ImplementsHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | PrototypeFunction::StructureFlags; - - private: - virtual void markChildren(MarkStack&); - - WriteBarrier<JSGlobalObject> m_cachedGlobalObject; - }; - -} // namespace JSC - -#endif // GlobalEvalFunction_h diff --git a/Source/JavaScriptCore/runtime/Heap.cpp b/Source/JavaScriptCore/runtime/Heap.cpp index c05233c..c52bcfe 100644 --- a/Source/JavaScriptCore/runtime/Heap.cpp +++ b/Source/JavaScriptCore/runtime/Heap.cpp @@ -24,7 +24,6 @@ #include "CodeBlock.h" #include "ConservativeSet.h" #include "GCActivityCallback.h" -#include "GCHandle.h" #include "Interpreter.h" #include "JSGlobalData.h" #include "JSGlobalObject.h" @@ -33,7 +32,7 @@ #include "Tracing.h" #include <algorithm> -#define COLLECT_ON_EVERY_ALLOCATION 0 +#define COLLECT_ON_EVERY_SLOW_ALLOCATION 0 using namespace std; @@ -49,8 +48,10 @@ Heap::Heap(JSGlobalData* globalData) , m_globalData(globalData) , m_machineStackMarker(this) , m_markStack(globalData->jsArrayVPtr) + , m_handleHeap(globalData) , m_extraCost(0) { + m_markedSpace.setHighWaterMark(minBytesPerCycle); (*m_activityCallback)(); } @@ -76,7 +77,8 @@ void Heap::destroy() delete m_markListSet; m_markListSet = 0; - + m_markedSpace.clearMarks(); + m_handleHeap.clearWeakPointers(); m_markedSpace.destroy(); m_globalData = 0; @@ -100,64 +102,29 @@ void Heap::reportExtraMemoryCostSlowCase(size_t cost) m_extraCost += cost; } -void* Heap::allocate(size_t s) +void* Heap::allocateSlowCase(size_t bytes) { ASSERT(globalData()->identifierTable == wtfThreadData().currentIdentifierTable()); ASSERT(JSLock::lockCount() > 0); ASSERT(JSLock::currentThreadIsHoldingLock()); - ASSERT_UNUSED(s, s <= MarkedBlock::CELL_SIZE); + ASSERT(bytes <= MarkedSpace::maxCellSize); ASSERT(m_operationInProgress == NoOperation); -#if COLLECT_ON_EVERY_ALLOCATION +#if COLLECT_ON_EVERY_SLOW_ALLOCATION collectAllGarbage(); ASSERT(m_operationInProgress == NoOperation); #endif + reset(DoNotSweep); + m_operationInProgress = Allocation; - void* result = m_markedSpace.allocate(s); + void* result = m_markedSpace.allocate(bytes); m_operationInProgress = NoOperation; - if (!result) { - reset(DoNotSweep); - - m_operationInProgress = Allocation; - result = m_markedSpace.allocate(s); - m_operationInProgress = NoOperation; - } ASSERT(result); return result; } -void Heap::updateWeakGCHandles() -{ - for (unsigned i = 0; i < m_weakGCHandlePools.size(); ++i) - weakGCHandlePool(i)->update(); -} - -void WeakGCHandlePool::update() -{ - for (unsigned i = 1; i < WeakGCHandlePool::numPoolEntries; ++i) { - if (m_entries[i].isValidPtr()) { - JSCell* cell = m_entries[i].get(); - if (!cell || !Heap::isMarked(cell)) - m_entries[i].invalidate(); - } - } -} - -WeakGCHandle* Heap::addWeakGCHandle(JSCell* ptr) -{ - for (unsigned i = 0; i < m_weakGCHandlePools.size(); ++i) - if (!weakGCHandlePool(i)->isFull()) - return weakGCHandlePool(i)->allocate(ptr); - - PageAllocationAligned allocation = PageAllocationAligned::allocate(WeakGCHandlePool::poolSize, WeakGCHandlePool::poolSize, OSAllocator::JSGCHeapPages); - m_weakGCHandlePools.append(allocation); - - WeakGCHandlePool* pool = new (allocation.base()) WeakGCHandlePool(); - return pool->allocate(ptr); -} - void Heap::protect(JSValue k) { ASSERT(k); @@ -269,14 +236,16 @@ void Heap::markRoots() JSONObject::markStringifiers(markStack, m_globalData->firstStringifierToMark); markStack.drain(); + m_handleHeap.markStrongHandles(markStack); + // Mark the small strings cache last, since it will clear itself if nothing // else has marked it. m_globalData->smallStrings.markChildren(markStack); markStack.drain(); markStack.compact(); - - updateWeakGCHandles(); + + m_handleHeap.updateAfterMark(); m_operationInProgress = NoOperation; } @@ -298,18 +267,17 @@ size_t Heap::capacity() const size_t Heap::globalObjectCount() { - return m_globalData->globalObjects.uncheckedSize(); + return m_globalData->globalObjectCount; } size_t Heap::protectedGlobalObjectCount() { - size_t count = 0; + size_t count = m_handleHeap.protectedGlobalObjectCount(); - GlobalObjectMap& map = m_globalData->globalObjects; - GlobalObjectMap::iterator end = map.uncheckedEnd(); - for (GlobalObjectMap::iterator it = map.uncheckedBegin(); it != end; ++it) { - if (map.isValid(it) && m_protectedValues.contains(it->second.get())) - ++count; + ProtectCountSet::iterator end = m_protectedValues.end(); + for (ProtectCountSet::iterator it = m_protectedValues.begin(); it != end; ++it) { + if (it->first->isObject() && asObject(it->first)->isGlobalObject()) + count++; } return count; @@ -402,6 +370,10 @@ void Heap::reset(SweepToggle sweepToggle) m_markedSpace.reset(); m_extraCost = 0; +#if ENABLE(JSC_ZOMBIES) + sweep(); +#endif + if (sweepToggle == DoSweep) { m_markedSpace.sweep(); m_markedSpace.shrink(); diff --git a/Source/JavaScriptCore/runtime/Heap.h b/Source/JavaScriptCore/runtime/Heap.h index 6591a5b..eb8af70 100644 --- a/Source/JavaScriptCore/runtime/Heap.h +++ b/Source/JavaScriptCore/runtime/Heap.h @@ -22,9 +22,11 @@ #ifndef Heap_h #define Heap_h +#include "HandleHeap.h" #include "MarkStack.h" #include "MarkedSpace.h" #include <wtf/Forward.h> +#include <wtf/HashCountedSet.h> #include <wtf/HashSet.h> namespace JSC { @@ -34,7 +36,6 @@ namespace JSC { class JSCell; class JSGlobalData; class JSValue; - class JSValue; class LiveObjectIterator; class MarkStack; class MarkedArgumentBuffer; @@ -89,8 +90,6 @@ namespace JSC { PassOwnPtr<TypeCountSet> protectedObjectTypeCounts(); PassOwnPtr<TypeCountSet> objectTypeCounts(); - WeakGCHandle* addWeakGCHandle(JSCell*); - void pushTempSortVector(Vector<ValueStringPair>*); void popTempSortVector(Vector<ValueStringPair>*); @@ -100,21 +99,21 @@ namespace JSC { template <typename Functor> void forEach(Functor&); + HandleSlot allocateGlobalHandle() { return m_handleHeap.allocate(); } + private: friend class JSGlobalData; static const size_t minExtraCost = 256; static const size_t maxExtraCost = 1024 * 1024; + void* allocateSlowCase(size_t); void reportExtraMemoryCostSlowCase(size_t); void markRoots(); void markProtectedObjects(MarkStack&); void markTempSortVectors(MarkStack&); - void updateWeakGCHandles(); - WeakGCHandlePool* weakGCHandlePool(size_t index); - enum SweepToggle { DoNotSweep, DoSweep }; void reset(SweepToggle); @@ -124,7 +123,6 @@ namespace JSC { MarkedSpace m_markedSpace; ProtectCountSet m_protectedValues; - Vector<PageAllocationAligned> m_weakGCHandlePools; Vector<Vector<ValueStringPair>* > m_tempSortingVectors; HashSet<GlobalCodeBlock*> m_codeBlocks; @@ -136,6 +134,7 @@ namespace JSC { MachineStackMarker m_machineStackMarker; MarkStack m_markStack; + HandleHeap m_handleHeap; size_t m_extraCost; }; @@ -165,11 +164,6 @@ namespace JSC { if (cost > minExtraCost) reportExtraMemoryCostSlowCase(cost); } - - inline WeakGCHandlePool* Heap::weakGCHandlePool(size_t index) - { - return static_cast<WeakGCHandlePool*>(m_weakGCHandlePools[index].base()); - } template <typename Functor> inline void Heap::forEach(Functor& functor) { diff --git a/Source/JavaScriptCore/runtime/Identifier.cpp b/Source/JavaScriptCore/runtime/Identifier.cpp index 28cfd0a..3992418 100644 --- a/Source/JavaScriptCore/runtime/Identifier.cpp +++ b/Source/JavaScriptCore/runtime/Identifier.cpp @@ -23,6 +23,7 @@ #include "CallFrame.h" #include "NumericStrings.h" +#include "ScopeChain.h" #include <new> // for placement new #include <string.h> // for strlen #include <wtf/Assertions.h> diff --git a/Source/JavaScriptCore/runtime/InitializeThreading.cpp b/Source/JavaScriptCore/runtime/InitializeThreading.cpp index 27611b7..aef60c8 100644 --- a/Source/JavaScriptCore/runtime/InitializeThreading.cpp +++ b/Source/JavaScriptCore/runtime/InitializeThreading.cpp @@ -59,6 +59,7 @@ static void initializeThreadingOnce() s_dtoaP5Mutex = new Mutex; initializeDates(); RegisterFile::initializeThreading(); + Structure::initializeThreading(); #endif } diff --git a/Source/JavaScriptCore/runtime/InternalFunction.cpp b/Source/JavaScriptCore/runtime/InternalFunction.cpp index f19ae0d..27106a1 100644 --- a/Source/JavaScriptCore/runtime/InternalFunction.cpp +++ b/Source/JavaScriptCore/runtime/InternalFunction.cpp @@ -29,23 +29,23 @@ namespace JSC { -ASSERT_CLASS_FITS_IN_CELL(InternalFunction); +// Ensure the compiler generates a vtable for InternalFunction! +void InternalFunction::vtableAnchor() {} -const ClassInfo InternalFunction::info = { "Function", 0, 0, 0 }; +ASSERT_CLASS_FITS_IN_CELL(InternalFunction); -const ClassInfo* InternalFunction::classInfo() const -{ - return &info; -} +const ClassInfo InternalFunction::s_info = { "Function", &JSObjectWithGlobalObject::s_info, 0, 0 }; InternalFunction::InternalFunction(NonNullPassRefPtr<Structure> structure) : JSObjectWithGlobalObject(structure) { + ASSERT(inherits(&s_info)); } InternalFunction::InternalFunction(JSGlobalData* globalData, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, const Identifier& name) : JSObjectWithGlobalObject(globalObject, structure) { + ASSERT(inherits(&s_info)); putDirect(*globalData, globalData->propertyNames->name, jsString(globalData, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum); } diff --git a/Source/JavaScriptCore/runtime/InternalFunction.h b/Source/JavaScriptCore/runtime/InternalFunction.h index 401f17b..8427b8c 100644 --- a/Source/JavaScriptCore/runtime/InternalFunction.h +++ b/Source/JavaScriptCore/runtime/InternalFunction.h @@ -33,8 +33,7 @@ namespace JSC { class InternalFunction : public JSObjectWithGlobalObject { public: - virtual const ClassInfo* classInfo() const; - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; const UString& name(ExecState*); const UString displayName(ExecState*); @@ -42,7 +41,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -55,13 +54,15 @@ namespace JSC { private: virtual CallType getCallData(CallData&) = 0; + + virtual void vtableAnchor(); }; InternalFunction* asInternalFunction(JSValue); inline InternalFunction* asInternalFunction(JSValue value) { - ASSERT(asObject(value)->inherits(&InternalFunction::info)); + ASSERT(asObject(value)->inherits(&InternalFunction::s_info)); return static_cast<InternalFunction*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h b/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h index a113e91..43dd0d3 100644 --- a/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h +++ b/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h @@ -37,7 +37,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, 0); } diff --git a/Source/JavaScriptCore/runtime/JSActivation.cpp b/Source/JavaScriptCore/runtime/JSActivation.cpp index 6fb5ced..eb9c7c1 100644 --- a/Source/JavaScriptCore/runtime/JSActivation.cpp +++ b/Source/JavaScriptCore/runtime/JSActivation.cpp @@ -37,11 +37,12 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(JSActivation); -const ClassInfo JSActivation::info = { "JSActivation", 0, 0, 0 }; +const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, 0 }; JSActivation::JSActivation(CallFrame* callFrame, NonNullPassRefPtr<FunctionExecutable> functionExecutable) : Base(callFrame->globalData().activationStructure, new JSActivationData(functionExecutable, callFrame->registers())) { + ASSERT(inherits(&s_info)); } JSActivation::~JSActivation() @@ -54,19 +55,19 @@ void JSActivation::markChildren(MarkStack& markStack) Base::markChildren(markStack); // No need to mark our registers if they're still in the RegisterFile. - Register* registerArray = d()->registerArray.get(); + WriteBarrier<Unknown>* registerArray = d()->registerArray.get(); if (!registerArray) return; size_t numParametersMinusThis = d()->functionExecutable->parameterCount(); size_t count = numParametersMinusThis; - markStack.deprecatedAppendValues(registerArray, count); + markStack.appendValues(registerArray, count); size_t numVars = d()->functionExecutable->capturedVariableCount(); // Skip the call frame, which sits between the parameters and vars. - markStack.deprecatedAppendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); + markStack.appendValues(registerArray + count + RegisterFile::CallFrameHeaderSize, numVars, MayContainNullValues); } inline bool JSActivation::symbolTableGet(const Identifier& propertyName, PropertySlot& slot) @@ -74,13 +75,13 @@ inline bool JSActivation::symbolTableGet(const Identifier& propertyName, Propert SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); if (!entry.isNull()) { ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount())); - slot.setRegisterSlot(®isterAt(entry.getIndex())); + slot.setValue(registerAt(entry.getIndex()).get()); return true; } return false; } -inline bool JSActivation::symbolTablePut(const Identifier& propertyName, JSValue value) +inline bool JSActivation::symbolTablePut(JSGlobalData& globalData, const Identifier& propertyName, JSValue value) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); @@ -90,7 +91,7 @@ inline bool JSActivation::symbolTablePut(const Identifier& propertyName, JSValue if (entry.isReadOnly()) return true; ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount())); - registerAt(entry.getIndex()) = value; + registerAt(entry.getIndex()).set(globalData, this, value); return true; } @@ -106,7 +107,7 @@ void JSActivation::getOwnPropertyNames(ExecState* exec, PropertyNameArray& prope JSObject::getOwnPropertyNames(exec, propertyNames, mode); } -inline bool JSActivation::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue value, unsigned attributes) +inline bool JSActivation::symbolTablePutWithAttributes(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); @@ -118,7 +119,7 @@ inline bool JSActivation::symbolTablePutWithAttributes(const Identifier& propert if (entry.getIndex() >= static_cast<int>(d()->functionExecutable->capturedVariableCount())) return false; entry.setAttributes(attributes); - registerAt(entry.getIndex()) = value; + registerAt(entry.getIndex()).set(globalData, this, value); return true; } @@ -148,7 +149,7 @@ void JSActivation::put(ExecState* exec, const Identifier& propertyName, JSValue { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); - if (symbolTablePut(propertyName, value)) + if (symbolTablePut(exec->globalData(), propertyName, value)) return; // We don't call through to JSObject because __proto__ and getter/setter @@ -163,7 +164,7 @@ void JSActivation::putWithAttributes(ExecState* exec, const Identifier& property { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); - if (symbolTablePutWithAttributes(propertyName, value, attributes)) + if (symbolTablePutWithAttributes(exec->globalData(), propertyName, value, attributes)) return; // We don't call through to JSObject because __proto__ and getter/setter @@ -201,7 +202,7 @@ bool JSActivation::isDynamicScope(bool& requiresDynamicChecks) const JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, const Identifier&) { JSActivation* activation = asActivation(slotBase); - CallFrame* callFrame = CallFrame::create(activation->d()->registers); + CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->d()->registers)); int argumentsRegister = activation->d()->functionExecutable->generatedBytecode().argumentsRegister(); if (JSValue arguments = callFrame->uncheckedR(argumentsRegister).jsValue()) return arguments; @@ -211,7 +212,7 @@ JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, const Identi callFrame->uncheckedR(argumentsRegister) = arguments; callFrame->uncheckedR(realArgumentsRegister) = arguments; - ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(&Arguments::info)); + ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(&Arguments::s_info)); return callFrame->uncheckedR(realArgumentsRegister).jsValue(); } diff --git a/Source/JavaScriptCore/runtime/JSActivation.h b/Source/JavaScriptCore/runtime/JSActivation.h index 6dd6d70..6e04041 100644 --- a/Source/JavaScriptCore/runtime/JSActivation.h +++ b/Source/JavaScriptCore/runtime/JSActivation.h @@ -62,12 +62,11 @@ namespace JSC { virtual JSObject* toThisObject(ExecState*) const; virtual JSValue toStrictThisObject(ExecState*) const; - void copyRegisters(); + void copyRegisters(JSGlobalData&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; - static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } + static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NeedsThisConversion | OverridesMarkChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags; @@ -93,8 +92,8 @@ namespace JSC { bool symbolTableGet(const Identifier&, PropertySlot&); bool symbolTableGet(const Identifier&, PropertyDescriptor&); bool symbolTableGet(const Identifier&, PropertySlot&, bool& slotIsWriteable); - bool symbolTablePut(const Identifier&, JSValue); - bool symbolTablePutWithAttributes(const Identifier&, JSValue, unsigned attributes); + bool symbolTablePut(JSGlobalData&, const Identifier&, JSValue); + bool symbolTablePutWithAttributes(JSGlobalData&, const Identifier&, JSValue, unsigned attributes); static JSValue argumentsGetter(ExecState*, JSValue, const Identifier&); NEVER_INLINE PropertySlot::GetValueFunc getArgumentsGetter(); @@ -106,7 +105,7 @@ namespace JSC { inline JSActivation* asActivation(JSValue value) { - ASSERT(asObject(value)->inherits(&JSActivation::info)); + ASSERT(asObject(value)->inherits(&JSActivation::s_info)); return static_cast<JSActivation*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/JSArray.cpp b/Source/JavaScriptCore/runtime/JSArray.cpp index ded6d87..822b84c 100644 --- a/Source/JavaScriptCore/runtime/JSArray.cpp +++ b/Source/JavaScriptCore/runtime/JSArray.cpp @@ -92,7 +92,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSArray); // as long as it is 1/8 full. If more sparse than that, we use a map. static const unsigned minDensityMultiplier = 8; -const ClassInfo JSArray::info = {"Array", 0, 0, 0}; +const ClassInfo JSArray::s_info = {"Array", &JSNonFinalObject::s_info, 0, 0}; // We keep track of the size of the last array after it was grown. We use this // as a simple heuristic for as the value to grow the next array from size 0. @@ -127,8 +127,10 @@ inline void JSArray::checkConsistency(ConsistencyCheckType) #endif JSArray::JSArray(VPtrStealingHackType) - : JSObject(createStructure(jsNull())) + : JSNonFinalObject(createStructure(jsNull())) { + ASSERT(inherits(&s_info)); + unsigned initialCapacity = 0; m_storage = static_cast<ArrayStorage*>(fastZeroedMalloc(storageSize(initialCapacity))); @@ -144,8 +146,10 @@ JSArray::JSArray(VPtrStealingHackType) } JSArray::JSArray(NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + : JSNonFinalObject(structure) { + ASSERT(inherits(&s_info)); + unsigned initialCapacity = 0; m_storage = static_cast<ArrayStorage*>(fastZeroedMalloc(storageSize(initialCapacity))); @@ -159,8 +163,10 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure) } JSArray::JSArray(NonNullPassRefPtr<Structure> structure, unsigned initialLength, ArrayCreationMode creationMode) - : JSObject(structure) + : JSNonFinalObject(structure) { + ASSERT(inherits(&s_info)); + unsigned initialCapacity; if (creationMode == CreateCompact) initialCapacity = initialLength; @@ -199,8 +205,10 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure, unsigned initialLength, } JSArray::JSArray(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure, const ArgList& list) - : JSObject(structure) + : JSNonFinalObject(structure) { + ASSERT(inherits(&s_info)); + unsigned initialCapacity = list.size(); unsigned initialStorage; diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h index b5caa47..ede3c61 100644 --- a/Source/JavaScriptCore/runtime/JSArray.h +++ b/Source/JavaScriptCore/runtime/JSArray.h @@ -57,7 +57,7 @@ namespace JSC { enum ArrayCreationMode { CreateCompact, CreateInitialized }; - class JSArray : public JSObject { + class JSArray : public JSNonFinalObject { friend class JIT; friend class Walker; @@ -75,7 +75,7 @@ namespace JSC { virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual void put(ExecState*, unsigned propertyName, JSValue); // FIXME: Make protected and add setItem. - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; unsigned length() const { return m_storage->m_length; } void setLength(unsigned); // OK to use on new arrays, but not if it might be a RegExpMatchArray. @@ -127,7 +127,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } inline void markChildrenDirect(MarkStack& markStack); @@ -144,8 +144,6 @@ namespace JSC { void setSubclassData(void*); private: - virtual const ClassInfo* classInfo() const { return &info; } - bool getOwnPropertySlotSlowCase(ExecState*, unsigned propertyName, PropertySlot&); void putSlowCase(ExecState*, unsigned propertyName, JSValue); @@ -167,7 +165,7 @@ namespace JSC { inline JSArray* asArray(JSCell* cell) { - ASSERT(cell->inherits(&JSArray::info)); + ASSERT(cell->inherits(&JSArray::s_info)); return static_cast<JSArray*>(cell); } diff --git a/Source/JavaScriptCore/runtime/JSByteArray.cpp b/Source/JavaScriptCore/runtime/JSByteArray.cpp index 3f7d806..ae735dc 100644 --- a/Source/JavaScriptCore/runtime/JSByteArray.cpp +++ b/Source/JavaScriptCore/runtime/JSByteArray.cpp @@ -33,12 +33,11 @@ using namespace WTF; namespace JSC { -const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", 0, 0, 0 }; +const ClassInfo JSByteArray::s_defaultInfo = { "ByteArray", &Base::s_info, 0, 0 }; -JSByteArray::JSByteArray(ExecState* exec, NonNullPassRefPtr<Structure> structure, ByteArray* storage, const JSC::ClassInfo* classInfo) - : JSObject(structure) +JSByteArray::JSByteArray(ExecState* exec, NonNullPassRefPtr<Structure> structure, ByteArray* storage) + : JSNonFinalObject(structure) , m_storage(storage) - , m_classInfo(classInfo) { putDirect(exec->globalData(), exec->globalData().propertyNames->length, jsNumber(m_storage->length()), ReadOnly | DontDelete); } @@ -51,10 +50,9 @@ JSByteArray::~JSByteArray() #endif -PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype) +PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype, const JSC::ClassInfo* classInfo) { - PassRefPtr<Structure> result = Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); - return result; + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, classInfo); } bool JSByteArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) diff --git a/Source/JavaScriptCore/runtime/JSByteArray.h b/Source/JavaScriptCore/runtime/JSByteArray.h index 44bae2d..6e91594 100644 --- a/Source/JavaScriptCore/runtime/JSByteArray.h +++ b/Source/JavaScriptCore/runtime/JSByteArray.h @@ -32,9 +32,11 @@ namespace JSC { - class JSByteArray : public JSObject { + class JSByteArray : public JSNonFinalObject { friend class JSGlobalData; public: + typedef JSNonFinalObject Base; + bool canAccessIndex(unsigned i) { return i < m_storage->length(); } JSValue getIndex(ExecState*, unsigned i) { @@ -45,18 +47,25 @@ namespace JSC { void setIndex(unsigned i, int value) { ASSERT(canAccessIndex(i)); + if (value & ~0xFF) { + if (value < 0) + value = 0; + else + value = 255; + } m_storage->data()[i] = static_cast<unsigned char>(value); } - + void setIndex(unsigned i, double value) { ASSERT(canAccessIndex(i)); - // The largest integer value that a double can represent without loss of precision - // is 2^53. long long is the smallest integral type that gives correct results - // when casting numbers larger than 2^31 from a value of type double. - m_storage->data()[i] = static_cast<unsigned char>(static_cast<long long>(value)); + if (!(value > 0)) // Clamp NaN to 0 + value = 0; + else if (value > 255) + value = 255; + m_storage->data()[i] = static_cast<unsigned char>(value + 0.5); } - + void setIndex(ExecState* exec, unsigned i, JSValue value) { double byteValue = value.toNumber(exec); @@ -66,8 +75,8 @@ namespace JSC { setIndex(i, byteValue); } - JSByteArray(ExecState* exec, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage, const JSC::ClassInfo* = &s_defaultInfo); - static PassRefPtr<Structure> createStructure(JSValue prototype); + JSByteArray(ExecState*, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage); + static PassRefPtr<Structure> createStructure(JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); @@ -77,9 +86,8 @@ namespace JSC { virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); - virtual const ClassInfo* classInfo() const { return m_classInfo; } static const ClassInfo s_defaultInfo; - + size_t length() const { return m_storage->length(); } WTF::ByteArray* storage() const { return m_storage.get(); } @@ -94,15 +102,13 @@ namespace JSC { private: enum VPtrStealingHackType { VPtrStealingHack }; JSByteArray(VPtrStealingHackType) - : JSObject(createStructure(jsNull())) - , m_classInfo(0) + : JSNonFinalObject(createStructure(jsNull())) { } RefPtr<WTF::ByteArray> m_storage; - const ClassInfo* m_classInfo; }; - + JSByteArray* asByteArray(JSValue value); inline JSByteArray* asByteArray(JSValue value) { diff --git a/Source/JavaScriptCore/runtime/JSCell.cpp b/Source/JavaScriptCore/runtime/JSCell.cpp index 0cc1ab1..9acb777 100644 --- a/Source/JavaScriptCore/runtime/JSCell.cpp +++ b/Source/JavaScriptCore/runtime/JSCell.cpp @@ -163,11 +163,6 @@ JSObject* JSCell::toThisObject(ExecState* exec) const return toObject(exec); } -const ClassInfo* JSCell::classInfo() const -{ - return 0; -} - JSValue JSCell::getJSNumber() { return JSValue(); diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h index 66f6197..7313d52 100644 --- a/Source/JavaScriptCore/runtime/JSCell.h +++ b/Source/JavaScriptCore/runtime/JSCell.h @@ -27,6 +27,7 @@ #include "ConstructData.h" #include "Heap.h" #include "JSImmediate.h" +#include "JSLock.h" #include "JSValue.h" #include "MarkStack.h" #include "Structure.h" @@ -65,6 +66,7 @@ namespace JSC { friend class JSGlobalData; friend class MarkedSpace; friend class MarkedBlock; + friend class ScopeChainNode; private: explicit JSCell(Structure*); @@ -73,7 +75,7 @@ namespace JSC { public: static PassRefPtr<Structure> createDummyStructure() { - return Structure::create(jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount); + return Structure::create(jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0); } // Querying the type. @@ -118,7 +120,7 @@ namespace JSC { #endif // Object operations, with the toObject operation included. - virtual const ClassInfo* classInfo() const; + const ClassInfo* classInfo() const { return m_structure->classInfo(); } virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); virtual void put(ExecState*, unsigned propertyName, JSValue); virtual bool deleteProperty(ExecState*, const Identifier& propertyName); @@ -174,16 +176,6 @@ namespace JSC { { } - inline void* JSCell::operator new(size_t size, JSGlobalData* globalData) - { - return globalData->heap.allocate(size); - } - - inline void* JSCell::operator new(size_t size, ExecState* exec) - { - return exec->heap()->allocate(size); - } - // --- JSValue inlines ---------------------------- inline bool JSValue::isString() const @@ -402,21 +394,59 @@ namespace JSC { } #endif - inline void* MarkedBlock::allocate(size_t& nextCell) + inline void* MarkedBlock::allocate() { - do { - ASSERT(nextCell < CELLS_PER_BLOCK); - if (!marked.testAndSet(nextCell)) { // Always false for the last cell in the block - JSCell* cell = reinterpret_cast<JSCell*>(&cells[nextCell++]); + while (m_nextAtom < m_endAtom) { + if (!m_marks.testAndSet(m_nextAtom)) { + JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[m_nextAtom]); + m_nextAtom += m_atomsPerCell; cell->~JSCell(); return cell; } - nextCell = marked.nextPossiblyUnset(nextCell); - } while (nextCell != CELLS_PER_BLOCK); - - nextCell = 0; + m_nextAtom += m_atomsPerCell; + } + return 0; } + + inline MarkedSpace::SizeClass& MarkedSpace::sizeClassFor(size_t bytes) + { + ASSERT(bytes && bytes <= preciseCutoff); + return m_preciseSizeClasses[(bytes - 1) / preciseStep]; + } + + inline void* MarkedSpace::allocate(size_t bytes) + { + SizeClass& sizeClass = sizeClassFor(bytes); + return allocateFromSizeClass(sizeClass); + } + + inline void* Heap::allocate(size_t bytes) + { + ASSERT(globalData()->identifierTable == wtfThreadData().currentIdentifierTable()); + ASSERT(JSLock::lockCount() > 0); + ASSERT(JSLock::currentThreadIsHoldingLock()); + ASSERT(bytes <= MarkedSpace::maxCellSize); + ASSERT(m_operationInProgress == NoOperation); + + m_operationInProgress = Allocation; + void* result = m_markedSpace.allocate(bytes); + m_operationInProgress = NoOperation; + if (result) + return result; + + return allocateSlowCase(bytes); + } + + inline void* JSCell::operator new(size_t size, JSGlobalData* globalData) + { + return globalData->heap.allocate(size); + } + + inline void* JSCell::operator new(size_t size, ExecState* exec) + { + return exec->heap()->allocate(size); + } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/JSChunk.cpp b/Source/JavaScriptCore/runtime/JSChunk.cpp new file mode 100644 index 0000000..f064de8 --- /dev/null +++ b/Source/JavaScriptCore/runtime/JSChunk.cpp @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSChunk.h" + diff --git a/Source/JavaScriptCore/runtime/JSChunk.h b/Source/JavaScriptCore/runtime/JSChunk.h new file mode 100644 index 0000000..bae2bc7 --- /dev/null +++ b/Source/JavaScriptCore/runtime/JSChunk.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSChunk_h +#define JSChunk_h + + + +#endif // JSChunk_h diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp index c569722..2ade441 100644 --- a/Source/JavaScriptCore/runtime/JSFunction.cpp +++ b/Source/JavaScriptCore/runtime/JSFunction.cpp @@ -42,16 +42,14 @@ using namespace WTF; using namespace Unicode; namespace JSC { -#if ENABLE(JIT) EncodedJSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState* exec) { return throwVMError(exec, createNotAConstructorError(exec, exec->callee())); } -#endif ASSERT_CLASS_FITS_IN_CELL(JSFunction); -const ClassInfo JSFunction::info = { "Function", 0, 0, 0 }; +const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0 }; bool JSFunction::isHostFunctionNonInline() const { @@ -61,43 +59,36 @@ bool JSFunction::isHostFunctionNonInline() const JSFunction::JSFunction(NonNullPassRefPtr<Structure> structure) : Base(structure) , m_executable(adoptRef(new VPtrHackExecutable())) - , m_scopeChain(NoScopeChain()) { + ASSERT(inherits(&s_info)); } -#if ENABLE(JIT) JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, PassRefPtr<NativeExecutable> thunk) : Base(globalObject, structure) , m_executable(thunk) - , m_scopeChain(globalObject->globalScopeChain()) + , m_scopeChain(exec->globalData(), this, globalObject->globalScopeChain()) { + ASSERT(inherits(&s_info)); putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum); putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum); } -#endif JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func) : Base(globalObject, structure) -#if ENABLE(JIT) , m_executable(exec->globalData().getHostFunction(func)) -#endif - , m_scopeChain(globalObject->globalScopeChain()) + , m_scopeChain(exec->globalData(), this, globalObject->globalScopeChain()) { + ASSERT(inherits(&s_info)); putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum); -#if ENABLE(JIT) putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum); -#else - UNUSED_PARAM(length); - UNUSED_PARAM(func); - ASSERT_NOT_REACHED(); -#endif } JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<FunctionExecutable> executable, ScopeChainNode* scopeChainNode) - : Base(scopeChainNode->globalObject, scopeChainNode->globalObject->functionStructure()) + : Base(scopeChainNode->globalObject.get(), scopeChainNode->globalObject->functionStructure()) , m_executable(executable) - , m_scopeChain(scopeChainNode) + , m_scopeChain(exec->globalData(), this, scopeChainNode) { + ASSERT(inherits(&s_info)); const Identifier& name = static_cast<FunctionExecutable*>(m_executable.get())->name(); putDirect(exec->globalData(), exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum); } @@ -159,20 +150,18 @@ void JSFunction::markChildren(MarkStack& markStack) Base::markChildren(markStack); if (!isHostFunction()) { jsExecutable()->markAggregate(markStack); - scope().markAggregate(markStack); + markStack.append(&m_scopeChain); } } CallType JSFunction::getCallData(CallData& callData) { -#if ENABLE(JIT) if (isHostFunction()) { callData.native.function = nativeFunction(); return CallTypeHost; } -#endif callData.js.functionExecutable = jsExecutable(); - callData.js.scopeChain = scope().node(); + callData.js.scopeChain = scope(); return CallTypeJS; } @@ -206,7 +195,7 @@ bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN WriteBarrierBase<Unknown>* location = getDirectLocation(propertyName); if (!location) { - JSObject* prototype = new (exec) JSObject(scope().globalObject()->emptyObjectStructure()); + JSObject* prototype = constructEmptyObject(exec, scope()->globalObject->emptyObjectStructure()); prototype->putDirect(exec->globalData(), exec->propertyNames().constructor, this, DontEnum); putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | DontEnum); location = getDirectLocation(propertyName); @@ -336,7 +325,7 @@ ConstructType JSFunction::getConstructData(ConstructData& constructData) if (isHostFunction()) return ConstructTypeNone; constructData.js.functionExecutable = jsExecutable(); - constructData.js.scopeChain = scope().node(); + constructData.js.scopeChain = scope(); return ConstructTypeJS; } diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h index 3a2fe30..089f42e 100644 --- a/Source/JavaScriptCore/runtime/JSFunction.h +++ b/Source/JavaScriptCore/runtime/JSFunction.h @@ -45,9 +45,7 @@ namespace JSC { public: JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction); -#if ENABLE(JIT) JSFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, PassRefPtr<NativeExecutable>); -#endif JSFunction(ExecState*, NonNullPassRefPtr<FunctionExecutable>, ScopeChainNode*); virtual ~JSFunction(); @@ -55,15 +53,15 @@ namespace JSC { const UString displayName(ExecState*); const UString calculatedDisplayName(ExecState*); - ScopeChain& scope() + ScopeChainNode* scope() { ASSERT(!isHostFunctionNonInline()); - return m_scopeChain; + return m_scopeChain.get(); } - void setScope(const ScopeChain& scopeChain) + void setScope(JSGlobalData& globalData, ScopeChainNode* scopeChain) { ASSERT(!isHostFunctionNonInline()); - m_scopeChain = scopeChain; + m_scopeChain.set(globalData, this, scopeChain); } ExecutableBase* executable() const { return m_executable.get(); } @@ -72,11 +70,11 @@ namespace JSC { inline bool isHostFunction() const; FunctionExecutable* jsExecutable() const; - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } NativeFunction nativeFunction(); @@ -100,21 +98,19 @@ namespace JSC { virtual void markChildren(MarkStack&); - virtual const ClassInfo* classInfo() const { return &info; } - static JSValue argumentsGetter(ExecState*, JSValue, const Identifier&); static JSValue callerGetter(ExecState*, JSValue, const Identifier&); static JSValue lengthGetter(ExecState*, JSValue, const Identifier&); RefPtr<ExecutableBase> m_executable; - ScopeChain m_scopeChain; + WriteBarrier<ScopeChainNode> m_scopeChain; }; JSFunction* asFunction(JSValue); inline JSFunction* asFunction(JSValue value) { - ASSERT(asObject(value)->inherits(&JSFunction::info)); + ASSERT(asObject(value)->inherits(&JSFunction::s_info)); return static_cast<JSFunction*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.cpp b/Source/JavaScriptCore/runtime/JSGlobalData.cpp index ff88048..e25040c 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalData.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalData.cpp @@ -75,6 +75,7 @@ extern JSC_CONST_HASHTABLE HashTable jsonTable; extern JSC_CONST_HASHTABLE HashTable dateTable; extern JSC_CONST_HASHTABLE HashTable mathTable; extern JSC_CONST_HASHTABLE HashTable numberTable; +extern JSC_CONST_HASHTABLE HashTable objectConstructorTable; extern JSC_CONST_HASHTABLE HashTable regExpTable; extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable; extern JSC_CONST_HASHTABLE HashTable stringTable; @@ -119,12 +120,13 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread , jsonTable(fastNew<HashTable>(JSC::jsonTable)) , mathTable(fastNew<HashTable>(JSC::mathTable)) , numberTable(fastNew<HashTable>(JSC::numberTable)) + , objectConstructorTable(fastNew<HashTable>(JSC::objectConstructorTable)) , regExpTable(fastNew<HashTable>(JSC::regExpTable)) , regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable)) , stringTable(fastNew<HashTable>(JSC::stringTable)) , activationStructure(JSActivation::createStructure(jsNull())) - , interruptedExecutionErrorStructure(JSObject::createStructure(jsNull())) - , terminatedExecutionErrorStructure(JSObject::createStructure(jsNull())) + , interruptedExecutionErrorStructure(JSNonFinalObject::createStructure(jsNull())) + , terminatedExecutionErrorStructure(JSNonFinalObject::createStructure(jsNull())) , staticScopeStructure(JSStaticScopeObject::createStructure(jsNull())) , strictEvalActivationStructure(StrictEvalActivation::createStructure(jsNull())) , stringStructure(JSString::createStructure(jsNull())) @@ -132,14 +134,16 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread , propertyNameIteratorStructure(JSPropertyNameIterator::createStructure(jsNull())) , getterSetterStructure(GetterSetter::createStructure(jsNull())) , apiWrapperStructure(JSAPIValueWrapper::createStructure(jsNull())) + , scopeChainNodeStructure(ScopeChainNode::createStructure(jsNull())) , dummyMarkableCellStructure(JSCell::createDummyStructure()) , identifierTable(globalDataType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable()) , propertyNames(new CommonIdentifiers(this)) , emptyList(new MarkedArgumentBuffer) , lexer(new Lexer(this)) , parser(new Parser) - , interpreter(new Interpreter) + , interpreter(0) , heap(this) + , globalObjectCount(0) , dynamicGlobalObject(0) , firstStringifierToMark(0) , cachedUTCOffset(NaN) @@ -152,6 +156,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread , exclusiveThread(0) #endif { + interpreter = new Interpreter(*this); if (globalDataType == Default) m_stack = wtfThreadData().stack(); @@ -159,7 +164,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread startProfilerServerIfNeeded(); #endif #if ENABLE(JIT) && ENABLE(INTERPRETER) -#if PLATFORM(CF) +#if USE(CF) CFStringRef canUseJITKey = CFStringCreateWithCString(0 , "JavaScriptCoreUseJIT", kCFStringEncodingMacRoman); CFBooleanRef canUseJIT = (CFBooleanRef)CFPreferencesCopyAppValue(canUseJITKey, kCFPreferencesCurrentApplication); if (canUseJIT) { @@ -201,6 +206,7 @@ JSGlobalData::~JSGlobalData() jsonTable->deleteTable(); mathTable->deleteTable(); numberTable->deleteTable(); + objectConstructorTable->deleteTable(); regExpTable->deleteTable(); regExpConstructorTable->deleteTable(); stringTable->deleteTable(); @@ -210,6 +216,7 @@ JSGlobalData::~JSGlobalData() fastDelete(const_cast<HashTable*>(jsonTable)); fastDelete(const_cast<HashTable*>(mathTable)); fastDelete(const_cast<HashTable*>(numberTable)); + fastDelete(const_cast<HashTable*>(objectConstructorTable)); fastDelete(const_cast<HashTable*>(regExpTable)); fastDelete(const_cast<HashTable*>(regExpConstructorTable)); fastDelete(const_cast<HashTable*>(stringTable)); @@ -283,6 +290,11 @@ PassRefPtr<NativeExecutable> JSGlobalData::getHostFunction(NativeFunction functi { return jitStubs->hostFunctionStub(this, function, generator); } +#else +PassRefPtr<NativeExecutable> JSGlobalData::getHostFunction(NativeFunction function) +{ + return NativeExecutable::create(function, callHostFunctionAsConstructor); +} #endif JSGlobalData::ClientData::~ClientData() @@ -320,7 +332,7 @@ public: inline void Recompiler::operator()(JSCell* cell) { - if (!cell->inherits(&JSFunction::info)) + if (!cell->inherits(&JSFunction::s_info)) return; JSFunction* function = asFunction(cell); if (function->executable()->isHostFunction()) diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.h b/Source/JavaScriptCore/runtime/JSGlobalData.h index 7b69055..ee3e067 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalData.h +++ b/Source/JavaScriptCore/runtime/JSGlobalData.h @@ -39,7 +39,6 @@ #include "SmallStrings.h" #include "Terminator.h" #include "TimeoutChecker.h" -#include "WeakGCMap.h" #include "WeakRandom.h" #include <wtf/BumpPointerAllocator.h> #include <wtf/Forward.h> @@ -63,6 +62,7 @@ namespace JSC { class JSGlobalObject; class JSObject; class Lexer; + class NativeExecutable; class Parser; class RegExpCache; class Stringifier; @@ -75,8 +75,6 @@ namespace JSC { struct HashTable; struct Instruction; - typedef WeakGCMap<JSGlobalObject*, JSGlobalObject> GlobalObjectMap; // FIXME: Would be nice to use a WeakGCSet here. - struct DSTOffsetCache { DSTOffsetCache() { @@ -141,6 +139,7 @@ namespace JSC { const HashTable* jsonTable; const HashTable* mathTable; const HashTable* numberTable; + const HashTable* objectConstructorTable; const HashTable* regExpTable; const HashTable* regExpConstructorTable; const HashTable* stringTable; @@ -155,6 +154,7 @@ namespace JSC { RefPtr<Structure> propertyNameIteratorStructure; RefPtr<Structure> getterSetterStructure; RefPtr<Structure> apiWrapperStructure; + RefPtr<Structure> scopeChainNodeStructure; RefPtr<Structure> dummyMarkableCellStructure; static void storeVPtrs(); @@ -199,9 +199,10 @@ namespace JSC { { return jitStubs->ctiStub(this, generator); } - PassRefPtr<NativeExecutable> getHostFunction(NativeFunction function); - PassRefPtr<NativeExecutable> getHostFunction(NativeFunction function, ThunkGenerator generator); + PassRefPtr<NativeExecutable> getHostFunction(NativeFunction, ThunkGenerator); #endif + PassRefPtr<NativeExecutable> getHostFunction(NativeFunction); + TimeoutChecker timeoutChecker; Terminator terminator; Heap heap; @@ -213,7 +214,7 @@ namespace JSC { HashMap<OpaqueJSClass*, OpaqueJSClassContextData*> opaqueJSClassData; - GlobalObjectMap globalObjects; + unsigned globalObjectCount; JSGlobalObject* dynamicGlobalObject; HashSet<JSObject*> stringRecursionCheckVisitedObjects; @@ -253,6 +254,8 @@ namespace JSC { void addRegExpToTrace(PassRefPtr<RegExp> regExp); #endif void dumpRegExpTrace(); + HandleSlot allocateGlobalHandle() { return heap.allocateGlobalHandle(); } + private: JSGlobalData(GlobalDataType, ThreadStackType); static JSGlobalData*& sharedInstanceInternal(); diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp index f303196..28fc07d 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp @@ -46,7 +46,6 @@ #include "ErrorPrototype.h" #include "FunctionConstructor.h" #include "FunctionPrototype.h" -#include "GlobalEvalFunction.h" #include "JSFunction.h" #include "JSGlobalObjectFunctions.h" #include "JSLock.h" @@ -60,7 +59,6 @@ #include "ObjectConstructor.h" #include "ObjectPrototype.h" #include "Profiler.h" -#include "PrototypeFunction.h" #include "RegExpConstructor.h" #include "RegExpMatchesArray.h" #include "RegExpObject.h" @@ -104,11 +102,6 @@ JSGlobalObject::~JSGlobalObject() (*profiler)->stopProfiling(globalExec(), UString()); } - d()->globalData->globalObjects.take(this); - - RegisterFile& registerFile = globalData().interpreter->registerFile(); - if (registerFile.clearGlobalObject(this)) - registerFile.setNumGlobals(0); d()->destructor(d()); } @@ -119,10 +112,9 @@ void JSGlobalObject::init(JSObject* thisValue) structure()->disableSpecificFunctionTracking(); d()->globalData = Heap::heap(this)->globalData(); - d()->globalData->globalObjects.set(this, this); - d()->globalScopeChain = ScopeChain(this, d()->globalData.get(), this, thisValue); + d()->globalScopeChain.set(*d()->globalData, this, new (d()->globalData.get()) ScopeChainNode(0, this, d()->globalData.get(), this, thisValue)); - JSGlobalObject::globalExec()->init(0, 0, d()->globalScopeChain.node(), CallFrame::noCaller(), 0, 0); + JSGlobalObject::globalExec()->init(0, 0, d()->globalScopeChain.get(), CallFrame::noCaller(), 0, 0); d()->debugger = 0; @@ -135,7 +127,7 @@ void JSGlobalObject::put(ExecState* exec, const Identifier& propertyName, JSValu { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); - if (symbolTablePut(propertyName, value)) + if (symbolTablePut(exec->globalData(), propertyName, value)) return; JSVariableObject::put(exec, propertyName, value, slot); } @@ -144,7 +136,7 @@ void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& proper { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); - if (symbolTablePutWithAttributes(propertyName, value, attributes)) + if (symbolTablePutWithAttributes(exec->globalData(), propertyName, value, attributes)) return; JSValue valueBefore = getDirect(propertyName); @@ -186,19 +178,18 @@ void JSGlobalObject::reset(JSValue prototype) // Prototypes d()->functionPrototype.set(exec->globalData(), this, new (exec) FunctionPrototype(exec, this, FunctionPrototype::createStructure(jsNull()))); // The real prototype will be set once ObjectPrototype is created. - d()->prototypeFunctionStructure = PrototypeFunction::createStructure(d()->functionPrototype.get()); + d()->functionStructure = JSFunction::createStructure(d()->functionPrototype.get()); d()->internalFunctionStructure = InternalFunction::createStructure(d()->functionPrototype.get()); - NativeFunctionWrapper* callFunction = 0; - NativeFunctionWrapper* applyFunction = 0; - d()->functionPrototype->addFunctionProperties(exec, this, d()->prototypeFunctionStructure.get(), &callFunction, &applyFunction); + JSFunction* callFunction = 0; + JSFunction* applyFunction = 0; + d()->functionPrototype->addFunctionProperties(exec, this, d()->functionStructure.get(), &callFunction, &applyFunction); d()->callFunction.set(exec->globalData(), this, callFunction); d()->applyFunction.set(exec->globalData(), this, applyFunction); - d()->objectPrototype.set(exec->globalData(), this, new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(jsNull()), d()->prototypeFunctionStructure.get())); + d()->objectPrototype.set(exec->globalData(), this, new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(jsNull()), d()->functionStructure.get())); d()->functionPrototype->structure()->setPrototypeWithoutTransition(d()->objectPrototype.get()); d()->emptyObjectStructure = d()->objectPrototype->inheritorID(); - d()->functionStructure = JSFunction::createStructure(d()->functionPrototype.get()); d()->callbackFunctionStructure = JSCallbackFunction::createStructure(d()->functionPrototype.get()); d()->argumentsStructure = Arguments::createStructure(d()->objectPrototype.get()); d()->callbackConstructorStructure = JSCallbackConstructor::createStructure(d()->objectPrototype.get()); @@ -211,32 +202,32 @@ void JSGlobalObject::reset(JSValue prototype) d()->stringPrototype.set(exec->globalData(), this, new (exec) StringPrototype(exec, this, StringPrototype::createStructure(d()->objectPrototype.get()))); d()->stringObjectStructure = StringObject::createStructure(d()->stringPrototype.get()); - d()->booleanPrototype.set(exec->globalData(), this, new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get())); + d()->booleanPrototype.set(exec->globalData(), this, new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(d()->objectPrototype.get()), d()->functionStructure.get())); d()->booleanObjectStructure = BooleanObject::createStructure(d()->booleanPrototype.get()); - d()->numberPrototype.set(exec->globalData(), this, new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get())); + d()->numberPrototype.set(exec->globalData(), this, new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(d()->objectPrototype.get()), d()->functionStructure.get())); d()->numberObjectStructure = NumberObject::createStructure(d()->numberPrototype.get()); d()->datePrototype.set(exec->globalData(), this, new (exec) DatePrototype(exec, this, DatePrototype::createStructure(d()->objectPrototype.get()))); d()->dateStructure = DateInstance::createStructure(d()->datePrototype.get()); - d()->regExpPrototype.set(exec->globalData(), this, new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get())); + d()->regExpPrototype.set(exec->globalData(), this, new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(d()->objectPrototype.get()), d()->functionStructure.get())); d()->regExpStructure = RegExpObject::createStructure(d()->regExpPrototype.get()); d()->methodCallDummy.set(exec->globalData(), this, constructEmptyObject(exec)); - ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(d()->objectPrototype.get()), d()->prototypeFunctionStructure.get()); + ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(d()->objectPrototype.get()), d()->functionStructure.get()); d()->errorStructure = ErrorInstance::createStructure(errorPrototype); // Constructors - JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(d()->functionPrototype.get()), d()->objectPrototype.get(), d()->prototypeFunctionStructure.get()); + JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(d()->functionPrototype.get()), d()->objectPrototype.get()); JSCell* functionConstructor = new (exec) FunctionConstructor(exec, this, FunctionConstructor::createStructure(d()->functionPrototype.get()), d()->functionPrototype.get()); - JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(d()->functionPrototype.get()), d()->arrayPrototype.get(), d()->prototypeFunctionStructure.get()); - JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(d()->functionPrototype.get()), d()->prototypeFunctionStructure.get(), d()->stringPrototype.get()); + JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(d()->functionPrototype.get()), d()->arrayPrototype.get(), d()->functionStructure.get()); + JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(d()->functionPrototype.get()), d()->functionStructure.get(), d()->stringPrototype.get()); JSCell* booleanConstructor = new (exec) BooleanConstructor(exec, this, BooleanConstructor::createStructure(d()->functionPrototype.get()), d()->booleanPrototype.get()); JSCell* numberConstructor = new (exec) NumberConstructor(exec, this, NumberConstructor::createStructure(d()->functionPrototype.get()), d()->numberPrototype.get()); - JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(d()->functionPrototype.get()), d()->prototypeFunctionStructure.get(), d()->datePrototype.get()); + JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(d()->functionPrototype.get()), d()->functionStructure.get(), d()->datePrototype.get()); d()->regExpConstructor.set(exec->globalData(), this, new (exec) RegExpConstructor(exec, this, RegExpConstructor::createStructure(d()->functionPrototype.get()), d()->regExpPrototype.get())); @@ -294,20 +285,20 @@ void JSGlobalObject::reset(JSValue prototype) // Set global functions. - d()->evalFunction.set(exec->globalData(), this, new (exec) GlobalEvalFunction(exec, this, GlobalEvalFunction::createStructure(d()->functionPrototype.get()), 1, exec->propertyNames().eval, globalFuncEval, this)); + d()->evalFunction.set(exec->globalData(), this, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, exec->propertyNames().eval, globalFuncEval)); putDirectFunctionWithoutTransition(exec, d()->evalFunction.get(), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 2, Identifier(exec, "parseInt"), globalFuncParseInt), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "parseFloat"), globalFuncParseFloat), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "isNaN"), globalFuncIsNaN), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "isFinite"), globalFuncIsFinite), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "escape"), globalFuncEscape), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "unescape"), globalFuncUnescape), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "decodeURI"), globalFuncDecodeURI), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "decodeURIComponent"), globalFuncDecodeURIComponent), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "encodeURI"), globalFuncEncodeURI), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "encodeURIComponent"), globalFuncEncodeURIComponent), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 2, Identifier(exec, "parseInt"), globalFuncParseInt), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "parseFloat"), globalFuncParseFloat), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "isNaN"), globalFuncIsNaN), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "isFinite"), globalFuncIsFinite), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "escape"), globalFuncEscape), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "unescape"), globalFuncUnescape), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "decodeURI"), globalFuncDecodeURI), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "decodeURIComponent"), globalFuncDecodeURIComponent), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "encodeURI"), globalFuncEncodeURI), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "encodeURIComponent"), globalFuncEncodeURIComponent), DontEnum); #ifndef NDEBUG - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, this, d()->prototypeFunctionStructure.get(), 1, Identifier(exec, "jscprint"), globalFuncJSCPrint), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, this, d()->functionStructure.get(), 1, Identifier(exec, "jscprint"), globalFuncJSCPrint), DontEnum); #endif resetPrototype(prototype); @@ -328,6 +319,8 @@ void JSGlobalObject::markChildren(MarkStack& markStack) { JSVariableObject::markChildren(markStack); + markIfNeeded(markStack, &d()->globalScopeChain); + markIfNeeded(markStack, &d()->regExpConstructor); markIfNeeded(markStack, &d()->errorConstructor); markIfNeeded(markStack, &d()->evalErrorConstructor); @@ -364,7 +357,6 @@ void JSGlobalObject::markChildren(MarkStack& markStack) markIfNeeded(markStack, d()->errorStructure); markIfNeeded(markStack, d()->functionStructure); markIfNeeded(markStack, d()->numberObjectStructure); - markIfNeeded(markStack, d()->prototypeFunctionStructure); markIfNeeded(markStack, d()->regExpMatchesArrayStructure); markIfNeeded(markStack, d()->regExpStructure); markIfNeeded(markStack, d()->stringObjectStructure); @@ -375,12 +367,12 @@ void JSGlobalObject::markChildren(MarkStack& markStack) if (d()->registerArray) { // Outside the execution of global code, when our variables are torn off, // we can mark the torn-off array. - markStack.deprecatedAppendValues(d()->registerArray.get(), d()->registerArraySize); + markStack.appendValues(d()->registerArray.get(), d()->registerArraySize); } else if (d()->registers) { // During execution of global code, when our variables are in the register file, // the symbol table tells us how many variables there are, and registers // points to where they end, and the registers used for execution begin. - markStack.deprecatedAppendValues(d()->registers - symbolTable().size(), symbolTable().size()); + markStack.appendValues(d()->registers - symbolTable().size(), symbolTable().size()); } } @@ -405,8 +397,8 @@ void JSGlobalObject::copyGlobalsFrom(RegisterFile& registerFile) return; } - OwnArrayPtr<Register> registerArray = copyRegisterArray(registerFile.lastGlobal(), numGlobals); - Register* registers = registerArray.get() + numGlobals; + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = copyRegisterArray(globalData(), reinterpret_cast<WriteBarrier<Unknown>*>(registerFile.lastGlobal()), numGlobals); + WriteBarrier<Unknown>* registers = registerArray.get() + numGlobals; setRegisters(registers, registerArray.release(), numGlobals); } @@ -420,9 +412,32 @@ void JSGlobalObject::copyGlobalsTo(RegisterFile& registerFile) registerFile.setNumGlobals(symbolTable().size()); if (d()->registerArray) { - memcpy(registerFile.start() - d()->registerArraySize, d()->registerArray.get(), d()->registerArraySize * sizeof(Register)); - setRegisters(registerFile.start(), 0, 0); + // The register file is always a gc root so no barrier is needed here + memcpy(registerFile.start() - d()->registerArraySize, d()->registerArray.get(), d()->registerArraySize * sizeof(WriteBarrier<Unknown>)); + setRegisters(reinterpret_cast<WriteBarrier<Unknown>*>(registerFile.start()), nullptr, 0); + } +} + +void JSGlobalObject::resizeRegisters(int oldSize, int newSize) +{ + ASSERT(symbolTable().size() == newSize); + if (newSize == oldSize) + return; + ASSERT(newSize && newSize > oldSize); + if (d()->registerArray || !d()->registers) { + ASSERT(static_cast<size_t>(oldSize) == d()->registerArraySize); + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = adoptArrayPtr(new WriteBarrier<Unknown>[newSize]); + for (int i = 0; i < oldSize; i++) + registerArray[newSize - oldSize + i].set(globalData(), this, d()->registerArray[i].get()); + WriteBarrier<Unknown>* registers = registerArray.get() + newSize; + setRegisters(registers, registerArray.release(), newSize); + } else { + ASSERT(static_cast<size_t>(newSize) < globalData().interpreter->registerFile().maxGlobals()); + globalData().interpreter->registerFile().setNumGlobals(newSize); } + + for (int i = -newSize; i < -oldSize; ++i) + d()->registers[i].setUndefined(); } void* JSGlobalObject::operator new(size_t size, JSGlobalData* globalData) diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h index d13d2da..03b39fc 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalObject.h +++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h @@ -26,7 +26,6 @@ #include "JSGlobalData.h" #include "JSVariableObject.h" #include "JSWeakObjectMapRefInternal.h" -#include "NativeFunctionWrapper.h" #include "NumberPrototype.h" #include "StringPrototype.h" #include <wtf/HashSet.h> @@ -42,10 +41,8 @@ namespace JSC { class ErrorConstructor; class FunctionPrototype; class GlobalCodeBlock; - class GlobalEvalFunction; class NativeErrorConstructor; class ProgramCodeBlock; - class PrototypeFunction; class RegExpConstructor; class RegExpPrototype; class RegisterFile; @@ -72,7 +69,7 @@ namespace JSC { : JSVariableObjectData(&symbolTable, 0) , destructor(destructor) , registerArraySize(0) - , globalScopeChain(NoScopeChain()) + , globalScopeChain() , weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) { } @@ -86,7 +83,7 @@ namespace JSC { Debugger* debugger; - ScopeChain globalScopeChain; + WriteBarrier<ScopeChainNode> globalScopeChain; Register globalCallFrame[RegisterFile::CallFrameHeaderSize]; WriteBarrier<RegExpConstructor> regExpConstructor; @@ -98,9 +95,9 @@ namespace JSC { WriteBarrier<NativeErrorConstructor> typeErrorConstructor; WriteBarrier<NativeErrorConstructor> URIErrorConstructor; - WriteBarrier<GlobalEvalFunction> evalFunction; - WriteBarrier<NativeFunctionWrapper> callFunction; - WriteBarrier<NativeFunctionWrapper> applyFunction; + WriteBarrier<JSFunction> evalFunction; + WriteBarrier<JSFunction> callFunction; + WriteBarrier<JSFunction> applyFunction; WriteBarrier<ObjectPrototype> objectPrototype; WriteBarrier<FunctionPrototype> functionPrototype; @@ -124,7 +121,6 @@ namespace JSC { RefPtr<Structure> errorStructure; RefPtr<Structure> functionStructure; RefPtr<Structure> numberObjectStructure; - RefPtr<Structure> prototypeFunctionStructure; RefPtr<Structure> regExpMatchesArrayStructure; RefPtr<Structure> regExpStructure; RefPtr<Structure> stringObjectStructure; @@ -181,6 +177,10 @@ namespace JSC { virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes); virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes); + // We use this in the code generator as we perform symbol table + // lookups prior to initializing the properties + bool symbolTableHasProperty(const Identifier& propertyName); + // The following accessors return pristine values, even if a script // replaces the global object's associated property. @@ -194,7 +194,7 @@ namespace JSC { NativeErrorConstructor* typeErrorConstructor() const { return d()->typeErrorConstructor.get(); } NativeErrorConstructor* URIErrorConstructor() const { return d()->URIErrorConstructor.get(); } - GlobalEvalFunction* evalFunction() const { return d()->evalFunction.get(); } + JSFunction* evalFunction() const { return d()->evalFunction.get(); } ObjectPrototype* objectPrototype() const { return d()->objectPrototype.get(); } FunctionPrototype* functionPrototype() const { return d()->functionPrototype.get(); } @@ -218,7 +218,6 @@ namespace JSC { Structure* errorStructure() const { return d()->errorStructure.get(); } Structure* functionStructure() const { return d()->functionStructure.get(); } Structure* numberObjectStructure() const { return d()->numberObjectStructure.get(); } - Structure* prototypeFunctionStructure() const { return d()->prototypeFunctionStructure.get(); } Structure* internalFunctionStructure() const { return d()->internalFunctionStructure.get(); } Structure* regExpMatchesArrayStructure() const { return d()->regExpMatchesArrayStructure.get(); } Structure* regExpStructure() const { return d()->regExpStructure.get(); } @@ -233,7 +232,7 @@ namespace JSC { virtual bool supportsProfiling() const { return false; } virtual bool supportsRichSourceInfo() const { return true; } - ScopeChain& globalScopeChain() { return d()->globalScopeChain; } + ScopeChainNode* globalScopeChain() { return d()->globalScopeChain.get(); } virtual bool isGlobalObject() const { return true; } @@ -247,7 +246,8 @@ namespace JSC { void copyGlobalsFrom(RegisterFile&); void copyGlobalsTo(RegisterFile&); - + void resizeRegisters(int oldSize, int newSize); + void resetPrototype(JSValue prototype); JSGlobalData& globalData() const { return *d()->globalData.get(); } @@ -255,7 +255,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } void registerWeakMap(OpaqueJSWeakObjectMap* map) @@ -295,7 +295,7 @@ namespace JSC { void init(JSObject* thisValue); void reset(JSValue prototype); - void setRegisters(Register* registers, PassOwnArrayPtr<Register> registerArray, size_t count); + void setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray, size_t count); void* operator new(size_t); // can only be allocated with JSGlobalData }; @@ -308,7 +308,7 @@ namespace JSC { return static_cast<JSGlobalObject*>(asObject(value)); } - inline void JSGlobalObject::setRegisters(Register* registers, PassOwnArrayPtr<Register> registerArray, size_t count) + inline void JSGlobalObject::setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray, size_t count) { JSVariableObject::setRegisters(registers, registerArray); d()->registerArraySize = count; @@ -318,17 +318,21 @@ namespace JSC { { size_t oldSize = d()->registerArraySize; size_t newSize = oldSize + count; - Register* registerArray = new Register[newSize]; - if (d()->registerArray) - memcpy(registerArray + count, d()->registerArray.get(), oldSize * sizeof(Register)); - setRegisters(registerArray + newSize, registerArray, newSize); + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = adoptArrayPtr(new WriteBarrier<Unknown>[newSize]); + if (d()->registerArray) { + // memcpy is safe here as we're copying barriers we already own from the existing array + memcpy(registerArray.get() + count, d()->registerArray.get(), oldSize * sizeof(Register)); + } + + WriteBarrier<Unknown>* registers = registerArray.get() + newSize; + setRegisters(registers, registerArray.release(), newSize); for (int i = 0, index = -static_cast<int>(oldSize) - 1; i < count; ++i, --index) { GlobalPropertyInfo& global = globals[i]; ASSERT(global.attributes & DontDelete); SymbolTableEntry newEntry(index, global.attributes); symbolTable().add(global.identifier.impl(), newEntry); - registerAt(index) = global.value; + registerAt(index).set(globalData(), this, global.value); } } @@ -355,6 +359,12 @@ namespace JSC { return symbolTableGet(propertyName, slot, slotIsWriteable); } + inline bool JSGlobalObject::symbolTableHasProperty(const Identifier& propertyName) + { + SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); + return !entry.isNull(); + } + inline JSValue Structure::prototypeForLookup(ExecState* exec) const { if (typeInfo().type() == ObjectType) @@ -401,16 +411,16 @@ namespace JSC { return globalData().dynamicGlobalObject; } - inline JSObject* constructEmptyObject(ExecState* exec) - { - return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure()); - } - inline JSObject* constructEmptyObject(ExecState* exec, JSGlobalObject* globalObject) { - return new (exec) JSObject(globalObject->emptyObjectStructure()); + return constructEmptyObject(exec, globalObject->emptyObjectStructure()); } + inline JSObject* constructEmptyObject(ExecState* exec) + { + return constructEmptyObject(exec, exec->lexicalGlobalObject()); + } + inline JSArray* constructEmptyArray(ExecState* exec) { return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure()); diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp index 284806e..de1300a 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp @@ -26,7 +26,6 @@ #include "JSGlobalObjectFunctions.h" #include "CallFrame.h" -#include "GlobalEvalFunction.h" #include "Interpreter.h" #include "JSGlobalObject.h" #include "JSString.h" @@ -451,11 +450,11 @@ EncodedJSValue JSC_HOST_CALL globalFuncEval(ExecState* exec) return JSValue::encode(parsedObject); RefPtr<EvalExecutable> eval = EvalExecutable::create(exec, makeSource(s), false); - JSObject* error = eval->compile(exec, static_cast<JSGlobalObject*>(unwrappedObject)->globalScopeChain().node()); + JSObject* error = eval->compile(exec, static_cast<JSGlobalObject*>(unwrappedObject)->globalScopeChain()); if (error) return throwVMError(exec, error); - return JSValue::encode(exec->interpreter()->execute(eval.get(), exec, thisObject, static_cast<JSGlobalObject*>(unwrappedObject)->globalScopeChain().node())); + return JSValue::encode(exec->interpreter()->execute(eval.get(), exec, thisObject, static_cast<JSGlobalObject*>(unwrappedObject)->globalScopeChain())); } EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec) diff --git a/Source/JavaScriptCore/runtime/JSLock.cpp b/Source/JavaScriptCore/runtime/JSLock.cpp index 918141f..64dcb08 100644 --- a/Source/JavaScriptCore/runtime/JSLock.cpp +++ b/Source/JavaScriptCore/runtime/JSLock.cpp @@ -23,14 +23,18 @@ #include "Heap.h" #include "CallFrame.h" +#include "ScopeChain.h" -#if ENABLE(JSC_MULTIPLE_THREADS) +#if USE(PTHREADS) #include <pthread.h> #endif namespace JSC { -#if ENABLE(JSC_MULTIPLE_THREADS) +// JSLock is only needed to support an obsolete execution model where JavaScriptCore +// automatically protected against concurrent access from multiple threads. +// So it's safe to disable it on non-mac platforms where we don't have native pthreads. +#if ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS)) // Acquire this mutex before accessing lock-related data. static pthread_mutex_t JSMutex = PTHREAD_MUTEX_INITIALIZER; @@ -208,7 +212,7 @@ JSLock::DropAllLocks::~DropAllLocks() --lockDropDepth; } -#else +#else // ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS)) JSLock::JSLock(ExecState*) : m_lockBehavior(SilenceAssertionsOnly) @@ -255,6 +259,6 @@ JSLock::DropAllLocks::~DropAllLocks() { } -#endif // USE(MULTIPLE_THREADS) +#endif // ENABLE(JSC_MULTIPLE_THREADS) && (OS(DARWIN) || USE(PTHREADS)) } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/JSNotAnObject.h b/Source/JavaScriptCore/runtime/JSNotAnObject.h index 9f527cf..7e70a98 100644 --- a/Source/JavaScriptCore/runtime/JSNotAnObject.h +++ b/Source/JavaScriptCore/runtime/JSNotAnObject.h @@ -36,16 +36,16 @@ namespace JSC { // This unholy class is used to allow us to avoid multiple exception checks // in certain SquirrelFish bytecodes -- effectively it just silently consumes // any operations performed on the result of a failed toObject call. - class JSNotAnObject : public JSObject { + class JSNotAnObject : public JSNonFinalObject { public: JSNotAnObject(ExecState* exec) - : JSObject(exec->globalData().notAnObjectStructure) + : JSNonFinalObject(exec->globalData().notAnObjectStructure) { } static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } private: diff --git a/Source/JavaScriptCore/runtime/JSNumberCell.cpp b/Source/JavaScriptCore/runtime/JSNumberCell.cpp index 6fa6b2a..3172cc9 100644 --- a/Source/JavaScriptCore/runtime/JSNumberCell.cpp +++ b/Source/JavaScriptCore/runtime/JSNumberCell.cpp @@ -22,6 +22,7 @@ #include "config.h" #include "JSNumberCell.h" +#include "ScopeChain.h" // Keep our exported symbols lists happy. namespace JSC { diff --git a/Source/JavaScriptCore/runtime/JSONObject.cpp b/Source/JavaScriptCore/runtime/JSONObject.cpp index 0f7a576..7d18e08 100644 --- a/Source/JavaScriptCore/runtime/JSONObject.cpp +++ b/Source/JavaScriptCore/runtime/JSONObject.cpp @@ -54,6 +54,7 @@ namespace JSC { JSONObject::JSONObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) : JSObjectWithGlobalObject(globalObject, structure) { + ASSERT(inherits(&s_info)); } // PropertyNameForFunctionCall objects must be on the stack, since the JSValue that they create is not marked. @@ -134,11 +135,11 @@ static inline JSValue unwrapBoxedPrimitive(ExecState* exec, JSValue value) if (!value.isObject()) return value; JSObject* object = asObject(value); - if (object->inherits(&NumberObject::info)) + if (object->inherits(&NumberObject::s_info)) return jsNumber(object->toNumber(exec)); - if (object->inherits(&StringObject::info)) + if (object->inherits(&StringObject::s_info)) return jsString(exec, object->toString(exec)); - if (object->inherits(&BooleanObject::info)) + if (object->inherits(&BooleanObject::s_info)) return object->toPrimitive(exec); return value; } @@ -212,7 +213,7 @@ Stringifier::Stringifier(ExecState* exec, JSValue replacer, JSValue space) if (!m_replacer.isObject()) return; - if (asObject(m_replacer)->inherits(&JSArray::info)) { + if (asObject(m_replacer)->inherits(&JSArray::s_info)) { m_usingArrayReplacer = true; JSObject* array = asObject(m_replacer); unsigned length = array->get(exec, exec->globalData().propertyNames->length).toUInt32(exec); @@ -234,7 +235,7 @@ Stringifier::Stringifier(ExecState* exec, JSValue replacer, JSValue space) } if (name.isObject()) { - if (!asObject(name)->inherits(&NumberObject::info) && !asObject(name)->inherits(&StringObject::info)) + if (!asObject(name)->inherits(&NumberObject::s_info) && !asObject(name)->inherits(&StringObject::s_info)) continue; propertyName = name.toString(exec); if (exec->hadException()) @@ -376,7 +377,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(UStringBuilder& return StringifyFailed; } - if (value.isUndefined() && !holder->inherits(&JSArray::info)) + if (value.isUndefined() && !holder->inherits(&JSArray::s_info)) return StringifyFailedDueToUndefinedValue; if (value.isNull()) { @@ -416,7 +417,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(UStringBuilder& CallData callData; if (object->getCallData(callData) != CallTypeNone) { - if (holder->inherits(&JSArray::info)) { + if (holder->inherits(&JSArray::s_info)) { builder.append("null"); return StringifySucceeded; } @@ -486,7 +487,7 @@ inline void Stringifier::startNewLine(UStringBuilder& builder) const inline Stringifier::Holder::Holder(JSObject* object) : m_object(object) - , m_isArray(object->inherits(&JSArray::info)) + , m_isArray(object->inherits(&JSArray::s_info)) , m_index(0) { } @@ -601,7 +602,7 @@ bool Stringifier::Holder::appendNextProperty(Stringifier& stringifier, UStringBu // ------------------------------ JSONObject -------------------------------- -const ClassInfo JSONObject::info = { "JSON", 0, 0, ExecState::jsonTable }; +const ClassInfo JSONObject::s_info = { "JSON", &JSObjectWithGlobalObject::s_info, 0, ExecState::jsonTable }; /* Source for JSONObject.lut.h @begin jsonTable @@ -678,7 +679,7 @@ NEVER_INLINE JSValue Walker::walk(JSValue unfiltered) arrayStartState: case ArrayStartState: { ASSERT(inValue.isObject()); - ASSERT(isJSArray(&m_exec->globalData(), asObject(inValue)) || asObject(inValue)->inherits(&JSArray::info)); + ASSERT(isJSArray(&m_exec->globalData(), asObject(inValue)) || asObject(inValue)->inherits(&JSArray::s_info)); if (objectStack.size() + arrayStack.size() > maximumFilterRecursion) return throwError(m_exec, createStackOverflowError(m_exec)); @@ -739,7 +740,7 @@ NEVER_INLINE JSValue Walker::walk(JSValue unfiltered) objectStartState: case ObjectStartState: { ASSERT(inValue.isObject()); - ASSERT(!isJSArray(&m_exec->globalData(), asObject(inValue)) && !asObject(inValue)->inherits(&JSArray::info)); + ASSERT(!isJSArray(&m_exec->globalData(), asObject(inValue)) && !asObject(inValue)->inherits(&JSArray::s_info)); if (objectStack.size() + arrayStack.size() > maximumFilterRecursion) return throwError(m_exec, createStackOverflowError(m_exec)); @@ -806,7 +807,7 @@ NEVER_INLINE JSValue Walker::walk(JSValue unfiltered) break; } JSObject* object = asObject(inValue); - if (isJSArray(&m_exec->globalData(), object) || object->inherits(&JSArray::info)) + if (isJSArray(&m_exec->globalData(), object) || object->inherits(&JSArray::s_info)) goto arrayStartState; goto objectStartState; } diff --git a/Source/JavaScriptCore/runtime/JSONObject.h b/Source/JavaScriptCore/runtime/JSONObject.h index f64be12..acffeca 100644 --- a/Source/JavaScriptCore/runtime/JSONObject.h +++ b/Source/JavaScriptCore/runtime/JSONObject.h @@ -38,7 +38,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } static void markStringifiers(MarkStack&, Stringifier*); @@ -50,8 +50,7 @@ namespace JSC { virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; }; UString JSONStringify(ExecState* exec, JSValue value, unsigned indent); diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp index 277ffff..87fbb67 100644 --- a/Source/JavaScriptCore/runtime/JSObject.cpp +++ b/Source/JavaScriptCore/runtime/JSObject.cpp @@ -42,9 +42,13 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(JSObject); +ASSERT_CLASS_FITS_IN_CELL(JSNonFinalObject); +ASSERT_CLASS_FILLS_CELL(JSFinalObject); const char* StrictModeReadonlyPropertyWriteError = "Attempted to assign to readonly property."; +const ClassInfo JSObject::s_info = { "Object", 0, 0, 0 }; + static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode) { // Add properties from the static hashtables of properties @@ -81,9 +85,8 @@ void JSObject::markChildren(MarkStack& markStack) UString JSObject::className() const { const ClassInfo* info = classInfo(); - if (info) - return info->className; - return "Object"; + ASSERT(info); + return info->className; } bool JSObject::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) @@ -506,6 +509,22 @@ JSObject* JSObject::unwrappedObject() return this; } +void JSObject::seal() +{ + setStructure(Structure::sealTransition(m_structure)); +} + +void JSObject::freeze() +{ + setStructure(Structure::freezeTransition(m_structure)); +} + +void JSObject::preventExtensions() +{ + if (isExtensible()) + setStructure(Structure::preventExtensionsTransition(m_structure)); +} + void JSObject::removeDirect(const Identifier& propertyName) { size_t offset; @@ -555,13 +574,28 @@ NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, WriteBarr Structure* JSObject::createInheritorID() { - m_inheritorID = JSObject::createStructure(this); + m_inheritorID = createEmptyObjectStructure(this); return m_inheritorID.get(); } void JSObject::allocatePropertyStorage(size_t oldSize, size_t newSize) { - allocatePropertyStorageInline(oldSize, newSize); + ASSERT(newSize > oldSize); + + // It's important that this function not rely on m_structure, since + // we might be in the middle of a transition. + bool wasInline = (oldSize < JSObject::baseExternalStorageCapacity); + + PropertyStorage oldPropertyStorage = m_propertyStorage; + PropertyStorage newPropertyStorage = new WriteBarrierBase<Unknown>[newSize]; + + for (unsigned i = 0; i < oldSize; ++i) + newPropertyStorage[i] = oldPropertyStorage[i]; + + if (!wasInline) + delete [] oldPropertyStorage; + + m_propertyStorage = newPropertyStorage; } bool JSObject::getOwnPropertyDescriptor(ExecState*, const Identifier& propertyName, PropertyDescriptor& descriptor) @@ -627,6 +661,12 @@ bool JSObject::defineOwnProperty(ExecState* exec, const Identifier& propertyName // If we have a new property we can just put it on normally PropertyDescriptor current; if (!getOwnPropertyDescriptor(exec, propertyName, current)) { + // unless extensions are prevented! + if (!isExtensible()) { + if (throwException) + throwError(exec, createTypeError(exec, "Attempting to define property on object that is not extensible.")); + return false; + } PropertyDescriptor oldDescriptor; oldDescriptor.setValue(jsUndefined()); return putDescriptor(exec, this, propertyName, descriptor, descriptor.attributes(), oldDescriptor); diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h index b79249c..2b4db43 100644 --- a/Source/JavaScriptCore/runtime/JSObject.h +++ b/Source/JavaScriptCore/runtime/JSObject.h @@ -80,8 +80,6 @@ namespace JSC { friend void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot); public: - explicit JSObject(NonNullPassRefPtr<Structure>); - virtual void markChildren(MarkStack&); ALWAYS_INLINE void markChildrenDirect(MarkStack& markStack); @@ -212,19 +210,19 @@ namespace JSC { virtual bool isStrictModeFunction() const { return false; } virtual bool isErrorInstance() const { return false; } + void seal(); + void freeze(); + void preventExtensions(); + bool isSealed() { return m_structure->isSealed(); } + bool isFrozen() { return m_structure->isFrozen(); } + bool isExtensible() { return m_structure->isExtensible(); } + virtual ComplType exceptionType() const { return Throw; } void allocatePropertyStorage(size_t oldSize, size_t newSize); - void allocatePropertyStorageInline(size_t oldSize, size_t newSize); bool isUsingInlineStorage() const { return m_structure->isUsingInlineStorage(); } - static const unsigned inlineStorageCapacity = sizeof(EncodedJSValue) == 2 * sizeof(void*) ? 4 : 3; - static const unsigned nonInlineBaseStorageCapacity = 16; - - static PassRefPtr<Structure> createStructure(JSValue prototype) - { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); - } + static const unsigned baseExternalStorageCapacity = 16; void flattenDictionaryObject(JSGlobalData& globalData) { @@ -246,15 +244,28 @@ namespace JSC { ASSERT(index < m_structure->anonymousSlotCount()); return locationForOffset(index)->get(); } + + static size_t offsetOfInlineStorage(); + static JS_EXPORTDATA const ClassInfo s_info; + protected: + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + static const unsigned StructureFlags = 0; - + void putThisToAnonymousValue(unsigned index) { locationForOffset(index)->setWithoutWriteBarrier(this); } - + + // To instantiate objects you likely want JSFinalObject, below. + // To create derived types you likely want JSNonFinalObject, below. + JSObject(NonNullPassRefPtr<Structure>, PropertyStorage inlineStorage); + private: // Nobody should ever ask any of these questions on something already known to be a JSObject. using JSCell::isAPIValueWrapper; @@ -265,8 +276,8 @@ namespace JSC { void isObject(); void isString(); - ConstPropertyStorage propertyStorage() const { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); } - PropertyStorage propertyStorage() { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); } + ConstPropertyStorage propertyStorage() const { return m_propertyStorage; } + PropertyStorage propertyStorage() { return m_propertyStorage; } const WriteBarrierBase<Unknown>* locationForOffset(size_t offset) const { @@ -287,14 +298,90 @@ namespace JSC { const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const; Structure* createInheritorID(); - union { - PropertyStorage m_externalStorage; - WriteBarrierBase<Unknown> m_inlineStorage[inlineStorageCapacity]; - }; - + PropertyStorage m_propertyStorage; RefPtr<Structure> m_inheritorID; }; - + + +#if USE(JSVALUE32_64) +#define JSNonFinalObject_inlineStorageCapacity 4 +#define JSFinalObject_inlineStorageCapacity 6 +#else +#define JSNonFinalObject_inlineStorageCapacity 2 +#define JSFinalObject_inlineStorageCapacity 4 +#endif + +COMPILE_ASSERT((JSFinalObject_inlineStorageCapacity >= JSNonFinalObject_inlineStorageCapacity), final_storage_is_at_least_as_large_as_non_final); + + // JSNonFinalObject is a type of JSObject that has some internal storage, + // but also preserves some space in the collector cell for additional + // data members in derived types. + class JSNonFinalObject : public JSObject { + friend class JSObject; + + public: + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + protected: + explicit JSNonFinalObject(NonNullPassRefPtr<Structure> structure) + : JSObject(structure, m_inlineStorage) + { + ASSERT(!(OBJECT_OFFSETOF(JSNonFinalObject, m_inlineStorage) % sizeof(double))); + ASSERT(this->structure()->propertyStorageCapacity() == JSNonFinalObject_inlineStorageCapacity); + } + + private: + WriteBarrierBase<Unknown> m_inlineStorage[JSNonFinalObject_inlineStorageCapacity]; + }; + + // JSFinalObject is a type of JSObject that contains sufficent internal + // storage to fully make use of the colloctor cell containing it. + class JSFinalObject : public JSObject { + friend class JSObject; + + public: + static JSFinalObject* create(ExecState* exec, NonNullPassRefPtr<Structure> structure) + { + return new (exec) JSFinalObject(structure); + } + + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + private: + explicit JSFinalObject(NonNullPassRefPtr<Structure> structure) + : JSObject(structure, m_inlineStorage) + { + ASSERT(OBJECT_OFFSETOF(JSFinalObject, m_inlineStorage) % sizeof(double) == 0); + ASSERT(this->structure()->propertyStorageCapacity() == JSFinalObject_inlineStorageCapacity); + } + + static const unsigned StructureFlags = JSObject::StructureFlags | IsJSFinalObject; + + WriteBarrierBase<Unknown> m_inlineStorage[JSFinalObject_inlineStorageCapacity]; + }; + +inline size_t JSObject::offsetOfInlineStorage() +{ + ASSERT(OBJECT_OFFSETOF(JSFinalObject, m_inlineStorage) == OBJECT_OFFSETOF(JSNonFinalObject, m_inlineStorage)); + return OBJECT_OFFSETOF(JSFinalObject, m_inlineStorage); +} + +inline JSObject* constructEmptyObject(ExecState* exec, NonNullPassRefPtr<Structure> structure) +{ + return JSFinalObject::create(exec, structure); +} + +inline PassRefPtr<Structure> createEmptyObjectStructure(JSValue prototype) +{ + return JSFinalObject::createStructure(prototype); +} + inline JSObject* asObject(JSCell* cell) { ASSERT(cell->isObject()); @@ -306,20 +393,21 @@ inline JSObject* asObject(JSValue value) return asObject(value.asCell()); } -inline JSObject::JSObject(NonNullPassRefPtr<Structure> structure) +inline JSObject::JSObject(NonNullPassRefPtr<Structure> structure, PropertyStorage inlineStorage) : JSCell(structure.releaseRef()) // ~JSObject balances this ref() + , m_propertyStorage(inlineStorage) { - ASSERT(m_structure->propertyStorageCapacity() == inlineStorageCapacity); + ASSERT(inherits(&s_info)); + ASSERT(m_structure->propertyStorageCapacity() < baseExternalStorageCapacity); ASSERT(m_structure->isEmpty()); ASSERT(prototype().isNull() || Heap::heap(this) == Heap::heap(prototype())); - ASSERT(OBJECT_OFFSETOF(JSObject, m_inlineStorage) % sizeof(double) == 0); } inline JSObject::~JSObject() { ASSERT(m_structure); if (!isUsingInlineStorage()) - delete [] m_externalStorage; + delete [] m_propertyStorage; m_structure->deref(); } @@ -363,7 +451,7 @@ inline Structure* JSObject::inheritorID() inline bool Structure::isUsingInlineStorage() const { - return (propertyStorageCapacity() == JSObject::inlineStorageCapacity); + return propertyStorageCapacity() < JSObject::baseExternalStorageCapacity; } inline bool JSCell::inherits(const ClassInfo* info) const @@ -490,6 +578,9 @@ inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifi return true; } + if (!isExtensible()) + return false; + size_t currentCapacity = m_structure->propertyStorageCapacity(); offset = m_structure->addPropertyWithoutTransition(propertyName, attributes, specificFunction); if (currentCapacity != m_structure->propertyStorageCapacity()) @@ -551,15 +642,8 @@ inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifi return true; } - // If we have a specific function, we may have got to this point if there is - // already a transition with the correct property name and attributes, but - // specialized to a different function. In this case we just want to give up - // and despecialize the transition. - // In this case we clear the value of specificFunction which will result - // in us adding a non-specific transition, and any subsequent lookup in - // Structure::addPropertyTransitionToExistingStructure will just use that. - if (specificFunction && m_structure->hasTransition(propertyName, attributes)) - specificFunction = 0; + if (!isExtensible()) + return false; RefPtr<Structure> structure = Structure::addPropertyTransition(m_structure, propertyName, attributes, specificFunction, offset); @@ -727,26 +811,6 @@ inline void JSValue::put(ExecState* exec, unsigned propertyName, JSValue value) asCell()->put(exec, propertyName, value); } -ALWAYS_INLINE void JSObject::allocatePropertyStorageInline(size_t oldSize, size_t newSize) -{ - ASSERT(newSize > oldSize); - - // It's important that this function not rely on m_structure, since - // we might be in the middle of a transition. - bool wasInline = (oldSize == JSObject::inlineStorageCapacity); - - PropertyStorage oldPropertyStorage = (wasInline ? m_inlineStorage : m_externalStorage); - PropertyStorage newPropertyStorage = new WriteBarrierBase<Unknown>[newSize]; - - for (unsigned i = 0; i < oldSize; ++i) - newPropertyStorage[i] = oldPropertyStorage[i]; - - if (!wasInline) - delete [] oldPropertyStorage; - - m_externalStorage = newPropertyStorage; -} - ALWAYS_INLINE void JSObject::markChildrenDirect(MarkStack& markStack) { JSCell::markChildren(markStack); diff --git a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp index c16acb1..9370139 100644 --- a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp +++ b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp @@ -31,7 +31,7 @@ namespace JSC { JSObjectWithGlobalObject::JSObjectWithGlobalObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + : JSNonFinalObject(structure) { COMPILE_ASSERT(AnonymousSlotCount == 1, AnonymousSlotCount_must_be_one); ASSERT(!globalObject || globalObject->isGlobalObject()); diff --git a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h index 9416a62..c5e3047 100644 --- a/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h +++ b/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h @@ -32,11 +32,11 @@ namespace JSC { class JSGlobalObject; -class JSObjectWithGlobalObject : public JSObject { +class JSObjectWithGlobalObject : public JSNonFinalObject { public: static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } JSGlobalObject* globalObject() const; @@ -45,7 +45,7 @@ protected: JSObjectWithGlobalObject(JSGlobalObject*, NonNullPassRefPtr<Structure>); JSObjectWithGlobalObject(NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + : JSNonFinalObject(structure) { // Should only be used by JSFunction when we aquire the JSFunction vptr. } diff --git a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp index 6fd28e3..0d759cf 100644 --- a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp +++ b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp @@ -47,12 +47,6 @@ inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyN m_jsStrings[i].set(exec->globalData(), this, jsOwnedString(exec, propertyNameVector[i].ustring())); } -JSPropertyNameIterator::~JSPropertyNameIterator() -{ - if (m_cachedStructure) - m_cachedStructure->clearEnumerationCache(this); -} - JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSObject* o) { ASSERT(!o->structure()->enumerationCache() || @@ -85,7 +79,7 @@ JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSObject jsPropertyNameIterator->setCachedPrototypeChain(structureChain); jsPropertyNameIterator->setCachedStructure(o->structure()); - o->structure()->setEnumerationCache(jsPropertyNameIterator); + o->structure()->setEnumerationCache(exec->globalData(), jsPropertyNameIterator); return jsPropertyNameIterator; } @@ -105,4 +99,12 @@ void JSPropertyNameIterator::markChildren(MarkStack& markStack) markStack.appendValues(m_jsStrings.get(), m_jsStringsSize, MayContainNullValues); } +#if !ASSERT_DISABLED + +JSPropertyNameIterator::~JSPropertyNameIterator() +{ + ASSERT(!m_cachedStructure || m_cachedStructure->enumerationCache() != this); +} + +#endif } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h index cd46243..d51cba8 100644 --- a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h +++ b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h @@ -47,10 +47,8 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount, 0); } - - virtual ~JSPropertyNameIterator(); virtual bool isPropertyNameIterator() const { return true; } @@ -80,6 +78,10 @@ namespace JSC { private: JSPropertyNameIterator(ExecState*, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot); + +#if !ASSERT_DISABLED + virtual ~JSPropertyNameIterator(); +#endif RefPtr<Structure> m_cachedStructure; RefPtr<StructureChain> m_cachedPrototypeChain; @@ -88,15 +90,15 @@ namespace JSC { OwnArrayPtr<WriteBarrier<Unknown> > m_jsStrings; }; - inline void Structure::setEnumerationCache(JSPropertyNameIterator* enumerationCache) + inline void Structure::setEnumerationCache(JSGlobalData& globalData, JSPropertyNameIterator* enumerationCache) { ASSERT(!isDictionary()); - m_enumerationCache = enumerationCache; + m_enumerationCache.set(globalData, enumerationCache, 0); } - inline void Structure::clearEnumerationCache(JSPropertyNameIterator* enumerationCache) + inline void Structure::clearEnumerationCache() { - m_enumerationCache.clear(enumerationCache); + m_enumerationCache.clear(); } inline JSPropertyNameIterator* Structure::enumerationCache() diff --git a/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp b/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp index 80b048e..727ac28 100644 --- a/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp +++ b/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp @@ -47,17 +47,17 @@ JSValue JSStaticScopeObject::toStrictThisObject(ExecState*) const return jsNull(); } -void JSStaticScopeObject::put(ExecState*, const Identifier& propertyName, JSValue value, PutPropertySlot&) +void JSStaticScopeObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot&) { - if (symbolTablePut(propertyName, value)) + if (symbolTablePut(exec->globalData(), propertyName, value)) return; ASSERT_NOT_REACHED(); } -void JSStaticScopeObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes) +void JSStaticScopeObject::putWithAttributes(ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) { - if (symbolTablePutWithAttributes(propertyName, value, attributes)) + if (symbolTablePutWithAttributes(exec->globalData(), propertyName, value, attributes)) return; ASSERT_NOT_REACHED(); @@ -74,7 +74,7 @@ JSStaticScopeObject::~JSStaticScopeObject() delete d(); } -inline bool JSStaticScopeObject::getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot& slot) +bool JSStaticScopeObject::getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot& slot) { return symbolTableGet(propertyName, slot); } diff --git a/Source/JavaScriptCore/runtime/JSStaticScopeObject.h b/Source/JavaScriptCore/runtime/JSStaticScopeObject.h index e69356a..b3c0695 100644 --- a/Source/JavaScriptCore/runtime/JSStaticScopeObject.h +++ b/Source/JavaScriptCore/runtime/JSStaticScopeObject.h @@ -58,7 +58,7 @@ namespace JSC{ virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes); - static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } + static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NeedsThisConversion | OverridesMarkChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags; diff --git a/Source/JavaScriptCore/runtime/JSString.h b/Source/JavaScriptCore/runtime/JSString.h index 6696404..3672300 100644 --- a/Source/JavaScriptCore/runtime/JSString.h +++ b/Source/JavaScriptCore/runtime/JSString.h @@ -349,7 +349,7 @@ namespace JSC { JSValue replaceCharacter(ExecState*, UChar, const UString& replacement); - static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount); } + static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount, 0); } private: enum VPtrStealingHackType { VPtrStealingHack }; diff --git a/Source/JavaScriptCore/runtime/JSTypeInfo.h b/Source/JavaScriptCore/runtime/JSTypeInfo.h index e225bc7..fdcaf31 100644 --- a/Source/JavaScriptCore/runtime/JSTypeInfo.h +++ b/Source/JavaScriptCore/runtime/JSTypeInfo.h @@ -43,20 +43,21 @@ namespace JSC { static const unsigned OverridesGetOwnPropertySlot = 1 << 5; static const unsigned OverridesMarkChildren = 1 << 6; static const unsigned OverridesGetPropertyNames = 1 << 7; + static const unsigned IsJSFinalObject = 1 << 8; class TypeInfo { friend class JIT; public: TypeInfo(JSType type, unsigned flags = 0) : m_type(type) + , m_flags(flags & 0xFF) + , m_flags2(flags >> 8) { - ASSERT(flags <= 0xFF); + ASSERT(flags <= 0x1FF); ASSERT(type <= 0xFF); // ImplementsDefaultHasInstance means (ImplementsHasInstance & !OverridesHasInstance) - if ((flags & (ImplementsHasInstance | OverridesHasInstance)) == ImplementsHasInstance) - m_flags = flags | ImplementsDefaultHasInstance; - else - m_flags = flags; + if ((m_flags & (ImplementsHasInstance | OverridesHasInstance)) == ImplementsHasInstance) + m_flags |= ImplementsDefaultHasInstance; } JSType type() const { return (JSType)m_type; } @@ -69,10 +70,12 @@ namespace JSC { bool overridesMarkChildren() const { return m_flags & OverridesMarkChildren; } bool overridesGetPropertyNames() const { return m_flags & OverridesGetPropertyNames; } unsigned flags() const { return m_flags; } + unsigned isFinal() const { return m_flags2 && (IsJSFinalObject >> 8); } private: unsigned char m_type; unsigned char m_flags; + unsigned char m_flags2; }; } diff --git a/Source/JavaScriptCore/runtime/JSVariableObject.cpp b/Source/JavaScriptCore/runtime/JSVariableObject.cpp index 81d05ba..abe9bbb 100644 --- a/Source/JavaScriptCore/runtime/JSVariableObject.cpp +++ b/Source/JavaScriptCore/runtime/JSVariableObject.cpp @@ -62,7 +62,7 @@ bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertyDe { SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); if (!entry.isNull()) { - descriptor.setDescriptor(registerAt(entry.getIndex()).jsValue(), entry.getAttributes() | DontDelete); + descriptor.setDescriptor(registerAt(entry.getIndex()).get(), entry.getAttributes() | DontDelete); return true; } return false; diff --git a/Source/JavaScriptCore/runtime/JSVariableObject.h b/Source/JavaScriptCore/runtime/JSVariableObject.h index 96a0ec4..e94d277 100644 --- a/Source/JavaScriptCore/runtime/JSVariableObject.h +++ b/Source/JavaScriptCore/runtime/JSVariableObject.h @@ -40,7 +40,7 @@ namespace JSC { class Register; - class JSVariableObject : public JSObject { + class JSVariableObject : public JSNonFinalObject { friend class JIT; public: @@ -54,11 +54,11 @@ namespace JSC { virtual bool isVariableObject() const; virtual bool isDynamicScope(bool& requiresDynamicChecks) const = 0; - Register& registerAt(int index) const { return d->registers[index]; } + WriteBarrier<Unknown>& registerAt(int index) const { return d->registers[index]; } static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -69,14 +69,14 @@ namespace JSC { struct JSVariableObjectData { JSVariableObjectData(SymbolTable* symbolTable, Register* registers) : symbolTable(symbolTable) - , registers(registers) + , registers(reinterpret_cast<WriteBarrier<Unknown>*>(registers)) { ASSERT(symbolTable); } SymbolTable* symbolTable; // Maps name -> offset from "r" in register file. - Register* registers; // "r" in the register file. - OwnArrayPtr<Register> registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file. + WriteBarrier<Unknown>* registers; // "r" in the register file. + OwnArrayPtr<WriteBarrier<Unknown> > registerArray; // Independent copy of registers, used when a variable object copies its registers out of the register file. private: JSVariableObjectData(const JSVariableObjectData&); @@ -84,19 +84,20 @@ namespace JSC { }; JSVariableObject(NonNullPassRefPtr<Structure> structure, JSVariableObjectData* data) - : JSObject(structure) + : JSNonFinalObject(structure) , d(data) // Subclass owns this pointer. { + COMPILE_ASSERT(sizeof(WriteBarrier<Unknown>) == sizeof(Register), Register_should_be_same_size_as_WriteBarrier); } - PassOwnArrayPtr<Register> copyRegisterArray(Register* src, size_t count); - void setRegisters(Register* registers, PassOwnArrayPtr<Register> registerArray); + PassOwnArrayPtr<WriteBarrier<Unknown> > copyRegisterArray(JSGlobalData&, WriteBarrier<Unknown>* src, size_t count); + void setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray); bool symbolTableGet(const Identifier&, PropertySlot&); bool symbolTableGet(const Identifier&, PropertyDescriptor&); bool symbolTableGet(const Identifier&, PropertySlot&, bool& slotIsWriteable); - bool symbolTablePut(const Identifier&, JSValue); - bool symbolTablePutWithAttributes(const Identifier&, JSValue, unsigned attributes); + bool symbolTablePut(JSGlobalData&, const Identifier&, JSValue); + bool symbolTablePutWithAttributes(JSGlobalData&, const Identifier&, JSValue, unsigned attributes); JSVariableObjectData* d; }; @@ -105,7 +106,7 @@ namespace JSC { { SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); if (!entry.isNull()) { - slot.setRegisterSlot(®isterAt(entry.getIndex())); + slot.setValue(registerAt(entry.getIndex()).get()); return true; } return false; @@ -115,14 +116,14 @@ namespace JSC { { SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl()); if (!entry.isNull()) { - slot.setRegisterSlot(®isterAt(entry.getIndex())); + slot.setValue(registerAt(entry.getIndex()).get()); slotIsWriteable = !entry.isReadOnly(); return true; } return false; } - inline bool JSVariableObject::symbolTablePut(const Identifier& propertyName, JSValue value) + inline bool JSVariableObject::symbolTablePut(JSGlobalData& globalData, const Identifier& propertyName, JSValue value) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); @@ -131,11 +132,11 @@ namespace JSC { return false; if (entry.isReadOnly()) return true; - registerAt(entry.getIndex()) = value; + registerAt(entry.getIndex()).set(globalData, this, value); return true; } - inline bool JSVariableObject::symbolTablePutWithAttributes(const Identifier& propertyName, JSValue value, unsigned attributes) + inline bool JSVariableObject::symbolTablePutWithAttributes(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes) { ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); @@ -145,19 +146,20 @@ namespace JSC { SymbolTableEntry& entry = iter->second; ASSERT(!entry.isNull()); entry.setAttributes(attributes); - registerAt(entry.getIndex()) = value; + registerAt(entry.getIndex()).set(globalData, this, value); return true; } - inline PassOwnArrayPtr<Register> JSVariableObject::copyRegisterArray(Register* src, size_t count) + inline PassOwnArrayPtr<WriteBarrier<Unknown> > JSVariableObject::copyRegisterArray(JSGlobalData& globalData, WriteBarrier<Unknown>* src, size_t count) { - OwnArrayPtr<Register> registerArray = adoptArrayPtr(new Register[count]); - memcpy(registerArray.get(), src, count * sizeof(Register)); + OwnArrayPtr<WriteBarrier<Unknown> > registerArray = adoptArrayPtr(new WriteBarrier<Unknown>[count]); + for (size_t i = 0; i < count; i++) + registerArray[i].set(globalData, this, src[i].get()); return registerArray.release(); } - inline void JSVariableObject::setRegisters(Register* registers, PassOwnArrayPtr<Register> registerArray) + inline void JSVariableObject::setRegisters(WriteBarrier<Unknown>* registers, PassOwnArrayPtr<WriteBarrier<Unknown> > registerArray) { ASSERT(registerArray != d->registerArray); d->registerArray = registerArray; diff --git a/Source/JavaScriptCore/runtime/JSWrapperObject.h b/Source/JavaScriptCore/runtime/JSWrapperObject.h index 0b0d3fd..6d586df 100644 --- a/Source/JavaScriptCore/runtime/JSWrapperObject.h +++ b/Source/JavaScriptCore/runtime/JSWrapperObject.h @@ -28,7 +28,7 @@ namespace JSC { // This class is used as a base for classes such as String, // Number, Boolean and Date which are wrappers for primitive types. - class JSWrapperObject : public JSObject { + class JSWrapperObject : public JSNonFinalObject { protected: explicit JSWrapperObject(JSGlobalData&, NonNullPassRefPtr<Structure>); @@ -38,7 +38,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -51,7 +51,7 @@ namespace JSC { }; inline JSWrapperObject::JSWrapperObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure) - : JSObject(structure) + : JSNonFinalObject(structure) { putAnonymousValue(globalData, 0, jsNull()); } diff --git a/Source/JavaScriptCore/runtime/JSZombie.cpp b/Source/JavaScriptCore/runtime/JSZombie.cpp index 8a36bda..c0c5f11 100644 --- a/Source/JavaScriptCore/runtime/JSZombie.cpp +++ b/Source/JavaScriptCore/runtime/JSZombie.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "JSZombie.h" #include "ClassInfo.h" +#include "ScopeChain.h" #if ENABLE(JSC_ZOMBIES) @@ -37,7 +38,7 @@ Structure* JSZombie::leakedZombieStructure() { static Structure* structure = 0; if (!structure) { Structure::startIgnoringLeaks(); - structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0).leakRef(); + structure = Structure::create(jsNull(), TypeInfo(UnspecifiedType), 0, &info).leakRef(); Structure::stopIgnoringLeaks(); } return structure; diff --git a/Source/JavaScriptCore/runtime/JSZombie.h b/Source/JavaScriptCore/runtime/JSZombie.h index da45699..5fe6b6d 100644 --- a/Source/JavaScriptCore/runtime/JSZombie.h +++ b/Source/JavaScriptCore/runtime/JSZombie.h @@ -37,9 +37,10 @@ public: : JSCell(structure) , m_oldInfo(oldInfo) { + ASSERT(inherits(&s_info)); } + virtual bool isZombie() const { return true; } - virtual const ClassInfo* classInfo() const { return &s_info; } static Structure* leakedZombieStructure(); virtual bool isGetterSetter() const { ASSERT_NOT_REACHED(); return false; } @@ -65,7 +66,13 @@ public: virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&) { ASSERT_NOT_REACHED(); return false; } virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&) { ASSERT_NOT_REACHED(); return false; } + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + static const ClassInfo s_info; + private: const ClassInfo* m_oldInfo; }; diff --git a/Source/JavaScriptCore/runtime/Lookup.cpp b/Source/JavaScriptCore/runtime/Lookup.cpp index 3c7d4be..307bceb 100644 --- a/Source/JavaScriptCore/runtime/Lookup.cpp +++ b/Source/JavaScriptCore/runtime/Lookup.cpp @@ -22,7 +22,6 @@ #include "Executable.h" #include "JSFunction.h" -#include "PrototypeFunction.h" namespace JSC { @@ -77,14 +76,14 @@ void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* WriteBarrierBase<Unknown>* location = thisObj->getDirectLocation(propertyName); if (!location) { - NativeFunctionWrapper* function; + JSFunction* function; JSGlobalObject* globalObject = asGlobalObject(thisObj->getAnonymousValue(0).asCell()); #if ENABLE(JIT) && ENABLE(JIT_OPTIMIZE_NATIVE_CALL) if (entry->generator()) - function = new (exec) NativeFunctionWrapper(exec, globalObject, globalObject->prototypeFunctionStructure(), entry->functionLength(), propertyName, exec->globalData().getHostFunction(entry->function(), entry->generator())); + function = new (exec) JSFunction(exec, globalObject, globalObject->functionStructure(), entry->functionLength(), propertyName, exec->globalData().getHostFunction(entry->function(), entry->generator())); else #endif - function = new (exec) NativeFunctionWrapper(exec, globalObject, globalObject->prototypeFunctionStructure(), entry->functionLength(), propertyName, entry->function()); + function = new (exec) JSFunction(exec, globalObject, globalObject->functionStructure(), entry->functionLength(), propertyName, entry->function()); thisObj->putDirectFunction(exec->globalData(), propertyName, function, entry->attributes()); location = thisObj->getDirectLocation(propertyName); diff --git a/Source/JavaScriptCore/runtime/MachineStackMarker.cpp b/Source/JavaScriptCore/runtime/MachineStackMarker.cpp index 4430947..4614a7c 100644 --- a/Source/JavaScriptCore/runtime/MachineStackMarker.cpp +++ b/Source/JavaScriptCore/runtime/MachineStackMarker.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2007 Eric Seidel <eric@webkit.org> + * Copyright (C) 2009 Acision BV. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -70,6 +71,13 @@ #include <errno.h> #endif +#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) +#include <signal.h> +#ifndef SA_RESTART +#error MachineStackMarker requires SA_RESTART +#endif +#endif + #endif namespace JSC { @@ -92,6 +100,17 @@ UNUSED_PARAM(end); typedef mach_port_t PlatformThread; #elif OS(WINDOWS) typedef HANDLE PlatformThread; +#elif USE(PTHREADS) +typedef pthread_t PlatformThread; +static const int SigThreadSuspendResume = SIGUSR2; + +static void pthreadSignalHandlerSuspendResume(int signo) +{ + sigset_t signalSet; + sigemptyset(&signalSet); + sigaddset(&signalSet, SigThreadSuspendResume); + sigsuspend(&signalSet); +} #endif class MachineStackMarker::Thread { @@ -101,6 +120,18 @@ public: , platformThread(platThread) , stackBase(base) { +#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) + struct sigaction action; + action.sa_handler = pthreadSignalHandlerSuspendResume; + sigemptyset(&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction(SigThreadSuspendResume, &action, 0); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SigThreadSuspendResume); + pthread_sigmask(SIG_UNBLOCK, &mask, 0); +#endif } Thread* next; @@ -145,6 +176,8 @@ static inline PlatformThread getCurrentPlatformThread() return pthread_mach_thread_np(pthread_self()); #elif OS(WINDOWS) return pthread_getw32threadhandle_np(pthread_self()); +#elif USE(PTHREADS) + return pthread_self(); #endif } @@ -245,6 +278,8 @@ static inline void suspendThread(const PlatformThread& platformThread) thread_suspend(platformThread); #elif OS(WINDOWS) SuspendThread(platformThread); +#elif USE(PTHREADS) + pthread_kill(platformThread, SigThreadSuspendResume); #else #error Need a way to suspend threads on this platform #endif @@ -256,6 +291,8 @@ static inline void resumeThread(const PlatformThread& platformThread) thread_resume(platformThread); #elif OS(WINDOWS) ResumeThread(platformThread); +#elif USE(PTHREADS) + pthread_kill(platformThread, SigThreadSuspendResume); #else #error Need a way to resume threads on this platform #endif @@ -281,6 +318,8 @@ typedef arm_thread_state_t PlatformThreadRegisters; #elif OS(WINDOWS) && CPU(X86) typedef CONTEXT PlatformThreadRegisters; +#elif USE(PTHREADS) +typedef pthread_attr_t PlatformThreadRegisters; #else #error Need a thread register struct for this platform #endif @@ -321,6 +360,16 @@ static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, P regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL | CONTEXT_SEGMENTS; GetThreadContext(platformThread, ®s); return sizeof(CONTEXT); +#elif USE(PTHREADS) + pthread_attr_init(®s); +#if HAVE(PTHREAD_NP_H) || OS(NETBSD) + // e.g. on FreeBSD 5.4, neundorf@kde.org + pthread_attr_get_np(platformThread, ®s); +#else + // FIXME: this function is non-portable; other POSIX systems may have different np alternatives + pthread_getattr_np(platformThread, ®s); +#endif + return 0; #else #error Need a way to get thread registers on this platform #endif @@ -361,11 +410,27 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs) // end OS(DARWIN) #elif CPU(X86) && OS(WINDOWS) return reinterpret_cast<void*>((uintptr_t) regs.Esp); +#elif USE(PTHREADS) + void* stackBase = 0; + size_t stackSize = 0; + int rc = pthread_attr_getstack(®s, &stackBase, &stackSize); + (void)rc; // FIXME: Deal with error code somehow? Seems fatal. + ASSERT(stackBase); + return static_cast<char*>(stackBase) + stackSize; #else #error Need a way to get the stack pointer for another thread on this platform #endif } +static void freePlatformThreadRegisters(PlatformThreadRegisters& regs) +{ +#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) + pthread_attr_destroy(®s); +#else + UNUSED_PARAM(regs); +#endif +} + void MachineStackMarker::markOtherThreadConservatively(ConservativeSet& conservativeSet, Thread* thread) { suspendThread(thread->platformThread); @@ -382,6 +447,8 @@ void MachineStackMarker::markOtherThreadConservatively(ConservativeSet& conserva conservativeSet.add(stackPointer, stackBase); resumeThread(thread->platformThread); + + freePlatformThreadRegisters(regs); } #endif diff --git a/Source/JavaScriptCore/runtime/MarkedBlock.cpp b/Source/JavaScriptCore/runtime/MarkedBlock.cpp index 16053f2..48dda4c 100644 --- a/Source/JavaScriptCore/runtime/MarkedBlock.cpp +++ b/Source/JavaScriptCore/runtime/MarkedBlock.cpp @@ -27,33 +27,38 @@ #include "MarkedBlock.h" #include "JSCell.h" +#include "ScopeChain.h" namespace JSC { -MarkedBlock* MarkedBlock::create(JSGlobalData* globalData) +MarkedBlock* MarkedBlock::create(JSGlobalData* globalData, size_t cellSize) { - PageAllocationAligned allocation = PageAllocationAligned::allocate(BLOCK_SIZE, BLOCK_SIZE, OSAllocator::JSGCHeapPages); + PageAllocationAligned allocation = PageAllocationAligned::allocate(blockSize, blockSize, OSAllocator::JSGCHeapPages); if (!static_cast<bool>(allocation)) CRASH(); - return new (allocation.base()) MarkedBlock(allocation, globalData); + return new (allocation.base()) MarkedBlock(allocation, globalData, cellSize); } void MarkedBlock::destroy(MarkedBlock* block) { - for (size_t i = 0; i < CELLS_PER_BLOCK; ++i) - reinterpret_cast<JSCell*>(&block->cells[i])->~JSCell(); + for (size_t i = block->firstAtom(); i < block->m_endAtom; i += block->m_atomsPerCell) + reinterpret_cast<JSCell*>(&block->atoms()[i])->~JSCell(); block->m_allocation.deallocate(); } -MarkedBlock::MarkedBlock(const PageAllocationAligned& allocation, JSGlobalData* globalData) - : m_allocation(allocation) +MarkedBlock::MarkedBlock(const PageAllocationAligned& allocation, JSGlobalData* globalData, size_t cellSize) + : m_nextAtom(firstAtom()) + , m_allocation(allocation) , m_heap(&globalData->heap) + , m_prev(0) + , m_next(0) { - marked.set(CELLS_PER_BLOCK - 1); + m_atomsPerCell = (cellSize + atomSize - 1) / atomSize; + m_endAtom = atomsPerBlock - m_atomsPerCell + 1; Structure* dummyMarkableCellStructure = globalData->dummyMarkableCellStructure.get(); - for (size_t i = 0; i < CELLS_PER_BLOCK; ++i) - new (&cells[i]) JSCell(dummyMarkableCellStructure); + for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) + new (&atoms()[i]) JSCell(dummyMarkableCellStructure); } void MarkedBlock::sweep() @@ -62,17 +67,17 @@ void MarkedBlock::sweep() Structure* dummyMarkableCellStructure = m_heap->globalData()->dummyMarkableCellStructure.get(); #endif - for (size_t i = 0; i < CELLS_PER_BLOCK; ++i) { - if (marked.get(i)) + for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) { + if (m_marks.get(i)) continue; - JSCell* cell = reinterpret_cast<JSCell*>(&cells[i]); + JSCell* cell = reinterpret_cast<JSCell*>(&atoms()[i]); #if ENABLE(JSC_ZOMBIES) if (!cell->isZombie()) { const ClassInfo* info = cell->classInfo(); cell->~JSCell(); new (cell) JSZombie(info, JSZombie::leakedZombieStructure()); - marked.set(i); + m_marks.set(i); } #else cell->~JSCell(); diff --git a/Source/JavaScriptCore/runtime/MarkedBlock.h b/Source/JavaScriptCore/runtime/MarkedBlock.h index f726c25..e80fe82 100644 --- a/Source/JavaScriptCore/runtime/MarkedBlock.h +++ b/Source/JavaScriptCore/runtime/MarkedBlock.h @@ -23,89 +23,108 @@ #define MarkedBlock_h #include <wtf/Bitmap.h> -#include <wtf/FixedArray.h> #include <wtf/PageAllocationAligned.h> -#define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= MarkedBlock::CELL_SIZE, class_fits_in_cell) - namespace JSC { class Heap; class JSCell; class JSGlobalData; - class MarkedBlock { -#if OS(WINCE) || OS(SYMBIAN) || PLATFORM(BREWMP) - static const size_t BLOCK_SIZE = 64 * 1024; // 64k -#else - static const size_t BLOCK_SIZE = 256 * 1024; // 256k -#endif - - static const size_t BLOCK_OFFSET_MASK = BLOCK_SIZE - 1; - static const size_t BLOCK_MASK = ~BLOCK_OFFSET_MASK; - static const size_t MINIMUM_CELL_SIZE = 64; - static const size_t CELL_ARRAY_LENGTH = (MINIMUM_CELL_SIZE / sizeof(double)) + (MINIMUM_CELL_SIZE % sizeof(double) != 0 ? sizeof(double) : 0); - public: - // This is still public for now, for use in assertions. - static const size_t CELL_SIZE = CELL_ARRAY_LENGTH * sizeof(double); - private: - static const size_t SMALL_CELL_SIZE = CELL_SIZE / 2; - static const size_t CELL_MASK = CELL_SIZE - 1; - static const size_t CELL_ALIGN_MASK = ~CELL_MASK; - static const size_t BITS_PER_BLOCK = BLOCK_SIZE / CELL_SIZE; - static const size_t CELLS_PER_BLOCK = (BLOCK_SIZE - sizeof(Heap*) - sizeof(WTF::Bitmap<BITS_PER_BLOCK>)) / CELL_SIZE; // Division rounds down intentionally. - - struct CollectorCell { - FixedArray<double, CELL_ARRAY_LENGTH> memory; - }; + typedef uintptr_t Bits; + + static const size_t KB = 1024; - // Cell size needs to be a power of two for CELL_MASK to be valid. - COMPILE_ASSERT(!(sizeof(CollectorCell) % 2), Collector_cell_size_is_power_of_two); + // Efficient implementation that takes advantage of powers of two. + template<size_t divisor> inline size_t roundUpToMultipleOf(size_t x) + { + COMPILE_ASSERT(divisor && !(divisor & (divisor - 1)), divisor_is_a_power_of_two); + + size_t remainderMask = divisor - 1; + return (x + remainderMask) & ~remainderMask; + } + class MarkedBlock { public: - static MarkedBlock* create(JSGlobalData*); + static const size_t atomSize = sizeof(double); // Ensures natural alignment for all built-in types. + + static MarkedBlock* create(JSGlobalData*, size_t cellSize); static void destroy(MarkedBlock*); - static bool isCellAligned(const void*); + static bool isAtomAligned(const void*); static MarkedBlock* blockFor(const void*); + static size_t firstAtom(); Heap* heap() const; + + void setPrev(MarkedBlock*); + void setNext(MarkedBlock*); + MarkedBlock* prev() const; + MarkedBlock* next() const; - void* allocate(size_t& nextCell); + void* allocate(); + void reset(); void sweep(); bool isEmpty(); void clearMarks(); size_t markCount(); + + size_t cellSize(); + size_t size(); size_t capacity(); - size_t cellNumber(const void*); + bool contains(const void*); + size_t atomNumber(const void*); bool isMarked(const void*); bool testAndSetMarked(const void*); void setMarked(const void*); template <typename Functor> void forEach(Functor&); - FixedArray<CollectorCell, CELLS_PER_BLOCK> cells; - private: - MarkedBlock(const PageAllocationAligned&, JSGlobalData*); + static const size_t blockSize = 16 * KB; + static const size_t blockMask = ~(blockSize - 1); // blockSize must be a power of two. + + static const size_t atomMask = ~(atomSize - 1); // atomSize must be a power of two. + + static const size_t atomsPerBlock = blockSize / atomSize; + + typedef char Atom[atomSize]; - WTF::Bitmap<BITS_PER_BLOCK> marked; + MarkedBlock(const PageAllocationAligned&, JSGlobalData*, size_t cellSize); + Atom* atoms(); + + size_t m_nextAtom; + size_t m_endAtom; // This is a fuzzy end. Always test for < m_endAtom. + size_t m_atomsPerCell; + WTF::Bitmap<blockSize / atomSize> m_marks; PageAllocationAligned m_allocation; Heap* m_heap; + MarkedBlock* m_prev; + MarkedBlock* m_next; }; - inline bool MarkedBlock::isCellAligned(const void* p) + inline size_t MarkedBlock::firstAtom() + { + return roundUpToMultipleOf<atomSize>(sizeof(MarkedBlock)) / atomSize; + } + + inline MarkedBlock::Atom* MarkedBlock::atoms() { - return !((intptr_t)(p) & CELL_MASK); + return reinterpret_cast<Atom*>(this); + } + + inline bool MarkedBlock::isAtomAligned(const void* p) + { + return !((intptr_t)(p) & ~atomMask); } inline MarkedBlock* MarkedBlock::blockFor(const void* p) { - return reinterpret_cast<MarkedBlock*>(reinterpret_cast<uintptr_t>(p) & BLOCK_MASK); + return reinterpret_cast<MarkedBlock*>(reinterpret_cast<uintptr_t>(p) & blockMask); } inline Heap* MarkedBlock::heap() const @@ -113,62 +132,98 @@ namespace JSC { return m_heap; } + inline void MarkedBlock::setPrev(MarkedBlock* prev) + { + m_prev = prev; + } + + inline void MarkedBlock::setNext(MarkedBlock* next) + { + m_next = next; + } + + inline MarkedBlock* MarkedBlock::prev() const + { + return m_prev; + } + + inline MarkedBlock* MarkedBlock::next() const + { + return m_next; + } + + inline void MarkedBlock::reset() + { + m_nextAtom = firstAtom(); + } + inline bool MarkedBlock::isEmpty() { - marked.clear(CELLS_PER_BLOCK - 1); // Clear the always-set last bit to avoid confusing isEmpty(). - bool result = marked.isEmpty(); - marked.set(CELLS_PER_BLOCK - 1); - return result; + return m_marks.isEmpty(); } inline void MarkedBlock::clearMarks() { - // allocate() assumes that the last mark bit is always set. - marked.clearAll(); - marked.set(CELLS_PER_BLOCK - 1); + m_marks.clearAll(); } inline size_t MarkedBlock::markCount() { - return marked.count() - 1; // The last mark bit is always set. + return m_marks.count(); + } + + inline size_t MarkedBlock::cellSize() + { + return m_atomsPerCell * atomSize; } inline size_t MarkedBlock::size() { - return markCount() * CELL_SIZE; + return markCount() * cellSize(); } inline size_t MarkedBlock::capacity() { - return BLOCK_SIZE; + return m_allocation.size(); + } + + inline bool MarkedBlock::contains(const void* p) + { + // Since we mark the first atom of every cell when allocating and/or + // marking, any pointer to a marked atom points to the head of a valid, + // live cell. Checking the mark bit guards against reviving an object + // in a zombie state. + + ASSERT(p && isAtomAligned(p)); + return isMarked(p); } - inline size_t MarkedBlock::cellNumber(const void* cell) + inline size_t MarkedBlock::atomNumber(const void* p) { - return (reinterpret_cast<uintptr_t>(cell) & BLOCK_OFFSET_MASK) / CELL_SIZE; + return (reinterpret_cast<uintptr_t>(p) - reinterpret_cast<uintptr_t>(this)) / atomSize; } - inline bool MarkedBlock::isMarked(const void* cell) + inline bool MarkedBlock::isMarked(const void* p) { - return marked.get(cellNumber(cell)); + return m_marks.get(atomNumber(p)); } - inline bool MarkedBlock::testAndSetMarked(const void* cell) + inline bool MarkedBlock::testAndSetMarked(const void* p) { - return marked.testAndSet(cellNumber(cell)); + return m_marks.testAndSet(atomNumber(p)); } - inline void MarkedBlock::setMarked(const void* cell) + inline void MarkedBlock::setMarked(const void* p) { - marked.set(cellNumber(cell)); + m_marks.set(atomNumber(p)); } template <typename Functor> inline void MarkedBlock::forEach(Functor& functor) { - for (size_t i = 0; i < CELLS_PER_BLOCK - 1; ++i) { // The last cell is a dummy place-holder. - if (!marked.get(i)) + for (size_t i = firstAtom(); i < m_endAtom; i += m_atomsPerCell) { + if (!m_marks.get(i)) continue; - functor(reinterpret_cast<JSCell*>(&cells[i])); + functor(reinterpret_cast<JSCell*>(&atoms()[i])); } } diff --git a/Source/JavaScriptCore/runtime/MarkedSpace.cpp b/Source/JavaScriptCore/runtime/MarkedSpace.cpp index 2f8075d..15ab514 100644 --- a/Source/JavaScriptCore/runtime/MarkedSpace.cpp +++ b/Source/JavaScriptCore/runtime/MarkedSpace.cpp @@ -24,6 +24,7 @@ #include "JSCell.h" #include "JSGlobalData.h" #include "JSLock.h" +#include "ScopeChain.h" namespace JSC { @@ -34,105 +35,125 @@ MarkedSpace::MarkedSpace(JSGlobalData* globalData) , m_highWaterMark(0) , m_globalData(globalData) { - allocateBlock(); + for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep) + sizeClassFor(cellSize).cellSize = cellSize; } void MarkedSpace::destroy() { - clearMarks(); // Make sure weak pointers appear dead during destruction. - - while (m_heap.blocks.size()) - freeBlock(0); - m_heap.blocks.clear(); + clearMarks(); + shrink(); + ASSERT(!size()); } -NEVER_INLINE MarkedBlock* MarkedSpace::allocateBlock() +MarkedBlock* MarkedSpace::allocateBlock(SizeClass& sizeClass) { - MarkedBlock* block = MarkedBlock::create(globalData()); - m_heap.blocks.append(block); + MarkedBlock* block = MarkedBlock::create(globalData(), sizeClass.cellSize); + sizeClass.blockList.append(block); + sizeClass.nextBlock = block; + m_blocks.add(block); + return block; } -NEVER_INLINE void MarkedSpace::freeBlock(size_t block) +void MarkedSpace::freeBlocks(DoublyLinkedList<MarkedBlock>& blocks) { - MarkedBlock::destroy(m_heap.blocks[block]); + MarkedBlock* next; + for (MarkedBlock* block = blocks.head(); block; block = next) { + next = block->next(); - // swap with the last block so we compact as we go - m_heap.blocks[block] = m_heap.blocks.last(); - m_heap.blocks.removeLast(); + blocks.remove(block); + m_blocks.remove(block); + MarkedBlock::destroy(block); + } } -void* MarkedSpace::allocate(size_t) +void* MarkedSpace::allocateFromSizeClass(SizeClass& sizeClass) { - do { - ASSERT(m_heap.nextBlock < m_heap.blocks.size()); - MarkedBlock* block = m_heap.collectorBlock(m_heap.nextBlock); - if (void* result = block->allocate(m_heap.nextCell)) + for (MarkedBlock*& block = sizeClass.nextBlock ; block; block = block->next()) { + if (void* result = block->allocate()) return result; m_waterMark += block->capacity(); - } while (++m_heap.nextBlock != m_heap.blocks.size()); + } if (m_waterMark < m_highWaterMark) - return allocateBlock()->allocate(m_heap.nextCell); + return allocateBlock(sizeClass)->allocate(); return 0; } void MarkedSpace::shrink() { - for (size_t i = 0; i != m_heap.blocks.size() && m_heap.blocks.size() > 1; ) { // We assume at least one block exists at all times. - if (m_heap.collectorBlock(i)->isEmpty()) { - freeBlock(i); - } else - ++i; + // We record a temporary list of empties to avoid modifying m_blocks while iterating it. + DoublyLinkedList<MarkedBlock> empties; + + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) { + MarkedBlock* block = *it; + if (block->isEmpty()) { + SizeClass& sizeClass = sizeClassFor(block->cellSize()); + sizeClass.blockList.remove(block); + sizeClass.nextBlock = sizeClass.blockList.head(); + empties.append(block); + } } + + freeBlocks(empties); + ASSERT(empties.isEmpty()); } void MarkedSpace::clearMarks() { - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - m_heap.collectorBlock(i)->clearMarks(); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + (*it)->clearMarks(); } void MarkedSpace::sweep() { - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - m_heap.collectorBlock(i)->sweep(); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + (*it)->sweep(); } size_t MarkedSpace::objectCount() const { size_t result = 0; - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - result += m_heap.collectorBlock(i)->markCount(); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + result += (*it)->markCount(); return result; } size_t MarkedSpace::size() const { size_t result = 0; - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - result += m_heap.collectorBlock(i)->size(); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + result += (*it)->size(); return result; } size_t MarkedSpace::capacity() const { size_t result = 0; - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - result += m_heap.collectorBlock(i)->capacity(); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + result += (*it)->capacity(); return result; } void MarkedSpace::reset() { - m_heap.nextCell = 0; - m_heap.nextBlock = 0; m_waterMark = 0; -#if ENABLE(JSC_ZOMBIES) - sweep(); -#endif + + for (size_t cellSize = preciseStep; cellSize <= preciseCutoff; cellSize += preciseStep) + sizeClassFor(cellSize).reset(); + + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + (*it)->reset(); } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/MarkedSpace.h b/Source/JavaScriptCore/runtime/MarkedSpace.h index fcb93b7..2e88887 100644 --- a/Source/JavaScriptCore/runtime/MarkedSpace.h +++ b/Source/JavaScriptCore/runtime/MarkedSpace.h @@ -26,11 +26,15 @@ #include "MarkedBlock.h" #include "PageAllocationAligned.h" #include <wtf/Bitmap.h> +#include <wtf/DoublyLinkedList.h> #include <wtf/FixedArray.h> -#include <wtf/HashCountedSet.h> +#include <wtf/HashSet.h> #include <wtf/Noncopyable.h> #include <wtf/Vector.h> +#define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= MarkedSpace::maxCellSize, class_fits_in_cell) +#define ASSERT_CLASS_FILLS_CELL(class) COMPILE_ASSERT(sizeof(class) == MarkedSpace::maxCellSize, class_fills_cell) + namespace JSC { class Heap; @@ -40,26 +44,12 @@ namespace JSC { class MarkStack; class WeakGCHandle; - struct CollectorHeap { - CollectorHeap() - : nextBlock(0) - , nextCell(0) - { - } - - MarkedBlock* collectorBlock(size_t index) const - { - return blocks[index]; - } - - size_t nextBlock; - size_t nextCell; - Vector<MarkedBlock*> blocks; - }; - class MarkedSpace { WTF_MAKE_NONCOPYABLE(MarkedSpace); public: + // Currently public for use in assertions. + static const size_t maxCellSize = 64; + static Heap* heap(JSCell*); static bool isMarked(const JSCell*); @@ -91,12 +81,32 @@ namespace JSC { template<typename Functor> void forEach(Functor&); private: - NEVER_INLINE MarkedBlock* allocateBlock(); - NEVER_INLINE void freeBlock(size_t); + // [ 8, 16... 64 ] + static const size_t preciseStep = MarkedBlock::atomSize; + static const size_t preciseCutoff = maxCellSize; + static const size_t preciseCount = preciseCutoff / preciseStep; + + typedef HashSet<MarkedBlock*>::iterator BlockIterator; + + struct SizeClass { + SizeClass(); + void reset(); + + MarkedBlock* nextBlock; + DoublyLinkedList<MarkedBlock> blockList; + size_t cellSize; + }; + + MarkedBlock* allocateBlock(SizeClass&); + void freeBlocks(DoublyLinkedList<MarkedBlock>&); + + SizeClass& sizeClassFor(size_t); + void* allocateFromSizeClass(SizeClass&); void clearMarks(MarkedBlock*); - CollectorHeap m_heap; + SizeClass m_preciseSizeClasses[preciseCount]; + HashSet<MarkedBlock*> m_blocks; size_t m_waterMark; size_t m_highWaterMark; JSGlobalData* m_globalData; @@ -124,31 +134,32 @@ namespace JSC { inline bool MarkedSpace::contains(const void* x) { - if (!MarkedBlock::isCellAligned(x)) + if (!MarkedBlock::isAtomAligned(x)) return false; MarkedBlock* block = MarkedBlock::blockFor(x); - if (!block) + if (!block || !m_blocks.contains(block)) return false; - size_t size = m_heap.blocks.size(); - for (size_t i = 0; i < size; i++) { - if (block != m_heap.collectorBlock(i)) - continue; - - // x is a pointer into the heap. Now, verify that the cell it - // points to is live. (If the cell is dead, we must not mark it, - // since that would revive it in a zombie state.) - return block->isMarked(x); - } - - return false; + return block->contains(x); } template <typename Functor> inline void MarkedSpace::forEach(Functor& functor) { - for (size_t i = 0; i < m_heap.blocks.size(); ++i) - m_heap.collectorBlock(i)->forEach(functor); + BlockIterator end = m_blocks.end(); + for (BlockIterator it = m_blocks.begin(); it != end; ++it) + (*it)->forEach(functor); + } + + inline MarkedSpace::SizeClass::SizeClass() + : nextBlock(0) + , cellSize(0) + { + } + + inline void MarkedSpace::SizeClass::reset() + { + nextBlock = blockList.head(); } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/MathObject.cpp b/Source/JavaScriptCore/runtime/MathObject.cpp index c79316b..7b856a1 100644 --- a/Source/JavaScriptCore/runtime/MathObject.cpp +++ b/Source/JavaScriptCore/runtime/MathObject.cpp @@ -61,7 +61,7 @@ namespace JSC { // ------------------------------ MathObject -------------------------------- -const ClassInfo MathObject::info = { "Math", 0, 0, ExecState::mathTable }; +const ClassInfo MathObject::s_info = { "Math", &JSObjectWithGlobalObject::s_info, 0, ExecState::mathTable }; /* Source for MathObject.lut.h @begin mathTable @@ -89,11 +89,13 @@ const ClassInfo MathObject::info = { "Math", 0, 0, ExecState::mathTable }; MathObject::MathObject(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) : JSObjectWithGlobalObject(globalObject, structure) { + ASSERT(inherits(&s_info)); + putDirectWithoutTransition(exec->globalData(), Identifier(exec, "E"), jsNumber(exp(1.0)), DontDelete | DontEnum | ReadOnly); putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LN2"), jsNumber(log(2.0)), DontDelete | DontEnum | ReadOnly); putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LN10"), jsNumber(log(10.0)), DontDelete | DontEnum | ReadOnly); putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LOG2E"), jsNumber(1.0 / log(2.0)), DontDelete | DontEnum | ReadOnly); - putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LOG10E"), jsNumber(1.0 / log(10.0)), DontDelete | DontEnum | ReadOnly); + putDirectWithoutTransition(exec->globalData(), Identifier(exec, "LOG10E"), jsNumber(0.4342944819032518), DontDelete | DontEnum | ReadOnly); // See ECMA-262 15.8.1.5 putDirectWithoutTransition(exec->globalData(), Identifier(exec, "PI"), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly); putDirectWithoutTransition(exec->globalData(), Identifier(exec, "SQRT1_2"), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly); putDirectWithoutTransition(exec->globalData(), Identifier(exec, "SQRT2"), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly); diff --git a/Source/JavaScriptCore/runtime/MathObject.h b/Source/JavaScriptCore/runtime/MathObject.h index 31fa2fe..86e7951 100644 --- a/Source/JavaScriptCore/runtime/MathObject.h +++ b/Source/JavaScriptCore/runtime/MathObject.h @@ -32,12 +32,11 @@ namespace JSC { virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: diff --git a/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp b/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp index 421eecf..7949dd9 100644 --- a/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp +++ b/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp @@ -30,11 +30,13 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor); -const ClassInfo NativeErrorConstructor::info = { "Function", &InternalFunction::info, 0, 0 }; +const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0 }; NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, NonNullPassRefPtr<Structure> prototypeStructure, const UString& nameAndMessage) : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, nameAndMessage)) { + ASSERT(inherits(&s_info)); + NativeErrorPrototype* prototype = new (exec) NativeErrorPrototype(exec, globalObject, prototypeStructure, nameAndMessage, this); putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5 diff --git a/Source/JavaScriptCore/runtime/NativeErrorConstructor.h b/Source/JavaScriptCore/runtime/NativeErrorConstructor.h index 1ff8207..e4978cc 100644 --- a/Source/JavaScriptCore/runtime/NativeErrorConstructor.h +++ b/Source/JavaScriptCore/runtime/NativeErrorConstructor.h @@ -33,7 +33,12 @@ namespace JSC { public: NativeErrorConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure> structure, NonNullPassRefPtr<Structure> prototypeStructure, const UString&); - static const ClassInfo info; + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } Structure* errorStructure() { return m_errorStructure.get(); } @@ -41,8 +46,6 @@ namespace JSC { virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); - virtual const ClassInfo* classInfo() const { return &info; } - RefPtr<Structure> m_errorStructure; }; diff --git a/Source/JavaScriptCore/runtime/NativeFunctionWrapper.h b/Source/JavaScriptCore/runtime/NativeFunctionWrapper.h deleted file mode 100644 index d4eeb3b..0000000 --- a/Source/JavaScriptCore/runtime/NativeFunctionWrapper.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2009 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef NativeFunctionWrapper_h -#define NativeFunctionWrapper_h - -namespace JSC { -#if ENABLE(JIT) && ENABLE(JIT_OPTIMIZE_NATIVE_CALL) - class JSFunction; - typedef JSFunction NativeFunctionWrapper; -#else - class PrototypeFunction; - typedef PrototypeFunction NativeFunctionWrapper; -#endif -} - -#endif diff --git a/Source/JavaScriptCore/runtime/NumberConstructor.cpp b/Source/JavaScriptCore/runtime/NumberConstructor.cpp index 7cec875..3e4d6c7 100644 --- a/Source/JavaScriptCore/runtime/NumberConstructor.cpp +++ b/Source/JavaScriptCore/runtime/NumberConstructor.cpp @@ -42,7 +42,7 @@ static JSValue numberConstructorMinValue(ExecState*, JSValue, const Identifier&) namespace JSC { -const ClassInfo NumberConstructor::info = { "Function", &InternalFunction::info, 0, ExecState::numberTable }; +const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::numberTable }; /* Source for NumberConstructor.lut.h @begin numberTable @@ -55,8 +55,10 @@ const ClassInfo NumberConstructor::info = { "Function", &InternalFunction::info, */ NumberConstructor::NumberConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, NumberPrototype* numberPrototype) - : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, numberPrototype->info.className)) + : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, numberPrototype->s_info.className)) { + ASSERT(inherits(&s_info)); + // Number.Prototype putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly); diff --git a/Source/JavaScriptCore/runtime/NumberConstructor.h b/Source/JavaScriptCore/runtime/NumberConstructor.h index d8a2593..aaf7c32 100644 --- a/Source/JavaScriptCore/runtime/NumberConstructor.h +++ b/Source/JavaScriptCore/runtime/NumberConstructor.h @@ -35,11 +35,11 @@ namespace JSC { virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); JSValue getValueProperty(ExecState*, int token) const; - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue }; @@ -50,8 +50,6 @@ namespace JSC { private: virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); - - virtual const ClassInfo* classInfo() const { return &info; } }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/NumberObject.cpp b/Source/JavaScriptCore/runtime/NumberObject.cpp index 603c2f0..4408673 100644 --- a/Source/JavaScriptCore/runtime/NumberObject.cpp +++ b/Source/JavaScriptCore/runtime/NumberObject.cpp @@ -29,11 +29,12 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(NumberObject); -const ClassInfo NumberObject::info = { "Number", 0, 0, 0 }; +const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0, 0 }; NumberObject::NumberObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure) : JSWrapperObject(globalData, structure) { + ASSERT(inherits(&s_info)); } JSValue NumberObject::getJSNumber() diff --git a/Source/JavaScriptCore/runtime/NumberObject.h b/Source/JavaScriptCore/runtime/NumberObject.h index 044f490..8a80382 100644 --- a/Source/JavaScriptCore/runtime/NumberObject.h +++ b/Source/JavaScriptCore/runtime/NumberObject.h @@ -29,19 +29,17 @@ namespace JSC { public: explicit NumberObject(JSGlobalData&, NonNullPassRefPtr<Structure>); - static const ClassInfo info; + static const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: static const unsigned StructureFlags = JSWrapperObject::StructureFlags; private: - virtual const ClassInfo* classInfo() const { return &info; } - virtual JSValue getJSNumber(); }; diff --git a/Source/JavaScriptCore/runtime/NumberPrototype.cpp b/Source/JavaScriptCore/runtime/NumberPrototype.cpp index fbe6992..6c027b3 100644 --- a/Source/JavaScriptCore/runtime/NumberPrototype.cpp +++ b/Source/JavaScriptCore/runtime/NumberPrototype.cpp @@ -26,7 +26,6 @@ #include "JSFunction.h" #include "JSString.h" #include "Operations.h" -#include "PrototypeFunction.h" #include "dtoa.h" #include <wtf/Assertions.h> #include <wtf/DecimalNumber.h> @@ -46,19 +45,19 @@ static EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState*); // ECMA 15.7.4 -NumberPrototype::NumberPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure) +NumberPrototype::NumberPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure) : NumberObject(exec->globalData(), structure) { setInternalValue(exec->globalData(), jsNumber(0)); // The constructor will be added later, after NumberConstructor has been constructed - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().toString, numberProtoFuncToString), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toLocaleString, numberProtoFuncToLocaleString), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().valueOf, numberProtoFuncValueOf), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().toFixed, numberProtoFuncToFixed), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().toExponential, numberProtoFuncToExponential), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().toPrecision, numberProtoFuncToPrecision), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().toString, numberProtoFuncToString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toLocaleString, numberProtoFuncToLocaleString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().valueOf, numberProtoFuncValueOf), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().toFixed, numberProtoFuncToFixed), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().toExponential, numberProtoFuncToExponential), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().toPrecision, numberProtoFuncToPrecision), DontEnum); } // ------------------------------ Functions --------------------------- diff --git a/Source/JavaScriptCore/runtime/NumberPrototype.h b/Source/JavaScriptCore/runtime/NumberPrototype.h index 78b690e..191ab47 100644 --- a/Source/JavaScriptCore/runtime/NumberPrototype.h +++ b/Source/JavaScriptCore/runtime/NumberPrototype.h @@ -27,7 +27,7 @@ namespace JSC { class NumberPrototype : public NumberObject { public: - NumberPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure); + NumberPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure); }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp index f31da67..5080ef8 100644 --- a/Source/JavaScriptCore/runtime/ObjectConstructor.cpp +++ b/Source/JavaScriptCore/runtime/ObjectConstructor.cpp @@ -26,10 +26,10 @@ #include "JSFunction.h" #include "JSArray.h" #include "JSGlobalObject.h" +#include "Lookup.h" #include "ObjectPrototype.h" #include "PropertyDescriptor.h" #include "PropertyNameArray.h" -#include "PrototypeFunction.h" namespace JSC { @@ -42,23 +42,56 @@ static EncodedJSValue JSC_HOST_CALL objectConstructorKeys(ExecState*); static EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState*); static EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState*); static EncodedJSValue JSC_HOST_CALL objectConstructorCreate(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorSeal(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorFreeze(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorPreventExtensions(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorIsSealed(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorIsFrozen(ExecState*); +static EncodedJSValue JSC_HOST_CALL objectConstructorIsExtensible(ExecState*); -ObjectConstructor::ObjectConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, ObjectPrototype* objectPrototype, Structure* prototypeFunctionStructure) -: InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "Object")) +} + +#include "ObjectConstructor.lut.h" + +namespace JSC { + +const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::objectConstructorTable }; + +/* Source for ObjectConstructor.lut.h +@begin objectConstructorTable + getPrototypeOf objectConstructorGetPrototypeOf DontEnum|Function 1 + getOwnPropertyDescriptor objectConstructorGetOwnPropertyDescriptor DontEnum|Function 2 + getOwnPropertyNames objectConstructorGetOwnPropertyNames DontEnum|Function 1 + keys objectConstructorKeys DontEnum|Function 1 + defineProperty objectConstructorDefineProperty DontEnum|Function 3 + defineProperties objectConstructorDefineProperties DontEnum|Function 2 + create objectConstructorCreate DontEnum|Function 2 + seal objectConstructorSeal DontEnum|Function 1 + freeze objectConstructorFreeze DontEnum|Function 1 + preventExtensions objectConstructorPreventExtensions DontEnum|Function 1 + isSealed objectConstructorIsSealed DontEnum|Function 1 + isFrozen objectConstructorIsFrozen DontEnum|Function 1 + isExtensible objectConstructorIsExtensible DontEnum|Function 1 +@end +*/ + +ObjectConstructor::ObjectConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, ObjectPrototype* objectPrototype) + : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "Object")) { // ECMA 15.2.3.1 putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly); - // no. of arguments for constructor putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete); - - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().getPrototypeOf, objectConstructorGetPrototypeOf), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().getOwnPropertyDescriptor, objectConstructorGetOwnPropertyDescriptor), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().getOwnPropertyNames, objectConstructorGetOwnPropertyNames), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().keys, objectConstructorKeys), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 3, exec->propertyNames().defineProperty, objectConstructorDefineProperty), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().defineProperties, objectConstructorDefineProperties), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().create, objectConstructorCreate), DontEnum); +} + +bool ObjectConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot &slot) +{ + return getStaticFunctionSlot<JSObject>(exec, ExecState::objectConstructorTable(exec), this, propertyName, slot); +} + +bool ObjectConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor<JSObject>(exec, ExecState::objectConstructorTable(exec), this, propertyName, descriptor); } // ECMA 15.2.2 @@ -66,7 +99,7 @@ static ALWAYS_INLINE JSObject* constructObject(ExecState* exec, const ArgList& a { JSValue arg = args.at(0); if (arg.isUndefinedOrNull()) - return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure()); + return constructEmptyObject(exec); return arg.toObject(exec); } @@ -317,4 +350,55 @@ EncodedJSValue JSC_HOST_CALL objectConstructorCreate(ExecState* exec) return JSValue::encode(defineProperties(exec, newObject, asObject(exec->argument(1)))); } +EncodedJSValue JSC_HOST_CALL objectConstructorSeal(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.seal can only be called on Objects.")); + asObject(obj)->seal(); + return JSValue::encode(obj); +} + +EncodedJSValue JSC_HOST_CALL objectConstructorFreeze(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.freeze can only be called on Objects.")); + asObject(obj)->freeze(); + return JSValue::encode(obj); +} + +EncodedJSValue JSC_HOST_CALL objectConstructorPreventExtensions(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.preventExtensions can only be called on Objects.")); + asObject(obj)->preventExtensions(); + return JSValue::encode(obj); +} + +EncodedJSValue JSC_HOST_CALL objectConstructorIsSealed(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.isSealed can only be called on Objects.")); + return JSValue::encode(jsBoolean(asObject(obj)->isSealed())); +} + +EncodedJSValue JSC_HOST_CALL objectConstructorIsFrozen(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.isFrozen can only be called on Objects.")); + return JSValue::encode(jsBoolean(asObject(obj)->isFrozen())); +} + +EncodedJSValue JSC_HOST_CALL objectConstructorIsExtensible(ExecState* exec) +{ + JSValue obj = exec->argument(0); + if (!obj.isObject()) + return throwVMError(exec, createTypeError(exec, "Object.isExtensible can only be called on Objects.")); + return JSValue::encode(jsBoolean(asObject(obj)->isExtensible())); +} + } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ObjectConstructor.h b/Source/JavaScriptCore/runtime/ObjectConstructor.h index 04a3c1a..895f988 100644 --- a/Source/JavaScriptCore/runtime/ObjectConstructor.h +++ b/Source/JavaScriptCore/runtime/ObjectConstructor.h @@ -29,7 +29,20 @@ namespace JSC { class ObjectConstructor : public InternalFunction { public: - ObjectConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, ObjectPrototype*, Structure* prototypeFunctionStructure); + ObjectConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, ObjectPrototype*); + + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); + + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags; private: virtual ConstructType getConstructData(ConstructData&); diff --git a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp index 57a8a31..187456f 100644 --- a/Source/JavaScriptCore/runtime/ObjectPrototype.cpp +++ b/Source/JavaScriptCore/runtime/ObjectPrototype.cpp @@ -25,7 +25,6 @@ #include "JSFunction.h" #include "JSString.h" #include "JSStringBuilder.h" -#include "PrototypeFunction.h" namespace JSC { @@ -41,22 +40,22 @@ static EncodedJSValue JSC_HOST_CALL objectProtoFuncLookupSetter(ExecState*); static EncodedJSValue JSC_HOST_CALL objectProtoFuncPropertyIsEnumerable(ExecState*); static EncodedJSValue JSC_HOST_CALL objectProtoFuncToLocaleString(ExecState*); -ObjectPrototype::ObjectPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> stucture, Structure* prototypeFunctionStructure) - : JSObject(stucture) +ObjectPrototype::ObjectPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> stucture, Structure* functionStructure) + : JSNonFinalObject(stucture) , m_hasNoPropertiesWithUInt32Names(true) { - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, objectProtoFuncToString), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toLocaleString, objectProtoFuncToLocaleString), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().valueOf, objectProtoFuncValueOf), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().hasOwnProperty, objectProtoFuncHasOwnProperty), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().propertyIsEnumerable, objectProtoFuncPropertyIsEnumerable), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().isPrototypeOf, objectProtoFuncIsPrototypeOf), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toString, objectProtoFuncToString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toLocaleString, objectProtoFuncToLocaleString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().valueOf, objectProtoFuncValueOf), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().hasOwnProperty, objectProtoFuncHasOwnProperty), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().propertyIsEnumerable, objectProtoFuncPropertyIsEnumerable), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().isPrototypeOf, objectProtoFuncIsPrototypeOf), DontEnum); // Mozilla extensions - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().__defineGetter__, objectProtoFuncDefineGetter), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 2, exec->propertyNames().__defineSetter__, objectProtoFuncDefineSetter), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().__lookupGetter__, objectProtoFuncLookupGetter), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().__lookupSetter__, objectProtoFuncLookupSetter), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 2, exec->propertyNames().__defineGetter__, objectProtoFuncDefineGetter), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 2, exec->propertyNames().__defineSetter__, objectProtoFuncDefineSetter), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().__lookupGetter__, objectProtoFuncLookupGetter), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().__lookupSetter__, objectProtoFuncLookupSetter), DontEnum); } void ObjectPrototype::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) diff --git a/Source/JavaScriptCore/runtime/ObjectPrototype.h b/Source/JavaScriptCore/runtime/ObjectPrototype.h index 0382ae4..61c8f57 100644 --- a/Source/JavaScriptCore/runtime/ObjectPrototype.h +++ b/Source/JavaScriptCore/runtime/ObjectPrototype.h @@ -25,9 +25,9 @@ namespace JSC { - class ObjectPrototype : public JSObject { + class ObjectPrototype : public JSNonFinalObject { public: - ObjectPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure); + ObjectPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure); private: virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); diff --git a/Source/JavaScriptCore/runtime/Operations.h b/Source/JavaScriptCore/runtime/Operations.h index 6e84123..181f912 100644 --- a/Source/JavaScriptCore/runtime/Operations.h +++ b/Source/JavaScriptCore/runtime/Operations.h @@ -472,8 +472,11 @@ namespace JSC { JSObject* base; while (true) { base = iter->get(); - if (next == end) - return isStrictPut ? JSValue() : base; + if (next == end) { + if (isStrictPut && !base->getPropertySlot(callFrame, property, slot)) + return JSValue(); + return base; + } if (base->getPropertySlot(callFrame, property, slot)) return base; diff --git a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h index bd452b6..85a3818 100644 --- a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h +++ b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h @@ -22,69 +22,531 @@ #define PropertyMapHashTable_h #include "UString.h" +#include <wtf/HashTable.h> +#include <wtf/PassOwnPtr.h> #include <wtf/Vector.h> + +#ifndef NDEBUG +#define DUMP_PROPERTYMAP_STATS 0 +#else +#define DUMP_PROPERTYMAP_STATS 0 +#endif + +#if DUMP_PROPERTYMAP_STATS + +extern int numProbes; +extern int numCollisions; +extern int numRehashes; +extern int numRemoves; + +#endif + +#define PROPERTY_MAP_DELETED_ENTRY_KEY ((StringImpl*)1) + namespace JSC { - struct PropertyMapEntry { - StringImpl* key; - unsigned offset; - unsigned attributes; - JSCell* specificValue; - unsigned index; - - PropertyMapEntry(StringImpl* key, unsigned attributes, JSCell* specificValue) - : key(key) - , offset(0) - , attributes(attributes) - , specificValue(specificValue) - , index(0) +inline bool isPowerOf2(unsigned v) +{ + // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html + + return !(v & (v - 1)) && v; +} + +inline unsigned nextPowerOf2(unsigned v) +{ + // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html + // Devised by Sean Anderson, Sepember 14, 2001 + + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + + return v; +} + +struct PropertyMapEntry { + StringImpl* key; + unsigned offset; + unsigned attributes; + JSCell* specificValue; + + PropertyMapEntry(StringImpl* key, unsigned offset, unsigned attributes, JSCell* specificValue) + : key(key) + , offset(offset) + , attributes(attributes) + , specificValue(specificValue) + { + } +}; + +class PropertyTable { + WTF_MAKE_FAST_ALLOCATED; + + // This is the implementation for 'iterator' and 'const_iterator', + // used for iterating over the table in insertion order. + template<typename T> + class ordered_iterator { + public: + ordered_iterator<T>& operator++() { + m_valuePtr = skipDeletedEntries(m_valuePtr + 1); + return *this; } - PropertyMapEntry(StringImpl* key, unsigned offset, unsigned attributes, JSCell* specificValue, unsigned index) - : key(key) - , offset(offset) - , attributes(attributes) - , specificValue(specificValue) - , index(index) + bool operator==(const ordered_iterator<T>& other) { + return m_valuePtr == other.m_valuePtr; + } + + bool operator!=(const ordered_iterator<T>& other) + { + return m_valuePtr != other.m_valuePtr; + } + + T& operator*() + { + return *m_valuePtr; } - }; - // lastIndexUsed is an ever-increasing index used to identify the order items - // were inserted into the property map. It's required that getEnumerablePropertyNames - // return the properties in the order they were added for compatibility with other - // browsers' JavaScript implementations. - struct PropertyMapHashTable { - unsigned sizeMask; - unsigned size; - unsigned keyCount; - unsigned deletedSentinelCount; - unsigned lastIndexUsed; - Vector<unsigned>* deletedOffsets; - unsigned entryIndices[1]; - - PropertyMapEntry* entries() + T* operator->() { - // The entries vector comes after the indices vector. - // The 0th item in the entries vector is not really used; it has to - // have a 0 in its key to allow the hash table lookup to handle deleted - // sentinels without any special-case code, but the other fields are unused. - return reinterpret_cast<PropertyMapEntry*>(&entryIndices[size]); + return m_valuePtr; } - static size_t allocationSize(unsigned size) + ordered_iterator(T* valuePtr) + : m_valuePtr(valuePtr) { - // We never let a hash table get more than half full, - // So the number of indices we need is the size of the hash table. - // But the number of entries is half that (plus one for the deleted sentinel). - return sizeof(PropertyMapHashTable) - + (size - 1) * sizeof(unsigned) - + (1 + size / 2) * sizeof(PropertyMapEntry); } + + private: + T* m_valuePtr; }; +public: + typedef StringImpl* KeyType; + typedef PropertyMapEntry ValueType; + + // The in order iterator provides overloaded * and -> to access the Value at the current position. + typedef ordered_iterator<ValueType> iterator; + typedef ordered_iterator<const ValueType> const_iterator; + + // The find_iterator is a pair of a pointer to a Value* an the entry in the index. + // If 'find' does not find an entry then iter.first will be 0, and iter.second will + // give the point in m_index where an entry should be inserted. + typedef std::pair<ValueType*, unsigned> find_iterator; + + // Constructor is passed an initial capacity, a PropertyTable to copy, or both. + PropertyTable(unsigned initialCapacity); + PropertyTable(const PropertyTable&); + PropertyTable(unsigned initialCapacity, const PropertyTable&); + ~PropertyTable(); + + // Ordered iteration methods. + iterator begin(); + iterator end(); + const_iterator begin() const; + const_iterator end() const; + + // Find a value in the table. + find_iterator find(const KeyType& key); + // Add a value to the table + std::pair<find_iterator, bool> add(const ValueType& entry); + // Remove a value from the table. + void remove(const find_iterator& iter); + void remove(const KeyType& key); + + // Returns the number of values in the hashtable. + unsigned size() const; + + // Checks if there are any values in the hashtable. + bool isEmpty() const; + + // Number of slots in the property storage array in use, included deletedOffsets. + unsigned propertyStorageSize() const; + + // Used to maintain a list of unused entries in the property storage. + void clearDeletedOffsets(); + bool hasDeletedOffset(); + unsigned getDeletedOffset(); + void addDeletedOffset(unsigned offset); + + // Copy this PropertyTable, ensuring the copy has at least the capacity provided. + PassOwnPtr<PropertyTable> copy(unsigned newCapacity); + +#ifndef NDEBUG + size_t sizeInMemory(); + void checkConsistency(); +#endif + +private: + // Used to insert a value known not to be in the table, and where we know capacity to be available. + void reinsert(const ValueType& entry); + + // Rehash the table. Used to grow, or to recover deleted slots. + void rehash(unsigned newCapacity); + + // The capacity of the table of values is half of the size of the index. + unsigned tableCapacity() const; + + // We keep an extra deleted slot after the array to make iteration work, + // and to use for deleted values. Index values into the array are 1-based, + // so this is tableCapacity() + 1. + // For example, if m_tableSize is 16, then tableCapacity() is 8 - but the + // values array is actually 9 long (the 9th used for the deleted value/ + // iteration guard). The 8 valid entries are numbered 1..8, so the + // deleted index is 9 (0 being reserved for empty). + unsigned deletedEntryIndex() const; + + // Used in iterator creation/progression. + template<typename T> + static T* skipDeletedEntries(T* valuePtr); + + // The table of values lies after the hash index. + ValueType* table(); + const ValueType* table() const; + + // total number of used entries in the values array - by either valid entries, or deleted ones. + unsigned usedCount() const; + + // The size in bytes of data needed for by the table. + size_t dataSize(); + + // Calculates the appropriate table size (rounds up to a power of two). + static unsigned sizeForCapacity(unsigned capacity); + + // Check if capacity is available. + bool canInsert(); + + unsigned m_indexSize; + unsigned m_indexMask; + unsigned* m_index; + unsigned m_keyCount; + unsigned m_deletedCount; + OwnPtr< Vector<unsigned> > m_deletedOffsets; + + static const unsigned MinimumTableSize = 16; + static const unsigned EmptyEntryIndex = 0; +}; + +inline PropertyTable::PropertyTable(unsigned initialCapacity) + : m_indexSize(sizeForCapacity(initialCapacity)) + , m_indexMask(m_indexSize - 1) + , m_index(static_cast<unsigned*>(fastZeroedMalloc(dataSize()))) + , m_keyCount(0) + , m_deletedCount(0) +{ + ASSERT(isPowerOf2(m_indexSize)); +} + +inline PropertyTable::PropertyTable(const PropertyTable& other) + : m_indexSize(other.m_indexSize) + , m_indexMask(other.m_indexMask) + , m_index(static_cast<unsigned*>(fastMalloc(dataSize()))) + , m_keyCount(other.m_keyCount) + , m_deletedCount(other.m_deletedCount) +{ + ASSERT(isPowerOf2(m_indexSize)); + + memcpy(m_index, other.m_index, dataSize()); + + iterator end = this->end(); + for (iterator iter = begin(); iter != end; ++iter) + iter->key->ref(); + + // Copy the m_deletedOffsets vector. + Vector<unsigned>* otherDeletedOffsets = other.m_deletedOffsets.get(); + if (otherDeletedOffsets) + m_deletedOffsets.set(new Vector<unsigned>(*otherDeletedOffsets)); +} + +inline PropertyTable::PropertyTable(unsigned initialCapacity, const PropertyTable& other) + : m_indexSize(sizeForCapacity(initialCapacity)) + , m_indexMask(m_indexSize - 1) + , m_index(static_cast<unsigned*>(fastZeroedMalloc(dataSize()))) + , m_keyCount(0) + , m_deletedCount(0) +{ + ASSERT(isPowerOf2(m_indexSize)); + ASSERT(initialCapacity >= other.m_keyCount); + + const_iterator end = other.end(); + for (const_iterator iter = other.begin(); iter != end; ++iter) { + ASSERT(canInsert()); + reinsert(*iter); + iter->key->ref(); + } + + // Copy the m_deletedOffsets vector. + Vector<unsigned>* otherDeletedOffsets = other.m_deletedOffsets.get(); + if (otherDeletedOffsets) + m_deletedOffsets.set(new Vector<unsigned>(*otherDeletedOffsets)); +} + +inline PropertyTable::~PropertyTable() +{ + iterator end = this->end(); + for (iterator iter = begin(); iter != end; ++iter) + iter->key->ref(); + + fastFree(m_index); +} + +inline PropertyTable::iterator PropertyTable::begin() +{ + return iterator(skipDeletedEntries(table())); +} + +inline PropertyTable::iterator PropertyTable::end() +{ + return iterator(table() + usedCount()); +} + +inline PropertyTable::const_iterator PropertyTable::begin() const +{ + return const_iterator(skipDeletedEntries(table())); +} + +inline PropertyTable::const_iterator PropertyTable::end() const +{ + return const_iterator(table() + usedCount()); +} + +inline PropertyTable::find_iterator PropertyTable::find(const KeyType& key) +{ + ASSERT(key); + unsigned hash = key->existingHash(); + unsigned step = 0; + +#if DUMP_PROPERTYMAP_STATS + ++numProbes; +#endif + + while (true) { + unsigned entryIndex = m_index[hash & m_indexMask]; + if (entryIndex == EmptyEntryIndex) + return std::make_pair((ValueType*)0, hash & m_indexMask); + if (key == table()[entryIndex - 1].key) + return std::make_pair(&table()[entryIndex - 1], hash & m_indexMask); + +#if DUMP_PROPERTYMAP_STATS + ++numCollisions; +#endif + + if (!step) + step =WTF::doubleHash(key->existingHash()) | 1; + hash += step; + +#if DUMP_PROPERTYMAP_STATS + ++numRehashes; +#endif + } +} + +inline std::pair<PropertyTable::find_iterator, bool> PropertyTable::add(const ValueType& entry) +{ + // Look for a value with a matching key already in the array. + find_iterator iter = find(entry.key); + if (iter.first) + return std::make_pair(iter, false); + + // Ref the key + entry.key->ref(); + + // ensure capacity is available. + if (!canInsert()) { + rehash(m_keyCount + 1); + iter = find(entry.key); + ASSERT(!iter.first); + } + + // Allocate a slot in the hashtable, and set the index to reference this. + unsigned entryIndex = usedCount() + 1; + m_index[iter.second] = entryIndex; + iter.first = &table()[entryIndex - 1]; + *iter.first = entry; + + ++m_keyCount; + return std::make_pair(iter, true); +} + +inline void PropertyTable::remove(const find_iterator& iter) +{ + // Removing a key that doesn't exist does nothing! + if (!iter.first) + return; + +#if DUMP_PROPERTYMAP_STATS + ++numRemoves; +#endif + + // Replace this one element with the deleted sentinel. Also clear out + // the entry so we can iterate all the entries as needed. + m_index[iter.second] = deletedEntryIndex(); + iter.first->key->deref(); + iter.first->key = PROPERTY_MAP_DELETED_ENTRY_KEY; + + ASSERT(m_keyCount >= 1); + --m_keyCount; + ++m_deletedCount; + + if (m_deletedCount * 4 >= m_indexSize) + rehash(m_keyCount); +} + +inline void PropertyTable::remove(const KeyType& key) +{ + remove(find(key)); +} + +// returns the number of values in the hashtable. +inline unsigned PropertyTable::size() const +{ + return m_keyCount; +} + +inline bool PropertyTable::isEmpty() const +{ + return !m_keyCount; +} + +inline unsigned PropertyTable::propertyStorageSize() const +{ + return size() + (m_deletedOffsets ? m_deletedOffsets->size() : 0); +} + +inline void PropertyTable::clearDeletedOffsets() +{ + m_deletedOffsets.clear(); +} + +inline bool PropertyTable::hasDeletedOffset() +{ + return m_deletedOffsets && !m_deletedOffsets->isEmpty(); +} + +inline unsigned PropertyTable::getDeletedOffset() +{ + unsigned offset = m_deletedOffsets->last(); + m_deletedOffsets->removeLast(); + return offset; +} + +inline void PropertyTable::addDeletedOffset(unsigned offset) +{ + if (!m_deletedOffsets) + m_deletedOffsets.set(new Vector<unsigned>); + m_deletedOffsets->append(offset); +} + +inline PassOwnPtr<PropertyTable> PropertyTable::copy(unsigned newCapacity) +{ + ASSERT(newCapacity >= m_keyCount); + + // Fast case; if the new table will be the same m_indexSize as this one, we can memcpy it, + // save rehashing all keys. + if (sizeForCapacity(newCapacity) == m_indexSize) + return new PropertyTable(*this); + return new PropertyTable(newCapacity, *this); +} + +#ifndef NDEBUG +inline size_t PropertyTable::sizeInMemory() +{ + size_t result = sizeof(PropertyTable) + dataSize(); + if (m_deletedOffsets) + result += (m_deletedOffsets->capacity() * sizeof(unsigned)); + return result; +} +#endif + +inline void PropertyTable::reinsert(const ValueType& entry) +{ + // Used to insert a value known not to be in the table, and where + // we know capacity to be available. + ASSERT(canInsert()); + find_iterator iter = find(entry.key); + ASSERT(!iter.first); + + unsigned entryIndex = usedCount() + 1; + m_index[iter.second] = entryIndex; + table()[entryIndex - 1] = entry; + + ++m_keyCount; +} + +inline void PropertyTable::rehash(unsigned newCapacity) +{ + unsigned* oldEntryIndices = m_index; + iterator iter = this->begin(); + iterator end = this->end(); + + m_indexSize = sizeForCapacity(newCapacity); + m_indexMask = m_indexSize - 1; + m_keyCount = 0; + m_deletedCount = 0; + m_index = static_cast<unsigned*>(fastZeroedMalloc(dataSize())); + + for (; iter != end; ++iter) { + ASSERT(canInsert()); + reinsert(*iter); + } + + fastFree(oldEntryIndices); +} + +inline unsigned PropertyTable::tableCapacity() const { return m_indexSize >> 1; } + +inline unsigned PropertyTable::deletedEntryIndex() const { return tableCapacity() + 1; } + +template<typename T> +inline T* PropertyTable::skipDeletedEntries(T* valuePtr) +{ + while (valuePtr->key == PROPERTY_MAP_DELETED_ENTRY_KEY) + ++valuePtr; + return valuePtr; +} + +inline PropertyTable::ValueType* PropertyTable::table() +{ + // The table of values lies after the hash index. + return reinterpret_cast<ValueType*>(m_index + m_indexSize); +} + +inline const PropertyTable::ValueType* PropertyTable::table() const +{ + // The table of values lies after the hash index. + return reinterpret_cast<const ValueType*>(m_index + m_indexSize); +} + +inline unsigned PropertyTable::usedCount() const +{ + // Total number of used entries in the values array - by either valid entries, or deleted ones. + return m_keyCount + m_deletedCount; +} + +inline size_t PropertyTable::dataSize() +{ + // The size in bytes of data needed for by the table. + return m_indexSize * sizeof(unsigned) + ((tableCapacity()) + 1) * sizeof(ValueType); +} + +inline unsigned PropertyTable::sizeForCapacity(unsigned capacity) +{ + if (capacity < 8) + return MinimumTableSize; + return nextPowerOf2(capacity + 1) * 2; +} + +inline bool PropertyTable::canInsert() +{ + return usedCount() < tableCapacity(); +} + } // namespace JSC #endif // PropertyMapHashTable_h diff --git a/Source/JavaScriptCore/runtime/PropertyNameArray.cpp b/Source/JavaScriptCore/runtime/PropertyNameArray.cpp index afb41be..351ecc3 100644 --- a/Source/JavaScriptCore/runtime/PropertyNameArray.cpp +++ b/Source/JavaScriptCore/runtime/PropertyNameArray.cpp @@ -21,6 +21,7 @@ #include "config.h" #include "PropertyNameArray.h" +#include "ScopeChain.h" #include "Structure.h" #include "StructureChain.h" diff --git a/Source/JavaScriptCore/runtime/PropertySlot.h b/Source/JavaScriptCore/runtime/PropertySlot.h index cdda6ff..ce29ac4 100644 --- a/Source/JavaScriptCore/runtime/PropertySlot.h +++ b/Source/JavaScriptCore/runtime/PropertySlot.h @@ -123,15 +123,6 @@ namespace JSC { m_value = value; } - void setRegisterSlot(Register* registerSlot) - { - ASSERT(registerSlot); - clearBase(); - clearOffset(); - m_getValue = JSC_VALUE_MARKER; - m_value = registerSlot->jsValue(); - } - void setCustom(JSValue slotBase, GetValueFunc getValue) { ASSERT(slotBase); diff --git a/Source/JavaScriptCore/runtime/Protect.h b/Source/JavaScriptCore/runtime/Protect.h index 0c1b5e8..843c9e1 100644 --- a/Source/JavaScriptCore/runtime/Protect.h +++ b/Source/JavaScriptCore/runtime/Protect.h @@ -61,155 +61,6 @@ namespace JSC { gcUnprotect(value.asCell()); } - // FIXME: Share more code with RefPtr template? The only differences are the ref/deref operation - // and the implicit conversion to raw pointer - template <class T> class ProtectedPtr { - public: - ProtectedPtr() : m_ptr(0) {} - ProtectedPtr(T* ptr); - ProtectedPtr(const ProtectedPtr&); - ~ProtectedPtr(); - - template <class U> ProtectedPtr(const ProtectedPtr<U>&); - - T* get() const { return m_ptr; } - operator T*() const { return m_ptr; } - operator JSValue() const { return JSValue(m_ptr); } - T* operator->() const { return m_ptr; } - - operator bool() const { return m_ptr; } - bool operator!() const { return !m_ptr; } - - ProtectedPtr& operator=(const ProtectedPtr&); - ProtectedPtr& operator=(T*); - - private: - T* m_ptr; - }; - - class ProtectedJSValue { - public: - ProtectedJSValue() {} - ProtectedJSValue(JSValue value); - ProtectedJSValue(const ProtectedJSValue&); - ~ProtectedJSValue(); - - template <class U> ProtectedJSValue(const ProtectedPtr<U>&); - - JSValue get() const { return m_value; } - operator JSValue() const { return m_value; } - JSValue operator->() const { return m_value; } - - operator bool() const { return m_value; } - bool operator!() const { return !m_value; } - - ProtectedJSValue& operator=(const ProtectedJSValue&); - ProtectedJSValue& operator=(JSValue); - - private: - JSValue m_value; - }; - - template <class T> inline ProtectedPtr<T>::ProtectedPtr(T* ptr) - : m_ptr(ptr) - { - gcProtectNullTolerant(m_ptr); - } - - template <class T> inline ProtectedPtr<T>::ProtectedPtr(const ProtectedPtr& o) - : m_ptr(o.get()) - { - gcProtectNullTolerant(m_ptr); - } - - template <class T> inline ProtectedPtr<T>::~ProtectedPtr() - { - gcUnprotectNullTolerant(m_ptr); - } - - template <class T> template <class U> inline ProtectedPtr<T>::ProtectedPtr(const ProtectedPtr<U>& o) - : m_ptr(o.get()) - { - gcProtectNullTolerant(m_ptr); - } - - template <class T> inline ProtectedPtr<T>& ProtectedPtr<T>::operator=(const ProtectedPtr<T>& o) - { - T* optr = o.m_ptr; - gcProtectNullTolerant(optr); - gcUnprotectNullTolerant(m_ptr); - m_ptr = optr; - return *this; - } - - template <class T> inline ProtectedPtr<T>& ProtectedPtr<T>::operator=(T* optr) - { - gcProtectNullTolerant(optr); - gcUnprotectNullTolerant(m_ptr); - m_ptr = optr; - return *this; - } - - inline ProtectedJSValue::ProtectedJSValue(JSValue value) - : m_value(value) - { - gcProtect(m_value); - } - - inline ProtectedJSValue::ProtectedJSValue(const ProtectedJSValue& o) - : m_value(o.get()) - { - gcProtect(m_value); - } - - inline ProtectedJSValue::~ProtectedJSValue() - { - gcUnprotect(m_value); - } - - template <class U> ProtectedJSValue::ProtectedJSValue(const ProtectedPtr<U>& o) - : m_value(o.get()) - { - gcProtect(m_value); - } - - inline ProtectedJSValue& ProtectedJSValue::operator=(const ProtectedJSValue& o) - { - JSValue ovalue = o.m_value; - gcProtect(ovalue); - gcUnprotect(m_value); - m_value = ovalue; - return *this; - } - - inline ProtectedJSValue& ProtectedJSValue::operator=(JSValue ovalue) - { - gcProtect(ovalue); - gcUnprotect(m_value); - m_value = ovalue; - return *this; - } - - template <class T> inline bool operator==(const ProtectedPtr<T>& a, const ProtectedPtr<T>& b) { return a.get() == b.get(); } - template <class T> inline bool operator==(const ProtectedPtr<T>& a, const T* b) { return a.get() == b; } - template <class T> inline bool operator==(const T* a, const ProtectedPtr<T>& b) { return a == b.get(); } - - template <class T> inline bool operator!=(const ProtectedPtr<T>& a, const ProtectedPtr<T>& b) { return a.get() != b.get(); } - template <class T> inline bool operator!=(const ProtectedPtr<T>& a, const T* b) { return a.get() != b; } - template <class T> inline bool operator!=(const T* a, const ProtectedPtr<T>& b) { return a != b.get(); } - - inline bool operator==(const ProtectedJSValue& a, const ProtectedJSValue& b) { return a.get() == b.get(); } - inline bool operator==(const ProtectedJSValue& a, const JSValue b) { return a.get() == b; } - template <class T> inline bool operator==(const ProtectedJSValue& a, const ProtectedPtr<T>& b) { return a.get() == JSValue(b.get()); } - inline bool operator==(const JSValue a, const ProtectedJSValue& b) { return a == b.get(); } - template <class T> inline bool operator==(const ProtectedPtr<T>& a, const ProtectedJSValue& b) { return JSValue(a.get()) == b.get(); } - - inline bool operator!=(const ProtectedJSValue& a, const ProtectedJSValue& b) { return a.get() != b.get(); } - inline bool operator!=(const ProtectedJSValue& a, const JSValue b) { return a.get() != b; } - template <class T> inline bool operator!=(const ProtectedJSValue& a, const ProtectedPtr<T>& b) { return a.get() != JSValue(b.get()); } - inline bool operator!=(const JSValue a, const ProtectedJSValue& b) { return a != b.get(); } - template <class T> inline bool operator!=(const ProtectedPtr<T>& a, const ProtectedJSValue& b) { return JSValue(a.get()) != b.get(); } - } // namespace JSC #endif // Protect_h diff --git a/Source/JavaScriptCore/runtime/PrototypeFunction.cpp b/Source/JavaScriptCore/runtime/PrototypeFunction.cpp deleted file mode 100644 index 95e1033..0000000 --- a/Source/JavaScriptCore/runtime/PrototypeFunction.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 1999-2002 Harri Porten (porten@kde.org) - * Copyright (C) 2001 Peter Kelly (pmk@post.com) - * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. - * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) - * Copyright (C) 2007 Maks Orlovich - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#include "config.h" -#include "PrototypeFunction.h" - -#include "JSGlobalObject.h" -#include <wtf/Assertions.h> - -namespace JSC { - -ASSERT_CLASS_FITS_IN_CELL(PrototypeFunction); - -PrototypeFunction::PrototypeFunction(ExecState* exec, JSGlobalObject* globalObject, int length, const Identifier& name, NativeFunction function) - : InternalFunction(&exec->globalData(), globalObject, exec->lexicalGlobalObject()->prototypeFunctionStructure(), name) - , m_function(function) -{ - ASSERT_ARG(function, function); - putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum); -} - -PrototypeFunction::PrototypeFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> prototypeFunctionStructure, int length, const Identifier& name, NativeFunction function) - : InternalFunction(&exec->globalData(), globalObject, prototypeFunctionStructure, name) - , m_function(function) -{ - ASSERT_ARG(function, function); - putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum); -} - -CallType PrototypeFunction::getCallData(CallData& callData) -{ - callData.native.function = m_function; - return CallTypeHost; -} - -} // namespace JSC diff --git a/Source/JavaScriptCore/runtime/PrototypeFunction.h b/Source/JavaScriptCore/runtime/PrototypeFunction.h deleted file mode 100644 index 6ca2342..0000000 --- a/Source/JavaScriptCore/runtime/PrototypeFunction.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. - * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) - * Copyright (C) 2007 Maks Orlovich - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef PrototypeFunction_h -#define PrototypeFunction_h - -#include "InternalFunction.h" -#include "CallData.h" - -namespace JSC { - - class PrototypeFunction : public InternalFunction { - public: - PrototypeFunction(ExecState*, JSGlobalObject*, int length, const Identifier&, NativeFunction); - PrototypeFunction(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, int length, const Identifier&, NativeFunction); - - private: - virtual CallType getCallData(CallData&); - - const NativeFunction m_function; - }; - -} // namespace JSC - -#endif // PrototypeFunction_h diff --git a/Source/JavaScriptCore/runtime/RegExpConstructor.cpp b/Source/JavaScriptCore/runtime/RegExpConstructor.cpp index 1b30514..c06fdc4 100644 --- a/Source/JavaScriptCore/runtime/RegExpConstructor.cpp +++ b/Source/JavaScriptCore/runtime/RegExpConstructor.cpp @@ -67,7 +67,7 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(RegExpConstructor); -const ClassInfo RegExpConstructor::info = { "Function", &InternalFunction::info, 0, ExecState::regExpConstructorTable }; +const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_info, 0, ExecState::regExpConstructorTable }; /* Source for RegExpConstructor.lut.h @begin regExpConstructorTable @@ -99,6 +99,8 @@ RegExpConstructor::RegExpConstructor(ExecState* exec, JSGlobalObject* globalObje : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "RegExp")) , d(adoptPtr(new RegExpConstructorPrivate)) { + ASSERT(inherits(&s_info)); + // ECMA 15.10.5.1 RegExp.prototype putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly); @@ -296,7 +298,7 @@ JSObject* constructRegExp(ExecState* exec, const ArgList& args) JSValue arg0 = args.at(0); JSValue arg1 = args.at(1); - if (arg0.inherits(&RegExpObject::info)) { + if (arg0.inherits(&RegExpObject::s_info)) { if (!arg1.isUndefined()) return throwError(exec, createTypeError(exec, "Cannot supply flags when constructing one RegExp from another.")); return asObject(arg0); diff --git a/Source/JavaScriptCore/runtime/RegExpConstructor.h b/Source/JavaScriptCore/runtime/RegExpConstructor.h index 1714bd3..8a8a54a 100644 --- a/Source/JavaScriptCore/runtime/RegExpConstructor.h +++ b/Source/JavaScriptCore/runtime/RegExpConstructor.h @@ -61,14 +61,14 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - static const ClassInfo info; + static const ClassInfo s_info; void performMatch(RegExp*, const UString&, int startOffset, int& position, int& length, int** ovector = 0); JSObject* arrayOfMatches(ExecState*) const; @@ -91,8 +91,6 @@ namespace JSC { virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); - virtual const ClassInfo* classInfo() const { return &info; } - OwnPtr<RegExpConstructorPrivate> d; }; @@ -102,7 +100,7 @@ namespace JSC { inline RegExpConstructor* asRegExpConstructor(JSValue value) { - ASSERT(asObject(value)->inherits(&RegExpConstructor::info)); + ASSERT(asObject(value)->inherits(&RegExpConstructor::s_info)); return static_cast<RegExpConstructor*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/RegExpObject.cpp b/Source/JavaScriptCore/runtime/RegExpObject.cpp index b969e38..5baf884 100644 --- a/Source/JavaScriptCore/runtime/RegExpObject.cpp +++ b/Source/JavaScriptCore/runtime/RegExpObject.cpp @@ -49,7 +49,7 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(RegExpObject); -const ClassInfo RegExpObject::info = { "RegExp", 0, 0, ExecState::regExpTable }; +const ClassInfo RegExpObject::s_info = { "RegExp", &JSObjectWithGlobalObject::s_info, 0, ExecState::regExpTable }; /* Source for RegExpObject.lut.h @begin regExpTable @@ -65,6 +65,7 @@ RegExpObject::RegExpObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Struc : JSObjectWithGlobalObject(globalObject, structure) , d(adoptPtr(new RegExpObjectData(regExp, 0))) { + ASSERT(inherits(&s_info)); } RegExpObject::~RegExpObject() diff --git a/Source/JavaScriptCore/runtime/RegExpObject.h b/Source/JavaScriptCore/runtime/RegExpObject.h index 99c84da..1f89b84 100644 --- a/Source/JavaScriptCore/runtime/RegExpObject.h +++ b/Source/JavaScriptCore/runtime/RegExpObject.h @@ -44,12 +44,11 @@ namespace JSC { virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); - virtual const ClassInfo* classInfo() const { return &info; } - static JS_EXPORTDATA const ClassInfo info; + static JS_EXPORTDATA const ClassInfo s_info; static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -70,7 +69,7 @@ namespace JSC { RefPtr<RegExp> regExp; double lastIndex; }; -#if PLATFORM(WIN) +#if COMPILER(MSVC) friend void WTF::deleteOwnedPtr<RegExpObjectData>(RegExpObjectData*); #endif OwnPtr<RegExpObjectData> d; @@ -80,7 +79,7 @@ namespace JSC { inline RegExpObject* asRegExpObject(JSValue value) { - ASSERT(asObject(value)->inherits(&RegExpObject::info)); + ASSERT(asObject(value)->inherits(&RegExpObject::s_info)); return static_cast<RegExpObject*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp index a7c447d..106006c 100644 --- a/Source/JavaScriptCore/runtime/RegExpPrototype.cpp +++ b/Source/JavaScriptCore/runtime/RegExpPrototype.cpp @@ -30,7 +30,6 @@ #include "JSStringBuilder.h" #include "JSValue.h" #include "ObjectPrototype.h" -#include "PrototypeFunction.h" #include "RegExpObject.h" #include "RegExp.h" #include "RegExpCache.h" @@ -48,13 +47,13 @@ static EncodedJSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState*); // ECMA 15.10.5 -RegExpPrototype::RegExpPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure) +RegExpPrototype::RegExpPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure) : RegExpObject(globalObject, structure, RegExp::create(&exec->globalData(), "", "")) { - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().compile, regExpProtoFuncCompile), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().exec, regExpProtoFuncExec), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().test, regExpProtoFuncTest), DontEnum); - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 0, exec->propertyNames().toString, regExpProtoFuncToString), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().compile, regExpProtoFuncCompile), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().exec, regExpProtoFuncExec), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().test, regExpProtoFuncTest), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 0, exec->propertyNames().toString, regExpProtoFuncToString), DontEnum); } // ------------------------------ Functions --------------------------- @@ -62,7 +61,7 @@ RegExpPrototype::RegExpPrototype(ExecState* exec, JSGlobalObject* globalObject, EncodedJSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&RegExpObject::info)) + if (!thisValue.inherits(&RegExpObject::s_info)) return throwVMTypeError(exec); return JSValue::encode(asRegExpObject(thisValue)->test(exec)); } @@ -70,7 +69,7 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState* exec) EncodedJSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&RegExpObject::info)) + if (!thisValue.inherits(&RegExpObject::s_info)) return throwVMTypeError(exec); return JSValue::encode(asRegExpObject(thisValue)->exec(exec)); } @@ -78,14 +77,14 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncExec(ExecState* exec) EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&RegExpObject::info)) + if (!thisValue.inherits(&RegExpObject::s_info)) return throwVMTypeError(exec); RefPtr<RegExp> regExp; JSValue arg0 = exec->argument(0); JSValue arg1 = exec->argument(1); - if (arg0.inherits(&RegExpObject::info)) { + if (arg0.inherits(&RegExpObject::s_info)) { if (!arg1.isUndefined()) return throwVMError(exec, createTypeError(exec, "Cannot supply flags when constructing one RegExp from another.")); regExp = asRegExpObject(arg0)->regExp(); @@ -106,8 +105,8 @@ EncodedJSValue JSC_HOST_CALL regExpProtoFuncCompile(ExecState* exec) EncodedJSValue JSC_HOST_CALL regExpProtoFuncToString(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); - if (!thisValue.inherits(&RegExpObject::info)) { - if (thisValue.inherits(&RegExpPrototype::info)) + if (!thisValue.inherits(&RegExpObject::s_info)) { + if (thisValue.inherits(&RegExpPrototype::s_info)) return JSValue::encode(jsNontrivialString(exec, "//")); return throwVMTypeError(exec); } diff --git a/Source/JavaScriptCore/runtime/RegExpPrototype.h b/Source/JavaScriptCore/runtime/RegExpPrototype.h index eb4ae00..70d77d9 100644 --- a/Source/JavaScriptCore/runtime/RegExpPrototype.h +++ b/Source/JavaScriptCore/runtime/RegExpPrototype.h @@ -28,7 +28,7 @@ namespace JSC { class RegExpPrototype : public RegExpObject { public: - RegExpPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure); + RegExpPrototype(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure); }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ScopeChain.cpp b/Source/JavaScriptCore/runtime/ScopeChain.cpp index 976cff6..4615f9a 100644 --- a/Source/JavaScriptCore/runtime/ScopeChain.cpp +++ b/Source/JavaScriptCore/runtime/ScopeChain.cpp @@ -31,16 +31,16 @@ namespace JSC { #ifndef NDEBUG -void ScopeChainNode::print() const +void ScopeChainNode::print() { ScopeChainIterator scopeEnd = end(); for (ScopeChainIterator scopeIter = begin(); scopeIter != scopeEnd; ++scopeIter) { - DeprecatedPtr<JSObject> o = *scopeIter; + JSObject* o = scopeIter->get(); PropertyNameArray propertyNames(globalObject->globalExec()); o->getPropertyNames(globalObject->globalExec(), propertyNames); PropertyNameArray::const_iterator propEnd = propertyNames.end(); - fprintf(stderr, "----- [scope %p] -----\n", o.get()); + fprintf(stderr, "----- [scope %p] -----\n", o); for (PropertyNameArray::const_iterator propIter = propertyNames.begin(); propIter != propEnd; propIter++) { Identifier name = *propIter; fprintf(stderr, "%s, ", name.ustring().utf8().data()); @@ -51,12 +51,12 @@ void ScopeChainNode::print() const #endif -int ScopeChain::localDepth() const +int ScopeChainNode::localDepth() { int scopeDepth = 0; ScopeChainIterator iter = this->begin(); ScopeChainIterator end = this->end(); - while (!(*iter)->inherits(&JSActivation::info)) { + while (!(*iter)->inherits(&JSActivation::s_info)) { ++iter; if (iter == end) break; @@ -65,4 +65,13 @@ int ScopeChain::localDepth() const return scopeDepth; } +void ScopeChainNode::markChildren(MarkStack& markStack) +{ + if (next) + markStack.append(&next); + markStack.append(&object); + markStack.append(&globalObject); + markStack.append(&globalThis); +} + } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ScopeChain.h b/Source/JavaScriptCore/runtime/ScopeChain.h index 11f3692..fbecd11 100644 --- a/Source/JavaScriptCore/runtime/ScopeChain.h +++ b/Source/JavaScriptCore/runtime/ScopeChain.h @@ -21,7 +21,7 @@ #ifndef ScopeChain_h #define ScopeChain_h -#include "WriteBarrier.h" +#include "JSCell.h" #include <wtf/FastAllocBase.h> namespace JSC { @@ -32,109 +32,67 @@ namespace JSC { class MarkStack; class ScopeChainIterator; - class ScopeChainNode { - WTF_MAKE_FAST_ALLOCATED; + class ScopeChainNode : public JSCell { public: ScopeChainNode(ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis) - : next(next) - , object(object) + : JSCell(globalData->scopeChainNodeStructure.get()) , globalData(globalData) - , globalObject(globalObject) - , globalThis(globalThis) - , refCount(1) + , next(*globalData, this, next) + , object(*globalData, this, object) + , globalObject(*globalData, this, globalObject) + , globalThis(*globalData, this, globalThis) { ASSERT(globalData); ASSERT(globalObject); } -#ifndef NDEBUG - // Due to the number of subtle and timing dependent bugs that have occurred due - // to deleted but still "valid" ScopeChainNodes we now deliberately clobber the - // contents in debug builds. - ~ScopeChainNode() - { - next = 0; - globalData = 0; - globalObject = 0; - globalThis = 0; - } -#endif - ScopeChainNode* next; - DeprecatedPtr<JSObject> object; JSGlobalData* globalData; - JSGlobalObject* globalObject; - JSObject* globalThis; - int refCount; - - void deref() { ASSERT(refCount); if (--refCount == 0) { release();} } - void ref() { ASSERT(refCount); ++refCount; } - void release(); - - // Before calling "push" on a bare ScopeChainNode, a client should - // logically "copy" the node. Later, the client can "deref" the head - // of its chain of ScopeChainNodes to reclaim all the nodes it added - // after the logical copy, leaving nodes added before the logical copy - // (nodes shared with other clients) untouched. - ScopeChainNode* copy() - { - ref(); - return this; - } + WriteBarrier<ScopeChainNode> next; + WriteBarrier<JSObject> object; + WriteBarrier<JSGlobalObject> globalObject; + WriteBarrier<JSObject> globalThis; ScopeChainNode* push(JSObject*); ScopeChainNode* pop(); - ScopeChainIterator begin() const; - ScopeChainIterator end() const; + ScopeChainIterator begin(); + ScopeChainIterator end(); + + int localDepth(); #ifndef NDEBUG - void print() const; + void print(); #endif + + static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); } + virtual void markChildren(MarkStack&); + private: + static const unsigned StructureFlags = OverridesMarkChildren; }; inline ScopeChainNode* ScopeChainNode::push(JSObject* o) { ASSERT(o); - return new ScopeChainNode(this, o, globalData, globalObject, globalThis); + return new (globalData) ScopeChainNode(this, o, globalData, globalObject.get(), globalThis.get()); } inline ScopeChainNode* ScopeChainNode::pop() { ASSERT(next); - ScopeChainNode* result = next; - - if (--refCount != 0) - ++result->refCount; - else - delete this; - - return result; - } - - inline void ScopeChainNode::release() - { - // This function is only called by deref(), - // Deref ensures these conditions are true. - ASSERT(refCount == 0); - ScopeChainNode* n = this; - do { - ScopeChainNode* next = n->next; - delete n; - n = next; - } while (n && --n->refCount == 0); + return next.get(); } class ScopeChainIterator { public: - ScopeChainIterator(const ScopeChainNode* node) + ScopeChainIterator(ScopeChainNode* node) : m_node(node) { } - DeprecatedPtr<JSObject> const & operator*() const { return m_node->object; } - DeprecatedPtr<JSObject> const * operator->() const { return &(operator*()); } + WriteBarrier<JSObject> const & operator*() const { return m_node->object; } + WriteBarrier<JSObject> const * operator->() const { return &(operator*()); } - ScopeChainIterator& operator++() { m_node = m_node->next; return *this; } + ScopeChainIterator& operator++() { m_node = m_node->next.get(); return *this; } // postfix ++ intentionally omitted @@ -142,100 +100,33 @@ namespace JSC { bool operator!=(const ScopeChainIterator& other) const { return m_node != other.m_node; } private: - const ScopeChainNode* m_node; + DeprecatedPtr<ScopeChainNode> m_node; }; - inline ScopeChainIterator ScopeChainNode::begin() const + inline ScopeChainIterator ScopeChainNode::begin() { return ScopeChainIterator(this); } - inline ScopeChainIterator ScopeChainNode::end() const + inline ScopeChainIterator ScopeChainNode::end() { return ScopeChainIterator(0); } - class NoScopeChain {}; - - class ScopeChain { - friend class JIT; - public: - ScopeChain(NoScopeChain) - : m_node(0) - { - } - - ScopeChain(JSObject* o, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis) - : m_node(new ScopeChainNode(0, o, globalData, globalObject, globalThis)) - { - } - - ScopeChain(const ScopeChain& c) - : m_node(c.m_node->copy()) - { - } - - ScopeChain& operator=(const ScopeChain& c); - - explicit ScopeChain(ScopeChainNode* node) - : m_node(node->copy()) - { - } - - ~ScopeChain() - { - if (m_node) - m_node->deref(); -#ifndef NDEBUG - m_node = 0; -#endif - } - - void swap(ScopeChain&); - - ScopeChainNode* node() const { return m_node; } - - JSObject* top() const { return m_node->object.get(); } - - ScopeChainIterator begin() const { return m_node->begin(); } - ScopeChainIterator end() const { return m_node->end(); } - - void push(JSObject* o) { m_node = m_node->push(o); } - - void pop() { m_node = m_node->pop(); } - void clear() { m_node->deref(); m_node = 0; } - - JSGlobalObject* globalObject() const { return m_node->globalObject; } - - void markAggregate(MarkStack&) const; - - // Caution: this should only be used if the codeblock this is being used - // with needs a full scope chain, otherwise this returns the depth of - // the preceeding call frame - // - // Returns the depth of the current call frame's scope chain - int localDepth() const; - -#ifndef NDEBUG - void print() const { m_node->print(); } -#endif - - private: - ScopeChainNode* m_node; - }; - - inline void ScopeChain::swap(ScopeChain& o) + ALWAYS_INLINE JSGlobalData& ExecState::globalData() const { - ScopeChainNode* tmp = m_node; - m_node = o.m_node; - o.m_node = tmp; + ASSERT(scopeChain()->globalData); + return *scopeChain()->globalData; } - inline ScopeChain& ScopeChain::operator=(const ScopeChain& c) + ALWAYS_INLINE JSGlobalObject* ExecState::lexicalGlobalObject() const + { + return scopeChain()->globalObject.get(); + } + + ALWAYS_INLINE JSObject* ExecState::globalThisValue() const { - ScopeChain tmp(c); - swap(tmp); - return *this; + return scopeChain()->globalThis.get(); } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/ScopeChainMark.h b/Source/JavaScriptCore/runtime/ScopeChainMark.h index faa4824..35701f1 100644 --- a/Source/JavaScriptCore/runtime/ScopeChainMark.h +++ b/Source/JavaScriptCore/runtime/ScopeChainMark.h @@ -25,12 +25,6 @@ namespace JSC { - inline void ScopeChain::markAggregate(MarkStack& markStack) const - { - for (ScopeChainNode* n = m_node; n; n = n->next) - markStack.append(&n->object); - } - } // namespace JSC #endif // ScopeChainMark_h diff --git a/Source/JavaScriptCore/runtime/SmallStrings.h b/Source/JavaScriptCore/runtime/SmallStrings.h index ee795b6..cd9c325 100644 --- a/Source/JavaScriptCore/runtime/SmallStrings.h +++ b/Source/JavaScriptCore/runtime/SmallStrings.h @@ -63,9 +63,9 @@ namespace JSC { void clear(); unsigned count() const; -#if ENABLE(JIT) + JSCell** singleCharacterStrings() { return m_singleCharacterStrings[0].slot(); } -#endif + private: void createEmptyString(JSGlobalData*); void createSingleCharacterString(JSGlobalData*, unsigned char); diff --git a/Source/JavaScriptCore/runtime/StrictEvalActivation.cpp b/Source/JavaScriptCore/runtime/StrictEvalActivation.cpp index 5bb013b..24c501e 100644 --- a/Source/JavaScriptCore/runtime/StrictEvalActivation.cpp +++ b/Source/JavaScriptCore/runtime/StrictEvalActivation.cpp @@ -29,7 +29,7 @@ namespace JSC { StrictEvalActivation::StrictEvalActivation(ExecState* exec) - : JSObject(exec->globalData().strictEvalActivationStructure) + : JSNonFinalObject(exec->globalData().strictEvalActivationStructure) { } diff --git a/Source/JavaScriptCore/runtime/StrictEvalActivation.h b/Source/JavaScriptCore/runtime/StrictEvalActivation.h index 1385eec..e2885cc 100644 --- a/Source/JavaScriptCore/runtime/StrictEvalActivation.h +++ b/Source/JavaScriptCore/runtime/StrictEvalActivation.h @@ -30,7 +30,7 @@ namespace JSC { -class StrictEvalActivation : public JSObject { +class StrictEvalActivation : public JSNonFinalObject { public: StrictEvalActivation(ExecState*); virtual bool deleteProperty(ExecState*, const Identifier&); diff --git a/Source/JavaScriptCore/runtime/StringConstructor.cpp b/Source/JavaScriptCore/runtime/StringConstructor.cpp index 604473b..5398f31 100644 --- a/Source/JavaScriptCore/runtime/StringConstructor.cpp +++ b/Source/JavaScriptCore/runtime/StringConstructor.cpp @@ -25,7 +25,6 @@ #include "JITCode.h" #include "JSFunction.h" #include "JSGlobalObject.h" -#include "PrototypeFunction.h" #include "StringPrototype.h" namespace JSC { @@ -49,7 +48,7 @@ static EncodedJSValue JSC_HOST_CALL stringFromCharCode(ExecState* exec) ASSERT_CLASS_FITS_IN_CELL(StringConstructor); -StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure, StringPrototype* stringPrototype) +StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* functionStructure, StringPrototype* stringPrototype) : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, stringPrototype->classInfo()->className)) { // ECMA 15.5.3.1 String.prototype @@ -57,9 +56,9 @@ StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObje // ECMA 15.5.3.2 fromCharCode() #if ENABLE(JIT) && ENABLE(JIT_OPTIMIZE_NATIVE_CALL) - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().fromCharCode, exec->globalData().getHostFunction(stringFromCharCode, fromCharCodeThunkGenerator)), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().fromCharCode, exec->globalData().getHostFunction(stringFromCharCode, fromCharCodeThunkGenerator)), DontEnum); #else - putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, globalObject, prototypeFunctionStructure, 1, exec->propertyNames().fromCharCode, stringFromCharCode), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) JSFunction(exec, globalObject, functionStructure, 1, exec->propertyNames().fromCharCode, stringFromCharCode), DontEnum); #endif // no. of arguments for constructor putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete); diff --git a/Source/JavaScriptCore/runtime/StringConstructor.h b/Source/JavaScriptCore/runtime/StringConstructor.h index 20f3a52..3a42c7e 100644 --- a/Source/JavaScriptCore/runtime/StringConstructor.h +++ b/Source/JavaScriptCore/runtime/StringConstructor.h @@ -29,7 +29,7 @@ namespace JSC { class StringConstructor : public InternalFunction { public: - StringConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* prototypeFunctionStructure, StringPrototype*); + StringConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, Structure* functionStructure, StringPrototype*); virtual ConstructType getConstructData(ConstructData&); virtual CallType getCallData(CallData&); diff --git a/Source/JavaScriptCore/runtime/StringObject.cpp b/Source/JavaScriptCore/runtime/StringObject.cpp index eb9cfa3..5fe7544 100644 --- a/Source/JavaScriptCore/runtime/StringObject.cpp +++ b/Source/JavaScriptCore/runtime/StringObject.cpp @@ -27,23 +27,26 @@ namespace JSC { ASSERT_CLASS_FITS_IN_CELL(StringObject); -const ClassInfo StringObject::info = { "String", 0, 0, 0 }; +const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0 }; StringObject::StringObject(ExecState* exec, NonNullPassRefPtr<Structure> structure) : JSWrapperObject(exec->globalData(), structure) { + ASSERT(inherits(&s_info)); setInternalValue(exec->globalData(), jsEmptyString(exec)); } StringObject::StringObject(JSGlobalData& globalData, NonNullPassRefPtr<Structure> structure, JSString* string) : JSWrapperObject(globalData, structure) { + ASSERT(inherits(&s_info)); setInternalValue(globalData, string); } StringObject::StringObject(ExecState* exec, NonNullPassRefPtr<Structure> structure, const UString& string) : JSWrapperObject(exec->globalData(), structure) { + ASSERT(inherits(&s_info)); setInternalValue(exec->globalData(), jsString(exec, string)); } diff --git a/Source/JavaScriptCore/runtime/StringObject.h b/Source/JavaScriptCore/runtime/StringObject.h index 03488f5..99f9add 100644 --- a/Source/JavaScriptCore/runtime/StringObject.h +++ b/Source/JavaScriptCore/runtime/StringObject.h @@ -41,14 +41,13 @@ namespace JSC { virtual bool deleteProperty(ExecState*, const Identifier& propertyName); virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); - virtual const ClassInfo* classInfo() const { return &info; } - static const JS_EXPORTDATA ClassInfo info; + static const JS_EXPORTDATA ClassInfo s_info; JSString* internalValue() const { return asString(JSWrapperObject::internalValue());} static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: @@ -60,7 +59,7 @@ namespace JSC { inline StringObject* asStringObject(JSValue value) { - ASSERT(asObject(value)->inherits(&StringObject::info)); + ASSERT(asObject(value)->inherits(&StringObject::s_info)); return static_cast<StringObject*>(asObject(value)); } diff --git a/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h b/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h index 43c3e38..0a44ed3 100644 --- a/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h +++ b/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h @@ -44,7 +44,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } static const unsigned StructureFlags = OverridesGetOwnPropertySlot | MasqueradesAsUndefined | OverridesGetPropertyNames | StringObject::StructureFlags; diff --git a/Source/JavaScriptCore/runtime/StringPrototype.cpp b/Source/JavaScriptCore/runtime/StringPrototype.cpp index 545c93e..aa37122 100644 --- a/Source/JavaScriptCore/runtime/StringPrototype.cpp +++ b/Source/JavaScriptCore/runtime/StringPrototype.cpp @@ -85,7 +85,7 @@ static EncodedJSValue JSC_HOST_CALL stringProtoFuncTrimRight(ExecState*); namespace JSC { -const ClassInfo StringPrototype::info = { "String", &StringObject::info, 0, ExecState::stringTable }; +const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0, ExecState::stringTable }; /* Source for StringPrototype.lut.h @begin stringTable 26 @@ -134,6 +134,8 @@ const ClassInfo StringPrototype::info = { "String", &StringObject::info, 0, Exec StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure) : StringObject(exec, structure) { + ASSERT(inherits(&s_info)); + putAnonymousValue(exec->globalData(), 0, globalObject); // The constructor will be added later, after StringConstructor has been built putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum); @@ -305,7 +307,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncReplace(ExecState* exec) if (callType == CallTypeNone) replacementString = replacement.toString(exec); - if (pattern.inherits(&RegExpObject::info)) { + if (pattern.inherits(&RegExpObject::s_info)) { const UString& source = sourceVal->value(exec); unsigned sourceLen = source.length(); if (exec->hadException()) @@ -473,7 +475,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncToString(ExecState* exec) if (thisValue.isString()) return JSValue::encode(thisValue); - if (thisValue.inherits(&StringObject::info)) + if (thisValue.inherits(&StringObject::s_info)) return JSValue::encode(asStringObject(thisValue)->internalValue()); return throwVMTypeError(exec); @@ -605,7 +607,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncMatch(ExecState* exec) UString u = s; RefPtr<RegExp> reg; RegExpObject* imp = 0; - if (a0.inherits(&RegExpObject::info)) + if (a0.inherits(&RegExpObject::s_info)) reg = asRegExpObject(a0)->regExp(); else { /* @@ -658,7 +660,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSearch(ExecState* exec) UString u = s; RefPtr<RegExp> reg; - if (a0.inherits(&RegExpObject::info)) + if (a0.inherits(&RegExpObject::s_info)) reg = asRegExpObject(a0)->regExp(); else { /* @@ -716,7 +718,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec) unsigned i = 0; unsigned p0 = 0; unsigned limit = a1.isUndefined() ? 0xFFFFFFFFU : a1.toUInt32(exec); - if (a0.inherits(&RegExpObject::info)) { + if (a0.inherits(&RegExpObject::s_info)) { RegExp* reg = asRegExpObject(a0)->regExp(); if (s.isEmpty() && reg->match(s, 0) >= 0) { // empty string matched by regexp -> empty array diff --git a/Source/JavaScriptCore/runtime/StringPrototype.h b/Source/JavaScriptCore/runtime/StringPrototype.h index 4b0f88f..feea2e2 100644 --- a/Source/JavaScriptCore/runtime/StringPrototype.h +++ b/Source/JavaScriptCore/runtime/StringPrototype.h @@ -34,8 +34,12 @@ namespace JSC { virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static PassRefPtr<Structure> createStructure(JSValue prototype) + { + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + static const ClassInfo s_info; }; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/Structure.cpp b/Source/JavaScriptCore/runtime/Structure.cpp index e8f5d7a..829e3db 100644 --- a/Source/JavaScriptCore/runtime/Structure.cpp +++ b/Source/JavaScriptCore/runtime/Structure.cpp @@ -50,23 +50,26 @@ using namespace std; using namespace WTF; -namespace JSC { +#if DUMP_PROPERTYMAP_STATS -// Choose a number for the following so that most property maps are smaller, -// but it's not going to blow out the stack to allocate this number of pointers. -static const int smallMapThreshold = 1024; +int numProbes; +int numCollisions; +int numRehashes; +int numRemoves; -// The point at which the function call overhead of the qsort implementation -// becomes small compared to the inefficiency of insertion sort. -static const unsigned tinyMapThreshold = 20; +#endif -static const unsigned newTableSize = 16; +namespace JSC { #ifndef NDEBUG static WTF::RefCountedLeakCounter structureCounter("Structure"); #if ENABLE(JSC_MULTIPLE_THREADS) -static Mutex& ignoreSetMutex = *(new Mutex); +static Mutex& ignoreSetMutex() +{ + DEFINE_STATIC_LOCAL(Mutex, mutex, ()); + return mutex; +} #endif static bool shouldIgnoreLeaks; @@ -77,105 +80,67 @@ static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>); static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>); #endif -static int comparePropertyMapEntryIndices(const void* a, const void* b); - -inline void Structure::setTransitionTable(TransitionTable* table) -{ - ASSERT(m_isUsingSingleSlot); -#ifndef NDEBUG - setSingleTransition(0); -#endif - m_isUsingSingleSlot = false; - m_transitions.m_table = table; - // This implicitly clears the flag that indicates we're using a single transition - ASSERT(!m_isUsingSingleSlot); -} - -// The contains and get methods accept imprecise matches, so if an unspecialised transition exists -// for the given key they will consider that transition to be a match. If a specialised transition -// exists and it matches the provided specificValue, get will return the specific transition. -inline bool Structure::transitionTableContains(const StructureTransitionTableHash::Key& key, JSCell* specificValue) +bool StructureTransitionTable::contains(StringImpl* rep, unsigned attributes) const { - if (m_isUsingSingleSlot) { - Structure* existingTransition = singleTransition(); - return existingTransition && existingTransition->m_nameInPrevious.get() == key.first - && existingTransition->m_attributesInPrevious == key.second - && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0); - } - TransitionTable::iterator find = transitionTable()->find(key); - if (find == transitionTable()->end()) - return false; - - return find->second.first || find->second.second->transitionedFor(specificValue); -} - -inline Structure* Structure::transitionTableGet(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const -{ - if (m_isUsingSingleSlot) { - Structure* existingTransition = singleTransition(); - if (existingTransition && existingTransition->m_nameInPrevious.get() == key.first - && existingTransition->m_attributesInPrevious == key.second - && (existingTransition->m_specificValueInPrevious == specificValue || existingTransition->m_specificValueInPrevious == 0)) - return existingTransition; - return 0; + if (isUsingSingleSlot()) { + Structure* transition = singleTransition(); + return transition && transition->m_nameInPrevious == rep && transition->m_attributesInPrevious == attributes; } - - Transition transition = transitionTable()->get(key); - if (transition.second && transition.second->transitionedFor(specificValue)) - return transition.second; - return transition.first; + return map()->contains(make_pair(rep, attributes)); } -inline bool Structure::transitionTableHasTransition(const StructureTransitionTableHash::Key& key) const +inline Structure* StructureTransitionTable::get(StringImpl* rep, unsigned attributes) const { - if (m_isUsingSingleSlot) { + if (isUsingSingleSlot()) { Structure* transition = singleTransition(); - return transition && transition->m_nameInPrevious == key.first - && transition->m_attributesInPrevious == key.second; + return (transition && transition->m_nameInPrevious == rep && transition->m_attributesInPrevious == attributes) ? transition : 0; } - return transitionTable()->contains(key); + return map()->get(make_pair(rep, attributes)); } -inline void Structure::transitionTableRemove(const StructureTransitionTableHash::Key& key, JSCell* specificValue) +inline void StructureTransitionTable::remove(Structure* structure) { - if (m_isUsingSingleSlot) { - ASSERT(transitionTableContains(key, specificValue)); + if (isUsingSingleSlot()) { + // If more than one transition had been added, then we wouldn't be in + // single slot mode (even despecifying a from a specific value triggers + // map mode). + // As such, the passed structure *must* be the existing transition. + ASSERT(singleTransition() == structure); setSingleTransition(0); - return; + } else { + // Check whether a mapping exists for structure's key, and whether the + // entry is structure (the latter check may fail if we initially had a + // transition with a specific value, and this has been despecified). + TransitionMap::iterator entry = map()->find(make_pair(structure->m_nameInPrevious, structure->m_attributesInPrevious)); + if (entry != map()->end() && structure == entry->second) + map()->remove(entry); } - TransitionTable::iterator find = transitionTable()->find(key); - if (!specificValue) - find->second.first = 0; - else - find->second.second = 0; - if (!find->second.first && !find->second.second) - transitionTable()->remove(find); } -inline void Structure::transitionTableAdd(const StructureTransitionTableHash::Key& key, Structure* structure, JSCell* specificValue) +inline void StructureTransitionTable::add(Structure* structure) { - if (m_isUsingSingleSlot) { - if (!singleTransition()) { + if (isUsingSingleSlot()) { + Structure* existingTransition = singleTransition(); + + // This handles the first transition being added. + if (!existingTransition) { setSingleTransition(structure); return; } - Structure* existingTransition = singleTransition(); - TransitionTable* transitionTable = new TransitionTable; - setTransitionTable(transitionTable); - if (existingTransition) - transitionTableAdd(std::make_pair(existingTransition->m_nameInPrevious.get(), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); + + // This handles the second transition being added + // (or the first transition being despecified!) + setMap(new TransitionMap()); + add(existingTransition); } - if (!specificValue) { - TransitionTable::iterator find = transitionTable()->find(key); - if (find == transitionTable()->end()) - transitionTable()->add(key, Transition(structure, static_cast<Structure*>(0))); - else - find->second.first = structure; - } else { - // If we're adding a transition to a specific value, then there cannot be - // an existing transition - ASSERT(!transitionTable()->contains(key)); - transitionTable()->add(key, Transition(static_cast<Structure*>(0), structure)); + + // Add the structure to the map. + std::pair<TransitionMap::iterator, bool> result = map()->add(make_pair(structure->m_nameInPrevious, structure->m_attributesInPrevious), structure); + if (!result.second) { + // There already is an entry! - we should only hit this when despecifying. + ASSERT(result.first->second->m_specificValueInPrevious); + ASSERT(!structure->m_specificValueInPrevious); + result.first->second = structure; } } @@ -191,21 +156,22 @@ void Structure::dumpStatistics() HashSet<Structure*>::const_iterator end = liveStructureSet.end(); for (HashSet<Structure*>::const_iterator it = liveStructureSet.begin(); it != end; ++it) { Structure* structure = *it; - if (structure->m_usingSingleTransitionSlot) { - if (!structure->m_transitions.singleTransition) + + switch (structure->m_transitionTable.size()) { + case 0: ++numberLeaf; - else - ++numberUsingSingleSlot; + if (!structure->m_previous) + ++numberSingletons; + break; - if (!structure->m_previous && !structure->m_transitions.singleTransition) - ++numberSingletons; + case 1: + ++numberUsingSingleSlot; + break; } if (structure->m_propertyTable) { ++numberWithPropertyMaps; - totalPropertyMapsSize += PropertyMapHashTable::allocationSize(structure->m_propertyTable->size); - if (structure->m_propertyTable->deletedOffsets) - totalPropertyMapsSize += (structure->m_propertyTable->deletedOffsets->capacity() * sizeof(unsigned)); + totalPropertyMapsSize += structure->m_propertyTable->sizeInMemory(); } } @@ -223,12 +189,12 @@ void Structure::dumpStatistics() #endif } -Structure::Structure(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount) +Structure::Structure(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo) : m_typeInfo(typeInfo) , m_prototype(prototype) , m_specificValueInPrevious(0) - , m_propertyTable(0) - , m_propertyStorageCapacity(JSObject::inlineStorageCapacity) + , m_classInfo(classInfo) + , m_propertyStorageCapacity(typeInfo.isFinal() ? JSFinalObject_inlineStorageCapacity : JSNonFinalObject_inlineStorageCapacity) , m_offset(noOffset) , m_dictionaryKind(NoneDictionaryKind) , m_isPinnedPropertyTable(false) @@ -237,16 +203,48 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo, unsigned anony , m_attributesInPrevious(0) , m_specificFunctionThrashCount(0) , m_anonymousSlotCount(anonymousSlotCount) - , m_isUsingSingleSlot(true) + , m_preventExtensions(false) { - m_transitions.m_singleTransition = 0; + ASSERT(m_prototype); + ASSERT(m_prototype->isObject() || m_prototype->isNull()); + +#ifndef NDEBUG +#if ENABLE(JSC_MULTIPLE_THREADS) + MutexLocker protect(ignoreSetMutex()); +#endif + if (shouldIgnoreLeaks) + ignoreSet.add(this); + else + structureCounter.increment(); +#endif + +#if DUMP_STRUCTURE_ID_STATISTICS + liveStructureSet.add(this); +#endif +} +Structure::Structure(const Structure* previous) + : m_typeInfo(previous->typeInfo()) + , m_prototype(previous->storedPrototype()) + , m_specificValueInPrevious(0) + , m_classInfo(previous->m_classInfo) + , m_propertyStorageCapacity(previous->m_propertyStorageCapacity) + , m_offset(noOffset) + , m_dictionaryKind(NoneDictionaryKind) + , m_isPinnedPropertyTable(false) + , m_hasGetterSetterProperties(previous->m_hasGetterSetterProperties) + , m_hasNonEnumerableProperties(previous->m_hasNonEnumerableProperties) + , m_attributesInPrevious(0) + , m_specificFunctionThrashCount(previous->m_specificFunctionThrashCount) + , m_anonymousSlotCount(previous->anonymousSlotCount()) + , m_preventExtensions(previous->m_preventExtensions) +{ ASSERT(m_prototype); ASSERT(m_prototype->isObject() || m_prototype->isNull()); #ifndef NDEBUG #if ENABLE(JSC_MULTIPLE_THREADS) - MutexLocker protect(ignoreSetMutex); + MutexLocker protect(ignoreSetMutex()); #endif if (shouldIgnoreLeaks) ignoreSet.add(this); @@ -263,28 +261,12 @@ Structure::~Structure() { if (m_previous) { ASSERT(m_nameInPrevious); - m_previous->transitionTableRemove(make_pair(m_nameInPrevious.get(), m_attributesInPrevious), m_specificValueInPrevious); - - } - ASSERT(!m_enumerationCache.hasDeadObject()); - - if (m_propertyTable) { - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; i++) { - if (StringImpl* key = m_propertyTable->entries()[i].key) - key->deref(); - } - - delete m_propertyTable->deletedOffsets; - fastFree(m_propertyTable); + m_previous->m_transitionTable.remove(this); } - if (!m_isUsingSingleSlot) - delete transitionTable(); - #ifndef NDEBUG #if ENABLE(JSC_MULTIPLE_THREADS) - MutexLocker protect(ignoreSetMutex); + MutexLocker protect(ignoreSetMutex()); #endif HashSet<Structure*>::iterator it = ignoreSet.find(this); if (it != ignoreSet.end()) @@ -312,43 +294,6 @@ void Structure::stopIgnoringLeaks() #endif } -static bool isPowerOf2(unsigned v) -{ - // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html - - return !(v & (v - 1)) && v; -} - -static unsigned nextPowerOf2(unsigned v) -{ - // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html - // Devised by Sean Anderson, Sepember 14, 2001 - - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v++; - - return v; -} - -static unsigned sizeForKeyCount(size_t keyCount) -{ - if (keyCount == notFound) - return newTableSize; - - if (keyCount < 8) - return newTableSize; - - if (isPowerOf2(keyCount)) - return keyCount * 4; - - return nextPowerOf2(keyCount) * 2; -} - void Structure::materializePropertyMap() { ASSERT(!m_propertyTable); @@ -358,13 +303,13 @@ void Structure::materializePropertyMap() Structure* structure = this; - // Search for the last Structure with a property table. + // Search for the last Structure with a property table. while ((structure = structure->previousID())) { if (structure->m_isPinnedPropertyTable) { ASSERT(structure->m_propertyTable); ASSERT(!structure->m_previous); - m_propertyTable = structure->copyPropertyTable(); + m_propertyTable = structure->m_propertyTable->copy(m_offset + 1); break; } @@ -372,72 +317,35 @@ void Structure::materializePropertyMap() } if (!m_propertyTable) - createPropertyMapHashTable(sizeForKeyCount(m_offset + 1)); - else { - if (sizeForKeyCount(m_offset + 1) > m_propertyTable->size) - rehashPropertyMapHashTable(sizeForKeyCount(m_offset + 1)); // This could be made more efficient by combining with the copy above. - } + createPropertyMap(m_offset + 1); for (ptrdiff_t i = structures.size() - 2; i >= 0; --i) { structure = structures[i]; - structure->m_nameInPrevious->ref(); - PropertyMapEntry entry(structure->m_nameInPrevious.get(), m_anonymousSlotCount + structure->m_offset, structure->m_attributesInPrevious, structure->m_specificValueInPrevious, ++m_propertyTable->lastIndexUsed); - insertIntoPropertyMapHashTable(entry); + PropertyMapEntry entry(structure->m_nameInPrevious.get(), m_anonymousSlotCount + structure->m_offset, structure->m_attributesInPrevious, structure->m_specificValueInPrevious); + m_propertyTable->add(entry); } } void Structure::growPropertyStorageCapacity() { - if (m_propertyStorageCapacity == JSObject::inlineStorageCapacity) - m_propertyStorageCapacity = JSObject::nonInlineBaseStorageCapacity; + if (isUsingInlineStorage()) + m_propertyStorageCapacity = JSObject::baseExternalStorageCapacity; else m_propertyStorageCapacity *= 2; } void Structure::despecifyDictionaryFunction(const Identifier& propertyName) { - const StringImpl* rep = propertyName.impl(); + StringImpl* rep = propertyName.impl(); materializePropertyMapIfNecessary(); ASSERT(isDictionary()); ASSERT(m_propertyTable); - unsigned i = rep->existingHash(); - -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - ASSERT(entryIndex != emptyEntryIndex); - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - m_propertyTable->entries()[entryIndex - 1].specificValue = 0; - return; - } - -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - - unsigned k = 1 | doubleHash(rep->existingHash()); - - while (1) { - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - ASSERT(entryIndex != emptyEntryIndex); - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - m_propertyTable->entries()[entryIndex - 1].specificValue = 0; - return; - } - } + PropertyMapEntry* entry = m_propertyTable->find(rep).first; + ASSERT(entry); + entry->specificValue = 0; } PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Structure* structure, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset) @@ -445,7 +353,10 @@ PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Struct ASSERT(!structure->isDictionary()); ASSERT(structure->typeInfo().type() == ObjectType); - if (Structure* existingTransition = structure->transitionTableGet(make_pair(propertyName.impl(), attributes), specificValue)) { + if (Structure* existingTransition = structure->m_transitionTable.get(propertyName.impl(), attributes)) { + JSCell* specificValueInPrevious = existingTransition->m_specificValueInPrevious; + if (specificValueInPrevious && specificValueInPrevious != specificValue) + return 0; ASSERT(existingTransition->m_offset != noOffset); offset = existingTransition->m_offset + existingTransition->m_anonymousSlotCount; ASSERT(offset >= structure->m_anonymousSlotCount); @@ -458,6 +369,16 @@ PassRefPtr<Structure> Structure::addPropertyTransitionToExistingStructure(Struct PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset) { + // If we have a specific function, we may have got to this point if there is + // already a transition with the correct property name and attributes, but + // specialized to a different function. In this case we just want to give up + // and despecialize the transition. + // In this case we clear the value of specificFunction which will result + // in us adding a non-specific transition, and any subsequent lookup in + // Structure::addPropertyTransitionToExistingStructure will just use that. + if (specificValue && structure->m_transitionTable.contains(propertyName.impl(), attributes)) + specificValue = 0; + ASSERT(!structure->isDictionary()); ASSERT(structure->typeInfo().type() == ObjectType); ASSERT(!Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificValue, offset)); @@ -476,30 +397,24 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con return transition.release(); } - RefPtr<Structure> transition = create(structure->m_prototype.get(), structure->typeInfo(), structure->anonymousSlotCount()); + RefPtr<Structure> transition = create(structure); transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain; transition->m_previous = structure; transition->m_nameInPrevious = propertyName.impl(); transition->m_attributesInPrevious = attributes; transition->m_specificValueInPrevious = specificValue; - transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; - transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; - transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; - transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount; if (structure->m_propertyTable) { if (structure->m_isPinnedPropertyTable) - transition->m_propertyTable = structure->copyPropertyTable(); - else { - transition->m_propertyTable = structure->m_propertyTable; - structure->m_propertyTable = 0; - } + transition->m_propertyTable = structure->m_propertyTable->copy(structure->m_propertyTable->size() + 1); + else + transition->m_propertyTable = structure->m_propertyTable.release(); } else { if (structure->m_previous) transition->materializePropertyMap(); else - transition->createPropertyMapHashTable(); + transition->createPropertyMap(); } offset = transition->put(propertyName, attributes, specificValue); @@ -510,7 +425,7 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con transition->m_offset = offset - structure->m_anonymousSlotCount; ASSERT(structure->anonymousSlotCount() == transition->anonymousSlotCount()); - structure->transitionTableAdd(make_pair(propertyName.impl(), attributes), transition.get(), specificValue); + structure->m_transitionTable.add(transition.get()); return transition.release(); } @@ -529,12 +444,9 @@ PassRefPtr<Structure> Structure::removePropertyTransition(Structure* structure, PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure, JSValue prototype) { - RefPtr<Structure> transition = create(prototype, structure->typeInfo(), structure->anonymousSlotCount()); + RefPtr<Structure> transition = create(structure); - transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; - transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; - transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; - transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount; + transition->m_prototype = prototype; // Don't set m_offset, as one can not transition to this. @@ -549,12 +461,9 @@ PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure, PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structure, const Identifier& replaceFunction) { ASSERT(structure->m_specificFunctionThrashCount < maxSpecificFunctionThrashCount); - RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo(), structure->anonymousSlotCount()); + RefPtr<Structure> transition = create(structure); - transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; - transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; - transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; - transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount + 1; + ++transition->m_specificFunctionThrashCount; // Don't set m_offset, as one can not transition to this. @@ -575,11 +484,7 @@ PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structur PassRefPtr<Structure> Structure::getterSetterTransition(Structure* structure) { - RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo(), structure->anonymousSlotCount()); - transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; - transition->m_hasGetterSetterProperties = transition->m_hasGetterSetterProperties; - transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; - transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount; + RefPtr<Structure> transition = create(structure); // Don't set m_offset, as one can not transition to this. @@ -595,16 +500,12 @@ PassRefPtr<Structure> Structure::toDictionaryTransition(Structure* structure, Di { ASSERT(!structure->isUncacheableDictionary()); - RefPtr<Structure> transition = create(structure->m_prototype.get(), structure->typeInfo(), structure->anonymousSlotCount()); - transition->m_dictionaryKind = kind; - transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; - transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; - transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerableProperties; - transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCount; - + RefPtr<Structure> transition = create(structure); + structure->materializePropertyMapIfNecessary(); transition->m_propertyTable = structure->copyPropertyTable(); transition->m_isPinnedPropertyTable = true; + transition->m_dictionaryKind = kind; ASSERT(structure->anonymousSlotCount() == transition->anonymousSlotCount()); return transition.release(); @@ -620,43 +521,109 @@ PassRefPtr<Structure> Structure::toUncacheableDictionaryTransition(Structure* st return toDictionaryTransition(structure, UncachedDictionaryKind); } +// In future we may want to cache this transition. +PassRefPtr<Structure> Structure::sealTransition(Structure* structure) +{ + RefPtr<Structure> transition = preventExtensionsTransition(structure); + + if (transition->m_propertyTable) { + PropertyTable::iterator end = transition->m_propertyTable->end(); + for (PropertyTable::iterator iter = transition->m_propertyTable->begin(); iter != end; ++iter) + iter->attributes |= DontDelete; + } + + return transition.release(); +} + +// In future we may want to cache this transition. +PassRefPtr<Structure> Structure::freezeTransition(Structure* structure) +{ + RefPtr<Structure> transition = preventExtensionsTransition(structure); + + if (transition->m_propertyTable) { + PropertyTable::iterator end = transition->m_propertyTable->end(); + for (PropertyTable::iterator iter = transition->m_propertyTable->begin(); iter != end; ++iter) + iter->attributes |= (DontDelete | ReadOnly); + } + + return transition.release(); +} + +// In future we may want to cache this transition. +PassRefPtr<Structure> Structure::preventExtensionsTransition(Structure* structure) +{ + RefPtr<Structure> transition = create(structure); + + // Don't set m_offset, as one can not transition to this. + + structure->materializePropertyMapIfNecessary(); + transition->m_propertyTable = structure->copyPropertyTable(); + transition->m_isPinnedPropertyTable = true; + transition->m_preventExtensions = true; + + ASSERT(structure->anonymousSlotCount() == transition->anonymousSlotCount()); + return transition.release(); +} + +// In future we may want to cache this property. +bool Structure::isSealed() +{ + if (isExtensible()) + return false; + + materializePropertyMapIfNecessary(); + if (!m_propertyTable) + return true; + + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) { + if ((iter->attributes & DontDelete) != DontDelete) + return false; + } + return true; +} + +// In future we may want to cache this property. +bool Structure::isFrozen() +{ + if (isExtensible()) + return false; + + materializePropertyMapIfNecessary(); + if (!m_propertyTable) + return true; + + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) { + if ((iter->attributes & (DontDelete | ReadOnly)) != (DontDelete | ReadOnly)) + return false; + } + return true; +} + PassRefPtr<Structure> Structure::flattenDictionaryStructure(JSGlobalData& globalData, JSObject* object) { ASSERT(isDictionary()); if (isUncacheableDictionary()) { ASSERT(m_propertyTable); - Vector<PropertyMapEntry*> sortedPropertyEntries(m_propertyTable->keyCount); - PropertyMapEntry** p = sortedPropertyEntries.data(); - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; i++) { - if (m_propertyTable->entries()[i].key) - *p++ = &m_propertyTable->entries()[i]; - } - size_t propertyCount = p - sortedPropertyEntries.data(); - qsort(sortedPropertyEntries.data(), propertyCount, sizeof(PropertyMapEntry*), comparePropertyMapEntryIndices); - sortedPropertyEntries.resize(propertyCount); - // We now have the properties currently defined on this object - // in the order that they are expected to be in, but we need to - // reorder the storage, so we have to copy the current values out - Vector<JSValue> values(propertyCount); unsigned anonymousSlotCount = m_anonymousSlotCount; - for (unsigned i = 0; i < propertyCount; i++) { - PropertyMapEntry* entry = sortedPropertyEntries[i]; - values[i] = object->getDirectOffset(entry->offset); + size_t propertyCount = m_propertyTable->size(); + Vector<JSValue> values(propertyCount); + + unsigned i = 0; + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter, ++i) { + values[i] = object->getDirectOffset(iter->offset); // Update property table to have the new property offsets - entry->offset = anonymousSlotCount + i; - entry->index = i; + iter->offset = anonymousSlotCount + i; } // Copy the original property values into their final locations for (unsigned i = 0; i < propertyCount; i++) object->putDirectOffset(globalData, anonymousSlotCount + i, values[i]); - if (m_propertyTable->deletedOffsets) { - delete m_propertyTable->deletedOffsets; - m_propertyTable->deletedOffsets = 0; - } + m_propertyTable->clearDeletedOffsets(); } m_dictionaryKind = NoneDictionaryKind; @@ -696,11 +663,6 @@ size_t Structure::removePropertyWithoutTransition(const Identifier& propertyName #if DUMP_PROPERTYMAP_STATS -static int numProbes; -static int numCollisions; -static int numRehashes; -static int numRemoves; - struct PropertyMapStatisticsExitLogger { ~PropertyMapStatisticsExitLogger(); }; @@ -718,8 +680,6 @@ PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger() #endif -static const unsigned deletedSentinelIndex = 1; - #if !DO_PROPERTYMAP_CONSTENCY_CHECK inline void Structure::checkConsistency() @@ -728,126 +688,41 @@ inline void Structure::checkConsistency() #endif -PropertyMapHashTable* Structure::copyPropertyTable() +PropertyTable* Structure::copyPropertyTable() { - if (!m_propertyTable) - return 0; - - size_t tableSize = PropertyMapHashTable::allocationSize(m_propertyTable->size); - PropertyMapHashTable* newTable = static_cast<PropertyMapHashTable*>(fastMalloc(tableSize)); - memcpy(newTable, m_propertyTable, tableSize); - - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; ++i) { - if (StringImpl* key = newTable->entries()[i].key) - key->ref(); - } - - // Copy the deletedOffsets vector. - if (m_propertyTable->deletedOffsets) - newTable->deletedOffsets = new Vector<unsigned>(*m_propertyTable->deletedOffsets); - - return newTable; + return m_propertyTable ? new PropertyTable(*m_propertyTable) : 0; } -size_t Structure::get(const StringImpl* rep, unsigned& attributes, JSCell*& specificValue) +size_t Structure::get(StringImpl* propertyName, unsigned& attributes, JSCell*& specificValue) { materializePropertyMapIfNecessary(); if (!m_propertyTable) - return notFound; + return WTF::notFound; - unsigned i = rep->existingHash(); + PropertyMapEntry* entry = m_propertyTable->find(propertyName).first; + if (!entry) + return WTF::notFound; -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return notFound; - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - attributes = m_propertyTable->entries()[entryIndex - 1].attributes; - specificValue = m_propertyTable->entries()[entryIndex - 1].specificValue; - ASSERT(m_propertyTable->entries()[entryIndex - 1].offset >= m_anonymousSlotCount); - return m_propertyTable->entries()[entryIndex - 1].offset; - } - -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - - unsigned k = 1 | doubleHash(rep->existingHash()); - - while (1) { - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return notFound; - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - attributes = m_propertyTable->entries()[entryIndex - 1].attributes; - specificValue = m_propertyTable->entries()[entryIndex - 1].specificValue; - ASSERT(m_propertyTable->entries()[entryIndex - 1].offset >= m_anonymousSlotCount); - return m_propertyTable->entries()[entryIndex - 1].offset; - } - } + attributes = entry->attributes; + specificValue = entry->specificValue; + ASSERT(entry->offset >= m_anonymousSlotCount); + return entry->offset; } bool Structure::despecifyFunction(const Identifier& propertyName) { - ASSERT(!propertyName.isNull()); - materializePropertyMapIfNecessary(); if (!m_propertyTable) return false; - StringImpl* rep = propertyName.impl(); - - unsigned i = rep->existingHash(); - -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) + ASSERT(!propertyName.isNull()); + PropertyMapEntry* entry = m_propertyTable->find(propertyName.impl()).first; + if (!entry) return false; - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - ASSERT(m_propertyTable->entries()[entryIndex - 1].specificValue); - m_propertyTable->entries()[entryIndex - 1].specificValue = 0; - return true; - } - -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - - unsigned k = 1 | doubleHash(rep->existingHash()); - - while (1) { - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return false; - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) { - ASSERT(m_propertyTable->entries()[entryIndex - 1].specificValue); - m_propertyTable->entries()[entryIndex - 1].specificValue = 0; - return true; - } - } + ASSERT(entry->specificValue); + entry->specificValue = 0; + return true; } void Structure::despecifyAllFunctions() @@ -855,10 +730,10 @@ void Structure::despecifyAllFunctions() materializePropertyMapIfNecessary(); if (!m_propertyTable) return; - - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; ++i) - m_propertyTable->entries()[i].specificValue = 0; + + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) + iter->specificValue = 0; } size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue) @@ -867,99 +742,28 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel ASSERT(get(propertyName) == notFound); checkConsistency(); - if (attributes & DontEnum) m_hasNonEnumerableProperties = true; StringImpl* rep = propertyName.impl(); if (!m_propertyTable) - createPropertyMapHashTable(); - - // FIXME: Consider a fast case for tables with no deleted sentinels. - - unsigned i = rep->existingHash(); - unsigned k = 0; - bool foundDeletedElement = false; - unsigned deletedElementIndex = 0; // initialize to make the compiler happy - -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - while (1) { - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - break; - - if (entryIndex == deletedSentinelIndex) { - // If we find a deleted-element sentinel, remember it for use later. - if (!foundDeletedElement) { - foundDeletedElement = true; - deletedElementIndex = i; - } - } - - if (k == 0) { - k = 1 | doubleHash(rep->existingHash()); -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - } - - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - } - - // Figure out which entry to use. - unsigned entryIndex = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount + 2; - if (foundDeletedElement) { - i = deletedElementIndex; - --m_propertyTable->deletedSentinelCount; - - // Since we're not making the table bigger, we can't use the entry one past - // the end that we were planning on using, so search backwards for the empty - // slot that we can use. We know it will be there because we did at least one - // deletion in the past that left an entry empty. - while (m_propertyTable->entries()[--entryIndex - 1].key) { } - } - - // Create a new hash table entry. - m_propertyTable->entryIndices[i & m_propertyTable->sizeMask] = entryIndex; - - // Create a new hash table entry. - rep->ref(); - m_propertyTable->entries()[entryIndex - 1].key = rep; - m_propertyTable->entries()[entryIndex - 1].attributes = attributes; - m_propertyTable->entries()[entryIndex - 1].specificValue = specificValue; - m_propertyTable->entries()[entryIndex - 1].index = ++m_propertyTable->lastIndexUsed; + createPropertyMap(); unsigned newOffset; - if (m_propertyTable->deletedOffsets && !m_propertyTable->deletedOffsets->isEmpty()) { - newOffset = m_propertyTable->deletedOffsets->last(); - m_propertyTable->deletedOffsets->removeLast(); - } else - newOffset = m_propertyTable->keyCount + m_anonymousSlotCount; - m_propertyTable->entries()[entryIndex - 1].offset = newOffset; - + + if (m_propertyTable->hasDeletedOffset()) + newOffset = m_propertyTable->getDeletedOffset(); + else + newOffset = m_propertyTable->size() + m_anonymousSlotCount; ASSERT(newOffset >= m_anonymousSlotCount); - ++m_propertyTable->keyCount; - if ((m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount) * 2 >= m_propertyTable->size) - expandPropertyMapHashTable(); + m_propertyTable->add(PropertyMapEntry(rep, newOffset, attributes, specificValue)); checkConsistency(); return newOffset; } -bool Structure::hasTransition(StringImpl* rep, unsigned attributes) -{ - return transitionTableHasTransition(make_pair(rep, attributes)); -} - size_t Structure::remove(const Identifier& propertyName) { ASSERT(!propertyName.isNull()); @@ -971,289 +775,104 @@ size_t Structure::remove(const Identifier& propertyName) if (!m_propertyTable) return notFound; -#if DUMP_PROPERTYMAP_STATS - ++numProbes; - ++numRemoves; -#endif - - // Find the thing to remove. - unsigned i = rep->existingHash(); - unsigned k = 0; - unsigned entryIndex; - StringImpl* key = 0; - while (1) { - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return notFound; - - key = m_propertyTable->entries()[entryIndex - 1].key; - if (rep == key) - break; - - if (k == 0) { - k = 1 | doubleHash(rep->existingHash()); -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - } - - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - } - - // Replace this one element with the deleted sentinel. Also clear out - // the entry so we can iterate all the entries as needed. - m_propertyTable->entryIndices[i & m_propertyTable->sizeMask] = deletedSentinelIndex; + PropertyTable::find_iterator position = m_propertyTable->find(rep); + if (!position.first) + return notFound; - size_t offset = m_propertyTable->entries()[entryIndex - 1].offset; + size_t offset = position.first->offset; ASSERT(offset >= m_anonymousSlotCount); - key->deref(); - m_propertyTable->entries()[entryIndex - 1].key = 0; - m_propertyTable->entries()[entryIndex - 1].attributes = 0; - m_propertyTable->entries()[entryIndex - 1].specificValue = 0; - m_propertyTable->entries()[entryIndex - 1].offset = 0; - - if (!m_propertyTable->deletedOffsets) - m_propertyTable->deletedOffsets = new Vector<unsigned>; - m_propertyTable->deletedOffsets->append(offset); - - ASSERT(m_propertyTable->keyCount >= 1); - --m_propertyTable->keyCount; - ++m_propertyTable->deletedSentinelCount; - - if (m_propertyTable->deletedSentinelCount * 4 >= m_propertyTable->size) - rehashPropertyMapHashTable(); + m_propertyTable->remove(position); + m_propertyTable->addDeletedOffset(offset); checkConsistency(); return offset; } -void Structure::insertIntoPropertyMapHashTable(const PropertyMapEntry& entry) -{ - ASSERT(m_propertyTable); - ASSERT(entry.offset >= m_anonymousSlotCount); - unsigned i = entry.key->existingHash(); - unsigned k = 0; - -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - while (1) { - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - break; - - if (k == 0) { - k = 1 | doubleHash(entry.key->existingHash()); -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - } - - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - } - - unsigned entryIndex = m_propertyTable->keyCount + 2; - m_propertyTable->entryIndices[i & m_propertyTable->sizeMask] = entryIndex; - m_propertyTable->entries()[entryIndex - 1] = entry; - - ++m_propertyTable->keyCount; -} - -void Structure::createPropertyMapHashTable() -{ - ASSERT(sizeForKeyCount(7) == newTableSize); - createPropertyMapHashTable(newTableSize); -} - -void Structure::createPropertyMapHashTable(unsigned newTableSize) +void Structure::createPropertyMap(unsigned capacity) { ASSERT(!m_propertyTable); - ASSERT(isPowerOf2(newTableSize)); checkConsistency(); - - m_propertyTable = static_cast<PropertyMapHashTable*>(fastZeroedMalloc(PropertyMapHashTable::allocationSize(newTableSize))); - m_propertyTable->size = newTableSize; - m_propertyTable->sizeMask = newTableSize - 1; - + m_propertyTable = new PropertyTable(capacity); checkConsistency(); } -void Structure::expandPropertyMapHashTable() -{ - ASSERT(m_propertyTable); - rehashPropertyMapHashTable(m_propertyTable->size * 2); -} - -void Structure::rehashPropertyMapHashTable() -{ - ASSERT(m_propertyTable); - ASSERT(m_propertyTable->size); - rehashPropertyMapHashTable(m_propertyTable->size); -} - -void Structure::rehashPropertyMapHashTable(unsigned newTableSize) -{ - ASSERT(m_propertyTable); - ASSERT(isPowerOf2(newTableSize)); - - checkConsistency(); - - PropertyMapHashTable* oldTable = m_propertyTable; - - m_propertyTable = static_cast<PropertyMapHashTable*>(fastZeroedMalloc(PropertyMapHashTable::allocationSize(newTableSize))); - m_propertyTable->size = newTableSize; - m_propertyTable->sizeMask = newTableSize - 1; - - unsigned lastIndexUsed = 0; - unsigned entryCount = oldTable->keyCount + oldTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; ++i) { - if (oldTable->entries()[i].key) { - lastIndexUsed = max(oldTable->entries()[i].index, lastIndexUsed); - insertIntoPropertyMapHashTable(oldTable->entries()[i]); - } - } - m_propertyTable->lastIndexUsed = lastIndexUsed; - m_propertyTable->deletedOffsets = oldTable->deletedOffsets; - - fastFree(oldTable); - - checkConsistency(); -} - -int comparePropertyMapEntryIndices(const void* a, const void* b) -{ - unsigned ia = static_cast<PropertyMapEntry* const*>(a)[0]->index; - unsigned ib = static_cast<PropertyMapEntry* const*>(b)[0]->index; - if (ia < ib) - return -1; - if (ia > ib) - return +1; - return 0; -} - void Structure::getPropertyNames(PropertyNameArray& propertyNames, EnumerationMode mode) { materializePropertyMapIfNecessary(); if (!m_propertyTable) return; - if (m_propertyTable->keyCount < tinyMapThreshold) { - PropertyMapEntry* a[tinyMapThreshold]; - int i = 0; - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned k = 1; k <= entryCount; k++) { - ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[k].attributes & DontEnum)); - if (m_propertyTable->entries()[k].key && (!(m_propertyTable->entries()[k].attributes & DontEnum) || (mode == IncludeDontEnumProperties))) { - PropertyMapEntry* value = &m_propertyTable->entries()[k]; - int j; - for (j = i - 1; j >= 0 && a[j]->index > value->index; --j) - a[j + 1] = a[j]; - a[j + 1] = value; - ++i; - } - } - if (!propertyNames.size()) { - for (int k = 0; k < i; ++k) - propertyNames.addKnownUnique(a[k]->key); - } else { - for (int k = 0; k < i; ++k) - propertyNames.add(a[k]->key); - } - - return; - } - - // Allocate a buffer to use to sort the keys. - Vector<PropertyMapEntry*, smallMapThreshold> sortedEnumerables(m_propertyTable->keyCount); + bool knownUnique = !propertyNames.size(); - // Get pointers to the enumerable entries in the buffer. - PropertyMapEntry** p = sortedEnumerables.data(); - unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; - for (unsigned i = 1; i <= entryCount; i++) { - if (m_propertyTable->entries()[i].key && (!(m_propertyTable->entries()[i].attributes & DontEnum) || (mode == IncludeDontEnumProperties))) - *p++ = &m_propertyTable->entries()[i]; + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) { + ASSERT(m_hasNonEnumerableProperties || !(iter->attributes & DontEnum)); + if (!(iter->attributes & DontEnum) || (mode == IncludeDontEnumProperties)) { + if (knownUnique) + propertyNames.addKnownUnique(iter->key); + else + propertyNames.add(iter->key); + } } +} - size_t enumerableCount = p - sortedEnumerables.data(); - // Sort the entries by index. - qsort(sortedEnumerables.data(), enumerableCount, sizeof(PropertyMapEntry*), comparePropertyMapEntryIndices); - sortedEnumerables.resize(enumerableCount); - - // Put the keys of the sorted entries into the list. - if (!propertyNames.size()) { - for (size_t i = 0; i < sortedEnumerables.size(); ++i) - propertyNames.addKnownUnique(sortedEnumerables[i]->key); - } else { - for (size_t i = 0; i < sortedEnumerables.size(); ++i) - propertyNames.add(sortedEnumerables[i]->key); - } +void Structure::initializeThreading() +{ +#if !defined(NDEBUG) && ENABLE(JSC_MULTIPLE_THREADS) + ignoreSetMutex(); +#endif } #if DO_PROPERTYMAP_CONSTENCY_CHECK -void Structure::checkConsistency() +void PropertyTable::checkConsistency() { - if (!m_propertyTable) - return; - - ASSERT(m_propertyTable->size >= newTableSize); - ASSERT(m_propertyTable->sizeMask); - ASSERT(m_propertyTable->size == m_propertyTable->sizeMask + 1); - ASSERT(!(m_propertyTable->size & m_propertyTable->sizeMask)); - - ASSERT(m_propertyTable->keyCount <= m_propertyTable->size / 2); - ASSERT(m_propertyTable->deletedSentinelCount <= m_propertyTable->size / 4); + ASSERT(m_indexSize >= PropertyTable::MinimumTableSize); + ASSERT(m_indexMask); + ASSERT(m_indexSize == m_indexMask + 1); + ASSERT(!(m_indexSize & m_indexMask)); - ASSERT(m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount <= m_propertyTable->size / 2); + ASSERT(m_keyCount <= m_indexSize / 2); + ASSERT(m_keyCount + m_deletedCount <= m_indexSize / 2); + ASSERT(m_deletedCount <= m_indexSize / 4); unsigned indexCount = 0; unsigned deletedIndexCount = 0; - for (unsigned a = 0; a != m_propertyTable->size; ++a) { - unsigned entryIndex = m_propertyTable->entryIndices[a]; - if (entryIndex == emptyEntryIndex) + for (unsigned a = 0; a != m_indexSize; ++a) { + unsigned entryIndex = m_index[a]; + if (entryIndex == PropertyTable::EmptyEntryIndex) continue; - if (entryIndex == deletedSentinelIndex) { + if (entryIndex == deletedEntryIndex()) { ++deletedIndexCount; continue; } - ASSERT(entryIndex > deletedSentinelIndex); - ASSERT(entryIndex - 1 <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount); + ASSERT(entryIndex < deletedEntryIndex()); + ASSERT(entryIndex - 1 <= usedCount()); ++indexCount; - for (unsigned b = a + 1; b != m_propertyTable->size; ++b) - ASSERT(m_propertyTable->entryIndices[b] != entryIndex); + for (unsigned b = a + 1; b != m_indexSize; ++b) + ASSERT(m_index[b] != entryIndex); } - ASSERT(indexCount == m_propertyTable->keyCount); - ASSERT(deletedIndexCount == m_propertyTable->deletedSentinelCount); + ASSERT(indexCount == m_keyCount); + ASSERT(deletedIndexCount == m_deletedCount); - ASSERT(m_propertyTable->entries()[0].key == 0); + ASSERT(!table()[deletedEntryIndex() - 1].key); unsigned nonEmptyEntryCount = 0; - for (unsigned c = 1; c <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; ++c) { - ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[c].attributes & DontEnum)); - StringImpl* rep = m_propertyTable->entries()[c].key; - ASSERT(m_propertyTable->entries()[c].offset >= m_anonymousSlotCount); - if (!rep) + for (unsigned c = 0; c < usedCount(); ++c) { + StringImpl* rep = table()[c].key; + if (rep == PROPERTY_MAP_DELETED_ENTRY_KEY) continue; ++nonEmptyEntryCount; unsigned i = rep->existingHash(); unsigned k = 0; unsigned entryIndex; while (1) { - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - ASSERT(entryIndex != emptyEntryIndex); - if (rep == m_propertyTable->entries()[entryIndex - 1].key) + entryIndex = m_index[i & m_indexMask]; + ASSERT(entryIndex != PropertyTable::EmptyEntryIndex); + if (rep == table()[entryIndex - 1].key) break; if (k == 0) k = 1 | doubleHash(rep->existingHash()); @@ -1262,7 +881,23 @@ void Structure::checkConsistency() ASSERT(entryIndex == c + 1); } - ASSERT(nonEmptyEntryCount == m_propertyTable->keyCount); + ASSERT(nonEmptyEntryCount == m_keyCount); +} + +void Structure::checkConsistency() +{ + if (!m_propertyTable) + return; + + if (!m_hasNonEnumerableProperties) { + PropertyTable::iterator end = m_propertyTable->end(); + for (PropertyTable::iterator iter = m_propertyTable->begin(); iter != end; ++iter) { + ASSERT(!(iter->attributes & DontEnum)); + ASSERT(iter->offset >= m_anonymousSlotCount); + } + } + + m_propertyTable->checkConsistency(); } #endif // DO_PROPERTYMAP_CONSTENCY_CHECK diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h index 77724ac..bf27334 100644 --- a/Source/JavaScriptCore/runtime/Structure.h +++ b/Source/JavaScriptCore/runtime/Structure.h @@ -40,11 +40,6 @@ #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> -#ifndef NDEBUG -#define DUMP_PROPERTYMAP_STATS 0 -#else -#define DUMP_PROPERTYMAP_STATS 0 -#endif namespace JSC { @@ -52,6 +47,8 @@ namespace JSC { class PropertyNameArray; class PropertyNameArrayData; + struct ClassInfo; + enum EnumerationMode { ExcludeDontEnumProperties, IncludeDontEnumProperties @@ -61,9 +58,9 @@ namespace JSC { public: friend class JIT; friend class StructureTransitionTable; - static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount) + static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo) { - return adoptRef(new Structure(prototype, typeInfo, anonymousSlotCount)); + return adoptRef(new Structure(prototype, typeInfo, anonymousSlotCount, classInfo)); } static void startIgnoringLeaks(); @@ -79,6 +76,13 @@ namespace JSC { static PassRefPtr<Structure> getterSetterTransition(Structure*); static PassRefPtr<Structure> toCacheableDictionaryTransition(Structure*); static PassRefPtr<Structure> toUncacheableDictionaryTransition(Structure*); + static PassRefPtr<Structure> sealTransition(Structure*); + static PassRefPtr<Structure> freezeTransition(Structure*); + static PassRefPtr<Structure> preventExtensionsTransition(Structure*); + + bool isSealed(); + bool isFrozen(); + bool isExtensible() const { return !m_preventExtensions; } PassRefPtr<Structure> flattenDictionaryStructure(JSGlobalData&, JSObject*); @@ -103,25 +107,16 @@ namespace JSC { void growPropertyStorageCapacity(); unsigned propertyStorageCapacity() const { return m_propertyStorageCapacity; } - unsigned propertyStorageSize() const { return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->keyCount + (m_propertyTable->deletedOffsets ? m_propertyTable->deletedOffsets->size() : 0) : static_cast<unsigned>(m_offset + 1)); } + unsigned propertyStorageSize() const { return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); } bool isUsingInlineStorage() const; size_t get(const Identifier& propertyName); - size_t get(const StringImpl* rep, unsigned& attributes, JSCell*& specificValue); + size_t get(StringImpl* propertyName, unsigned& attributes, JSCell*& specificValue); size_t get(const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue) { ASSERT(!propertyName.isNull()); return get(propertyName.impl(), attributes, specificValue); } - bool transitionedFor(const JSCell* specificValue) - { - return m_specificValueInPrevious == specificValue; - } - bool hasTransition(StringImpl*, unsigned attributes); - bool hasTransition(const Identifier& propertyName, unsigned attributes) - { - return hasTransition(propertyName.impl(), attributes); - } bool hasGetterSetterProperties() const { return m_hasGetterSetterProperties; } void setHasGetterSetterProperties(bool hasGetterSetterProperties) { m_hasGetterSetterProperties = hasGetterSetterProperties; } @@ -131,19 +126,28 @@ namespace JSC { bool hasAnonymousSlots() const { return !!m_anonymousSlotCount; } unsigned anonymousSlotCount() const { return m_anonymousSlotCount; } - bool isEmpty() const { return m_propertyTable ? !m_propertyTable->keyCount : m_offset == noOffset; } + bool isEmpty() const { return m_propertyTable ? m_propertyTable->isEmpty() : m_offset == noOffset; } void despecifyDictionaryFunction(const Identifier& propertyName); void disableSpecificFunctionTracking() { m_specificFunctionThrashCount = maxSpecificFunctionThrashCount; } - void setEnumerationCache(JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h. - void clearEnumerationCache(JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h. + void setEnumerationCache(JSGlobalData&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h. + void clearEnumerationCache(); // Defined in JSPropertyNameIterator.h. JSPropertyNameIterator* enumerationCache(); // Defined in JSPropertyNameIterator.h. void getPropertyNames(PropertyNameArray&, EnumerationMode mode); - + + const ClassInfo* classInfo() const { return m_classInfo; } + + static void initializeThreading(); + private: + Structure(JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount, const ClassInfo*); + Structure(const Structure*); - Structure(JSValue prototype, const TypeInfo&, unsigned anonymousSlotCount); + static PassRefPtr<Structure> create(const Structure* structure) + { + return adoptRef(new Structure(structure)); + } typedef enum { NoneDictionaryKind = 0, @@ -155,24 +159,18 @@ namespace JSC { size_t put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue); size_t remove(const Identifier& propertyName); - void expandPropertyMapHashTable(); - void rehashPropertyMapHashTable(); - void rehashPropertyMapHashTable(unsigned newTableSize); - void createPropertyMapHashTable(); - void createPropertyMapHashTable(unsigned newTableSize); - void insertIntoPropertyMapHashTable(const PropertyMapEntry&); + void createPropertyMap(unsigned keyCount = 0); void checkConsistency(); bool despecifyFunction(const Identifier&); void despecifyAllFunctions(); - PropertyMapHashTable* copyPropertyTable(); + PropertyTable* copyPropertyTable(); void materializePropertyMap(); void materializePropertyMapIfNecessary() { - if (m_propertyTable || !m_previous) - return; - materializePropertyMap(); + if (!m_propertyTable && m_previous) + materializePropertyMap(); } signed char transitionCount() const @@ -181,24 +179,8 @@ namespace JSC { return m_offset == noOffset ? 0 : m_offset + 1; } - typedef std::pair<Structure*, Structure*> Transition; - typedef HashMap<StructureTransitionTableHash::Key, Transition, StructureTransitionTableHash, StructureTransitionTableHashTraits> TransitionTable; - - inline bool transitionTableContains(const StructureTransitionTableHash::Key& key, JSCell* specificValue); - inline void transitionTableRemove(const StructureTransitionTableHash::Key& key, JSCell* specificValue); - inline void transitionTableAdd(const StructureTransitionTableHash::Key& key, Structure* structure, JSCell* specificValue); - inline bool transitionTableHasTransition(const StructureTransitionTableHash::Key& key) const; - inline Structure* transitionTableGet(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const; - - TransitionTable* transitionTable() const { ASSERT(!m_isUsingSingleSlot); return m_transitions.m_table; } - inline void setTransitionTable(TransitionTable* table); - Structure* singleTransition() const { ASSERT(m_isUsingSingleSlot); return m_transitions.m_singleTransition; } - void setSingleTransition(Structure* structure) { ASSERT(m_isUsingSingleSlot); m_transitions.m_singleTransition = structure; } - bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const; - static const unsigned emptyEntryIndex = 0; - static const signed char s_maxTransitionLength = 64; static const signed char noOffset = -1; @@ -214,15 +196,13 @@ namespace JSC { RefPtr<StringImpl> m_nameInPrevious; JSCell* m_specificValueInPrevious; - // 'm_isUsingSingleSlot' indicates whether we are using the single transition optimisation. - union { - TransitionTable* m_table; - Structure* m_singleTransition; - } m_transitions; + const ClassInfo* m_classInfo; + + StructureTransitionTable m_transitionTable; WeakGCPtr<JSPropertyNameIterator> m_enumerationCache; - PropertyMapHashTable* m_propertyTable; + OwnPtr<PropertyTable> m_propertyTable; uint32_t m_propertyStorageCapacity; @@ -243,53 +223,19 @@ namespace JSC { #endif unsigned m_specificFunctionThrashCount : 2; unsigned m_anonymousSlotCount : 5; - unsigned m_isUsingSingleSlot : 1; + unsigned m_preventExtensions : 1; // 4 free bits }; inline size_t Structure::get(const Identifier& propertyName) { - ASSERT(!propertyName.isNull()); - materializePropertyMapIfNecessary(); if (!m_propertyTable) - return WTF::notFound; - - StringImpl* rep = propertyName.impl(); - - unsigned i = rep->existingHash(); - -#if DUMP_PROPERTYMAP_STATS - ++numProbes; -#endif - - unsigned entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return WTF::notFound; - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) - return m_propertyTable->entries()[entryIndex - 1].offset; + return notFound; -#if DUMP_PROPERTYMAP_STATS - ++numCollisions; -#endif - - unsigned k = 1 | WTF::doubleHash(rep->existingHash()); - - while (1) { - i += k; - -#if DUMP_PROPERTYMAP_STATS - ++numRehashes; -#endif - - entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask]; - if (entryIndex == emptyEntryIndex) - return WTF::notFound; - - if (rep == m_propertyTable->entries()[entryIndex - 1].key) - return m_propertyTable->entries()[entryIndex - 1].offset; - } + PropertyMapEntry* entry = m_propertyTable->find(propertyName.impl()).first; + ASSERT(!entry || entry->offset >= m_anonymousSlotCount); + return entry ? entry->offset : notFound; } } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/StructureTransitionTable.h b/Source/JavaScriptCore/runtime/StructureTransitionTable.h index 7e9d7ff..da78e1b 100644 --- a/Source/JavaScriptCore/runtime/StructureTransitionTable.h +++ b/Source/JavaScriptCore/runtime/StructureTransitionTable.h @@ -35,9 +35,12 @@ namespace JSC { - class Structure; +class Structure; - struct StructureTransitionTableHash { +class StructureTransitionTable { + static const intptr_t UsingSingleSlotFlag = 1; + + struct Hash { typedef std::pair<RefPtr<StringImpl>, unsigned> Key; static unsigned hash(const Key& p) { @@ -52,7 +55,7 @@ namespace JSC { static const bool safeToCompareToEmptyOrDeleted = true; }; - struct StructureTransitionTableHashTraits { + struct HashTraits { typedef WTF::HashTraits<RefPtr<StringImpl> > FirstTraits; typedef WTF::GenericHashTraits<unsigned> SecondTraits; typedef std::pair<FirstTraits::TraitType, SecondTraits::TraitType > TraitType; @@ -66,6 +69,62 @@ namespace JSC { static bool isDeletedValue(const TraitType& value) { return FirstTraits::isDeletedValue(value.first); } }; + typedef HashMap<Hash::Key, Structure*, Hash, HashTraits> TransitionMap; + +public: + StructureTransitionTable() + : m_data(UsingSingleSlotFlag) + { + } + + ~StructureTransitionTable() + { + if (!isUsingSingleSlot()) + delete map(); + } + + inline void add(Structure*); + inline void remove(Structure*); + inline bool contains(StringImpl* rep, unsigned attributes) const; + inline Structure* get(StringImpl* rep, unsigned attributes) const; + +private: + bool isUsingSingleSlot() const + { + return m_data & UsingSingleSlotFlag; + } + + TransitionMap* map() const + { + ASSERT(!isUsingSingleSlot()); + return reinterpret_cast<TransitionMap*>(m_data); + } + + void setMap(TransitionMap* map) + { + ASSERT(isUsingSingleSlot()); + + // This implicitly clears the flag that indicates we're using a single transition + m_data = reinterpret_cast<intptr_t>(map); + + ASSERT(!isUsingSingleSlot()); + } + + Structure* singleTransition() const + { + ASSERT(isUsingSingleSlot()); + return reinterpret_cast<Structure*>(m_data & ~UsingSingleSlotFlag); + } + + void setSingleTransition(Structure* structure) + { + ASSERT(isUsingSingleSlot()); + m_data = reinterpret_cast<intptr_t>(structure) | UsingSingleSlotFlag; + } + + intptr_t m_data; +}; + } // namespace JSC #endif // StructureTransitionTable_h diff --git a/Source/JavaScriptCore/runtime/WeakGCMap.h b/Source/JavaScriptCore/runtime/WeakGCMap.h index 7bf4503..a40e684 100644 --- a/Source/JavaScriptCore/runtime/WeakGCMap.h +++ b/Source/JavaScriptCore/runtime/WeakGCMap.h @@ -26,110 +26,127 @@ #ifndef WeakGCMap_h #define WeakGCMap_h -#include "Heap.h" +#include "Handle.h" +#include "JSGlobalData.h" #include <wtf/HashMap.h> namespace JSC { -class JSCell; - -// A HashMap whose get() function returns emptyValue() for cells awaiting destruction. -template<typename KeyType, typename MappedType> -class WeakGCMap { +// A HashMap for GC'd values that removes entries when the associated value +// dies. +template<typename KeyType, typename MappedType> class WeakGCMap : private Finalizer { WTF_MAKE_FAST_ALLOCATED; - /* - Invariants: - * A value enters the WeakGCMap marked. (Guaranteed by set().) - * A value that becomes unmarked leaves the WeakGCMap before being recycled. (Guaranteed by the value's destructor removing it from the WeakGCMap.) - * A value that becomes unmarked leaves the WeakGCMap before becoming marked again. (Guaranteed by all destructors running before the mark phase begins.) - * During the mark phase, all values in the WeakGCMap are valid. (Guaranteed by all destructors running before the mark phase begins.) - */ + WTF_MAKE_NONCOPYABLE(WeakGCMap); + + typedef HashMap<KeyType, HandleSlot> MapType; + typedef typename HandleTypes<MappedType>::ExternalType ExternalType; + typedef typename MapType::iterator map_iterator; public: - typedef typename HashMap<KeyType, DeprecatedPtr<MappedType> >::iterator iterator; - typedef typename HashMap<KeyType, DeprecatedPtr<MappedType> >::const_iterator const_iterator; - + + struct iterator { + iterator(map_iterator iter) + : m_iterator(iter) + { + } + + std::pair<KeyType, ExternalType> get() const { return std::make_pair(m_iterator->first, HandleTypes<MappedType>::getFromSlot(m_iterator->second)); } + std::pair<KeyType, HandleSlot> getSlot() const { return *m_iterator; } + + iterator& operator++() { ++m_iterator; return *this; } + + // postfix ++ intentionally omitted + + // Comparison. + bool operator==(const iterator& other) const { return m_iterator == other.m_iterator; } + bool operator!=(const iterator& other) const { return m_iterator != other.m_iterator; } + + private: + map_iterator m_iterator; + }; + + WeakGCMap() + { + } + bool isEmpty() { return m_map.isEmpty(); } - void clear() { m_map.clear(); } + void clear() + { + map_iterator end = m_map.end(); + for (map_iterator ptr = m_map.begin(); ptr != end; ++ptr) + HandleHeap::heapFor(ptr->second)->deallocate(ptr->second); + m_map.clear(); + } - MappedType* get(const KeyType&) const; - pair<iterator, bool> set(const KeyType&, MappedType*); - MappedType* take(const KeyType&); + ExternalType get(const KeyType& key) const + { + return HandleTypes<MappedType>::getFromSlot(m_map.get(key)); + } - // These unchecked functions provide access to a value even if the value's - // mark bit is not set. This is used, among other things, to retrieve values - // during the GC mark phase, which begins by clearing all mark bits. - - size_t uncheckedSize() { return m_map.size(); } + HandleSlot getSlot(const KeyType& key) const + { + return m_map.get(key); + } - MappedType* uncheckedGet(const KeyType& key) const { return m_map.get(key).get(); } - DeprecatedPtr<MappedType>* uncheckedGetSlot(const KeyType& key) + void set(JSGlobalData& globalData, const KeyType& key, ExternalType value) { - iterator iter = m_map.find(key); - if (iter == m_map.end()) - return 0; - return &iter->second; + pair<typename MapType::iterator, bool> iter = m_map.add(key, 0); + HandleSlot slot = iter.first->second; + if (iter.second) { + slot = globalData.allocateGlobalHandle(); + iter.first->second = slot; + HandleHeap::heapFor(slot)->makeWeak(slot, this, key); + } + HandleHeap::heapFor(slot)->writeBarrier(slot, value); + *slot = value; } - bool uncheckedRemove(const KeyType&, MappedType*); - iterator uncheckedBegin() { return m_map.begin(); } - iterator uncheckedEnd() { return m_map.end(); } + ExternalType take(const KeyType& key) + { + HandleSlot slot = m_map.take(key); + if (!slot) + return HashTraits<ExternalType>::emptyValue(); + ExternalType result = HandleTypes<MappedType>::getFromSlot(slot); + HandleHeap::heapFor(slot)->deallocate(slot); + return result; + } - const_iterator uncheckedBegin() const { return m_map.begin(); } - const_iterator uncheckedEnd() const { return m_map.end(); } + size_t size() { return m_map.size(); } - bool isValid(iterator it) const { return Heap::isMarked(it->second.get()); } - bool isValid(const_iterator it) const { return Heap::isMarked(it->second.get()); } + bool deprecatedRemove(const KeyType& key, ExternalType value) + { + // This only exists in order to allow some semblance of correctness to + // the JSWeakObjectMapClear API + typename MapType::iterator iter = m_map.find(key); + if (iter == m_map.end()) + return false; + HandleSlot slot = iter->second; + ExternalType inmap = HandleTypes<MappedType>::getFromSlot(slot); + if (inmap && inmap != value) + return false; + m_map.remove(iter); + HandleHeap::heapFor(slot)->deallocate(slot); + return true; + } + iterator begin() { return iterator(m_map.begin()); } + iterator end() { return iterator(m_map.end()); } + + ~WeakGCMap() + { + clear(); + } + private: - HashMap<KeyType, DeprecatedPtr<MappedType> > m_map; -}; - -template<typename KeyType, typename MappedType> -inline MappedType* WeakGCMap<KeyType, MappedType>::get(const KeyType& key) const -{ - MappedType* result = m_map.get(key).get(); - if (result == HashTraits<MappedType*>::emptyValue()) - return result; - if (!Heap::isMarked(result)) - return HashTraits<MappedType*>::emptyValue(); - return result; -} - -template<typename KeyType, typename MappedType> -MappedType* WeakGCMap<KeyType, MappedType>::take(const KeyType& key) -{ - MappedType* result = m_map.take(key).get(); - if (result == HashTraits<MappedType*>::emptyValue()) - return result; - if (!Heap::isMarked(result)) - return HashTraits<MappedType*>::emptyValue(); - return result; -} - -template<typename KeyType, typename MappedType> -pair<typename WeakGCMap<KeyType, MappedType>::iterator, bool> WeakGCMap<KeyType, MappedType>::set(const KeyType& key, MappedType* value) -{ - Heap::setMarked(value); // If value is newly allocated, it's not marked, so mark it now. - pair<iterator, bool> result = m_map.add(key, value); - if (!result.second) { // pre-existing entry - result.second = !Heap::isMarked(result.first->second.get()); - result.first->second = value; + virtual void finalize(Handle<Unknown>, void* key) + { + HandleSlot slot = m_map.take(static_cast<KeyType>(key)); + ASSERT(slot); + HandleHeap::heapFor(slot)->deallocate(slot); } - return result; -} - -template<typename KeyType, typename MappedType> -bool WeakGCMap<KeyType, MappedType>::uncheckedRemove(const KeyType& key, MappedType* value) -{ - iterator it = m_map.find(key); - if (it == m_map.end()) - return false; - if (it->second.get() != value) - return false; - m_map.remove(it); - return true; -} + + MapType m_map; +}; } // namespace JSC diff --git a/Source/JavaScriptCore/runtime/WeakGCPtr.h b/Source/JavaScriptCore/runtime/WeakGCPtr.h index 4946ee7..3f87b83 100644 --- a/Source/JavaScriptCore/runtime/WeakGCPtr.h +++ b/Source/JavaScriptCore/runtime/WeakGCPtr.h @@ -26,128 +26,79 @@ #ifndef WeakGCPtr_h #define WeakGCPtr_h +#include "Global.h" #include "Heap.h" -#include "GCHandle.h" namespace JSC { +// A smart pointer whose get() function returns 0 for cells that have died -// A smart pointer whose get() function returns 0 for cells awaiting destruction. -template <typename T> class WeakGCPtr { +template <typename T> class WeakGCPtr : public HandleConverter<WeakGCPtr<T>, T> { WTF_MAKE_NONCOPYABLE(WeakGCPtr); + public: + typedef typename HandleTypes<T>::ExternalType ExternalType; + WeakGCPtr() - : m_ptr(0) + : m_slot(0) { } - - WeakGCPtr(T* ptr) { assign(ptr); } - - ~WeakGCPtr() + + WeakGCPtr(JSGlobalData& globalData, Finalizer* finalizer = 0, void* context = 0) + : m_slot(globalData.allocateGlobalHandle()) { - if (m_ptr) - m_ptr->pool()->free(m_ptr); + HandleHeap::heapFor(m_slot)->makeWeak(m_slot, finalizer, context); } - - T* get() const + + WeakGCPtr(JSGlobalData& globalData, ExternalType value, Finalizer* finalizer = 0, void* context = 0) + : m_slot(globalData.allocateGlobalHandle()) { - if (m_ptr && m_ptr->isValidPtr()) - return static_cast<T*>(m_ptr->get()); - return 0; + HandleHeap::heapFor(m_slot)->makeWeak(m_slot, finalizer, context); + internalSet(value); } + + ExternalType get() const { return HandleTypes<T>::getFromSlot(m_slot); } - bool clear(JSCell* p) + void clear() { - if (!m_ptr || m_ptr->get() != p) - return false; - - m_ptr->pool()->free(m_ptr); - m_ptr = 0; - return true; + if (m_slot) + internalSet(ExternalType()); } - - T& operator*() const { return *get(); } - T* operator->() const { return get(); } - bool operator!() const { return !get(); } + bool operator!() const { return !m_slot || !*m_slot; } // This conversion operator allows implicit conversion to bool but not to other integer types. -#if COMPILER(WINSCW) - operator bool() const { return m_ptr; } -#else - typedef WeakGCHandle* WeakGCPtr::*UnspecifiedBoolType; - operator UnspecifiedBoolType() const { return get() ? &WeakGCPtr::m_ptr : 0; } -#endif + typedef ExternalType (WeakGCPtr::*UnspecifiedBoolType); + operator UnspecifiedBoolType*() const { return !*this ? 0 : reinterpret_cast<UnspecifiedBoolType*>(1); } - WeakGCPtr& operator=(T*); + ~WeakGCPtr() + { + if (!m_slot) + return; + HandleHeap::heapFor(m_slot)->deallocate(m_slot); + } -#if !ASSERT_DISABLED - bool hasDeadObject() const { return !!m_ptr; } -#endif + void set(JSGlobalData& globalData, ExternalType value, Finalizer* finalizer) + { + if (!this->m_slot) { + this->m_slot = globalData.allocateGlobalHandle(); + HandleHeap::heapFor(this->m_slot)->makeWeak(this->m_slot, finalizer, 0); + } else + ASSERT(HandleHeap::heapFor(this->m_slot)->getFinalizer(this->m_slot) == finalizer); + this->internalSet(value); + } private: - void assign(JSCell* ptr) + void internalSet(ExternalType value) { - ASSERT(ptr); - if (m_ptr) - m_ptr->set(ptr); - else - m_ptr = Heap::heap(ptr)->addWeakGCHandle(ptr); + ASSERT(m_slot); + JSValue newValue(HandleTypes<T>::toJSValue(value)); + HandleHeap::heapFor(m_slot)->writeBarrier(m_slot, newValue); + *m_slot = newValue; } - WeakGCHandle* m_ptr; + HandleSlot m_slot; }; -template <typename T> inline WeakGCPtr<T>& WeakGCPtr<T>::operator=(T* optr) -{ - assign(optr); - return *this; -} - -template <typename T, typename U> inline bool operator==(const WeakGCPtr<T>& a, const WeakGCPtr<U>& b) -{ - return a.get() == b.get(); -} - -template <typename T, typename U> inline bool operator==(const WeakGCPtr<T>& a, U* b) -{ - return a.get() == b; -} - -template <typename T, typename U> inline bool operator==(T* a, const WeakGCPtr<U>& b) -{ - return a == b.get(); -} - -template <typename T, typename U> inline bool operator!=(const WeakGCPtr<T>& a, const WeakGCPtr<U>& b) -{ - return a.get() != b.get(); -} - -template <typename T, typename U> inline bool operator!=(const WeakGCPtr<T>& a, U* b) -{ - return a.get() != b; -} - -template <typename T, typename U> inline bool operator!=(T* a, const WeakGCPtr<U>& b) -{ - return a != b.get(); -} - -template <typename T, typename U> inline WeakGCPtr<T> static_pointer_cast(const WeakGCPtr<U>& p) -{ - return WeakGCPtr<T>(static_cast<T*>(p.get())); -} - -template <typename T, typename U> inline WeakGCPtr<T> const_pointer_cast(const WeakGCPtr<U>& p) -{ - return WeakGCPtr<T>(const_cast<T*>(p.get())); -} - -template <typename T> inline T* get(const WeakGCPtr<T>& p) -{ - return p.get(); -} - } // namespace JSC #endif // WeakGCPtr_h diff --git a/Source/JavaScriptCore/runtime/WriteBarrier.h b/Source/JavaScriptCore/runtime/WriteBarrier.h index 64150ed..44840ad 100644 --- a/Source/JavaScriptCore/runtime/WriteBarrier.h +++ b/Source/JavaScriptCore/runtime/WriteBarrier.h @@ -33,6 +33,7 @@ class JSCell; class JSGlobalData; typedef enum { } Unknown; +typedef JSValue* HandleSlot; template <class T> class DeprecatedPtr { public: diff --git a/Source/JavaScriptCore/wscript b/Source/JavaScriptCore/wscript index 8e27304..214ef91 100644 --- a/Source/JavaScriptCore/wscript +++ b/Source/JavaScriptCore/wscript @@ -38,7 +38,7 @@ jscore_excludes.extend(get_excludes(jscore_dir, ['*None.cpp'])) if build_port == "wx": if building_on_win32: - jscore_excludes += ['MarkStackPosix.cpp', 'ThreadingPthreads.cpp'] + jscore_excludes += ['MarkStackPosix.cpp', 'OSAllocatorPosix.cpp', 'ThreadingPthreads.cpp'] sources += ['runtime/MarkStackWin.cpp'] else: jscore_excludes.append('JSStringRefBSTR.cpp') diff --git a/Source/JavaScriptCore/wtf/Assertions.cpp b/Source/JavaScriptCore/wtf/Assertions.cpp index cdde180..3c4fc77 100644 --- a/Source/JavaScriptCore/wtf/Assertions.cpp +++ b/Source/JavaScriptCore/wtf/Assertions.cpp @@ -225,12 +225,12 @@ void WTFReportBacktrace() // Assume c++ & try to demangle the name. char* demangledName = abi::__cxa_demangle(mangledName, 0, 0, 0); if (demangledName) { - fprintf(stderr, " -> %s\n", demangledName); + fprintf(stderr, "%-3d %s\n", i, demangledName); free(demangledName); } else - fprintf(stderr, " -> %s\n", mangledName); + fprintf(stderr, "%-3d %s\n", i, mangledName); } else - fprintf(stderr, " -> %p\n", pointer); + fprintf(stderr, "%-3d %p\n", i, pointer); } #endif } diff --git a/Source/JavaScriptCore/wtf/Bitmap.h b/Source/JavaScriptCore/wtf/Bitmap.h index b046b61..9ee7f4a 100644 --- a/Source/JavaScriptCore/wtf/Bitmap.h +++ b/Source/JavaScriptCore/wtf/Bitmap.h @@ -40,6 +40,7 @@ public: size_t nextPossiblyUnset(size_t) const; void clear(size_t); void clearAll(); + int64_t findRunOfZeros(size_t) const; size_t count(size_t = 0) const; size_t isEmpty() const; size_t isFull() const; @@ -107,6 +108,26 @@ inline size_t Bitmap<size>::nextPossiblyUnset(size_t start) const } template<size_t size> +inline int64_t Bitmap<size>::findRunOfZeros(size_t runLength) const +{ + if (!runLength) + runLength = 1; + + for (size_t i = 0; i <= (size - runLength) ; i++) { + bool found = true; + for (size_t j = i; j <= (i + runLength - 1) ; j++) { + if (get(j)) { + found = false; + break; + } + } + if (found) + return i; + } + return -1; +} + +template<size_t size> inline size_t Bitmap<size>::count(size_t start) const { size_t result = 0; diff --git a/Source/JavaScriptCore/wtf/BlockStack.h b/Source/JavaScriptCore/wtf/BlockStack.h new file mode 100644 index 0000000..a4d7425 --- /dev/null +++ b/Source/JavaScriptCore/wtf/BlockStack.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef BlockStack_h +#define BlockStack_h + +#include <wtf/Assertions.h> +#include <wtf/Vector.h> + +namespace WTF { + +template <typename T> class BlockStack { +public: + static const size_t blockSize = 4096; + static const size_t blockLength = blockSize / sizeof(T); + + BlockStack(); + ~BlockStack(); + + T* grow(); + void shrink(T*); + + const Vector<T*>& blocks(); + +private: + Vector<T*> m_blocks; + T* m_spareBlock; // Used to avoid thrash at block boundaries. +}; + +template <typename T> BlockStack<T>::BlockStack() + : m_spareBlock(0) +{ +} + +template <typename T> BlockStack<T>::~BlockStack() +{ + if (m_spareBlock) + free(m_spareBlock); + for (size_t i = 0; i < m_blocks.size(); ++i) + free(m_blocks[i]); +} + +template <typename T> inline const Vector<T*>& BlockStack<T>::blocks() +{ + return m_blocks; +} + +template <typename T> T* BlockStack<T>::grow() +{ + T* block = m_spareBlock ? m_spareBlock : static_cast<T*>(malloc(blockSize)); + m_spareBlock = 0; + + m_blocks.append(block); + return block; +} + +template <typename T> void BlockStack<T>::shrink(T* newEnd) +{ + ASSERT(newEnd != m_blocks.last() + blockLength); + m_spareBlock = m_blocks.last(); + m_blocks.removeLast(); + + while (m_blocks.last() + blockLength != newEnd) { + free(m_blocks.last()); + m_blocks.removeLast(); + } +} + +} + +using WTF::BlockStack; + +#endif diff --git a/Source/JavaScriptCore/wtf/CMakeLists.txt b/Source/JavaScriptCore/wtf/CMakeLists.txt index f85bf02..c27b2e5 100644 --- a/Source/JavaScriptCore/wtf/CMakeLists.txt +++ b/Source/JavaScriptCore/wtf/CMakeLists.txt @@ -16,6 +16,7 @@ SET(WTF_HEADERS Decoder.h Deque.h DisallowCType.h + DoublyLinkedList.h Encoder.h FastAllocBase.h FastMalloc.h @@ -64,6 +65,7 @@ SET(WTF_HEADERS RefPtrHashMap.h RetainPtr.h SegmentedVector.h + SHA1.h StackBounds.h StaticConstructors.h StdLibExtras.h @@ -115,6 +117,7 @@ SET(WTF_SOURCES OSRandomSource.cpp RandomNumber.cpp RefCountedLeakCounter.cpp + SHA1.cpp StackBounds.cpp StringExtras.cpp Threading.cpp diff --git a/Source/JavaScriptCore/wtf/CurrentTime.cpp b/Source/JavaScriptCore/wtf/CurrentTime.cpp index 56724cb..4205227 100644 --- a/Source/JavaScriptCore/wtf/CurrentTime.cpp +++ b/Source/JavaScriptCore/wtf/CurrentTime.cpp @@ -35,7 +35,7 @@ #if OS(WINDOWS) -// Windows is first since we want to use hires timers, despite PLATFORM(CF) +// Windows is first since we want to use hires timers, despite USE(CF) // being defined. // If defined, WIN32_LEAN_AND_MEAN disables timeBeginPeriod/timeEndPeriod. #undef WIN32_LEAN_AND_MEAN diff --git a/Source/JavaScriptCore/wtf/DateMath.cpp b/Source/JavaScriptCore/wtf/DateMath.cpp index 8873352..062cc1b 100644 --- a/Source/JavaScriptCore/wtf/DateMath.cpp +++ b/Source/JavaScriptCore/wtf/DateMath.cpp @@ -76,6 +76,9 @@ #include "ASCIICType.h" #include "CurrentTime.h" #include "MathExtras.h" +#if USE(JSC) +#include "ScopeChain.h" +#endif #include "StdLibExtras.h" #include "StringExtras.h" @@ -920,6 +923,14 @@ static double parseDateFromNullTerminatedCharacters(const char* dateString, bool } } } + + // The year may be after the time but before the time zone. + if (year <= 0) { + if (!parseLong(dateString, &newPosStr, 10, &year)) + year = 0; + dateString = newPosStr; + skipSpacesAndComments(dateString); + } // Don't fail if the time zone is missing. // Some websites omit the time zone (4275206). diff --git a/Source/JavaScriptCore/wtf/Deque.h b/Source/JavaScriptCore/wtf/Deque.h index 1b16afc..8ae46e9 100644 --- a/Source/JavaScriptCore/wtf/Deque.h +++ b/Source/JavaScriptCore/wtf/Deque.h @@ -37,27 +37,27 @@ namespace WTF { - template<typename T> class DequeIteratorBase; - template<typename T> class DequeIterator; - template<typename T> class DequeConstIterator; - template<typename T> class DequeReverseIterator; - template<typename T> class DequeConstReverseIterator; + template<typename T, size_t inlineCapacity> class DequeIteratorBase; + template<typename T, size_t inlineCapacity> class DequeIterator; + template<typename T, size_t inlineCapacity> class DequeConstIterator; + template<typename T, size_t inlineCapacity> class DequeReverseIterator; + template<typename T, size_t inlineCapacity> class DequeConstReverseIterator; - template<typename T> + template<typename T, size_t inlineCapacity = 0> class Deque { WTF_MAKE_FAST_ALLOCATED; public: - typedef DequeIterator<T> iterator; - typedef DequeConstIterator<T> const_iterator; - typedef DequeReverseIterator<T> reverse_iterator; - typedef DequeConstReverseIterator<T> const_reverse_iterator; + typedef DequeIterator<T, inlineCapacity> iterator; + typedef DequeConstIterator<T, inlineCapacity> const_iterator; + typedef DequeReverseIterator<T, inlineCapacity> reverse_iterator; + typedef DequeConstReverseIterator<T, inlineCapacity> const_reverse_iterator; Deque(); - Deque(const Deque<T>&); - Deque& operator=(const Deque<T>&); + Deque(const Deque<T, inlineCapacity>&); + Deque& operator=(const Deque<T, inlineCapacity>&); ~Deque(); - void swap(Deque<T>&); + void swap(Deque<T, inlineCapacity>&); size_t size() const { return m_start <= m_end ? m_end - m_start : m_end + m_buffer.capacity() - m_start; } bool isEmpty() const { return m_start == m_end; } @@ -87,11 +87,11 @@ namespace WTF { iterator findIf(Predicate&); private: - friend class DequeIteratorBase<T>; + friend class DequeIteratorBase<T, inlineCapacity>; - typedef VectorBuffer<T, 0> Buffer; + typedef VectorBuffer<T, inlineCapacity> Buffer; typedef VectorTypeOperations<T> TypeOperations; - typedef DequeIteratorBase<T> IteratorBase; + typedef DequeIteratorBase<T, inlineCapacity> IteratorBase; void remove(size_t position); void invalidateIterators(); @@ -109,14 +109,14 @@ namespace WTF { #endif }; - template<typename T> + template<typename T, size_t inlineCapacity = 0> class DequeIteratorBase { private: - typedef DequeIteratorBase<T> Base; + typedef DequeIteratorBase<T, inlineCapacity> Base; protected: DequeIteratorBase(); - DequeIteratorBase(const Deque<T>*, size_t); + DequeIteratorBase(const Deque<T, inlineCapacity>*, size_t); DequeIteratorBase(const Base&); Base& operator=(const Base&); ~DequeIteratorBase(); @@ -137,10 +137,10 @@ namespace WTF { void checkValidity() const; void checkValidity(const Base&) const; - Deque<T>* m_deque; + Deque<T, inlineCapacity>* m_deque; size_t m_index; - friend class Deque<T>; + friend class Deque<T, inlineCapacity>; #ifndef NDEBUG mutable DequeIteratorBase* m_next; @@ -148,14 +148,14 @@ namespace WTF { #endif }; - template<typename T> - class DequeIterator : public DequeIteratorBase<T> { + template<typename T, size_t inlineCapacity = 0> + class DequeIterator : public DequeIteratorBase<T, inlineCapacity> { private: - typedef DequeIteratorBase<T> Base; - typedef DequeIterator<T> Iterator; + typedef DequeIteratorBase<T, inlineCapacity> Base; + typedef DequeIterator<T, inlineCapacity> Iterator; public: - DequeIterator(Deque<T>* deque, size_t index) : Base(deque, index) { } + DequeIterator(Deque<T, inlineCapacity>* deque, size_t index) : Base(deque, index) { } DequeIterator(const Iterator& other) : Base(other) { } DequeIterator& operator=(const Iterator& other) { Base::assign(other); return *this; } @@ -172,15 +172,15 @@ namespace WTF { // postfix -- intentionally omitted }; - template<typename T> - class DequeConstIterator : public DequeIteratorBase<T> { + template<typename T, size_t inlineCapacity = 0> + class DequeConstIterator : public DequeIteratorBase<T, inlineCapacity> { private: - typedef DequeIteratorBase<T> Base; - typedef DequeConstIterator<T> Iterator; - typedef DequeIterator<T> NonConstIterator; + typedef DequeIteratorBase<T, inlineCapacity> Base; + typedef DequeConstIterator<T, inlineCapacity> Iterator; + typedef DequeIterator<T, inlineCapacity> NonConstIterator; public: - DequeConstIterator(const Deque<T>* deque, size_t index) : Base(deque, index) { } + DequeConstIterator(const Deque<T, inlineCapacity>* deque, size_t index) : Base(deque, index) { } DequeConstIterator(const Iterator& other) : Base(other) { } DequeConstIterator(const NonConstIterator& other) : Base(other) { } @@ -199,14 +199,14 @@ namespace WTF { // postfix -- intentionally omitted }; - template<typename T> - class DequeReverseIterator : public DequeIteratorBase<T> { + template<typename T, size_t inlineCapacity = 0> + class DequeReverseIterator : public DequeIteratorBase<T, inlineCapacity> { private: - typedef DequeIteratorBase<T> Base; - typedef DequeReverseIterator<T> Iterator; + typedef DequeIteratorBase<T, inlineCapacity> Base; + typedef DequeReverseIterator<T, inlineCapacity> Iterator; public: - DequeReverseIterator(const Deque<T>* deque, size_t index) : Base(deque, index) { } + DequeReverseIterator(const Deque<T, inlineCapacity>* deque, size_t index) : Base(deque, index) { } DequeReverseIterator(const Iterator& other) : Base(other) { } DequeReverseIterator& operator=(const Iterator& other) { Base::assign(other); return *this; } @@ -223,15 +223,15 @@ namespace WTF { // postfix -- intentionally omitted }; - template<typename T> - class DequeConstReverseIterator : public DequeIteratorBase<T> { + template<typename T, size_t inlineCapacity = 0> + class DequeConstReverseIterator : public DequeIteratorBase<T, inlineCapacity> { private: - typedef DequeIteratorBase<T> Base; - typedef DequeConstReverseIterator<T> Iterator; - typedef DequeReverseIterator<T> NonConstIterator; + typedef DequeIteratorBase<T, inlineCapacity> Base; + typedef DequeConstReverseIterator<T, inlineCapacity> Iterator; + typedef DequeReverseIterator<T, inlineCapacity> NonConstIterator; public: - DequeConstReverseIterator(const Deque<T>* deque, size_t index) : Base(deque, index) { } + DequeConstReverseIterator(const Deque<T, inlineCapacity>* deque, size_t index) : Base(deque, index) { } DequeConstReverseIterator(const Iterator& other) : Base(other) { } DequeConstReverseIterator(const NonConstIterator& other) : Base(other) { } @@ -251,13 +251,17 @@ namespace WTF { }; #ifdef NDEBUG - template<typename T> inline void Deque<T>::checkValidity() const { } - template<typename T> inline void Deque<T>::checkIndexValidity(size_t) const { } - template<typename T> inline void Deque<T>::invalidateIterators() { } + template<typename T, size_t inlineCapacity> inline void Deque<T, inlineCapacity>::checkValidity() const { } + template<typename T, size_t inlineCapacity> inline void Deque<T, inlineCapacity>::checkIndexValidity(size_t) const { } + template<typename T, size_t inlineCapacity> inline void Deque<T, inlineCapacity>::invalidateIterators() { } #else - template<typename T> - void Deque<T>::checkValidity() const + template<typename T, size_t inlineCapacity> + void Deque<T, inlineCapacity>::checkValidity() const { + // In this implementation a capacity of 1 would confuse append() and + // other places that assume the index after capacity - 1 is 0. + ASSERT(m_buffer.capacity() != 1); + if (!m_buffer.capacity()) { ASSERT(!m_start); ASSERT(!m_end); @@ -267,8 +271,8 @@ namespace WTF { } } - template<typename T> - void Deque<T>::checkIndexValidity(size_t index) const + template<typename T, size_t inlineCapacity> + void Deque<T, inlineCapacity>::checkIndexValidity(size_t index) const { ASSERT(index <= m_buffer.capacity()); if (m_start <= m_end) { @@ -279,8 +283,8 @@ namespace WTF { } } - template<typename T> - void Deque<T>::invalidateIterators() + template<typename T, size_t inlineCapacity> + void Deque<T, inlineCapacity>::invalidateIterators() { IteratorBase* next; for (IteratorBase* p = m_iterators; p; p = next) { @@ -293,8 +297,8 @@ namespace WTF { } #endif - template<typename T> - inline Deque<T>::Deque() + template<typename T, size_t inlineCapacity> + inline Deque<T, inlineCapacity>::Deque() : m_start(0) , m_end(0) #ifndef NDEBUG @@ -304,8 +308,8 @@ namespace WTF { checkValidity(); } - template<typename T> - inline Deque<T>::Deque(const Deque<T>& other) + template<typename T, size_t inlineCapacity> + inline Deque<T, inlineCapacity>::Deque(const Deque<T, inlineCapacity>& other) : m_start(other.m_start) , m_end(other.m_end) , m_buffer(other.m_buffer.capacity()) @@ -322,25 +326,27 @@ namespace WTF { } } - template<typename T> - void deleteAllValues(const Deque<T>& collection) + template<typename T, size_t inlineCapacity> + void deleteAllValues(const Deque<T, inlineCapacity>& collection) { - typedef typename Deque<T>::const_iterator iterator; + typedef typename Deque<T, inlineCapacity>::const_iterator iterator; iterator end = collection.end(); for (iterator it = collection.begin(); it != end; ++it) delete *it; } - template<typename T> - inline Deque<T>& Deque<T>::operator=(const Deque<T>& other) + template<typename T, size_t inlineCapacity> + inline Deque<T, inlineCapacity>& Deque<T, inlineCapacity>::operator=(const Deque<T, inlineCapacity>& other) { + // FIXME: This is inefficient if we're using an inline buffer and T is + // expensive to copy since it will copy the buffer twice instead of once. Deque<T> copy(other); swap(copy); return *this; } - template<typename T> - inline void Deque<T>::destroyAll() + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::destroyAll() { if (m_start <= m_end) TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffer() + m_end); @@ -350,16 +356,16 @@ namespace WTF { } } - template<typename T> - inline Deque<T>::~Deque() + template<typename T, size_t inlineCapacity> + inline Deque<T, inlineCapacity>::~Deque() { checkValidity(); invalidateIterators(); destroyAll(); } - template<typename T> - inline void Deque<T>::swap(Deque<T>& other) + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other) { checkValidity(); other.checkValidity(); @@ -371,8 +377,8 @@ namespace WTF { other.checkValidity(); } - template<typename T> - inline void Deque<T>::clear() + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::clear() { checkValidity(); invalidateIterators(); @@ -382,9 +388,9 @@ namespace WTF { checkValidity(); } - template<typename T> + template<typename T, size_t inlineCapacity> template<typename Predicate> - inline DequeIterator<T> Deque<T>::findIf(Predicate& predicate) + inline DequeIterator<T, inlineCapacity> Deque<T, inlineCapacity>::findIf(Predicate& predicate) { iterator end_iterator = end(); for (iterator it = begin(); it != end_iterator; ++it) { @@ -394,8 +400,8 @@ namespace WTF { return end_iterator; } - template<typename T> - inline void Deque<T>::expandCapacityIfNeeded() + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::expandCapacityIfNeeded() { if (m_start) { if (m_end + 1 != m_start) @@ -409,8 +415,8 @@ namespace WTF { expandCapacity(); } - template<typename T> - void Deque<T>::expandCapacity() + template<typename T, size_t inlineCapacity> + void Deque<T, inlineCapacity>::expandCapacity() { checkValidity(); size_t oldCapacity = m_buffer.capacity(); @@ -429,16 +435,16 @@ namespace WTF { checkValidity(); } - template<typename T> - inline T Deque<T>::takeFirst() + template<typename T, size_t inlineCapacity> + inline T Deque<T, inlineCapacity>::takeFirst() { T oldFirst = first(); removeFirst(); return oldFirst; } - template<typename T> template<typename U> - inline void Deque<T>::append(const U& value) + template<typename T, size_t inlineCapacity> template<typename U> + inline void Deque<T, inlineCapacity>::append(const U& value) { checkValidity(); expandCapacityIfNeeded(); @@ -450,8 +456,8 @@ namespace WTF { checkValidity(); } - template<typename T> template<typename U> - inline void Deque<T>::prepend(const U& value) + template<typename T, size_t inlineCapacity> template<typename U> + inline void Deque<T, inlineCapacity>::prepend(const U& value) { checkValidity(); expandCapacityIfNeeded(); @@ -463,8 +469,8 @@ namespace WTF { checkValidity(); } - template<typename T> - inline void Deque<T>::removeFirst() + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::removeFirst() { checkValidity(); invalidateIterators(); @@ -477,22 +483,22 @@ namespace WTF { checkValidity(); } - template<typename T> - inline void Deque<T>::remove(iterator& it) + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::remove(iterator& it) { it.checkValidity(); remove(it.m_index); } - template<typename T> - inline void Deque<T>::remove(const_iterator& it) + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::remove(const_iterator& it) { it.checkValidity(); remove(it.m_index); } - template<typename T> - inline void Deque<T>::remove(size_t position) + template<typename T, size_t inlineCapacity> + inline void Deque<T, inlineCapacity>::remove(size_t position) { if (position == m_end) return; @@ -515,28 +521,28 @@ namespace WTF { } #ifdef NDEBUG - template<typename T> inline void DequeIteratorBase<T>::checkValidity() const { } - template<typename T> inline void DequeIteratorBase<T>::checkValidity(const DequeIteratorBase<T>&) const { } - template<typename T> inline void DequeIteratorBase<T>::addToIteratorsList() { } - template<typename T> inline void DequeIteratorBase<T>::removeFromIteratorsList() { } + template<typename T, size_t inlineCapacity> inline void DequeIteratorBase<T, inlineCapacity>::checkValidity() const { } + template<typename T, size_t inlineCapacity> inline void DequeIteratorBase<T, inlineCapacity>::checkValidity(const DequeIteratorBase<T, inlineCapacity>&) const { } + template<typename T, size_t inlineCapacity> inline void DequeIteratorBase<T, inlineCapacity>::addToIteratorsList() { } + template<typename T, size_t inlineCapacity> inline void DequeIteratorBase<T, inlineCapacity>::removeFromIteratorsList() { } #else - template<typename T> - void DequeIteratorBase<T>::checkValidity() const + template<typename T, size_t inlineCapacity> + void DequeIteratorBase<T, inlineCapacity>::checkValidity() const { ASSERT(m_deque); m_deque->checkIndexValidity(m_index); } - template<typename T> - void DequeIteratorBase<T>::checkValidity(const Base& other) const + template<typename T, size_t inlineCapacity> + void DequeIteratorBase<T, inlineCapacity>::checkValidity(const Base& other) const { checkValidity(); other.checkValidity(); ASSERT(m_deque == other.m_deque); } - template<typename T> - void DequeIteratorBase<T>::addToIteratorsList() + template<typename T, size_t inlineCapacity> + void DequeIteratorBase<T, inlineCapacity>::addToIteratorsList() { if (!m_deque) m_next = 0; @@ -549,8 +555,8 @@ namespace WTF { m_previous = 0; } - template<typename T> - void DequeIteratorBase<T>::removeFromIteratorsList() + template<typename T, size_t inlineCapacity> + void DequeIteratorBase<T, inlineCapacity>::removeFromIteratorsList() { if (!m_deque) { ASSERT(!m_next); @@ -574,23 +580,23 @@ namespace WTF { } #endif - template<typename T> - inline DequeIteratorBase<T>::DequeIteratorBase() + template<typename T, size_t inlineCapacity> + inline DequeIteratorBase<T, inlineCapacity>::DequeIteratorBase() : m_deque(0) { } - template<typename T> - inline DequeIteratorBase<T>::DequeIteratorBase(const Deque<T>* deque, size_t index) - : m_deque(const_cast<Deque<T>*>(deque)) + template<typename T, size_t inlineCapacity> + inline DequeIteratorBase<T, inlineCapacity>::DequeIteratorBase(const Deque<T, inlineCapacity>* deque, size_t index) + : m_deque(const_cast<Deque<T, inlineCapacity>*>(deque)) , m_index(index) { addToIteratorsList(); checkValidity(); } - template<typename T> - inline DequeIteratorBase<T>::DequeIteratorBase(const Base& other) + template<typename T, size_t inlineCapacity> + inline DequeIteratorBase<T, inlineCapacity>::DequeIteratorBase(const Base& other) : m_deque(other.m_deque) , m_index(other.m_index) { @@ -598,8 +604,8 @@ namespace WTF { checkValidity(); } - template<typename T> - inline DequeIteratorBase<T>& DequeIteratorBase<T>::operator=(const Base& other) + template<typename T, size_t inlineCapacity> + inline DequeIteratorBase<T, inlineCapacity>& DequeIteratorBase<T, inlineCapacity>::operator=(const Base& other) { checkValidity(); other.checkValidity(); @@ -612,8 +618,8 @@ namespace WTF { return *this; } - template<typename T> - inline DequeIteratorBase<T>::~DequeIteratorBase() + template<typename T, size_t inlineCapacity> + inline DequeIteratorBase<T, inlineCapacity>::~DequeIteratorBase() { #ifndef NDEBUG removeFromIteratorsList(); @@ -621,15 +627,15 @@ namespace WTF { #endif } - template<typename T> - inline bool DequeIteratorBase<T>::isEqual(const Base& other) const + template<typename T, size_t inlineCapacity> + inline bool DequeIteratorBase<T, inlineCapacity>::isEqual(const Base& other) const { checkValidity(other); return m_index == other.m_index; } - template<typename T> - inline void DequeIteratorBase<T>::increment() + template<typename T, size_t inlineCapacity> + inline void DequeIteratorBase<T, inlineCapacity>::increment() { checkValidity(); ASSERT(m_index != m_deque->m_end); @@ -641,8 +647,8 @@ namespace WTF { checkValidity(); } - template<typename T> - inline void DequeIteratorBase<T>::decrement() + template<typename T, size_t inlineCapacity> + inline void DequeIteratorBase<T, inlineCapacity>::decrement() { checkValidity(); ASSERT(m_index != m_deque->m_start); @@ -654,16 +660,16 @@ namespace WTF { checkValidity(); } - template<typename T> - inline T* DequeIteratorBase<T>::after() const + template<typename T, size_t inlineCapacity> + inline T* DequeIteratorBase<T, inlineCapacity>::after() const { checkValidity(); ASSERT(m_index != m_deque->m_end); return &m_deque->m_buffer.buffer()[m_index]; } - template<typename T> - inline T* DequeIteratorBase<T>::before() const + template<typename T, size_t inlineCapacity> + inline T* DequeIteratorBase<T, inlineCapacity>::before() const { checkValidity(); ASSERT(m_index != m_deque->m_start); diff --git a/Source/JavaScriptCore/wtf/DoublyLinkedList.h b/Source/JavaScriptCore/wtf/DoublyLinkedList.h new file mode 100644 index 0000000..9351263 --- /dev/null +++ b/Source/JavaScriptCore/wtf/DoublyLinkedList.h @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DoublyLinkedList_h +#define DoublyLinkedList_h + +namespace WTF { + +template <typename Node> class DoublyLinkedList { +public: + DoublyLinkedList(); + + bool isEmpty(); + + Node* head(); + + void append(Node*); + void remove(Node*); + +private: + Node* m_head; + Node* m_tail; +}; + +template <typename Node> inline DoublyLinkedList<Node>::DoublyLinkedList() + : m_head(0) + , m_tail(0) +{ +} + +template <typename Node> inline bool DoublyLinkedList<Node>::isEmpty() +{ + return !m_head; +} + +template <typename Node> inline Node* DoublyLinkedList<Node>::head() +{ + return m_head; +} + +template <typename Node> inline void DoublyLinkedList<Node>::append(Node* node) +{ + if (!m_tail) { + ASSERT(!m_head); + m_head = node; + m_tail = node; + node->setPrev(0); + node->setNext(0); + return; + } + + ASSERT(m_head); + m_tail->setNext(node); + node->setPrev(m_tail); + node->setNext(0); + m_tail = node; +} + +template <typename Node> inline void DoublyLinkedList<Node>::remove(Node* node) +{ + if (node->prev()) { + ASSERT(node != m_head); + node->prev()->setNext(node->next()); + } else { + ASSERT(node == m_head); + m_head = node->next(); + } + + if (node->next()) { + ASSERT(node != m_tail); + node->next()->setPrev(node->prev()); + } else { + ASSERT(node == m_tail); + m_tail = node->prev(); + } +} + +} // namespace WTF + +using WTF::DoublyLinkedList; + +#endif diff --git a/Source/JavaScriptCore/wtf/ListHashSet.h b/Source/JavaScriptCore/wtf/ListHashSet.h index e916ef2..b0d0e43 100644 --- a/Source/JavaScriptCore/wtf/ListHashSet.h +++ b/Source/JavaScriptCore/wtf/ListHashSet.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -90,10 +91,24 @@ namespace WTF { const_iterator begin() const; const_iterator end() const; + ValueType& first(); + const ValueType& first() const; + + ValueType& last(); + const ValueType& last() const; + void removeLast(); + iterator find(const ValueType&); const_iterator find(const ValueType&) const; bool contains(const ValueType&) const; + // An alternate version of find() that finds the object by hashing and comparing + // with some other type, to avoid the cost of type conversion. + // The HashTranslator interface is defined in HashSet. + template<typename T, typename HashTranslator> iterator find(const T&); + template<typename T, typename HashTranslator> const_iterator find(const T&) const; + template<typename T, typename HashTranslator> bool contains(const T&) const; + // the return value is a pair of an iterator to the new value's location, // and a bool that is true if an new entry was added pair<iterator, bool> add(const ValueType&); @@ -442,6 +457,42 @@ namespace WTF { } template<typename T, size_t inlineCapacity, typename U> + inline T& ListHashSet<T, inlineCapacity, U>::first() + { + ASSERT(!isEmpty()); + return m_head->m_value; + } + + template<typename T, size_t inlineCapacity, typename U> + inline const T& ListHashSet<T, inlineCapacity, U>::first() const + { + ASSERT(!isEmpty()); + return m_head->m_value; + } + + template<typename T, size_t inlineCapacity, typename U> + inline T& ListHashSet<T, inlineCapacity, U>::last() + { + ASSERT(!isEmpty()); + return m_tail->m_value; + } + + template<typename T, size_t inlineCapacity, typename U> + inline const T& ListHashSet<T, inlineCapacity, U>::last() const + { + ASSERT(!isEmpty()); + return m_tail->m_value; + } + + template<typename T, size_t inlineCapacity, typename U> + inline void ListHashSet<T, inlineCapacity, U>::removeLast() + { + ASSERT(!isEmpty()); + m_impl.remove(m_tail); + unlinkAndDelete(m_tail); + } + + template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::iterator ListHashSet<T, inlineCapacity, U>::find(const ValueType& value) { typedef ListHashSetTranslator<ValueType, inlineCapacity, HashFunctions> Translator; @@ -461,6 +512,45 @@ namespace WTF { return makeConstIterator(*it); } + template<typename ValueType, size_t inlineCapacity, typename T, typename Translator> + struct ListHashSetTranslatorAdapter { + private: + typedef ListHashSetNode<ValueType, inlineCapacity> Node; + public: + static unsigned hash(const T& key) { return Translator::hash(key); } + static bool equal(Node* const& a, const T& b) { return Translator::equal(a->m_value, b); } + }; + + template<typename ValueType, size_t inlineCapacity, typename U> + template<typename T, typename HashTranslator> + inline typename ListHashSet<ValueType, inlineCapacity, U>::iterator ListHashSet<ValueType, inlineCapacity, U>::find(const T& value) + { + typedef ListHashSetTranslatorAdapter<ValueType, inlineCapacity, T, HashTranslator> Adapter; + ImplTypeConstIterator it = m_impl.template find<T, Adapter>(value); + if (it == m_impl.end()) + return end(); + return makeIterator(*it); + } + + template<typename ValueType, size_t inlineCapacity, typename U> + template<typename T, typename HashTranslator> + inline typename ListHashSet<ValueType, inlineCapacity, U>::const_iterator ListHashSet<ValueType, inlineCapacity, U>::find(const T& value) const + { + typedef ListHashSetTranslatorAdapter<ValueType, inlineCapacity, T, HashTranslator> Adapter; + ImplTypeConstIterator it = m_impl.template find<T, Adapter>(value); + if (it == m_impl.end()) + return end(); + return makeConstIterator(*it); + } + + template<typename ValueType, size_t inlineCapacity, typename U> + template<typename T, typename HashTranslator> + inline bool ListHashSet<ValueType, inlineCapacity, U>::contains(const T& value) const + { + typedef ListHashSetTranslatorAdapter<ValueType, inlineCapacity, T, HashTranslator> Adapter; + return m_impl.template contains<T, Adapter>(value); + } + template<typename T, size_t inlineCapacity, typename U> inline bool ListHashSet<T, inlineCapacity, U>::contains(const ValueType& value) const { diff --git a/Source/JavaScriptCore/wtf/MD5.cpp b/Source/JavaScriptCore/wtf/MD5.cpp index c926a7b..07bbadd 100644 --- a/Source/JavaScriptCore/wtf/MD5.cpp +++ b/Source/JavaScriptCore/wtf/MD5.cpp @@ -203,6 +203,7 @@ static void MD5Transform(uint32_t buf[4], const uint32_t in[16]) MD5::MD5() { + // FIXME: Move unit tests somewhere outside the constructor. See bug 55853. testMD5(); m_buf[0] = 0x67452301; m_buf[1] = 0xefcdab89; diff --git a/Source/JavaScriptCore/wtf/OSAllocator.h b/Source/JavaScriptCore/wtf/OSAllocator.h index 577a6b8..3fd4cef 100644 --- a/Source/JavaScriptCore/wtf/OSAllocator.h +++ b/Source/JavaScriptCore/wtf/OSAllocator.h @@ -77,9 +77,10 @@ inline void* OSAllocator::reserveAndCommit(size_t reserveSize, size_t commitSize inline void OSAllocator::decommitAndRelease(void* releaseBase, size_t releaseSize, void* decommitBase, size_t decommitSize) { ASSERT(decommitBase >= releaseBase && (static_cast<char*>(decommitBase) + decommitSize) <= (static_cast<char*>(releaseBase) + releaseSize)); -#if OS(WINCE) +#if OS(WINCE) || OS(SYMBIAN) // On most platforms we can actually skip this final decommit; releasing the VM will // implicitly decommit any physical memory in the region. This is not true on WINCE. + // On Symbian, this makes implementation simpler and better aligned with the RChunk API decommit(decommitBase, decommitSize); #else UNUSED_PARAM(decommitBase); diff --git a/Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp b/Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp index e746fde..c63e609 100644 --- a/Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp +++ b/Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,31 +27,176 @@ #include "config.h" #include "OSAllocator.h" -#include <wtf/FastMalloc.h> +#include "PageAllocatorSymbian.h" namespace WTF { -void* OSAllocator::reserveUncommitted(size_t bytes, Usage, bool, bool) +// Array to store code chunks used by JIT engine(s) +static RPointerArray<SymbianChunk> codeChunksContainer; + +// The singleton data allocator (non code) +static PageAllocatorSymbian dataAllocator; + +_LIT(KErrorStringInternalConsistency, "OSAllocator:ConsistencyError"); +_LIT(KErrorStringChunkCreation, "OSAllocator:ChunkInitError"); +_LIT(KErrorStringPageSize, "OSAllocator:WrongPageSize"); + +// Makes a new code chunk for a JIT engine with everything in committed state +static void* allocateCodeChunk(size_t bytes) +{ + RChunk c; + TInt error = c.CreateLocalCode(bytes, bytes); + __ASSERT_ALWAYS(error == KErrNone, User::Panic(KErrorStringChunkCreation, error)); + + codeChunksContainer.Append(new SymbianChunk(c.Handle())); + return static_cast<void*>(c.Base()); +} + +// Frees the _entire_ code chunk in which this address resides. +static bool deallocateCodeChunk(void* address) +{ + bool found = false; + for (int i = 0; i < codeChunksContainer.Count(); i++) { + SymbianChunk* p = codeChunksContainer[i]; + if (p && p->contains(address)) { + codeChunksContainer.Remove(i); + delete p; + found = true; + } + } + return found; +} + +// Return the (singleton) object that manages all non-code VM operations +static PageAllocatorSymbian* dataAllocatorInstance() { - return fastMalloc(bytes); + return &dataAllocator; } -void* OSAllocator::reserveAndCommit(size_t bytes, Usage, bool, bool) +// Reserve memory and return the base address of the region +void* OSAllocator::reserveUncommitted(size_t reservationSize, Usage usage, bool , bool executable) { - return fastMalloc(bytes); + void* base = 0; + if (executable) + base = allocateCodeChunk(reservationSize); + else + base = dataAllocatorInstance()->reserve(reservationSize); + return base; } -void OSAllocator::commit(void*, size_t, bool, bool) +// Inverse operation of reserveUncommitted() +void OSAllocator::releaseDecommitted(void* parkedBase, size_t bytes) { + if (dataAllocatorInstance()->contains(parkedBase)) + dataAllocatorInstance()->release(parkedBase, bytes); + + // NOOP for code chunks (JIT) because we released them in decommit() } -void OSAllocator::decommit(void*, size_t) +// Commit what was previously reserved via reserveUncommitted() +void OSAllocator::commit(void* address, size_t bytes, bool, bool executable) { + // For code chunks, we commit (early) in reserveUncommitted(), so NOOP + // For data regions, do real work + if (!executable) + dataAllocatorInstance()->commit(address, bytes); +} + +void OSAllocator::decommit(void* address, size_t bytes) +{ + if (dataAllocatorInstance()->contains(address)) + dataAllocatorInstance()->decommit(address, bytes); + else + deallocateCodeChunk(address); // for code chunk, decommit AND release +} + +void* OSAllocator::reserveAndCommit(size_t bytes, Usage usage, bool writable, bool executable) +{ + void* base = reserveUncommitted(bytes, usage, writable, executable); + commit(base, bytes, writable, executable); + return base; +} + + +// The PageAllocatorSymbian class helps map OSAllocator calls for reserve/commit/decommit +// to a single large Symbian chunk. Only works with multiples of page size, and as a corollary +// all addresses accepted or returned by it are also page-sized aligned. +// Design notes: +// - We initialize a chunk up-front with a large reservation size +// - The entire reservation reserve is logically divided into pageSized blocks (4K on Symbian) +// - The map maintains 1 bit for each of the 4K-sized region in our address space +// - OSAllocator::reserveUncommitted() requests lead to 1 or more bits being set in map +// to indicate internally reserved state. The VM address corresponding to the first bit is returned. +// - OSAllocator::commit() actually calls RChunk.commit() and commits *all or part* of the region +// reserved via reserveUncommitted() previously. +// - OSAllocator::decommit() calls RChunk.decommit() +// - OSAllocator::releaseDecommitted() unparks all the bits in the map, but trusts that a previously +// call to decommit() would have returned the memory to the OS +PageAllocatorSymbian::PageAllocatorSymbian() +{ + __ASSERT_ALWAYS(m_pageSize == WTF::pageSize(), User::Panic(KErrorStringPageSize, m_pageSize)); + + RChunk chunk; + TInt error = chunk.CreateDisconnectedLocal(0, 0, TInt(largeReservationSize)); + __ASSERT_ALWAYS(error == KErrNone, User::Panic(KErrorStringChunkCreation, error)); + + m_chunk = new SymbianChunk(chunk.Handle()); // takes ownership of chunk +} + +PageAllocatorSymbian::~PageAllocatorSymbian() +{ + delete m_chunk; +} + +// Reserves a region internally in the bitmap +void* PageAllocatorSymbian::reserve(size_t bytes) +{ + // Find first available region + const size_t nPages = bytes / m_pageSize; + const int64_t startIdx = m_map.findRunOfZeros(nPages); + + // Pseudo OOM + if (startIdx < 0) + return 0; + + for (size_t i = startIdx; i < startIdx + nPages ; i++) + m_map.set(i); + + return static_cast<void*>( m_chunk->m_base + (TUint)(m_pageSize * startIdx) ); +} + +// Reverses the effects of a reserve() call +void PageAllocatorSymbian::release(void* address, size_t bytes) +{ + const size_t startIdx = (static_cast<char*>(address) - m_chunk->m_base) / m_pageSize; + const size_t nPages = bytes / m_pageSize; + for (size_t i = startIdx; i < startIdx + nPages ; i++) + m_map.clear(i); +} + +// Actually commit memory from the OS, after a previous call to reserve() +bool PageAllocatorSymbian::commit(void* address, size_t bytes) +{ + // sanity check that bits were previously set + const size_t idx = (static_cast<char*>(address) - m_chunk->m_base) / m_pageSize; + const size_t nPages = bytes / m_pageSize; + __ASSERT_ALWAYS(m_map.get(idx), User::Panic(KErrorStringInternalConsistency, idx)); + __ASSERT_ALWAYS(m_map.get(idx+nPages-1), User::Panic(KErrorStringInternalConsistency, idx+nPages-1)); + + TInt error = m_chunk->Commit(static_cast<char*>(address) - m_chunk->m_base, bytes); + return (error == KErrNone); +} + +// Inverse operation of commit(), a release() should follow later +bool PageAllocatorSymbian::decommit(void* address, size_t bytes) +{ + TInt error = m_chunk->Decommit(static_cast<char*>(address) - m_chunk->m_base, bytes); + return (error == KErrNone); } -void OSAllocator::releaseDecommitted(void* address, size_t) +bool PageAllocatorSymbian::contains(const void* address) const { - fastFree(address); + return m_chunk->contains(address); } } // namespace WTF diff --git a/Source/JavaScriptCore/wtf/OSRandomSource.cpp b/Source/JavaScriptCore/wtf/OSRandomSource.cpp index 0c1416a..7d86f6f 100644 --- a/Source/JavaScriptCore/wtf/OSRandomSource.cpp +++ b/Source/JavaScriptCore/wtf/OSRandomSource.cpp @@ -29,6 +29,10 @@ #include <stdint.h> #include <stdlib.h> +#if OS(SYMBIAN) +#include <e32math.h> +#endif + #if OS(UNIX) #include <fcntl.h> #include <unistd.h> @@ -44,7 +48,19 @@ namespace WTF { #if USE(OS_RANDOMNESS) void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length) { -#if OS(UNIX) +#if OS(SYMBIAN) + TInt random; + while (length > sizeof(random)) { + random = Math::Random(); + memcpy(buffer, &random, sizeof(random)); + length -= sizeof(random); + buffer += sizeof(random); + } + if (length > 0) { + random = Math::Random(); + memcpy(buffer, &random, length); + } +#elif OS(UNIX) int fd = open("/dev/urandom", O_RDONLY, 0); if (fd < 0) CRASH(); // We need /dev/urandom for this API to work... diff --git a/Source/JavaScriptCore/wtf/OwnArrayPtr.h b/Source/JavaScriptCore/wtf/OwnArrayPtr.h index 6b7c8da..2828698 100644 --- a/Source/JavaScriptCore/wtf/OwnArrayPtr.h +++ b/Source/JavaScriptCore/wtf/OwnArrayPtr.h @@ -111,6 +111,16 @@ template<typename T> inline typename OwnArrayPtr<T>::PtrType OwnArrayPtr<T>::lea return ptr; } +#ifdef LOOSE_OWN_ARRAY_PTR +template<typename T> inline void OwnArrayPtr<T>::set(PtrType ptr) +{ + ASSERT(!ptr || m_ptr != ptr); + PtrType oldPtr = m_ptr; + m_ptr = ptr; + deleteOwnedArrayPtr(oldPtr); +} +#endif + template<typename T> inline OwnArrayPtr<T>& OwnArrayPtr<T>::operator=(const PassOwnArrayPtr<T>& o) { PtrType ptr = m_ptr; diff --git a/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h b/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h new file mode 100644 index 0000000..48a8464 --- /dev/null +++ b/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef PageAllocatorSymbian_h +#define PageAllocatorSymbian_h + +#include <e32std.h> +#include <wtf/BitMap.h> + +namespace WTF { + +size_t pageSize(); + +// Convenience wrapper around an RChunk +class SymbianChunk : public RChunk { + +public: + SymbianChunk(TInt handle) + { + SetHandle(handle); + // prevent kernel calls by caching these + m_base = reinterpret_cast<char*>(Base()); + m_maxSize = MaxSize(); + } + + ~SymbianChunk() + { + Decommit(0, m_maxSize); + Close(); + } + + // checks if address is in chunk's virtual address space + bool contains(const void* address) const + { + return (static_cast<const char*>(address) >= m_base && static_cast<const char*>(address) < (m_base + m_maxSize)); + } + + char* m_base; + size_t m_maxSize; + +}; + +// Size of the large up-front reservation +#if defined(__WINS__) +// Emulator has limited virtual address space +const size_t largeReservationSize = 96*1024*1024; +#else +// HW has plenty of virtual addresses +const size_t largeReservationSize = 256*1024*1024; +#endif + +class PageAllocatorSymbian { + +public: + PageAllocatorSymbian(); + ~PageAllocatorSymbian(); + + void* reserve(size_t); + void release(void*, size_t); + bool commit(void*, size_t); + bool decommit(void*, size_t); + + bool contains(const void*) const; + +private: + static const size_t m_pageSize = 4096; + SymbianChunk* m_chunk; + Bitmap<largeReservationSize / m_pageSize> m_map; + +}; + +} // namespace WTF + +#endif // PageAllocatorSymbian_h + diff --git a/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h b/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h index e1aa61e..3f30924 100644 --- a/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h +++ b/Source/JavaScriptCore/wtf/PassOwnArrayPtr.h @@ -30,9 +30,6 @@ #include "NullPtr.h" #include "TypeTraits.h" -// Remove this once we make all WebKit code compatible with stricter rules about PassOwnArrayPtr. -#define LOOSE_PASS_OWN_ARRAY_PTR - namespace WTF { template<typename T> class OwnArrayPtr; @@ -46,6 +43,10 @@ public: PassOwnArrayPtr() : m_ptr(0) { } +#if !defined(LOOSE_PASS_OWN_PTR) || !HAVE(NULLPTR) + PassOwnArrayPtr(std::nullptr_t) : m_ptr(0) { } +#endif + // It somewhat breaks the type system to allow transfer of ownership out of // a const PassOwnArrayPtr. However, it makes it much easier to work with PassOwnArrayPtr // temporaries, and we don't have a need to use real const PassOwnArrayPtrs anyway. diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h index 98eee7f..593bb42 100644 --- a/Source/JavaScriptCore/wtf/Platform.h +++ b/Source/JavaScriptCore/wtf/Platform.h @@ -349,7 +349,9 @@ #endif /* ARM */ - +#if CPU(ARM) || CPU(MIPS) +#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 +#endif /* ==== OS() - underlying operating system; only to be used for mandated low-level services like virtual memory, not to choose a GUI toolkit ==== */ @@ -399,7 +401,7 @@ #endif /* OS(FREEBSD) - FreeBSD */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) #define WTF_OS_FREEBSD 1 #endif @@ -532,29 +534,25 @@ #if PLATFORM(MAC) || PLATFORM(IOS) #define WTF_PLATFORM_CG 1 #endif -#if PLATFORM(MAC) && !PLATFORM(IOS) -#define WTF_PLATFORM_CI 1 -#endif #if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && PLATFORM(CG)) #define WTF_PLATFORM_CA 1 #endif -/* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */ +/* USE(SKIA) for Win/Linux, CG for Mac */ #if PLATFORM(CHROMIUM) #if OS(DARWIN) #define WTF_PLATFORM_CG 1 -#define WTF_PLATFORM_CI 1 #define WTF_USE_ATSUI 1 #define WTF_USE_CORE_TEXT 1 #define WTF_USE_ICCJPEG 1 #else -#define WTF_PLATFORM_SKIA 1 +#define WTF_USE_SKIA 1 #define WTF_USE_CHROMIUM_NET 1 #endif #endif #if PLATFORM(BREWMP) -#define WTF_PLATFORM_SKIA 1 +#define WTF_USE_SKIA 1 #endif #if PLATFORM(GTK) @@ -567,7 +565,7 @@ #define WTF_USE_MERSENNE_TWISTER_19937 1 #endif -#if (PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && OS(DARWIN) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS) +#if (PLATFORM(GTK) || PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && OS(DARWIN) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS) #define ENABLE_JSC_MULTIPLE_THREADS 1 #endif @@ -600,6 +598,10 @@ #define WTF_USE_ICU_UNICODE 1 #endif +#if !PLATFORM(CHROMIUM) /* Chromium controls this macro with a gyp define */ +#define WTF_USE_BUILTIN_UTF8_CODEC 1 +#endif + #if PLATFORM(MAC) && !PLATFORM(IOS) #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && CPU(X86_64) #define WTF_USE_PLUGIN_HOST_PROCESS 1 @@ -615,7 +617,7 @@ #if !defined(ENABLE_DASHBOARD_SUPPORT) #define ENABLE_DASHBOARD_SUPPORT 1 #endif -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #define WTF_USE_PTHREADS 1 #define HAVE_PTHREAD_RWLOCK 1 #define HAVE_READLINE 1 @@ -634,7 +636,7 @@ #endif #if PLATFORM(CHROMIUM) && OS(DARWIN) -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #define WTF_USE_PTHREADS 1 #define HAVE_PTHREAD_RWLOCK 1 #define WTF_USE_CARBON_SECURE_INPUT_MODE 1 @@ -645,7 +647,7 @@ #endif #if PLATFORM(QT) && OS(DARWIN) -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #endif #if OS(DARWIN) && !defined(BUILDING_ON_TIGER) && !PLATFORM(GTK) && !PLATFORM(QT) @@ -655,6 +657,7 @@ #if PLATFORM(IOS) #define ENABLE_CONTEXT_MENUS 0 #define ENABLE_DRAG_SUPPORT 0 +#define ENABLE_DATA_TRANSFER_ITEMS 0 #define ENABLE_FTPDIR 1 #define ENABLE_GEOLOCATION 1 #define ENABLE_ICONDATABASE 0 @@ -664,7 +667,7 @@ #define ENABLE_ORIENTATION_EVENTS 1 #define ENABLE_REPAINT_THROTTLING 1 #define HAVE_READLINE 1 -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #define WTF_USE_PTHREADS 1 #define HAVE_PTHREAD_RWLOCK 1 #define ENABLE_WEB_ARCHIVE 1 @@ -688,10 +691,19 @@ #endif #if PLATFORM(WIN) && !OS(WINCE) -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #define WTF_USE_PTHREADS 0 #endif +#if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !defined(WIN_CAIRO) +#define WTF_USE_CFNETWORK 1 +#endif + +#if USE(CFNETWORK) || PLATFORM(MAC) +#define WTF_USE_CFURLCACHE 1 +#define WTF_USE_CFURLSTORAGESESSIONS 1 +#endif + #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(CHROMIUM) && !PLATFORM(QT) #define ENABLE_WEB_ARCHIVE 1 #endif @@ -700,7 +712,7 @@ #define ENABLE_ASSEMBLER 1 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0 #if OS(DARWIN) -#define WTF_PLATFORM_CF 1 +#define WTF_USE_CF 1 #ifndef BUILDING_ON_TIGER #define WTF_USE_CORE_TEXT 1 #define ENABLE_WEB_ARCHIVE 1 @@ -891,6 +903,10 @@ #define ENABLE_DRAG_SUPPORT 1 #endif +#if !defined(ENABLE_DATA_TRANSFER_ITEMS) +#define ENABLE_DATA_TRANSFER_ITEMS 0 +#endif + #if !defined(ENABLE_DASHBOARD_SUPPORT) #define ENABLE_DASHBOARD_SUPPORT 0 #endif diff --git a/Source/JavaScriptCore/wtf/RandomNumber.cpp b/Source/JavaScriptCore/wtf/RandomNumber.cpp index 1574324..5b06243 100644 --- a/Source/JavaScriptCore/wtf/RandomNumber.cpp +++ b/Source/JavaScriptCore/wtf/RandomNumber.cpp @@ -27,6 +27,7 @@ #include "config.h" #include "RandomNumber.h" +#include "CryptographicallyRandomNumber.h" #include "RandomNumberSeed.h" #include <limits> @@ -52,6 +53,14 @@ namespace WTF { double randomNumber() { +#if USE(OS_RANDOMNESS) + uint32_t bits = cryptographicallyRandomNumber(); + return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0); +#else + // Without OS_RANDOMNESS, we fall back to other random number generators + // that might not be cryptographically secure. Ideally, most ports would + // define USE(OS_RANDOMNESS). + #if !ENABLE(JSC_MULTIPLE_THREADS) static bool s_initialized = false; if (!s_initialized) { @@ -59,46 +68,16 @@ double randomNumber() s_initialized = true; } #endif - -#if COMPILER(MSVC) && defined(_CRT_RAND_S) - uint32_t bits; - rand_s(&bits); - return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0); -#elif OS(DARWIN) - uint32_t bits = arc4random(); - return static_cast<double>(bits) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0); -#elif OS(UNIX) - uint32_t part1 = random() & (RAND_MAX - 1); - uint32_t part2 = random() & (RAND_MAX - 1); - // random only provides 31 bits - uint64_t fullRandom = part1; - fullRandom <<= 31; - fullRandom |= part2; - // Mask off the low 53bits - fullRandom &= (1LL << 53) - 1; - return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53); -#elif USE(MERSENNE_TWISTER_19937) +#if USE(MERSENNE_TWISTER_19937) return genrand_res53(); -#elif OS(WINDOWS) - uint32_t part1 = rand() & (RAND_MAX - 1); - uint32_t part2 = rand() & (RAND_MAX - 1); - uint32_t part3 = rand() & (RAND_MAX - 1); - uint32_t part4 = rand() & (RAND_MAX - 1); - // rand only provides 15 bits on Win32 - uint64_t fullRandom = part1; - fullRandom <<= 15; - fullRandom |= part2; - fullRandom <<= 15; - fullRandom |= part3; - fullRandom <<= 15; - fullRandom |= part4; - - // Mask off the low 53bits - fullRandom &= (1LL << 53) - 1; - return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53); #elif PLATFORM(BREWMP) uint32_t bits; + // Is this a cryptographically strong source of random numbers? If so, we + // should move this into OSRandomSource. + // http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp851.pdf + // is slightly unclear on this point, although it seems to imply that it is + // secure. RefPtr<ISource> randomSource = createRefPtrInstance<ISource>(AEECLSID_RANDOM); ISOURCE_Read(randomSource.get(), reinterpret_cast<char*>(&bits), 4); @@ -118,6 +97,7 @@ double randomNumber() fullRandom &= (1LL << 53) - 1; return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53); #endif +#endif } } diff --git a/Source/JavaScriptCore/wtf/RetainPtr.h b/Source/JavaScriptCore/wtf/RetainPtr.h index fa7c163..3a11589 100644 --- a/Source/JavaScriptCore/wtf/RetainPtr.h +++ b/Source/JavaScriptCore/wtf/RetainPtr.h @@ -25,7 +25,10 @@ #include "NullPtr.h" #include "TypeTraits.h" #include <algorithm> + +#if USE(CF) #include <CoreFoundation/CoreFoundation.h> +#endif #ifdef __OBJC__ #import <Foundation/Foundation.h> diff --git a/Source/JavaScriptCore/wtf/SHA1.cpp b/Source/JavaScriptCore/wtf/SHA1.cpp new file mode 100644 index 0000000..e76f6ac --- /dev/null +++ b/Source/JavaScriptCore/wtf/SHA1.cpp @@ -0,0 +1,219 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// A straightforward SHA-1 implementation based on RFC 3174. +// http://www.ietf.org/rfc/rfc3174.txt +// The names of functions and variables (such as "a", "b", and "f") follow notations in RFC 3174. + +#include "config.h" +#include "SHA1.h" + +#include "Assertions.h" +#ifndef NDEBUG +#include "StringExtras.h" +#include "text/CString.h" +#endif + +namespace WTF { + +#ifdef NDEBUG +static inline void testSHA1() { } +#else +static bool isTestSHA1Done; + +static void expectSHA1(CString input, int repeat, CString expected) +{ + SHA1 sha1; + for (int i = 0; i < repeat; ++i) + sha1.addBytes(reinterpret_cast<const uint8_t*>(input.data()), input.length()); + Vector<uint8_t, 20> digest; + sha1.computeHash(digest); + char* buffer = 0; + CString actual = CString::newUninitialized(40, buffer); + for (size_t i = 0; i < 20; ++i) { + snprintf(buffer, 3, "%02X", digest.at(i)); + buffer += 2; + } + ASSERT_WITH_MESSAGE(actual == expected, "input: %s, repeat: %d, actual: %s, expected: %s", input.data(), repeat, actual.data(), expected.data()); +} + +static void testSHA1() +{ + if (isTestSHA1Done) + return; + isTestSHA1Done = true; + + // Examples taken from sample code in RFC 3174. + expectSHA1("abc", 1, "A9993E364706816ABA3E25717850C26C9CD0D89D"); + expectSHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 1, "84983E441C3BD26EBAAE4AA1F95129E5E54670F1"); + expectSHA1("a", 1000000, "34AA973CD4C4DAA4F61EEB2BDBAD27316534016F"); + expectSHA1("0123456701234567012345670123456701234567012345670123456701234567", 10, "DEA356A2CDDD90C7A7ECEDC5EBB563934F460452"); +} +#endif + +static inline uint32_t f(int t, uint32_t b, uint32_t c, uint32_t d) +{ + ASSERT(t >= 0 && t < 80); + if (t < 20) + return (b & c) | ((~b) & d); + if (t < 40) + return b ^ c ^ d; + if (t < 60) + return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +static inline uint32_t k(int t) +{ + ASSERT(t >= 0 && t < 80); + if (t < 20) + return 0x5a827999; + if (t < 40) + return 0x6ed9eba1; + if (t < 60) + return 0x8f1bbcdc; + return 0xca62c1d6; +} + +static inline uint32_t rotateLeft(int n, uint32_t x) +{ + ASSERT(n >= 0 && n < 32); + return (x << n) | (x >> (32 - n)); +} + +SHA1::SHA1() +{ + // FIXME: Move unit tests somewhere outside the constructor. See bug 55853. + testSHA1(); + reset(); +} + +void SHA1::addBytes(const uint8_t* input, size_t length) +{ + while (length--) { + ASSERT(m_cursor < 64); + m_buffer[m_cursor++] = *input++; + ++m_totalBytes; + if (m_cursor == 64) + processBlock(); + } +} + +void SHA1::computeHash(Vector<uint8_t, 20>& digest) +{ + finalize(); + + digest.clear(); + digest.resize(20); + for (size_t i = 0; i < 5; ++i) { + // Treat hashValue as a big-endian value. + uint32_t hashValue = m_hash[i]; + for (int j = 0; j < 4; ++j) { + digest[4 * i + (3 - j)] = hashValue & 0xFF; + hashValue >>= 8; + } + } + + reset(); +} + +void SHA1::finalize() +{ + ASSERT(m_cursor < 64); + m_buffer[m_cursor++] = 0x80; + if (m_cursor > 56) { + // Pad out to next block. + while (m_cursor < 64) + m_buffer[m_cursor++] = 0x00; + processBlock(); + } + + for (size_t i = m_cursor; i < 56; ++i) + m_buffer[i] = 0x00; + + // Write the length as a big-endian 64-bit value. + uint64_t bits = m_totalBytes * 8; + for (int i = 0; i < 8; ++i) { + m_buffer[56 + (7 - i)] = bits & 0xFF; + bits >>= 8; + } + m_cursor = 64; + processBlock(); +} + +void SHA1::processBlock() +{ + ASSERT(m_cursor == 64); + + uint32_t w[80] = { 0 }; + for (int t = 0; t < 16; ++t) + w[t] = (m_buffer[t * 4] << 24) | (m_buffer[t * 4 + 1] << 16) | (m_buffer[t * 4 + 2] << 8) | m_buffer[t * 4 + 3]; + for (int t = 16; t < 80; ++t) + w[t] = rotateLeft(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]); + + uint32_t a = m_hash[0]; + uint32_t b = m_hash[1]; + uint32_t c = m_hash[2]; + uint32_t d = m_hash[3]; + uint32_t e = m_hash[4]; + + for (int t = 0; t < 80; ++t) { + uint32_t temp = rotateLeft(5, a) + f(t, b, c, d) + e + w[t] + k(t); + e = d; + d = c; + c = rotateLeft(30, b); + b = a; + a = temp; + } + + m_hash[0] += a; + m_hash[1] += b; + m_hash[2] += c; + m_hash[3] += d; + m_hash[4] += e; + + m_cursor = 0; +} + +void SHA1::reset() +{ + m_cursor = 0; + m_totalBytes = 0; + m_hash[0] = 0x67452301; + m_hash[1] = 0xefcdab89; + m_hash[2] = 0x98badcfe; + m_hash[3] = 0x10325476; + m_hash[4] = 0xc3d2e1f0; + + // Clear the buffer after use in case it's sensitive. + memset(m_buffer, 0, sizeof(m_buffer)); +} + +} // namespace WTF diff --git a/Source/JavaScriptCore/wtf/SHA1.h b/Source/JavaScriptCore/wtf/SHA1.h new file mode 100644 index 0000000..dad6dc8 --- /dev/null +++ b/Source/JavaScriptCore/wtf/SHA1.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WTF_SHA1_h +#define WTF_SHA1_h + +#include <wtf/Vector.h> + +namespace WTF { + +class SHA1 { +public: + SHA1(); + + void addBytes(const Vector<uint8_t>& input) + { + addBytes(input.data(), input.size()); + } + void addBytes(const uint8_t* input, size_t length); + + // computeHash has a side effect of resetting the state of the object. + void computeHash(Vector<uint8_t, 20>&); + +private: + void finalize(); + void processBlock(); + void reset(); + + uint8_t m_buffer[64]; + size_t m_cursor; // Number of bytes filled in m_buffer (0-64). + uint64_t m_totalBytes; // Number of bytes added so far. + uint32_t m_hash[5]; +}; + +} // namespace WTF + +using WTF::SHA1; + +#endif // WTF_SHA1_h diff --git a/Source/JavaScriptCore/wtf/SentinelLinkedList.h b/Source/JavaScriptCore/wtf/SentinelLinkedList.h new file mode 100644 index 0000000..610d2d2 --- /dev/null +++ b/Source/JavaScriptCore/wtf/SentinelLinkedList.h @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// A SentinelLinkedList is a linked list with dummy head and tail sentinels, +// which allow for branch-less insertion and removal, and removal without a +// pointer to the list. +// +// Requires: Node is a concrete class with: +// Node(SentinelTag); +// void setPrev(Node*); +// Node* prev(); +// void setNext(Node*); +// Node* next(); + +#ifndef SentinelLinkedList_h +#define SentinelLinkedList_h + +namespace WTF { + +enum SentinelTag { Sentinel }; + +template <typename Node> class SentinelLinkedList { +public: + typedef Node* iterator; + + SentinelLinkedList(); + + void push(Node*); + static void remove(Node*); + + iterator begin(); + iterator end(); + +private: + Node m_headSentinel; + Node m_tailSentinel; +}; + +template <typename Node> inline SentinelLinkedList<Node>::SentinelLinkedList() + : m_headSentinel(Sentinel) + , m_tailSentinel(Sentinel) +{ + m_headSentinel.setNext(&m_tailSentinel); + m_headSentinel.setPrev(0); + + m_tailSentinel.setPrev(&m_headSentinel); + m_tailSentinel.setNext(0); +} + +template <typename Node> inline typename SentinelLinkedList<Node>::iterator SentinelLinkedList<Node>::begin() +{ + return m_headSentinel.next(); +} + +template <typename Node> inline typename SentinelLinkedList<Node>::iterator SentinelLinkedList<Node>::end() +{ + return &m_tailSentinel; +} + +template <typename Node> inline void SentinelLinkedList<Node>::push(Node* node) +{ + ASSERT(node); + Node* prev = &m_headSentinel; + Node* next = m_headSentinel.next(); + + node->setPrev(prev); + node->setNext(next); + + prev->setNext(node); + next->setPrev(node); +} + +template <typename Node> inline void SentinelLinkedList<Node>::remove(Node* node) +{ + Node* prev = node->prev(); + Node* next = node->next(); + + prev->setNext(next); + next->setPrev(prev); +} + +} + +using WTF::SentinelLinkedList; + +#endif + diff --git a/Source/JavaScriptCore/wtf/SinglyLinkedList.h b/Source/JavaScriptCore/wtf/SinglyLinkedList.h new file mode 100644 index 0000000..c00bf36 --- /dev/null +++ b/Source/JavaScriptCore/wtf/SinglyLinkedList.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SinglyLinkedList_h +#define SinglyLinkedList_h + +namespace WTF { + +template <typename Node> class SinglyLinkedList { +public: + SinglyLinkedList(); + + bool isEmpty(); + + void push(Node*); + Node* pop(); + +private: + Node* m_head; +}; + +template <typename Node> inline SinglyLinkedList<Node>::SinglyLinkedList() + : m_head(0) +{ +} + +template <typename Node> inline bool SinglyLinkedList<Node>::isEmpty() +{ + return !m_head; +} + +template <typename Node> inline void SinglyLinkedList<Node>::push(Node* node) +{ + ASSERT(node); + node->setNext(m_head); + m_head = node; +} + +template <typename Node> inline Node* SinglyLinkedList<Node>::pop() +{ + Node* tmp = m_head; + m_head = m_head->next(); + return tmp; +} + +} + +using WTF::SinglyLinkedList; + +#endif diff --git a/Source/JavaScriptCore/wtf/ThreadingWin.cpp b/Source/JavaScriptCore/wtf/ThreadingWin.cpp index 4ca290f..c452205 100644 --- a/Source/JavaScriptCore/wtf/ThreadingWin.cpp +++ b/Source/JavaScriptCore/wtf/ThreadingWin.cpp @@ -332,6 +332,7 @@ bool PlatformCondition::timedWait(PlatformMutex& mutex, DWORD durationMillisecon res = ReleaseSemaphore(m_blockLock, 1, 0); ASSERT(res); + --mutex.m_recursionCount; LeaveCriticalSection(&mutex.m_internalMutex); // Main wait - use timeout. @@ -365,6 +366,7 @@ bool PlatformCondition::timedWait(PlatformMutex& mutex, DWORD durationMillisecon } EnterCriticalSection (&mutex.m_internalMutex); + ++mutex.m_recursionCount; return !timedOut; } diff --git a/Source/JavaScriptCore/wtf/Vector.h b/Source/JavaScriptCore/wtf/Vector.h index 6d8dd4c..2fb4114 100644 --- a/Source/JavaScriptCore/wtf/Vector.h +++ b/Source/JavaScriptCore/wtf/Vector.h @@ -282,6 +282,7 @@ namespace WTF { public: void allocateBuffer(size_t newCapacity) { + ASSERT(newCapacity); m_capacity = newCapacity; if (newCapacity > std::numeric_limits<size_t>::max() / sizeof(T)) CRASH(); @@ -290,6 +291,7 @@ namespace WTF { bool tryAllocateBuffer(size_t newCapacity) { + ASSERT(newCapacity); if (newCapacity > std::numeric_limits<size_t>::max() / sizeof(T)) return false; @@ -360,7 +362,10 @@ namespace WTF { VectorBuffer(size_t capacity) { - allocateBuffer(capacity); + // Calling malloc(0) might take a lock and may actually do an + // allocation on some systems (e.g. Brew). + if (capacity) + allocateBuffer(capacity); } ~VectorBuffer() @@ -392,6 +397,7 @@ namespace WTF { template<typename T, size_t inlineCapacity> class VectorBuffer : private VectorBufferBase<T> { + WTF_MAKE_NONCOPYABLE(VectorBuffer); private: typedef VectorBufferBase<T> Base; public: @@ -414,6 +420,7 @@ namespace WTF { void allocateBuffer(size_t newCapacity) { + // FIXME: This should ASSERT(!m_buffer) to catch misuse/leaks. if (newCapacity > inlineCapacity) Base::allocateBuffer(newCapacity); else { diff --git a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp index 8dcfb9e..7c51ee1 100644 --- a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp +++ b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp @@ -61,11 +61,6 @@ template <> void freeOwnedGPtr<GDir>(GDir* ptr) g_dir_close(ptr); } -template <> void freeOwnedGPtr<GFile>(GFile* ptr) -{ - if (ptr) - g_object_unref(ptr); -} } // namespace WTF #endif // ENABLE(GLIB_SUPPORT) diff --git a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h index 4136f28..8c7e837 100644 --- a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h +++ b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h @@ -39,7 +39,6 @@ template<> void freeOwnedGPtr<GCond>(GCond*); template<> void freeOwnedGPtr<GMutex>(GMutex*); template<> void freeOwnedGPtr<GPatternSpec>(GPatternSpec*); template<> void freeOwnedGPtr<GDir>(GDir*); -template<> void freeOwnedGPtr<GFile>(GFile*); template <typename T> class GOwnPtr { WTF_MAKE_NONCOPYABLE(GOwnPtr); diff --git a/Source/JavaScriptCore/wtf/text/AtomicString.h b/Source/JavaScriptCore/wtf/text/AtomicString.h index ab5b366..45a71e7 100644 --- a/Source/JavaScriptCore/wtf/text/AtomicString.h +++ b/Source/JavaScriptCore/wtf/text/AtomicString.h @@ -95,7 +95,7 @@ public: static void remove(StringImpl*); -#if PLATFORM(CF) +#if USE(CF) AtomicString(CFStringRef s) : m_string(add(String(s).impl())) { } CFStringRef createCFString() const { return m_string.createCFString(); } #endif diff --git a/Source/JavaScriptCore/wtf/text/StringImpl.cpp b/Source/JavaScriptCore/wtf/text/StringImpl.cpp index c83ec42..9afd1d2 100644 --- a/Source/JavaScriptCore/wtf/text/StringImpl.cpp +++ b/Source/JavaScriptCore/wtf/text/StringImpl.cpp @@ -458,14 +458,14 @@ intptr_t StringImpl::toIntPtr(bool* ok) return charactersToIntPtr(m_data, m_length, ok); } -double StringImpl::toDouble(bool* ok) +double StringImpl::toDouble(bool* ok, bool* didReadNumber) { - return charactersToDouble(m_data, m_length, ok); + return charactersToDouble(m_data, m_length, ok, didReadNumber); } -float StringImpl::toFloat(bool* ok) +float StringImpl::toFloat(bool* ok, bool* didReadNumber) { - return charactersToFloat(m_data, m_length, ok); + return charactersToFloat(m_data, m_length, ok, didReadNumber); } static bool equal(const UChar* a, const char* b, int length) @@ -1005,15 +1005,23 @@ bool equalIgnoringNullity(StringImpl* a, StringImpl* b) return false; } -WTF::Unicode::Direction StringImpl::defaultWritingDirection() +WTF::Unicode::Direction StringImpl::defaultWritingDirection(bool* hasStrongDirectionality) { for (unsigned i = 0; i < m_length; ++i) { WTF::Unicode::Direction charDirection = WTF::Unicode::direction(m_data[i]); - if (charDirection == WTF::Unicode::LeftToRight) + if (charDirection == WTF::Unicode::LeftToRight) { + if (hasStrongDirectionality) + *hasStrongDirectionality = true; return WTF::Unicode::LeftToRight; - if (charDirection == WTF::Unicode::RightToLeft || charDirection == WTF::Unicode::RightToLeftArabic) + } + if (charDirection == WTF::Unicode::RightToLeft || charDirection == WTF::Unicode::RightToLeftArabic) { + if (hasStrongDirectionality) + *hasStrongDirectionality = true; return WTF::Unicode::RightToLeft; + } } + if (hasStrongDirectionality) + *hasStrongDirectionality = false; return WTF::Unicode::LeftToRight; } diff --git a/Source/JavaScriptCore/wtf/text/StringImpl.h b/Source/JavaScriptCore/wtf/text/StringImpl.h index 25411e1..a08427b 100644 --- a/Source/JavaScriptCore/wtf/text/StringImpl.h +++ b/Source/JavaScriptCore/wtf/text/StringImpl.h @@ -34,7 +34,7 @@ #include <wtf/text/StringImplBase.h> #include <wtf/unicode/Unicode.h> -#if PLATFORM(CF) +#if USE(CF) typedef const struct __CFString * CFStringRef; #endif @@ -281,8 +281,8 @@ public: uint64_t toUInt64(bool* ok = 0); // ignores trailing garbage intptr_t toIntPtr(bool* ok = 0); // ignores trailing garbage - double toDouble(bool* ok = 0); - float toFloat(bool* ok = 0); + double toDouble(bool* ok = 0, bool* didReadNumber = 0); + float toFloat(bool* ok = 0, bool* didReadNumber = 0); PassRefPtr<StringImpl> lower(); PassRefPtr<StringImpl> upper(); @@ -316,9 +316,9 @@ public: PassRefPtr<StringImpl> replace(StringImpl*, StringImpl*); PassRefPtr<StringImpl> replace(unsigned index, unsigned len, StringImpl*); - WTF::Unicode::Direction defaultWritingDirection(); + WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0); -#if PLATFORM(CF) +#if USE(CF) CFStringRef createCFString(); #endif #ifdef __OBJC__ diff --git a/Source/JavaScriptCore/wtf/text/TextPosition.h b/Source/JavaScriptCore/wtf/text/TextPosition.h index 9f426ea..bb3ffa4 100644 --- a/Source/JavaScriptCore/wtf/text/TextPosition.h +++ b/Source/JavaScriptCore/wtf/text/TextPosition.h @@ -89,7 +89,7 @@ public: ZeroBasedNumber() {} int zeroBasedInt() const { return m_value; } - + int convertAsOneBasedInt() const { return m_value + 1; } OneBasedNumber convertToOneBased() const; bool operator==(ZeroBasedNumber other) { return m_value == other.m_value; } diff --git a/Source/JavaScriptCore/wtf/text/WTFString.cpp b/Source/JavaScriptCore/wtf/text/WTFString.cpp index b9b4e74..d862f96 100644 --- a/Source/JavaScriptCore/wtf/text/WTFString.cpp +++ b/Source/JavaScriptCore/wtf/text/WTFString.cpp @@ -561,24 +561,28 @@ intptr_t String::toIntPtr(bool* ok) const return m_impl->toIntPtr(ok); } -double String::toDouble(bool* ok) const +double String::toDouble(bool* ok, bool* didReadNumber) const { if (!m_impl) { if (ok) *ok = false; + if (didReadNumber) + *didReadNumber = false; return 0.0; } - return m_impl->toDouble(ok); + return m_impl->toDouble(ok, didReadNumber); } -float String::toFloat(bool* ok) const +float String::toFloat(bool* ok, bool* didReadNumber) const { if (!m_impl) { if (ok) *ok = false; + if (didReadNumber) + *didReadNumber = false; return 0.0f; } - return m_impl->toFloat(ok); + return m_impl->toFloat(ok, didReadNumber); } String String::threadsafeCopy() const @@ -937,11 +941,13 @@ intptr_t charactersToIntPtr(const UChar* data, size_t length, bool* ok) return toIntegralType<intptr_t>(data, lengthOfCharactersAsInteger(data, length), ok, 10); } -double charactersToDouble(const UChar* data, size_t length, bool* ok) +double charactersToDouble(const UChar* data, size_t length, bool* ok, bool* didReadNumber) { if (!length) { if (ok) *ok = false; + if (didReadNumber) + *didReadNumber = false; return 0.0; } @@ -949,17 +955,20 @@ double charactersToDouble(const UChar* data, size_t length, bool* ok) for (unsigned i = 0; i < length; ++i) bytes[i] = data[i] < 0x7F ? data[i] : '?'; bytes[length] = '\0'; + char* start = bytes.data(); char* end; - double val = WTF::strtod(bytes.data(), &end); + double val = WTF::strtod(start, &end); if (ok) *ok = (end == 0 || *end == '\0'); + if (didReadNumber) + *didReadNumber = end - start; return val; } -float charactersToFloat(const UChar* data, size_t length, bool* ok) +float charactersToFloat(const UChar* data, size_t length, bool* ok, bool* didReadNumber) { // FIXME: This will return ok even when the string fits into a double but not a float. - return static_cast<float>(charactersToDouble(data, length, ok)); + return static_cast<float>(charactersToDouble(data, length, ok, didReadNumber)); } } // namespace WTF diff --git a/Source/JavaScriptCore/wtf/text/WTFString.h b/Source/JavaScriptCore/wtf/text/WTFString.h index 0aee2ef..713a6c3 100644 --- a/Source/JavaScriptCore/wtf/text/WTFString.h +++ b/Source/JavaScriptCore/wtf/text/WTFString.h @@ -31,7 +31,7 @@ #include <objc/objc.h> #endif -#if PLATFORM(CF) +#if USE(CF) typedef const struct __CFString * CFStringRef; #endif @@ -79,8 +79,8 @@ int64_t charactersToInt64(const UChar*, size_t, bool* ok = 0); // ignores traili uint64_t charactersToUInt64(const UChar*, size_t, bool* ok = 0); // ignores trailing garbage intptr_t charactersToIntPtr(const UChar*, size_t, bool* ok = 0); // ignores trailing garbage -double charactersToDouble(const UChar*, size_t, bool* ok = 0); -float charactersToFloat(const UChar*, size_t, bool* ok = 0); +double charactersToDouble(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0); +float charactersToFloat(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0); template<bool isSpecialCharacter(UChar)> bool isAllSpecialCharacters(const UChar*, size_t); @@ -92,6 +92,11 @@ public: // Construct a string with UTF-16 data. String(const UChar* characters, unsigned length); + // Construct a string by copying the contents of a vector. To avoid + // copying, consider using String::adopt instead. + template<size_t inlineCapacity> + explicit String(const Vector<UChar, inlineCapacity>&); + // Construct a string with UTF-16 data, from a null-terminated source. String(const UChar*); @@ -264,8 +269,8 @@ public: int64_t toInt64(bool* ok = 0) const; uint64_t toUInt64(bool* ok = 0) const; intptr_t toIntPtr(bool* ok = 0) const; - double toDouble(bool* ok = 0) const; - float toFloat(bool* ok = 0) const; + double toDouble(bool* ok = 0, bool* didReadNumber = 0) const; + float toFloat(bool* ok = 0, bool* didReadNumber = 0) const; bool percentage(int& percentage) const; @@ -284,7 +289,7 @@ public: operator UnspecifiedBoolTypeA() const; operator UnspecifiedBoolTypeB() const; -#if PLATFORM(CF) +#if USE(CF) String(CFStringRef); CFStringRef createCFString() const; #endif @@ -326,7 +331,14 @@ public: static String fromUTF8WithLatin1Fallback(const char*, size_t); // Determines the writing direction using the Unicode Bidi Algorithm rules P2 and P3. - WTF::Unicode::Direction defaultWritingDirection() const { return m_impl ? m_impl->defaultWritingDirection() : WTF::Unicode::LeftToRight; } + WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0) const + { + if (m_impl) + return m_impl->defaultWritingDirection(hasStrongDirectionality); + if (hasStrongDirectionality) + *hasStrongDirectionality = false; + return WTF::Unicode::LeftToRight; + } bool containsOnlyASCII() const { return charactersAreAllASCII(characters(), length()); } bool containsOnlyLatin1() const { return charactersAreAllLatin1(characters(), length()); } @@ -378,6 +390,12 @@ inline void swap(String& a, String& b) { a.swap(b); } // Definitions of string operations +template<size_t inlineCapacity> +String::String(const Vector<UChar, inlineCapacity>& vector) + : m_impl(vector.size() ? StringImpl::create(vector.data(), vector.size()) : 0) +{ +} + #ifdef __OBJC__ // This is for situations in WebKit where the long standing behavior has been // "nil if empty", so we try to maintain longstanding behavior for the sake of diff --git a/Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp b/Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp index 805b114..ca27ba2 100644 --- a/Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp +++ b/Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp @@ -59,7 +59,7 @@ Collator::Collator(const char* locale) PassOwnPtr<Collator> Collator::userDefault() { -#if OS(DARWIN) && PLATFORM(CF) +#if OS(DARWIN) && USE(CF) // Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work. #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !OS(IOS) RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent()); diff --git a/Source/JavaScriptCore/wtf/wtf.pri b/Source/JavaScriptCore/wtf/wtf.pri index 3be3b5f..5f15eb0 100644 --- a/Source/JavaScriptCore/wtf/wtf.pri +++ b/Source/JavaScriptCore/wtf/wtf.pri @@ -23,6 +23,7 @@ SOURCES += \ wtf/PageBlock.cpp \ wtf/RandomNumber.cpp \ wtf/RefCountedLeakCounter.cpp \ + wtf/SHA1.cpp \ wtf/StackBounds.cpp \ wtf/TCSystemAlloc.cpp \ wtf/ThreadingNone.cpp \ diff --git a/Source/JavaScriptCore/wtf/wx/StringWx.cpp b/Source/JavaScriptCore/wtf/wx/StringWx.cpp index fe0fd89..d5f6c57 100644 --- a/Source/JavaScriptCore/wtf/wx/StringWx.cpp +++ b/Source/JavaScriptCore/wtf/wx/StringWx.cpp @@ -25,12 +25,15 @@ #include "config.h" -#include <wtf/text/CString.h> -#include <wtf/text/WTFString.h> - +// The wx headers must come first in this case, because the wtf/text headers +// import windows.h, and we need to allow the wx headers to set its configuration +// first. #include <wx/defs.h> #include <wx/string.h> +#include <wtf/text/CString.h> +#include <wtf/text/WTFString.h> + namespace WTF { String::String(const wxString& wxstr) @@ -39,9 +42,10 @@ String::String(const wxString& wxstr) #error "This code only works in Unicode build of wxWidgets" #endif -#if SIZEOF_WCHAR_T == U_SIZEOF_UCHAR +#if SIZEOF_WCHAR_T == 2 - m_impl = StringImpl::create(wxstr.wc_str(), wxstr.length()); + const UChar* str = wxstr.wc_str(); + const size_t len = wxstr.length(); #else // SIZEOF_WCHAR_T == 4 @@ -58,13 +62,18 @@ String::String(const wxString& wxstr) #endif size_t wideLength = wxstr.length(); - UChar* data; wxMBConvUTF16 conv; - unsigned utf16Length = conv.FromWChar(0, 0, wideString, wideLength); - m_impl = StringImpl::createUninitialized(utf16Length, data); - conv.FromWChar((char*)data, utf16Length, wideString, wideLength); -#endif // SIZEOF_WCHAR_T == 4 + const size_t utf16bufLen = conv.FromWChar(0, 0, wideString, wideLength); + wxCharBuffer utf16buf(utf16bufLen); + + const UChar* str = (const UChar*)utf16buf.data(); + size_t len = conv.FromWChar(utf16buf.data(), utf16bufLen, wideString, wideLength) / 2; + +#endif // SIZEOF_WCHAR_T == 2 + + m_impl = StringImpl::create(str, len); + } String::operator wxString() const diff --git a/Source/JavaScriptCore/yarr/YarrPattern.cpp b/Source/JavaScriptCore/yarr/YarrPattern.cpp index 3d6dbd3..5913f7e 100644 --- a/Source/JavaScriptCore/yarr/YarrPattern.cpp +++ b/Source/JavaScriptCore/yarr/YarrPattern.cpp @@ -495,7 +495,9 @@ public: for (unsigned i = 0; i < numParenAlternatives; i++) { if (!parenthesesDisjunction->m_alternatives[i]->m_terms.size() && numParenAlternatives > 1) { + PatternAlternative* altToRemove = parenthesesDisjunction->m_alternatives[i]; parenthesesDisjunction->m_alternatives.remove(i); + delete altToRemove; --numParenAlternatives; containsEmptyAlternative = true; @@ -812,20 +814,6 @@ public: } } - bool addBeginTerm(PatternTerm term, Vector<TermChain>* beginTerms, PatternAlternative* alternative, unsigned numTerms, unsigned termIndex, unsigned depth) - { - if (term.quantityType == QuantifierFixedCount) { - beginTerms->append(TermChain(term)); - if (depth < 2 && termIndex < numTerms - 1 && term.quantityCount == 1) - setupAlternativeBeginTerms(alternative, &beginTerms->last().hotTerms, termIndex + 1, depth + 1); - } else if (termIndex != numTerms - 1) { - beginTerms->append(TermChain(term)); - return true; - } - - return false; - } - // This function collects the terms which are potentially matching the first number of depth characters in the result. // If this function returns false then it found at least one term which makes the beginning character // look-up optimization inefficient. @@ -861,10 +849,17 @@ public: return false; case PatternTerm::TypePatternCharacter: - if (addBeginTerm(term, beginTerms, alternative, numTerms, termIndex, depth)) { + if (termIndex != numTerms - 1) { + beginTerms->append(TermChain(term)); termIndex++; checkNext = true; + } else if (term.quantityType == QuantifierFixedCount) { + beginTerms->append(TermChain(term)); + if (depth < 2 && termIndex < numTerms - 1 && term.quantityCount == 1) + if (!setupAlternativeBeginTerms(alternative, &beginTerms->last().hotTerms, termIndex + 1, depth + 1)) + return false; } + break; case PatternTerm::TypeCharacterClass: @@ -881,7 +876,6 @@ public: termIndex++; checkNext = true; - } if (!setupDisjunctionBeginTerms(term.parentheses.disjunction, beginTerms, depth)) |