From: Apple Date: Mon, 26 Jul 2010 21:27:40 +0000 (+0000) Subject: JavaScriptCore-576.tar.gz X-Git-Tag: ios-40^0 X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/commitdiff_plain/f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63 JavaScriptCore-576.tar.gz --- diff --git a/API/APICast.h b/API/APICast.h index b6d1532..4284c44 100644 --- a/API/APICast.h +++ b/API/APICast.h @@ -27,6 +27,7 @@ #define APICast_h #include "JSAPIValueWrapper.h" +#include "JSGlobalObject.h" #include "JSValue.h" #include #include @@ -50,16 +51,20 @@ typedef struct OpaqueJSValue* JSObjectRef; inline JSC::ExecState* toJS(JSContextRef c) { + ASSERT(c); return reinterpret_cast(const_cast(c)); } inline JSC::ExecState* toJS(JSGlobalContextRef c) { + ASSERT(c); return reinterpret_cast(c); } -inline JSC::JSValue toJS(JSC::ExecState*, JSValueRef v) +inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v) { + ASSERT_UNUSED(exec, exec); + ASSERT(v); #if USE(JSVALUE32_64) JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); if (!jsCell) @@ -72,6 +77,20 @@ inline JSC::JSValue toJS(JSC::ExecState*, JSValueRef v) #endif } +inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v) +{ + ASSERT_UNUSED(exec, exec); + ASSERT(v); +#if USE(JSVALUE32_64) + JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); + if (!jsCell) + return JSC::JSValue(); + return jsCell; +#else + return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); +#endif +} + inline JSC::JSObject* toJS(JSObjectRef o) { return reinterpret_cast(o); @@ -118,6 +137,7 @@ inline JSContextRef toRef(JSC::ExecState* e) inline JSGlobalContextRef toGlobalRef(JSC::ExecState* e) { + ASSERT(e == e->lexicalGlobalObject()->globalExec()); return reinterpret_cast(e); } diff --git a/API/APIShims.h b/API/APIShims.h new file mode 100644 index 0000000..d7276ec --- /dev/null +++ b/API/APIShims.h @@ -0,0 +1,99 @@ +/* + * 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 COMPUTER, 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 COMPUTER, 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 APIShims_h +#define APIShims_h + +#include "CallFrame.h" +#include "JSLock.h" + +namespace JSC { + +class APIEntryShimWithoutLock { +protected: + APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread) + : m_globalData(globalData) + , m_entryIdentifierTable(setCurrentIdentifierTable(globalData->identifierTable)) + { + if (registerThread) + globalData->heap.registerThread(); + m_globalData->timeoutChecker.start(); + } + + ~APIEntryShimWithoutLock() + { + m_globalData->timeoutChecker.stop(); + setCurrentIdentifierTable(m_entryIdentifierTable); + } + +private: + JSGlobalData* m_globalData; + IdentifierTable* m_entryIdentifierTable; +}; + +class APIEntryShim : public APIEntryShimWithoutLock { +public: + // Normal API entry + APIEntryShim(ExecState* exec, bool registerThread = true) + : APIEntryShimWithoutLock(&exec->globalData(), registerThread) + , m_lock(exec) + { + } + + // JSPropertyNameAccumulator only has a globalData. + APIEntryShim(JSGlobalData* globalData, bool registerThread = true) + : APIEntryShimWithoutLock(globalData, registerThread) + , m_lock(globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly) + { + } + +private: + JSLock m_lock; +}; + +class APICallbackShim { +public: + APICallbackShim(ExecState* exec) + : m_dropAllLocks(exec) + , m_globalData(&exec->globalData()) + { + resetCurrentIdentifierTable(); + m_globalData->timeoutChecker.start(); + } + + ~APICallbackShim() + { + m_globalData->timeoutChecker.stop(); + setCurrentIdentifierTable(m_globalData->identifierTable); + } + +private: + JSLock::DropAllLocks m_dropAllLocks; + JSGlobalData* m_globalData; +}; + +} + +#endif diff --git a/API/JSBase.cpp b/API/JSBase.cpp index fc3d0fe..ebfeafa 100644 --- a/API/JSBase.cpp +++ b/API/JSBase.cpp @@ -28,6 +28,7 @@ #include "JSBasePrivate.h" #include "APICast.h" +#include "APIShims.h" #include "Completion.h" #include "OpaqueJSString.h" #include "SourceCode.h" @@ -43,8 +44,7 @@ using namespace JSC; JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsThisObject = toJS(thisObject); @@ -69,8 +69,7 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); SourceCode source = makeSource(script->ustring(), sourceURL->ustring(), startingLineNumber); Completion completion = checkSyntax(exec->dynamicGlobalObject()->globalExec(), source); @@ -94,12 +93,11 @@ void JSGarbageCollect(JSContextRef ctx) return; ExecState* exec = toJS(ctx); - JSGlobalData& globalData = exec->globalData(); - - JSLock lock(globalData.isSharedInstance); + APIEntryShim entryShim(exec, false); + JSGlobalData& globalData = exec->globalData(); if (!globalData.heap.isBusy()) - globalData.heap.collect(); + globalData.heap.collectAllGarbage(); // FIXME: Perhaps we should trigger a second mark and sweep // once the garbage collector is done if this is called when @@ -109,8 +107,6 @@ void JSGarbageCollect(JSContextRef ctx) void JSReportExtraMemoryCost(JSContextRef ctx, size_t size) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); - + APIEntryShim entryShim(exec); exec->globalData().heap.reportExtraMemoryCost(size); } diff --git a/API/JSBase.h b/API/JSBase.h index 9f3d88e..2e16720 100644 --- a/API/JSBase.h +++ b/API/JSBase.h @@ -65,27 +65,15 @@ typedef struct OpaqueJSValue* JSObjectRef; /* JavaScript symbol exports */ #undef JS_EXPORT -#if defined(BUILDING_WX__) +#if defined(JS_NO_EXPORT) #define JS_EXPORT -#elif defined(__GNUC__) +#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) #define JS_EXPORT __attribute__((visibility("default"))) -#elif defined(_WIN32_WCE) - #if defined(JS_BUILDING_JS) - #define JS_EXPORT __declspec(dllexport) - #elif defined(JS_IMPORT_JS) - #define JS_EXPORT __declspec(dllimport) - #else - #define JS_EXPORT - #endif -#elif defined(WIN32) || defined(_WIN32) - /* - * TODO: Export symbols with JS_EXPORT when using MSVC. - * See http://bugs.webkit.org/show_bug.cgi?id=16227 - */ +#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) - #define JS_EXPORT __declspec(dllexport) + #define JS_EXPORT __declspec(dllexport) #else - #define JS_EXPORT __declspec(dllimport) + #define JS_EXPORT __declspec(dllimport) #endif #else #define JS_EXPORT diff --git a/API/JSCallbackConstructor.cpp b/API/JSCallbackConstructor.cpp index 64c83cb..9c5f6d7 100644 --- a/API/JSCallbackConstructor.cpp +++ b/API/JSCallbackConstructor.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "JSCallbackConstructor.h" +#include "APIShims.h" #include "APICast.h" #include #include @@ -36,7 +37,7 @@ namespace JSC { const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 }; -JSCallbackConstructor::JSCallbackConstructor(PassRefPtr structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) +JSCallbackConstructor::JSCallbackConstructor(NonNullPassRefPtr structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) : JSObject(structure) , m_class(jsClass) , m_callback(callback) @@ -66,7 +67,7 @@ static JSObject* constructJSCallback(ExecState* exec, JSObject* constructor, con JSValueRef exception = 0; JSObjectRef result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = callback(ctx, constructorRef, argumentCount, arguments.data(), &exception); } if (exception) diff --git a/API/JSCallbackConstructor.h b/API/JSCallbackConstructor.h index 1f06249..e529947 100644 --- a/API/JSCallbackConstructor.h +++ b/API/JSCallbackConstructor.h @@ -33,7 +33,7 @@ namespace JSC { class JSCallbackConstructor : public JSObject { public: - JSCallbackConstructor(PassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); + JSCallbackConstructor(NonNullPassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); virtual ~JSCallbackConstructor(); JSClassRef classRef() const { return m_class; } JSObjectCallAsConstructorCallback callback() const { return m_callback; } @@ -41,9 +41,12 @@ public: static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } +protected: + static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; + private: virtual ConstructType getConstructData(ConstructData&); virtual const ClassInfo* classInfo() const { return &info; } diff --git a/API/JSCallbackFunction.cpp b/API/JSCallbackFunction.cpp index 1b3217b..0e434d9 100644 --- a/API/JSCallbackFunction.cpp +++ b/API/JSCallbackFunction.cpp @@ -27,7 +27,9 @@ #include #include "JSCallbackFunction.h" +#include "APIShims.h" #include "APICast.h" +#include "CodeBlock.h" #include "JSFunction.h" #include "FunctionPrototype.h" #include @@ -60,7 +62,7 @@ JSValue JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSVa JSValueRef exception = 0; JSValueRef result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = static_cast(functionObject)->m_callback(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception); } if (exception) diff --git a/API/JSCallbackFunction.h b/API/JSCallbackFunction.h index 7dd87b5..10dae6b 100644 --- a/API/JSCallbackFunction.h +++ b/API/JSCallbackFunction.h @@ -41,7 +41,7 @@ public: // refactor the code so this override isn't necessary static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } private: diff --git a/API/JSCallbackObject.h b/API/JSCallbackObject.h index 9d22ad9..adb5b60 100644 --- a/API/JSCallbackObject.h +++ b/API/JSCallbackObject.h @@ -36,7 +36,7 @@ namespace JSC { template class JSCallbackObject : public Base { public: - JSCallbackObject(ExecState*, PassRefPtr, JSClassRef, void* data); + JSCallbackObject(ExecState*, NonNullPassRefPtr, JSClassRef, void* data); JSCallbackObject(JSClassRef); virtual ~JSCallbackObject(); @@ -50,14 +50,18 @@ public: static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount); } +protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | Base::StructureFlags; + private: virtual UString className() const; virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); @@ -66,7 +70,7 @@ private: virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto); - virtual void getPropertyNames(ExecState*, PropertyNameArray&); + virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); virtual double toNumber(ExecState*) const; virtual UString toString(ExecState*) const; diff --git a/API/JSCallbackObjectFunctions.h b/API/JSCallbackObjectFunctions.h index 1abed3f..4b28a99 100644 --- a/API/JSCallbackObjectFunctions.h +++ b/API/JSCallbackObjectFunctions.h @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "APIShims.h" #include "APICast.h" #include "Error.h" #include "JSCallbackFunction.h" @@ -47,7 +48,7 @@ inline JSCallbackObject* JSCallbackObject::asCallbackObject(JSValue } template -JSCallbackObject::JSCallbackObject(ExecState* exec, PassRefPtr structure, JSClassRef jsClass, void* data) +JSCallbackObject::JSCallbackObject(ExecState* exec, NonNullPassRefPtr structure, JSClassRef jsClass, void* data) : Base(structure) , m_callbackObjectData(new JSCallbackObjectData(data, jsClass)) { @@ -79,7 +80,7 @@ void JSCallbackObject::init(ExecState* exec) // initialize from base to derived for (int i = static_cast(initRoutines.size()) - 1; i >= 0; i--) { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); JSObjectInitializeCallback initialize = initRoutines[i]; initialize(toRef(exec), toRef(this)); } @@ -117,7 +118,7 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, const Identifie if (JSObjectHasPropertyCallback hasProperty = jsClass->hasProperty) { if (!propertyNameRef) propertyNameRef = OpaqueJSString::create(propertyName.ustring()); - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); if (hasProperty(ctx, thisRef, propertyNameRef.get())) { slot.setCustom(this, callbackGetter); return true; @@ -128,18 +129,18 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, const Identifie JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); - if (value) { - slot.setValue(toJS(exec, value)); - return true; - } if (exception) { + exec->setException(toJS(exec, exception)); slot.setValue(jsUndefined()); return true; } + if (value) { + slot.setValue(toJS(exec, value)); + return true; + } } if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { @@ -166,6 +167,25 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, unsigned proper return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); } +template +bool JSCallbackObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + PropertySlot slot; + if (getOwnPropertySlot(exec, propertyName, slot)) { + // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. + JSValue value = slot.getValue(exec, propertyName); + if (!exec->hadException()) + descriptor.setValue(value); + // We don't know whether the property is configurable, but assume it is. + descriptor.setConfigurable(true); + // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't. + descriptor.setEnumerable(false); + return true; + } + + return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor); +} + template void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { @@ -181,10 +201,11 @@ void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return; } @@ -199,10 +220,11 @@ void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return; } else @@ -237,10 +259,11 @@ bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& p JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return true; } @@ -298,10 +321,11 @@ JSObject* JSCallbackObject::construct(ExecState* exec, JSObject* construct JSValueRef exception = 0; JSObject* result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception)); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -322,10 +346,11 @@ bool JSCallbackObject::hasInstance(ExecState* exec, JSValue value, JSValue JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = hasInstance(execRef, thisRef, valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -360,10 +385,11 @@ JSValue JSCallbackObject::call(ExecState* exec, JSObject* functionObject, JSValueRef exception = 0; JSValue result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception)); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -373,14 +399,14 @@ JSValue JSCallbackObject::call(ExecState* exec, JSObject* functionObject, } template -void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { JSContextRef execRef = toRef(exec); JSObjectRef thisRef = toRef(this); for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); getPropertyNames(execRef, thisRef, toRef(&propertyNames)); } @@ -390,7 +416,7 @@ void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray for (iterator it = staticValues->begin(); it != end; ++it) { UString::Rep* name = it->first.get(); StaticValueEntry* entry = it->second; - if (entry->getProperty && !(entry->attributes & kJSPropertyAttributeDontEnum)) + if (entry->getProperty && (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties))) propertyNames.add(Identifier(exec, name)); } } @@ -401,13 +427,13 @@ void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray for (iterator it = staticFunctions->begin(); it != end; ++it) { UString::Rep* name = it->first.get(); StaticFunctionEntry* entry = it->second; - if (!(entry->attributes & kJSPropertyAttributeDontEnum)) + if (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties)) propertyNames.add(Identifier(exec, name)); } } } - Base::getPropertyNames(exec, propertyNames); + Base::getOwnPropertyNames(exec, propertyNames, mode); } template @@ -426,7 +452,7 @@ double JSCallbackObject::toNumber(ExecState* exec) const JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = convertToType(ctx, thisRef, kJSTypeNumber, &exception); } if (exception) { @@ -435,7 +461,8 @@ double JSCallbackObject::toNumber(ExecState* exec) const } double dValue; - return toJS(exec, value).getNumber(dValue) ? dValue : NaN; + if (value) + return toJS(exec, value).getNumber(dValue) ? dValue : NaN; } return Base::toNumber(exec); @@ -452,14 +479,15 @@ UString JSCallbackObject::toString(ExecState* exec) const JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = convertToType(ctx, thisRef, kJSTypeString, &exception); } if (exception) { exec->setException(toJS(exec, exception)); return ""; } - return toJS(exec, value).getString(); + if (value) + return toJS(exec, value).getString(exec); } return Base::toString(exec); @@ -504,16 +532,17 @@ JSValue JSCallbackObject::staticValueGetter(ExecState* exec, const Identif JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) { + exec->setException(toJS(exec, exception)); + return jsUndefined(); + } if (value) return toJS(exec, value); - if (exception) - return jsUndefined(); } - + return throwError(exec, ReferenceError, "Static value property defined with NULL getProperty callback."); } @@ -557,14 +586,15 @@ JSValue JSCallbackObject::callbackGetter(ExecState* exec, const Identifier JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) { + exec->setException(toJS(exec, exception)); + return jsUndefined(); + } if (value) return toJS(exec, value); - if (exception) - return jsUndefined(); } return throwError(exec, ReferenceError, "hasProperty callback returned true for a property that doesn't exist."); diff --git a/API/JSClassRef.cpp b/API/JSClassRef.cpp index afde7ce..d75d5cd 100644 --- a/API/JSClassRef.cpp +++ b/API/JSClassRef.cpp @@ -34,6 +34,7 @@ #include #include +using namespace std; using namespace JSC; const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -52,7 +53,7 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* , callAsConstructor(definition->callAsConstructor) , hasInstance(definition->hasInstance) , convertToType(definition->convertToType) - , m_className(UString::Rep::createFromUTF8(definition->className)) + , m_className(UString::createFromUTF8(definition->className).rep()->ref()) , m_staticValues(0) , m_staticFunctions(0) { @@ -61,8 +62,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticValue* staticValue = definition->staticValues) { m_staticValues = new OpaqueJSClassStaticValuesTable(); while (staticValue->name) { - m_staticValues->add(UString::Rep::createFromUTF8(staticValue->name), - new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes)); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); + m_staticValues->add(UString::createFromUTF8(staticValue->name).rep()->ref(), entry); ++staticValue; } } @@ -70,8 +72,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticFunction* staticFunction = definition->staticFunctions) { m_staticFunctions = new OpaqueJSClassStaticFunctionsTable(); while (staticFunction->name) { - m_staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name), - new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes)); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); + m_staticFunctions->add(UString::createFromUTF8(staticFunction->name).rep()->ref(), entry); ++staticFunction; } } @@ -82,12 +85,12 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* OpaqueJSClass::~OpaqueJSClass() { - ASSERT(!m_className.rep()->identifierTable()); + ASSERT(!m_className.rep()->isIdentifier()); if (m_staticValues) { OpaqueJSClassStaticValuesTable::const_iterator end = m_staticValues->end(); for (OpaqueJSClassStaticValuesTable::const_iterator it = m_staticValues->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); + ASSERT(!it->first->isIdentifier()); delete it->second; } delete m_staticValues; @@ -96,7 +99,7 @@ OpaqueJSClass::~OpaqueJSClass() if (m_staticFunctions) { OpaqueJSClassStaticFunctionsTable::const_iterator end = m_staticFunctions->end(); for (OpaqueJSClassStaticFunctionsTable::const_iterator it = m_staticFunctions->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); + ASSERT(!it->first->isIdentifier()); delete it->second; } delete m_staticFunctions; @@ -115,42 +118,35 @@ static void clearReferenceToPrototype(JSObjectRef prototype) { OpaqueJSClassContextData* jsClassData = static_cast(JSObjectGetPrivate(prototype)); ASSERT(jsClassData); - jsClassData->cachedPrototype = 0; + jsClassData->cachedPrototype.clear(toJS(prototype)); } -PassRefPtr OpaqueJSClass::create(const JSClassDefinition* definition) +PassRefPtr OpaqueJSClass::create(const JSClassDefinition* clientDefinition) { - if (const JSStaticFunction* staticFunctions = definition->staticFunctions) { - // copy functions into a prototype class - JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; - protoDefinition.staticFunctions = staticFunctions; - protoDefinition.finalize = clearReferenceToPrototype; - - // We are supposed to use JSClassRetain/Release but since we know that we currently have - // the only reference to this class object we cheat and use a RefPtr instead. - RefPtr protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); - - // remove functions from the original class - JSClassDefinition objectDefinition = *definition; - objectDefinition.staticFunctions = 0; - - return adoptRef(new OpaqueJSClass(&objectDefinition, protoClass.get())); - } + JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy. - return adoptRef(new OpaqueJSClass(definition, 0)); + JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; + protoDefinition.finalize = clearReferenceToPrototype; + 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 + // the only reference to this class object we cheat and use a RefPtr instead. + RefPtr protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); + return adoptRef(new OpaqueJSClass(&definition, protoClass.get())); } OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) : m_class(jsClass) - , cachedPrototype(0) { if (jsClass->m_staticValues) { staticValues = new OpaqueJSClassStaticValuesTable; OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end(); for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); - staticValues->add(UString::Rep::createCopying(it->first->data(), it->first->size()), - new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes)); + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); + staticValues->add(UString::Rep::create(it->first->data(), it->first->size()), entry); + } } else @@ -161,9 +157,10 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) staticFunctions = new OpaqueJSClassStaticFunctionsTable; OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end(); for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); - staticFunctions->add(UString::Rep::createCopying(it->first->data(), it->first->size()), - new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes)); + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); + staticFunctions->add(UString::Rep::create(it->first->data(), it->first->size()), entry); } } else @@ -240,5 +237,5 @@ JSObject* OpaqueJSClass::prototype(ExecState* exec) jsClassData.cachedPrototype->setPrototype(prototype); } } - return jsClassData.cachedPrototype; + return jsClassData.cachedPrototype.get(); } diff --git a/API/JSClassRef.h b/API/JSClassRef.h index 4f67618..ae60aad 100644 --- a/API/JSClassRef.h +++ b/API/JSClassRef.h @@ -31,10 +31,11 @@ #include #include #include +#include #include #include -struct StaticValueEntry { +struct StaticValueEntry : FastAllocBase { StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes) : getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes) { @@ -45,7 +46,7 @@ struct StaticValueEntry { JSPropertyAttributes attributes; }; -struct StaticFunctionEntry { +struct StaticFunctionEntry : FastAllocBase { StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes) : callAsFunction(_callAsFunction), attributes(_attributes) { @@ -58,7 +59,7 @@ struct StaticFunctionEntry { typedef HashMap, StaticValueEntry*> OpaqueJSClassStaticValuesTable; typedef HashMap, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable; -class OpaqueJSClass; +struct OpaqueJSClass; // An OpaqueJSClass (JSClass) is created without a context, so it can be used with any context, even across context groups. // This structure holds data members that vary across context groups. @@ -76,7 +77,7 @@ struct OpaqueJSClassContextData : Noncopyable { OpaqueJSClassStaticValuesTable* staticValues; OpaqueJSClassStaticFunctionsTable* staticFunctions; - JSC::JSObject* cachedPrototype; + JSC::WeakGCPtr cachedPrototype; }; struct OpaqueJSClass : public ThreadSafeShared { diff --git a/API/JSContextRef.cpp b/API/JSContextRef.cpp index a3bdc69..2c76338 100644 --- a/API/JSContextRef.cpp +++ b/API/JSContextRef.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "JSContextRef.h" +#include "JSContextRefPrivate.h" #include "APICast.h" #include "InitializeThreading.h" @@ -34,7 +35,7 @@ #include "JSObject.h" #include -#if PLATFORM(DARWIN) +#if OS(DARWIN) #include static const int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0 @@ -45,7 +46,7 @@ using namespace JSC; JSContextGroupRef JSContextGroupCreate() { initializeThreading(); - return toRef(JSGlobalData::create().releaseRef()); + return toRef(JSGlobalData::createNonDefault().releaseRef()); } JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) @@ -62,7 +63,7 @@ void JSContextGroupRelease(JSContextGroupRef group) JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) { initializeThreading(); -#if PLATFORM(DARWIN) +#if OS(DARWIN) // When running on Tiger or Leopard, or if the application was linked before JSGlobalContextCreate was changed // to use a unique JSGlobalData, we use a shared one for compatibility. #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) @@ -70,10 +71,10 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) #else { #endif - JSLock lock(true); + JSLock lock(LockForReal); return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass); } -#endif // PLATFORM(DARWIN) +#endif // OS(DARWIN) return JSGlobalContextCreateInGroup(0, globalObjectClass); } @@ -82,9 +83,10 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass { initializeThreading(); - JSLock lock(true); + JSLock lock(LockForReal); + RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::createNonDefault(); - RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::create(); + APIEntryShim entryShim(globalData.get(), false); #if ENABLE(JSC_MULTIPLE_THREADS) globalData->makeUsableFromMultipleThreads(); @@ -107,12 +109,9 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx) { ExecState* exec = toJS(ctx); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSGlobalData& globalData = exec->globalData(); - - globalData.heap.registerThread(); - gcProtect(exec->dynamicGlobalObject()); globalData.ref(); return ctx; @@ -123,25 +122,26 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx) ExecState* exec = toJS(ctx); JSLock lock(exec); + JSGlobalData& globalData = exec->globalData(); + IdentifierTable* savedIdentifierTable = setCurrentIdentifierTable(globalData.identifierTable); + gcUnprotect(exec->dynamicGlobalObject()); - JSGlobalData& globalData = exec->globalData(); if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain(). // The last reference was released, this is our last chance to collect. - ASSERT(!globalData.heap.protectedObjectCount()); - ASSERT(!globalData.heap.isBusy()); globalData.heap.destroy(); } else - globalData.heap.collect(); + globalData.heap.collectAllGarbage(); globalData.deref(); + + setCurrentIdentifierTable(savedIdentifierTable); } JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); // It is necessary to call toThisObject to get the wrapper object when used with WebCore. return toRef(exec->lexicalGlobalObject()->toThisObject(exec)); @@ -152,3 +152,11 @@ JSContextGroupRef JSContextGetGroup(JSContextRef ctx) ExecState* exec = toJS(ctx); return toRef(&exec->globalData()); } + +JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toGlobalRef(exec->lexicalGlobalObject()->globalExec()); +} diff --git a/API/JSContextRefPrivate.h b/API/JSContextRefPrivate.h new file mode 100644 index 0000000..ff014ec --- /dev/null +++ b/API/JSContextRefPrivate.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2009 Apple Computer, 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 COMPUTER, 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 COMPUTER, 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 JSContextRefPrivate_h +#define JSContextRefPrivate_h + +#include +#include +#include + +#ifndef __cplusplus +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function +@abstract Gets the global context of a JavaScript execution context. +@param ctx The JSContext whose global context you want to get. +@result ctx's global context. +*/ +JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx); + +#ifdef __cplusplus +} +#endif + +#endif /* JSContextRefPrivate_h */ diff --git a/API/JSObjectRef.cpp b/API/JSObjectRef.cpp index 50ee635..faaa4eb 100644 --- a/API/JSObjectRef.cpp +++ b/API/JSObjectRef.cpp @@ -28,6 +28,7 @@ #include "JSObjectRef.h" #include "APICast.h" +#include "CodeBlock.h" #include "DateConstructor.h" #include "ErrorConstructor.h" #include "FunctionConstructor.h" @@ -75,8 +76,7 @@ void JSClassRelease(JSClassRef jsClass) JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); if (!jsClass) return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure())); // slightly more efficient @@ -91,8 +91,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); @@ -102,8 +101,7 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsPrototype = jsClass ? jsClass->prototype(exec) : 0; if (!jsPrototype) @@ -117,8 +115,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); @@ -140,8 +137,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* result; if (argumentCount) { @@ -166,8 +162,7 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -187,8 +182,7 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -208,8 +202,7 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -229,8 +222,7 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); return toRef(exec, jsObject->prototype()); @@ -239,8 +231,7 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = toJS(exec, value); @@ -251,8 +242,7 @@ void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -262,8 +252,7 @@ bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -279,8 +268,7 @@ JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); Identifier name(propertyName->identifier(&exec->globalData())); @@ -303,8 +291,7 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -321,8 +308,7 @@ JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsi void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = toJS(exec, value); @@ -338,8 +324,7 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -388,8 +373,7 @@ bool JSObjectIsFunction(JSContextRef, JSObjectRef object) JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSObject* jsThisObject = toJS(thisObject); @@ -426,8 +410,7 @@ bool JSObjectIsConstructor(JSContextRef, JSObjectRef object) JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -449,7 +432,7 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size return result; } -struct OpaqueJSPropertyNameArray { +struct OpaqueJSPropertyNameArray : FastAllocBase { OpaqueJSPropertyNameArray(JSGlobalData* globalData) : refCount(0) , globalData(globalData) @@ -465,8 +448,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o { JSObject* jsObject = toJS(object); ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSGlobalData* globalData = &exec->globalData(); @@ -491,7 +473,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array) void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array) { if (--array->refCount == 0) { - JSLock lock(array->globalData->isSharedInstance); + APIEntryShim entryShim(array->globalData, false); delete array; } } @@ -509,9 +491,6 @@ JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName) { PropertyNameArray* propertyNames = toJS(array); - - propertyNames->globalData()->heap.registerThread(); - JSLock lock(propertyNames->globalData()->isSharedInstance); - + APIEntryShim entryShim(propertyNames->globalData()); propertyNames->add(propertyName->identifier(propertyNames->globalData())); } diff --git a/API/JSStringRef.h b/API/JSStringRef.h index 8b17ee2..c58b958 100644 --- a/API/JSStringRef.h +++ b/API/JSStringRef.h @@ -37,7 +37,7 @@ extern "C" { #endif -#if !defined(WIN32) && !defined(_WIN32) +#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) /*! @typedef JSChar @abstract A Unicode character. diff --git a/API/JSValueRef.cpp b/API/JSValueRef.cpp index 2207181..a12cc34 100644 --- a/API/JSValueRef.cpp +++ b/API/JSValueRef.cpp @@ -28,6 +28,7 @@ #include #include "APICast.h" +#include "APIShims.h" #include "JSCallbackObject.h" #include @@ -41,13 +42,14 @@ #include // for std::min -JSType JSValueGetType(JSContextRef ctx, JSValueRef value) +using namespace JSC; + +::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) { - JSC::ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSC::JSLock lock(exec); + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); - JSC::JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJS(exec, value); if (jsValue.isUndefined()) return kJSTypeUndefined; @@ -63,13 +65,10 @@ JSType JSValueGetType(JSContextRef ctx, JSValueRef value) return kJSTypeObject; } -using namespace JSC; // placed here to avoid conflict between JSC::JSType and JSType, above. - bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isUndefined(); @@ -78,8 +77,7 @@ bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) bool JSValueIsNull(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isNull(); @@ -88,8 +86,7 @@ bool JSValueIsNull(JSContextRef ctx, JSValueRef value) bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isBoolean(); @@ -98,8 +95,7 @@ bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isNumber(); @@ -108,8 +104,7 @@ bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) bool JSValueIsString(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isString(); @@ -118,8 +113,7 @@ bool JSValueIsString(JSContextRef ctx, JSValueRef value) bool JSValueIsObject(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isObject(); @@ -128,8 +122,7 @@ bool JSValueIsObject(JSContextRef ctx, JSValueRef value) bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -145,8 +138,7 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsA = toJS(exec, a); JSValue jsB = toJS(exec, b); @@ -163,20 +155,18 @@ bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* ex bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsA = toJS(exec, a); JSValue jsB = toJS(exec, b); - return JSValue::strictEqual(jsA, jsB); + return JSValue::strictEqual(exec, jsA, jsB); } bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -195,8 +185,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject JSValueRef JSValueMakeUndefined(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsUndefined()); } @@ -204,8 +193,7 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx) JSValueRef JSValueMakeNull(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsNull()); } @@ -213,8 +201,7 @@ JSValueRef JSValueMakeNull(JSContextRef ctx) JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsBoolean(value)); } @@ -222,8 +209,7 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsNumber(exec, value)); } @@ -231,8 +217,7 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsString(exec, string->ustring())); } @@ -240,8 +225,7 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.toBoolean(exec); @@ -250,8 +234,7 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -268,8 +251,7 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -286,8 +268,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -304,19 +285,17 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce void JSValueProtect(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); - JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJSForGC(exec, value); gcProtect(jsValue); } void JSValueUnprotect(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); - JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJSForGC(exec, value); gcUnprotect(jsValue); } diff --git a/API/OpaqueJSString.cpp b/API/OpaqueJSString.cpp index 7c7b1af..f740abe 100644 --- a/API/OpaqueJSString.cpp +++ b/API/OpaqueJSString.cpp @@ -42,7 +42,7 @@ PassRefPtr OpaqueJSString::create(const UString& ustring) UString OpaqueJSString::ustring() const { if (this && m_characters) - return UString(m_characters, m_length, true); + return UString(m_characters, m_length); return UString::null(); } diff --git a/API/tests/testapi.c b/API/tests/testapi.c index 1f413e1..ebc0cfb 100644 --- a/API/tests/testapi.c +++ b/API/tests/testapi.c @@ -25,6 +25,7 @@ #include "JavaScriptCore.h" #include "JSBasePrivate.h" +#include "JSContextRefPrivate.h" #include #define ASSERT_DISABLED 0 #include @@ -41,8 +42,8 @@ static double nan(const char*) #endif -static JSGlobalContextRef context = 0; -static int failed = 0; +static JSGlobalContextRef context; +static int failed; static void assertEqualsAsBoolean(JSValueRef value, bool expectedValue) { if (JSValueToBoolean(context, value) != expectedValue) { @@ -165,6 +166,10 @@ static JSValueRef MyObject_getProperty(JSContextRef context, JSObjectRef object, if (JSStringIsEqualToUTF8CString(propertyName, "cantFind")) { return JSValueMakeUndefined(context); } + + if (JSStringIsEqualToUTF8CString(propertyName, "hasPropertyLie")) { + return 0; + } if (JSStringIsEqualToUTF8CString(propertyName, "throwOnGet")) { return JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception); @@ -175,7 +180,7 @@ static JSValueRef MyObject_getProperty(JSContextRef context, JSObjectRef object, return JSValueMakeNumber(context, 1); } - return NULL; + return JSValueMakeNull(context); } static bool MyObject_setProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception) @@ -298,7 +303,7 @@ static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef objec } // string conversion -- forward to default object class - return NULL; + return JSValueMakeNull(context); } static JSStaticValue evilStaticValues[] = { @@ -373,7 +378,7 @@ static JSValueRef EvilExceptionObject_convertToType(JSContextRef context, JSObje funcName = JSStringCreateWithUTF8CString("toStringExplicit"); break; default: - return NULL; + return JSValueMakeNull(context); break; } @@ -381,7 +386,7 @@ static JSValueRef EvilExceptionObject_convertToType(JSContextRef context, JSObje JSStringRelease(funcName); JSObjectRef function = JSValueToObject(context, func, exception); if (!function) - return NULL; + return JSValueMakeNull(context); JSValueRef value = JSObjectCallAsFunction(context, function, object, 0, NULL, exception); if (!value) { JSStringRef errorString = JSStringCreateWithUTF8CString("convertToType failed"); @@ -618,14 +623,27 @@ static JSClassRef Derived_class(JSContextRef context) return jsClass; } -static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +static JSClassRef Derived2_class(JSContextRef context) +{ + static JSClassRef jsClass; + if (!jsClass) { + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.parentClass = Derived_class(context); + jsClass = JSClassCreate(&definition); + } + return jsClass; +} + +static JSValueRef print_callAsFunction(JSContextRef ctx, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { UNUSED_PARAM(functionObject); UNUSED_PARAM(thisObject); UNUSED_PARAM(exception); + + ASSERT(JSContextGetGlobalContext(ctx) == context); if (argumentCount > 0) { - JSStringRef string = JSValueToStringCopy(context, arguments[0], NULL); + JSStringRef string = JSValueToStringCopy(ctx, arguments[0], NULL); size_t sizeUTF8 = JSStringGetMaximumUTF8CStringSize(string); char* stringUTF8 = (char*)malloc(sizeUTF8); JSStringGetUTF8CString(string, stringUTF8, sizeUTF8); @@ -634,7 +652,7 @@ static JSValueRef print_callAsFunction(JSContextRef context, JSObjectRef functio JSStringRelease(string); } - return JSValueMakeUndefined(context); + return JSValueMakeUndefined(ctx); } static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) @@ -734,6 +752,15 @@ static void testInitializeFinalize() ASSERT(JSObjectGetPrivate(o) == (void*)3); } +static JSValueRef jsNumberValue = NULL; + +static void makeGlobalNumberValue(JSContextRef context) { + JSValueRef v = JSValueMakeNumber(context, 420); + JSValueProtect(context, v); + jsNumberValue = v; + v = NULL; +} + int main(int argc, char* argv[]) { const char *scriptPath = "testapi.js"; @@ -760,6 +787,7 @@ int main(int argc, char* argv[]) JSGlobalContextRetain(context); JSGlobalContextRelease(context); + ASSERT(JSContextGetGlobalContext(context) == context); JSReportExtraMemoryCost(context, 0); JSReportExtraMemoryCost(context, 1); @@ -944,10 +972,12 @@ int main(int argc, char* argv[]) CFRelease(cfEmptyString); jsGlobalValue = JSObjectMake(context, NULL, NULL); + makeGlobalNumberValue(context); JSValueProtect(context, jsGlobalValue); JSGarbageCollect(context); ASSERT(JSValueIsObject(context, jsGlobalValue)); JSValueUnprotect(context, jsGlobalValue); + JSValueUnprotect(context, jsNumberValue); JSStringRef goodSyntax = JSStringCreateWithUTF8CString("x = 1;"); JSStringRef badSyntax = JSStringCreateWithUTF8CString("x := 1;"); @@ -1051,11 +1081,21 @@ int main(int argc, char* argv[]) ASSERT(!JSObjectSetPrivate(myConstructor, (void*)1)); ASSERT(!JSObjectGetPrivate(myConstructor)); + string = JSStringCreateWithUTF8CString("Base"); + JSObjectRef baseConstructor = JSObjectMakeConstructor(context, Base_class(context), NULL); + JSObjectSetProperty(context, globalObject, string, baseConstructor, kJSPropertyAttributeNone, NULL); + JSStringRelease(string); + string = JSStringCreateWithUTF8CString("Derived"); JSObjectRef derivedConstructor = JSObjectMakeConstructor(context, Derived_class(context), NULL); JSObjectSetProperty(context, globalObject, string, derivedConstructor, kJSPropertyAttributeNone, NULL); JSStringRelease(string); + string = JSStringCreateWithUTF8CString("Derived2"); + JSObjectRef derived2Constructor = JSObjectMakeConstructor(context, Derived2_class(context), NULL); + JSObjectSetProperty(context, globalObject, string, derived2Constructor, kJSPropertyAttributeNone, NULL); + JSStringRelease(string); + o = JSObjectMake(context, NULL, NULL); JSObjectSetProperty(context, o, jsOneIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeNone, NULL); JSObjectSetProperty(context, o, jsCFIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeDontEnum, NULL); @@ -1154,7 +1194,7 @@ int main(int argc, char* argv[]) } else { script = JSStringCreateWithUTF8CString(scriptUTF8); result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); - if (JSValueIsUndefined(context, result)) + if (result && JSValueIsUndefined(context, result)) printf("PASS: Test script executed successfully.\n"); else { printf("FAIL: Test script returned unexpected value:\n"); diff --git a/API/tests/testapi.js b/API/tests/testapi.js index 82756b5..15c9e50 100644 --- a/API/tests/testapi.js +++ b/API/tests/testapi.js @@ -113,6 +113,35 @@ if (foundRegularType) else fail("MyObject.regularType was not enumerated"); +var alwaysOneDescriptor = Object.getOwnPropertyDescriptor(MyObject, "alwaysOne"); +shouldBe('typeof alwaysOneDescriptor', "object"); +shouldBe('alwaysOneDescriptor.value', MyObject.alwaysOne); +shouldBe('alwaysOneDescriptor.configurable', true); +shouldBe('alwaysOneDescriptor.enumerable', false); // Actually it is. +var cantFindDescriptor = Object.getOwnPropertyDescriptor(MyObject, "cantFind"); +shouldBe('typeof cantFindDescriptor', "object"); +shouldBe('cantFindDescriptor.value', MyObject.cantFind); +shouldBe('cantFindDescriptor.configurable', true); +shouldBe('cantFindDescriptor.enumerable', false); +try { + // If getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw. + Object.getOwnPropertyDescriptor(MyObject, "throwOnGet"); +} catch (e) { + pass("getting property descriptor of throwOnGet threw exception"); +} +var myPropertyNameDescriptor = Object.getOwnPropertyDescriptor(MyObject, "myPropertyName"); +shouldBe('typeof myPropertyNameDescriptor', "object"); +shouldBe('myPropertyNameDescriptor.value', MyObject.myPropertyName); +shouldBe('myPropertyNameDescriptor.configurable', true); +shouldBe('myPropertyNameDescriptor.enumerable', false); // Actually it is. +try { + // if getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw. + Object.getOwnPropertyDescriptor(MyObject, "hasPropertyLie"); +} catch (e) { + pass("getting property descriptor of hasPropertyLie threw exception"); +} +shouldBe('Object.getOwnPropertyDescriptor(MyObject, "doesNotExist")', undefined); + myObject = new MyObject(); shouldBe("delete MyObject.regularType", true); @@ -140,6 +169,9 @@ shouldThrow("MyObject.hasPropertyLie"); derived = new Derived(); +shouldBe("derived instanceof Derived", true); +shouldBe("derived instanceof Base", true); + // base properties and functions return 1 when called/gotten; derived, 2 shouldBe("derived.baseProtoDup()", 2); shouldBe("derived.baseProto()", 1); @@ -155,6 +187,51 @@ shouldBe("derived.baseOnly = 0", 1); shouldBe("derived.derivedOnly = 0", 2) shouldBe("derived.protoDup = 0", 2); +derived2 = new Derived2(); + +shouldBe("derived2 instanceof Derived2", true); +shouldBe("derived2 instanceof Derived", true); +shouldBe("derived2 instanceof Base", true); + +// base properties and functions return 1 when called/gotten; derived, 2 +shouldBe("derived2.baseProtoDup()", 2); +shouldBe("derived2.baseProto()", 1); +shouldBe("derived2.baseDup", 2); +shouldBe("derived2.baseOnly", 1); +shouldBe("derived2.protoOnly()", 2); +shouldBe("derived2.protoDup", 2); +shouldBe("derived2.derivedOnly", 2) + +// base properties throw 1 when set; derived, 2 +shouldBe("derived2.baseDup = 0", 2); +shouldBe("derived2.baseOnly = 0", 1); +shouldBe("derived2.derivedOnly = 0", 2) +shouldBe("derived2.protoDup = 0", 2); + +shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProto")', undefined); +shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProtoDup")', undefined); +var baseDupDescriptor = Object.getOwnPropertyDescriptor(derived, "baseDup"); +shouldBe('typeof baseDupDescriptor', "object"); +shouldBe('baseDupDescriptor.value', derived.baseDup); +shouldBe('baseDupDescriptor.configurable', true); +shouldBe('baseDupDescriptor.enumerable', false); +var baseOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "baseOnly"); +shouldBe('typeof baseOnlyDescriptor', "object"); +shouldBe('baseOnlyDescriptor.value', derived.baseOnly); +shouldBe('baseOnlyDescriptor.configurable', true); +shouldBe('baseOnlyDescriptor.enumerable', false); +shouldBe('Object.getOwnPropertyDescriptor(derived, "protoOnly")', undefined); +var protoDupDescriptor = Object.getOwnPropertyDescriptor(derived, "protoDup"); +shouldBe('typeof protoDupDescriptor', "object"); +shouldBe('protoDupDescriptor.value', derived.protoDup); +shouldBe('protoDupDescriptor.configurable', true); +shouldBe('protoDupDescriptor.enumerable', false); +var derivedOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "derivedOnly"); +shouldBe('typeof derivedOnlyDescriptor', "object"); +shouldBe('derivedOnlyDescriptor.value', derived.derivedOnly); +shouldBe('derivedOnlyDescriptor.configurable', true); +shouldBe('derivedOnlyDescriptor.enumerable', false); + shouldBe("undefined instanceof MyObject", false); EvilExceptionObject.hasInstance = function f() { return f(); }; EvilExceptionObject.__proto__ = undefined; diff --git a/AllInOneFile.cpp b/AllInOneFile.cpp index 7b67dbe..e69de29 100644 --- a/AllInOneFile.cpp +++ b/AllInOneFile.cpp @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. - * - * 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. - * - */ - -// This file exists to help compile the essential code of -// JavaScriptCore all as one file, for compilers and build systems -// that see a significant speed gain from this. - -#define KDE_USE_FINAL 1 -#define JAVASCRIPTCORE_BUILDING_ALL_IN_ONE_FILE 1 -#include "config.h" - -// these headers are included here to avoid confusion between ::JSType and JSC::JSType -#include "JSCallbackConstructor.h" -#include "JSCallbackFunction.h" -#include "JSCallbackObject.h" - -#include "runtime/JSStaticScopeObject.cpp" -#include "runtime/JSFunction.cpp" -#include "runtime/Arguments.cpp" -#include "runtime/JSAPIValueWrapper.cpp" -#include "runtime/JSGlobalObjectFunctions.cpp" -#include "runtime/PrototypeFunction.cpp" -#include "runtime/GlobalEvalFunction.cpp" -#include "debugger/Debugger.cpp" -#include "runtime/JSArray.cpp" -#include "runtime/ArrayConstructor.cpp" -#include "runtime/ArrayPrototype.cpp" -#include "runtime/BooleanConstructor.cpp" -#include "runtime/BooleanObject.cpp" -#include "runtime/BooleanPrototype.cpp" -#include "runtime/Collector.cpp" -#include "runtime/CommonIdentifiers.cpp" -#include "runtime/DateConstructor.cpp" -#include "runtime/DateConversion.cpp" -#include "runtime/DatePrototype.cpp" -#include "runtime/DateInstance.cpp" -#include "wtf/dtoa.cpp" -#include "runtime/ErrorInstance.cpp" -#include "runtime/ErrorPrototype.cpp" -#include "runtime/ErrorConstructor.cpp" -#include "runtime/FunctionConstructor.cpp" -#include "runtime/FunctionPrototype.cpp" -#include "Grammar.cpp" -#include "runtime/Identifier.cpp" -#include "runtime/JSString.cpp" -#include "runtime/JSNumberCell.cpp" -#include "runtime/GetterSetter.cpp" -#include "runtime/InternalFunction.cpp" -#include "runtime/Completion.cpp" -#include "runtime/JSImmediate.cpp" -#include "runtime/JSLock.cpp" -#include "runtime/JSWrapperObject.cpp" -#include "parser/Lexer.cpp" -#include "runtime/ArgList.cpp" -#include "runtime/Lookup.cpp" -#include "runtime/MathObject.cpp" -#include "runtime/NativeErrorConstructor.cpp" -#include "runtime/NativeErrorPrototype.cpp" -#include "runtime/NumberConstructor.cpp" -#include "runtime/NumberObject.cpp" -#include "runtime/NumberPrototype.cpp" -#include "parser/Nodes.cpp" -#include "runtime/JSObject.cpp" -#include "runtime/Error.cpp" -#include "runtime/JSGlobalObject.cpp" -#include "runtime/ObjectConstructor.cpp" -#include "runtime/ObjectPrototype.cpp" -#include "runtime/Operations.cpp" -#include "parser/Parser.cpp" -#include "runtime/PropertySlot.cpp" -#include "runtime/PropertyNameArray.cpp" -#include "runtime/RegExp.cpp" -#include "runtime/RegExpConstructor.cpp" -#include "runtime/RegExpObject.cpp" -#include "runtime/RegExpPrototype.cpp" -#include "runtime/ScopeChain.cpp" -#include "runtime/StringConstructor.cpp" -#include "runtime/StringObject.cpp" -#include "runtime/StringPrototype.cpp" -#include "runtime/UString.cpp" -#include "runtime/JSValue.cpp" -#include "runtime/CallData.cpp" -#include "runtime/ConstructData.cpp" -#include "runtime/JSCell.cpp" -#include "runtime/JSVariableObject.cpp" -#include "wtf/FastMalloc.cpp" -#include "wtf/TCSystemAlloc.cpp" -#include "bytecompiler/BytecodeGenerator.cpp" -#include "interpreter/RegisterFile.cpp" diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..e76da32 --- /dev/null +++ b/Android.mk @@ -0,0 +1,216 @@ +## +## Copyright 2009, The Android Open Source Project +## +## 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. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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. +## + +LOCAL_SRC_FILES := \ + API/JSValueRef.cpp \ + API/JSCallbackObject.cpp \ + API/OpaqueJSString.cpp \ + \ + bytecode/CodeBlock.cpp \ + bytecode/JumpTable.cpp \ + bytecode/Opcode.cpp \ + bytecode/SamplingTool.cpp \ + bytecode/StructureStubInfo.cpp \ + \ + bytecompiler/BytecodeGenerator.cpp \ + bytecompiler/NodesCodegen.cpp \ + \ + debugger/Debugger.cpp \ + debugger/DebuggerActivation.cpp \ + debugger/DebuggerCallFrame.cpp \ + \ + interpreter/CallFrame.cpp \ + interpreter/Interpreter.cpp \ + interpreter/RegisterFile.cpp \ + \ + parser/Lexer.cpp \ + parser/Nodes.cpp \ + parser/Parser.cpp \ + parser/ParserArena.cpp \ + \ + pcre/pcre_compile.cpp \ + pcre/pcre_exec.cpp \ + pcre/pcre_tables.cpp \ + pcre/pcre_ucp_searchfuncs.cpp \ + pcre/pcre_xclass.cpp \ + \ + profiler/Profile.cpp \ + profiler/ProfileGenerator.cpp \ + profiler/ProfileNode.cpp \ + profiler/Profiler.cpp \ + \ + runtime/ArgList.cpp \ + runtime/Arguments.cpp \ + runtime/ArrayConstructor.cpp \ + runtime/ArrayPrototype.cpp \ + runtime/BooleanConstructor.cpp \ + runtime/BooleanObject.cpp \ + runtime/BooleanPrototype.cpp \ + runtime/CallData.cpp \ + runtime/Collector.cpp \ + runtime/CommonIdentifiers.cpp \ + runtime/Completion.cpp \ + runtime/ConstructData.cpp \ + runtime/DateConstructor.cpp \ + runtime/DateConversion.cpp \ + runtime/DateInstance.cpp \ + runtime/DatePrototype.cpp \ + runtime/Error.cpp \ + runtime/ErrorConstructor.cpp \ + runtime/ErrorInstance.cpp \ + runtime/ErrorPrototype.cpp \ + runtime/ExceptionHelpers.cpp \ + runtime/Executable.cpp \ + runtime/FunctionConstructor.cpp \ + runtime/FunctionPrototype.cpp \ + runtime/GetterSetter.cpp \ + runtime/GlobalEvalFunction.cpp \ + runtime/Identifier.cpp \ + runtime/InitializeThreading.cpp \ + runtime/InternalFunction.cpp \ + runtime/JSAPIValueWrapper.cpp \ + runtime/JSActivation.cpp \ + runtime/JSArray.cpp \ + runtime/JSByteArray.cpp \ + runtime/JSCell.cpp \ + runtime/JSFunction.cpp \ + runtime/JSGlobalData.cpp \ + runtime/JSGlobalObject.cpp \ + runtime/JSGlobalObjectFunctions.cpp \ + runtime/JSImmediate.cpp \ + runtime/JSLock.cpp \ + runtime/JSNotAnObject.cpp \ + runtime/JSNumberCell.cpp \ + runtime/JSONObject.cpp \ + runtime/JSObject.cpp \ + runtime/JSPropertyNameIterator.cpp \ + runtime/JSStaticScopeObject.cpp \ + runtime/JSString.cpp \ + runtime/JSValue.cpp \ + runtime/JSVariableObject.cpp \ + runtime/JSWrapperObject.cpp \ + runtime/LiteralParser.cpp \ + runtime/Lookup.cpp \ + runtime/MarkStack.cpp \ + runtime/MarkStackPosix.cpp \ + runtime/MathObject.cpp \ + runtime/NativeErrorConstructor.cpp \ + runtime/NativeErrorPrototype.cpp \ + runtime/NumberConstructor.cpp \ + runtime/NumberObject.cpp \ + runtime/NumberPrototype.cpp \ + runtime/ObjectConstructor.cpp \ + runtime/ObjectPrototype.cpp \ + runtime/Operations.cpp \ + runtime/PropertyDescriptor.cpp \ + runtime/PropertyNameArray.cpp \ + runtime/PropertySlot.cpp \ + runtime/PrototypeFunction.cpp \ + runtime/RegExp.cpp \ + runtime/RegExpConstructor.cpp \ + runtime/RegExpObject.cpp \ + runtime/RegExpPrototype.cpp \ + runtime/ScopeChain.cpp \ + runtime/SmallStrings.cpp \ + runtime/StringConstructor.cpp \ + runtime/StringObject.cpp \ + runtime/StringPrototype.cpp \ + runtime/Structure.cpp \ + runtime/StructureChain.cpp \ + runtime/TimeoutChecker.cpp \ + runtime/UString.cpp \ + \ + wrec/CharacterClass.cpp \ + wrec/CharacterClassConstructor.cpp \ + wrec/WREC.cpp \ + wrec/WRECFunctors.cpp \ + wrec/WRECGenerator.cpp \ + wrec/WRECParser.cpp \ + \ + wtf/Assertions.cpp \ + wtf/ByteArray.cpp \ + wtf/CurrentTime.cpp \ + wtf/DateMath.cpp \ + wtf/FastMalloc.cpp \ + wtf/HashTable.cpp \ + wtf/MainThread.cpp \ + wtf/RandomNumber.cpp \ + wtf/RefCountedLeakCounter.cpp \ + wtf/TCSystemAlloc.cpp \ + wtf/ThreadIdentifierDataPthreads.cpp \ + wtf/Threading.cpp \ + wtf/ThreadingPthreads.cpp \ + \ + wtf/TypeTraits.cpp \ + wtf/dtoa.cpp \ + \ + wtf/android/MainThreadAndroid.cpp \ + \ + wtf/unicode/CollatorDefault.cpp \ + wtf/unicode/UTF8.cpp \ + \ + wtf/unicode/icu/CollatorICU.cpp + +# Rule to build grammar.y with our custom bison. +GEN := $(intermediates)/parser/Grammar.cpp +$(GEN) : PRIVATE_YACCFLAGS := -p jscyy +$(GEN) : $(LOCAL_PATH)/parser/Grammar.y + $(call local-transform-y-to-cpp,.cpp) +$(GEN) : $(LOCAL_BISON) +LOCAL_GENERATED_SOURCES += $(GEN) + +# generated headers +JSC_OBJECTS := $(addprefix $(intermediates)/runtime/, \ + ArrayPrototype.lut.h \ + DatePrototype.lut.h \ + JSONObject.lut.h \ + MathObject.lut.h \ + NumberConstructor.lut.h \ + RegExpConstructor.lut.h \ + RegExpObject.lut.h \ + StringPrototype.lut.h \ + ) +$(JSC_OBJECTS): PRIVATE_PATH := $(LOCAL_PATH) +$(JSC_OBJECTS): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@ +$(JSC_OBJECTS): $(LOCAL_PATH)/create_hash_table +$(JSC_OBJECTS): $(intermediates)/%.lut.h : $(LOCAL_PATH)/%.cpp + $(transform-generated-source) + + +LEXER_HEADER := $(intermediates)/Lexer.lut.h +$(LEXER_HEADER): PRIVATE_PATH := $(LOCAL_PATH) +$(LEXER_HEADER): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@ +$(LEXER_HEADER): $(LOCAL_PATH)/create_hash_table +$(LEXER_HEADER): $(intermediates)/%.lut.h : $(LOCAL_PATH)/parser/Keywords.table + $(transform-generated-source) + +CHARTABLES := $(intermediates)/chartables.c +$(CHARTABLES): PRIVATE_PATH := $(LOCAL_PATH) +$(CHARTABLES): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/pcre/dftables $@ +$(CHARTABLES): $(LOCAL_PATH)/pcre/dftables +$(CHARTABLES): $(LOCAL_PATH)/pcre/pcre_internal.h + $(transform-generated-source) + +LOCAL_GENERATED_SOURCES += $(JSC_OBJECTS) $(LEXER_HEADER) $(CHARTABLES) diff --git a/Android.v8.wtf.mk b/Android.v8.wtf.mk new file mode 100644 index 0000000..69128d6 --- /dev/null +++ b/Android.v8.wtf.mk @@ -0,0 +1,69 @@ +## +## Copyright 2009, The Android Open Source Project +## +## 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. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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. +## + +# wtf source files + +LOCAL_SRC_FILES := \ + pcre/pcre_compile.cpp \ + pcre/pcre_exec.cpp \ + pcre/pcre_tables.cpp \ + pcre/pcre_ucp_searchfuncs.cpp \ + pcre/pcre_xclass.cpp \ + \ + wtf/Assertions.cpp \ + wtf/ByteArray.cpp \ + wtf/CurrentTime.cpp \ + wtf/DateMath.cpp \ + wtf/FastMalloc.cpp \ + wtf/HashTable.cpp \ + wtf/MainThread.cpp \ + wtf/RandomNumber.cpp \ + wtf/RefCountedLeakCounter.cpp \ + wtf/TCSystemAlloc.cpp \ + wtf/ThreadIdentifierDataPthreads.cpp \ + wtf/Threading.cpp \ + wtf/ThreadingPthreads.cpp \ + \ + wtf/android/MainThreadAndroid.cpp \ + \ + wtf/TypeTraits.cpp \ + wtf/dtoa.cpp \ + \ + wtf/unicode/CollatorDefault.cpp \ + wtf/unicode/UTF8.cpp \ + \ + wtf/unicode/icu/CollatorICU.cpp + +CHARTABLES := $(intermediates)/chartables.c +$(CHARTABLES): PRIVATE_PATH := $(LOCAL_PATH) +$(CHARTABLES): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/pcre/dftables $@ +$(CHARTABLES): $(LOCAL_PATH)/pcre/dftables +$(CHARTABLES): $(LOCAL_PATH)/pcre/pcre_internal.h + $(transform-generated-source) + +$(intermediates)/pcre/pcre_tables.o : $(CHARTABLES) + +# We do not add $(CHARTABLES) to LOCAL_GENERATED_SOURCES because the chartables.c file +# is explicitly #included in pcre_tables.cpp. diff --git a/DerivedSources.pro b/DerivedSources.pro new file mode 100644 index 0000000..bd9f6ab --- /dev/null +++ b/DerivedSources.pro @@ -0,0 +1,95 @@ +# DerivedSources - qmake build info + +CONFIG -= debug_and_release + +TEMPLATE = lib +TARGET = dummy + +QMAKE_EXTRA_TARGETS += generated_files + +CONFIG(standalone_package) { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated +} else { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated +} + +LUT_FILES += \ + runtime/ArrayPrototype.cpp \ + runtime/DatePrototype.cpp \ + runtime/JSONObject.cpp \ + runtime/MathObject.cpp \ + runtime/NumberConstructor.cpp \ + runtime/RegExpConstructor.cpp \ + runtime/RegExpObject.cpp \ + runtime/StringPrototype.cpp + +KEYWORDLUT_FILES += \ + parser/Keywords.table + +JSCBISON += \ + parser/Grammar.y + +RVCT_STUB_FILES += \ + jit/JITStubs.cpp + +defineTest(addExtraCompiler) { + eval($${1}.CONFIG = target_predeps no_link) + eval($${1}.variable_out =) + eval($${1}.dependency_type = TYPE_C) + + wkScript = $$eval($${1}.wkScript) + eval($${1}.depends += $$wkScript) + + export($${1}.CONFIG) + export($${1}.variable_out) + export($${1}.dependency_type) + export($${1}.depends) + + QMAKE_EXTRA_COMPILERS += $$1 + generated_files.depends += compiler_$${1}_make_all + export(QMAKE_EXTRA_COMPILERS) + export(generated_files.depends) + return(true) +} + +# GENERATOR 1-A: LUT creator +lut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h +lut.input = LUT_FILES +lut.wkScript = $$PWD/create_hash_table +lut.commands = perl $$lut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} +lut.depends = ${QMAKE_FILE_NAME} +addExtraCompiler(lut) + +# GENERATOR 1-B: particular LUT creator (for 1 file only) +keywordlut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h +keywordlut.input = KEYWORDLUT_FILES +keywordlut.wkScript = $$PWD/create_hash_table +keywordlut.commands = perl $$keywordlut.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} +keywordlut.depends = ${QMAKE_FILE_NAME} +addExtraCompiler(keywordlut) + +# GENERATOR 2: bison grammar +jscbison.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp +jscbison.input = JSCBISON +jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h +jscbison.depends = ${QMAKE_FILE_NAME} +addExtraCompiler(jscbison) + +# GENERATOR 3: JIT Stub functions for RVCT +rvctstubs.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h +rvctstubs.wkScript = $$PWD/create_rvct_stubs +rvctstubs.commands = perl $$rvctstubs.wkScript ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} +rvctstubs.depends = ${QMAKE_FILE_NAME} +rvctstubs.input = RVCT_STUB_FILES +rvctstubs.CONFIG += no_link +addExtraCompiler(rvctstubs) + +# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources) +win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\"" +ctgen.output = $$JSC_GENERATED_SOURCES_DIR/chartables.c +ctgen.wkScript = $$PWD/pcre/dftables +ctgen.input = ctgen.wkScript +ctgen.commands = perl $$ctgen.wkScript ${QMAKE_FILE_OUT} $$PREPROCESSOR +ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_JSC_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE} +addExtraCompiler(ctgen) + diff --git a/GNUmakefile.am b/GNUmakefile.am index d376b78..7ac6a8c 100644 --- a/GNUmakefile.am +++ b/GNUmakefile.am @@ -45,6 +45,7 @@ javascriptcore_built_nosources += \ javascriptcore_sources += \ JavaScriptCore/API/APICast.h \ + JavaScriptCore/API/APIShims.h \ JavaScriptCore/API/JSBase.cpp \ JavaScriptCore/API/JSBasePrivate.h \ JavaScriptCore/API/JSCallbackConstructor.cpp \ @@ -57,6 +58,7 @@ javascriptcore_sources += \ JavaScriptCore/API/JSClassRef.cpp \ JavaScriptCore/API/JSClassRef.h \ JavaScriptCore/API/JSContextRef.cpp \ + JavaScriptCore/API/JSContextRefPrivate.h \ JavaScriptCore/API/JSObjectRef.cpp \ JavaScriptCore/API/JSRetainPtr.h \ JavaScriptCore/API/JSStringRef.cpp \ @@ -96,8 +98,6 @@ javascriptcore_sources += \ JavaScriptCore/bytecode/JumpTable.cpp \ JavaScriptCore/bytecode/JumpTable.h \ JavaScriptCore/bytecode/EvalCodeCache.h \ - JavaScriptCore/runtime/ExceptionHelpers.cpp \ - JavaScriptCore/runtime/ExceptionHelpers.h \ JavaScriptCore/bytecode/Instruction.h \ JavaScriptCore/bytecompiler/Label.h \ JavaScriptCore/interpreter/Interpreter.cpp \ @@ -135,14 +135,22 @@ javascriptcore_sources += \ JavaScriptCore/icu/unicode/utf_old.h \ JavaScriptCore/icu/unicode/utypes.h \ JavaScriptCore/icu/unicode/uversion.h \ + JavaScriptCore/assembler/ARMAssembler.h \ + JavaScriptCore/assembler/ARMAssembler.cpp \ JavaScriptCore/assembler/X86Assembler.h \ JavaScriptCore/assembler/AbstractMacroAssembler.h \ JavaScriptCore/assembler/AssemblerBuffer.h \ + JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h \ + JavaScriptCore/assembler/CodeLocation.h \ + JavaScriptCore/assembler/LinkBuffer.h \ JavaScriptCore/assembler/MacroAssembler.h \ + JavaScriptCore/assembler/MacroAssemblerARM.h \ + JavaScriptCore/assembler/MacroAssemblerARM.cpp \ JavaScriptCore/assembler/MacroAssemblerCodeRef.h \ JavaScriptCore/assembler/MacroAssemblerX86.h \ JavaScriptCore/assembler/MacroAssemblerX86_64.h \ JavaScriptCore/assembler/MacroAssemblerX86Common.h \ + JavaScriptCore/assembler/RepatchBuffer.h \ JavaScriptCore/os-win32/stdbool.h \ JavaScriptCore/os-win32/stdint.h \ JavaScriptCore/pcre/pcre.h \ @@ -154,8 +162,6 @@ javascriptcore_sources += \ JavaScriptCore/pcre/pcre_xclass.cpp \ JavaScriptCore/pcre/ucpinternal.h \ JavaScriptCore/profiler/CallIdentifier.h \ - JavaScriptCore/profiler/HeavyProfile.cpp \ - JavaScriptCore/profiler/HeavyProfile.h \ JavaScriptCore/profiler/Profile.cpp \ JavaScriptCore/profiler/Profile.h \ JavaScriptCore/profiler/ProfileGenerator.cpp \ @@ -164,14 +170,14 @@ javascriptcore_sources += \ JavaScriptCore/profiler/ProfileNode.h \ JavaScriptCore/profiler/Profiler.cpp \ JavaScriptCore/profiler/Profiler.h \ - JavaScriptCore/profiler/TreeProfile.cpp \ - JavaScriptCore/profiler/TreeProfile.h \ JavaScriptCore/interpreter/CachedCall.h \ JavaScriptCore/interpreter/CallFrame.cpp \ JavaScriptCore/interpreter/CallFrame.h \ JavaScriptCore/interpreter/CallFrameClosure.h \ - JavaScriptCore/runtime/TimeoutChecker.cpp \ - JavaScriptCore/runtime/TimeoutChecker.h \ + JavaScriptCore/runtime/ExceptionHelpers.cpp \ + JavaScriptCore/runtime/ExceptionHelpers.h \ + JavaScriptCore/runtime/Executable.cpp \ + JavaScriptCore/runtime/Executable.h \ JavaScriptCore/runtime/InitializeThreading.cpp \ JavaScriptCore/runtime/InitializeThreading.h \ JavaScriptCore/runtime/JSActivation.cpp \ @@ -186,16 +192,27 @@ javascriptcore_sources += \ JavaScriptCore/runtime/JSONObject.h \ JavaScriptCore/runtime/JSPropertyNameIterator.cpp \ JavaScriptCore/runtime/JSPropertyNameIterator.h \ + JavaScriptCore/runtime/JSZombie.h \ JavaScriptCore/runtime/LiteralParser.cpp \ JavaScriptCore/runtime/LiteralParser.h \ + JavaScriptCore/runtime/MarkStack.cpp \ + JavaScriptCore/runtime/MarkStack.h \ + JavaScriptCore/runtime/NumericStrings.h \ + JavaScriptCore/runtime/PropertyDescriptor.h \ + JavaScriptCore/runtime/PropertyDescriptor.cpp \ JavaScriptCore/runtime/SmallStrings.cpp \ JavaScriptCore/runtime/SmallStrings.h \ + JavaScriptCore/runtime/StringBuilder.h \ JavaScriptCore/runtime/Structure.cpp \ JavaScriptCore/runtime/Structure.h \ JavaScriptCore/runtime/StructureChain.cpp \ JavaScriptCore/runtime/StructureChain.h \ JavaScriptCore/runtime/StructureTransitionTable.h \ - JavaScriptCore/runtime/TypeInfo.h \ + JavaScriptCore/runtime/TimeoutChecker.cpp \ + JavaScriptCore/runtime/TimeoutChecker.h \ + JavaScriptCore/runtime/JSTypeInfo.h \ + JavaScriptCore/runtime/WeakGCMap.h \ + JavaScriptCore/runtime/WeakGCPtr.h \ JavaScriptCore/wrec/CharacterClass.h \ JavaScriptCore/wrec/CharacterClassConstructor.h \ JavaScriptCore/wrec/Escapes.h \ @@ -212,7 +229,6 @@ javascriptcore_sources += \ JavaScriptCore/wtf/ByteArray.cpp \ JavaScriptCore/wtf/ByteArray.h \ JavaScriptCore/wtf/CrossThreadRefCounted.h \ - JavaScriptCore/wtf/OwnFastMallocPtr.h \ JavaScriptCore/wtf/CurrentTime.cpp \ JavaScriptCore/wtf/CurrentTime.h \ JavaScriptCore/wtf/DateMath.cpp \ @@ -220,8 +236,6 @@ javascriptcore_sources += \ JavaScriptCore/wtf/Deque.h \ JavaScriptCore/wtf/DisallowCType.h \ JavaScriptCore/wtf/Forward.h \ - JavaScriptCore/wtf/GOwnPtr.cpp \ - JavaScriptCore/wtf/GOwnPtr.h \ JavaScriptCore/wtf/GetPtr.h \ JavaScriptCore/wtf/HashCountedSet.h \ JavaScriptCore/wtf/HashFunctions.h \ @@ -241,11 +255,13 @@ javascriptcore_sources += \ JavaScriptCore/wtf/Noncopyable.h \ JavaScriptCore/wtf/NotFound.h \ JavaScriptCore/wtf/OwnArrayPtr.h \ + JavaScriptCore/wtf/OwnFastMallocPtr.h \ JavaScriptCore/wtf/OwnPtr.h \ JavaScriptCore/wtf/OwnPtrCommon.h \ JavaScriptCore/wtf/PassOwnPtr.h \ JavaScriptCore/wtf/PassRefPtr.h \ JavaScriptCore/wtf/Platform.h \ + JavaScriptCore/wtf/PossiblyNull.h \ JavaScriptCore/wtf/PtrAndFlags.h \ JavaScriptCore/wtf/RandomNumber.cpp \ JavaScriptCore/wtf/RandomNumber.h \ @@ -259,18 +275,25 @@ javascriptcore_sources += \ JavaScriptCore/wtf/SegmentedVector.h \ JavaScriptCore/wtf/StdLibExtras.h \ JavaScriptCore/wtf/StringExtras.h \ + JavaScriptCore/wtf/StringHashFunctions.h \ JavaScriptCore/wtf/TCPackedCache.h \ JavaScriptCore/wtf/TCPageMap.h \ JavaScriptCore/wtf/TCSpinLock.h \ - JavaScriptCore/wtf/ThreadSpecific.h \ - JavaScriptCore/wtf/Threading.h \ + JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp \ + JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h \ JavaScriptCore/wtf/Threading.cpp \ + JavaScriptCore/wtf/Threading.h \ JavaScriptCore/wtf/ThreadingPthreads.cpp \ + JavaScriptCore/wtf/ThreadSpecific.h \ JavaScriptCore/wtf/TypeTraits.cpp \ JavaScriptCore/wtf/TypeTraits.h \ JavaScriptCore/wtf/UnusedParam.h \ JavaScriptCore/wtf/Vector.h \ JavaScriptCore/wtf/VectorTraits.h \ + JavaScriptCore/wtf/gtk/GOwnPtr.cpp \ + JavaScriptCore/wtf/gtk/GOwnPtr.h \ + JavaScriptCore/wtf/gtk/GRefPtr.cpp \ + JavaScriptCore/wtf/gtk/GRefPtr.h \ JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \ JavaScriptCore/wtf/gtk/ThreadingGtk.cpp \ JavaScriptCore/wtf/unicode/Collator.h \ @@ -282,10 +305,12 @@ javascriptcore_sources += \ if TARGET_WIN32 javascriptcore_sources += \ JavaScriptCore/wtf/ThreadSpecificWin.cpp \ - JavaScriptCore/jit/ExecutableAllocatorWin.cpp + JavaScriptCore/jit/ExecutableAllocatorWin.cpp \ + JavaScriptCore/runtime/MarkStackWin.cpp else javascriptcore_sources += \ - JavaScriptCore/jit/ExecutableAllocatorPosix.cpp + JavaScriptCore/jit/ExecutableAllocatorPosix.cpp \ + JavaScriptCore/runtime/MarkStackPosix.cpp endif # ---- @@ -318,17 +343,12 @@ javascriptcore_sources += \ JavaScriptCore/yarr/RegexParser.h \ JavaScriptCore/yarr/RegexPattern.h -# Debug build -if ENABLE_DEBUG -javascriptcore_built_sources += \ - DerivedSources/Grammar.cpp \ - DerivedSources/Grammar.h - javascriptcore_sources += \ JavaScriptCore/interpreter/RegisterFile.cpp \ JavaScriptCore/interpreter/RegisterFile.h \ JavaScriptCore/bytecompiler/BytecodeGenerator.cpp \ JavaScriptCore/bytecompiler/BytecodeGenerator.h \ + JavaScriptCore/bytecompiler/NodesCodegen.cpp \ JavaScriptCore/bytecompiler/LabelScope.h \ JavaScriptCore/debugger/Debugger.cpp \ JavaScriptCore/debugger/Debugger.h \ @@ -377,6 +397,7 @@ javascriptcore_sources += \ JavaScriptCore/runtime/DateConversion.h \ JavaScriptCore/runtime/DateInstance.cpp \ JavaScriptCore/runtime/DateInstance.h \ + JavaScriptCore/runtime/DateInstanceCache.h \ JavaScriptCore/runtime/DatePrototype.cpp \ JavaScriptCore/runtime/DatePrototype.h \ JavaScriptCore/runtime/Error.cpp \ @@ -402,6 +423,8 @@ javascriptcore_sources += \ JavaScriptCore/runtime/Completion.cpp \ JavaScriptCore/runtime/JSArray.cpp \ JavaScriptCore/runtime/JSArray.h \ + JavaScriptCore/runtime/JSAPIValueWrapper.cpp \ + JavaScriptCore/runtime/JSAPIValueWrapper.h \ JavaScriptCore/runtime/JSCell.cpp \ JavaScriptCore/runtime/JSCell.h \ JavaScriptCore/runtime/JSFunction.cpp \ @@ -482,6 +505,9 @@ javascriptcore_sources += \ JavaScriptCore/runtime/Tracing.h \ JavaScriptCore/runtime/UString.cpp \ JavaScriptCore/runtime/UString.h \ + JavaScriptCore/runtime/UStringImpl.cpp \ + JavaScriptCore/runtime/UStringImpl.h \ + JavaScriptCore/runtime/WeakRandom.h \ JavaScriptCore/wtf/FastAllocBase.h \ JavaScriptCore/wtf/FastMalloc.cpp \ JavaScriptCore/wtf/FastMalloc.h \ @@ -491,17 +517,10 @@ javascriptcore_sources += \ JavaScriptCore/wtf/dtoa.cpp \ JavaScriptCore/wtf/dtoa.h -else -javascriptcore_built_nosources += \ +javascriptcore_built_sources += \ DerivedSources/Grammar.cpp \ DerivedSources/Grammar.h -javascriptcore_sources += \ - JavaScriptCore/AllInOneFile.cpp \ - JavaScriptCore/parser/ParserArena.cpp \ - JavaScriptCore/parser/ParserArena.h -endif # END ENABLE_DEBUG - DerivedSources/Grammar.h: DerivedSources/Grammar.cpp; DerivedSources/Grammar.cpp: $(srcdir)/JavaScriptCore/parser/Grammar.y diff --git a/Info.plist b/Info.plist index 17949b0..77c9eb8 100644 --- a/Info.plist +++ b/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -7,7 +7,7 @@ CFBundleExecutable ${PRODUCT_NAME} CFBundleGetInfoString - ${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. + ${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. CFBundleIdentifier com.apple.${PRODUCT_NAME} CFBundleInfoDictionaryVersion diff --git a/JavaScriptCore.exp b/JavaScriptCore.exp index 6d9af9b..aa82120 100644 --- a/JavaScriptCore.exp +++ b/JavaScriptCore.exp @@ -2,6 +2,7 @@ _JSCheckScriptSyntax _JSClassCreate _JSClassRelease _JSClassRetain +_JSContextGetGlobalContext _JSContextGetGlobalObject _JSContextGetGroup _JSContextGroupCreate @@ -78,6 +79,7 @@ _JSValueToNumber _JSValueToObject _JSValueToStringCopy _JSValueUnprotect +_WebCoreWebThreadIsLockedOrDisabled _WTFLog _WTFLogVerbose _WTFReportArgumentAssertionFailure @@ -89,101 +91,120 @@ __Z12jsRegExpFreeP8JSRegExp __Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc __Z15jsRegExpExecutePK8JSRegExpPKtiiPii __ZN14OpaqueJSString6createERKN3JSC7UStringE -__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_7UString3RepE -__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_7UString3RepE -__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_12JSGlobalDataEPNS_7UString3RepE -__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_9ExecStateEPNS_7UString3RepE +__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_11UStringImplE +__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_11UStringImplE +__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_12JSGlobalDataEPNS_11UStringImplE +__ZN3JSC10Identifier24checkSameIdentifierTableEPNS_9ExecStateEPNS_11UStringImplE __ZN3JSC10Identifier3addEPNS_9ExecStateEPKc -__ZN3JSC10Identifier5equalEPKNS_7UString3RepEPKc -__ZN3JSC10JSFunction4infoE -__ZN3JSC10JSFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE +__ZN3JSC10Identifier5equalEPKNS_11UStringImplEPKc +__ZN3JSC10JSFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE __ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeE __ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeEPKc __ZN3JSC10throwErrorEPNS_9ExecStateENS_9ErrorTypeERKNS_7UStringE __ZN3JSC11JSByteArray15createStructureENS_7JSValueE -__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS3_9ByteArrayEPKNS_9ClassInfoE +__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayEPKNS_9ClassInfoE __ZN3JSC11ParserArena5resetEv +__ZN3JSC11UStringImpl12sharedBufferEv +__ZN3JSC11UStringImpl6s_nullE +__ZN3JSC11UStringImpl7s_emptyE +__ZN3JSC11UStringImplD1Ev __ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE __ZN3JSC12DateInstance4infoE +__ZN3JSC12DateInstanceC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEd +__ZN3JSC12DateInstanceC1EPNS_9ExecStateEd __ZN3JSC12JSGlobalData10ClientDataD2Ev +__ZN3JSC12JSGlobalData11jsArrayVPtrE __ZN3JSC12JSGlobalData12createLeakedEv +__ZN3JSC12JSGlobalData12jsStringVPtrE +__ZN3JSC12JSGlobalData12stopSamplingEv +__ZN3JSC12JSGlobalData13startSamplingEv +__ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE +__ZN3JSC12JSGlobalData14resetDateCacheEv __ZN3JSC12JSGlobalData14sharedInstanceEv -__ZN3JSC12JSGlobalData6createEb +__ZN3JSC12JSGlobalData6createEv __ZN3JSC12JSGlobalDataD1Ev -__ZN3JSC12SamplingTool4dumpEPNS_9ExecStateE __ZN3JSC12SamplingTool5setupEv __ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE +__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh __ZN3JSC12StringObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE -__ZN3JSC12StringObject14toThisJSStringEPNS_9ExecStateE -__ZN3JSC12StringObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE +__ZN3JSC12StringObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC12StringObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC12StringObject4infoE -__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEERKNS_7UStringE +__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7UStringE __ZN3JSC12jsNumberCellEPNS_9ExecStateEd __ZN3JSC12nonInlineNaNEv __ZN3JSC13SamplingFlags4stopEv __ZN3JSC13SamplingFlags5startEv __ZN3JSC13SamplingFlags7s_flagsE __ZN3JSC13StatementNode6setLocEii -__ZN3JSC13jsOwnedStringEPNS_12JSGlobalDataERKNS_7UStringE __ZN3JSC14JSGlobalObject10globalExecEv -__ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectE -__ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectE +__ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj +__ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj +__ZN3JSC14JSGlobalObject12markChildrenERNS_9MarkStackE __ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj +__ZN3JSC14JSGlobalObject25destroyJSGlobalObjectDataEPv __ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE -__ZN3JSC14JSGlobalObject4markEv __ZN3JSC14JSGlobalObjectD2Ev __ZN3JSC14JSGlobalObjectnwEmPNS_12JSGlobalDataE __ZN3JSC14SamplingThread4stopEv __ZN3JSC14SamplingThread5startEj +__ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE __ZN3JSC14TimeoutChecker5resetEv -__ZN3JSC14constructArrayEPNS_9ExecStateERKNS_7ArgListE -__ZN3JSC15JSWrapperObject4markEv +__ZN3JSC15JSWrapperObject12markChildrenERNS_9MarkStackE +__ZN3JSC15createTypeErrorEPNS_9ExecStateEPKc __ZN3JSC15toInt32SlowCaseEdRb -__ZN3JSC16FunctionBodyNode13finishParsingEPNS_10IdentifierEm -__ZN3JSC16FunctionBodyNode14copyParametersEv -__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEPNS6_IPNS_12FuncDeclNodeELm0EEERKNS_10SourceCodeEji __ZN3JSC16InternalFunction4infoE -__ZN3JSC16InternalFunction4nameEPNS_12JSGlobalDataE -__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF10PassRefPtrINS_9StructureEEERKNS_10IdentifierE +__ZN3JSC16InternalFunction4nameEPNS_9ExecStateE +__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_10IdentifierE __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE -__ZN3JSC16JSVariableObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE +__ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE +__ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC16toUInt32SlowCaseEdRb __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb -__ZN3JSC17PropertyNameArray3addEPNS_7UString3RepE -__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE +__ZN3JSC17PropertyNameArray3addEPNS_11UStringImplE +__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE __ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectES6_RKNS_7ArgListEE __ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi __ZN3JSC18DebuggerActivationC1EPNS_8JSObjectE -__ZN3JSC19constructEmptyArrayEPNS_9ExecStateE +__ZN3JSC18PropertyDescriptor11setWritableEb +__ZN3JSC18PropertyDescriptor12setUndefinedEv +__ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj +__ZN3JSC18PropertyDescriptor13setEnumerableEb +__ZN3JSC18PropertyDescriptor15setConfigurableEb +__ZN3JSC18PropertyDescriptor17defaultAttributesE +__ZN3JSC18PropertyDescriptor21setAccessorDescriptorENS_7JSValueES1_j +__ZN3JSC18PropertyDescriptor9setGetterENS_7JSValueE +__ZN3JSC18PropertyDescriptor9setSetterENS_7JSValueE __ZN3JSC19initializeThreadingEv __ZN3JSC20MarkedArgumentBuffer10slowAppendENS_7JSValueE -__ZN3JSC20constructEmptyObjectEPNS_9ExecStateE __ZN3JSC23AbstractSamplingCounter4dumpEv __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE __ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE -__ZN3JSC4Heap11objectCountEv +__ZN3JSC25g_identifierTableSpecificE +__ZN3JSC29createIdentifierTableSpecificEv +__ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE +__ZN3JSC3NaNE __ZN3JSC4Heap14primaryHeapEndEv __ZN3JSC4Heap15recordExtraCostEm __ZN3JSC4Heap16primaryHeapBeginEv +__ZN3JSC4Heap17collectAllGarbageEv __ZN3JSC4Heap17globalObjectCountEv __ZN3JSC4Heap20protectedObjectCountEv -__ZN3JSC4Heap24setGCProtectNeedsLockingEv __ZN3JSC4Heap25protectedObjectTypeCountsEv __ZN3JSC4Heap26protectedGlobalObjectCountEv -__ZN3JSC4Heap4heapENS_7JSValueE __ZN3JSC4Heap6isBusyEv -__ZN3JSC4Heap7collectEv __ZN3JSC4Heap7destroyEv __ZN3JSC4Heap7protectENS_7JSValueE __ZN3JSC4Heap8allocateEm __ZN3JSC4Heap9unprotectENS_7JSValueE __ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE -__ZN3JSC5equalEPKNS_7UString3RepES3_ +__ZN3JSC5equalEPKNS_11UStringImplES2_ __ZN3JSC6JSCell11getCallDataERNS_8CallDataE __ZN3JSC6JSCell11getJSNumberEv __ZN3JSC6JSCell14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE @@ -192,74 +213,76 @@ __ZN3JSC6JSCell14toThisJSStringEPNS_9ExecStateE __ZN3JSC6JSCell16getConstructDataERNS_13ConstructDataE __ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE +__ZN3JSC6JSCell18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE __ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC6JSCell3putEPNS_9ExecStateEjNS_7JSValueE __ZN3JSC6JSCell9getObjectEv -__ZN3JSC6JSCellnwEmPNS_9ExecStateE +__ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE __ZN3JSC6JSLock12DropAllLocksC1EPNS_9ExecStateE -__ZN3JSC6JSLock12DropAllLocksC1Eb __ZN3JSC6JSLock12DropAllLocksD1Ev -__ZN3JSC6JSLock4lockEb -__ZN3JSC6JSLock6unlockEb +__ZN3JSC6JSLock4lockENS_14JSLockBehaviorE +__ZN3JSC6JSLock6unlockENS_14JSLockBehaviorE __ZN3JSC6JSLock9lockCountEv __ZN3JSC6JSLockC1EPNS_9ExecStateE __ZN3JSC6Parser5parseEPNS_12JSGlobalDataEPiPNS_7UStringE __ZN3JSC7CStringD1Ev __ZN3JSC7CStringaSERKS0_ __ZN3JSC7JSArray4infoE +__ZN3JSC7JSArray9setLengthEj +__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE __ZN3JSC7Profile10restoreAllEv __ZN3JSC7Profile5focusEPKNS_11ProfileNodeE __ZN3JSC7Profile7excludeEPKNS_11ProfileNodeE __ZN3JSC7Profile7forEachEMNS_11ProfileNodeEFvvE -__ZN3JSC7UString3Rep11computeHashEPKci -__ZN3JSC7UString3Rep11computeHashEPKti -__ZN3JSC7UString3Rep12sharedBufferEv -__ZN3JSC7UString3Rep14createFromUTF8EPKc -__ZN3JSC7UString3Rep14nullBaseStringE -__ZN3JSC7UString3Rep6createEPtiN3WTF10PassRefPtrINS3_21CrossThreadRefCountedINS3_16OwnFastMallocPtrItEEEEEE -__ZN3JSC7UString3Rep7destroyEv __ZN3JSC7UString4fromEd __ZN3JSC7UString4fromEi __ZN3JSC7UString4fromEj __ZN3JSC7UString4fromEl -__ZN3JSC7UString6appendEPKc -__ZN3JSC7UString6appendERKS0_ __ZN3JSC7UStringC1EPKc __ZN3JSC7UStringC1EPKti __ZN3JSC7UStringaSEPKc +__ZN3JSC8Debugger23recompileAllJSFunctionsEPNS_12JSGlobalDataE __ZN3JSC8Debugger6attachEPNS_14JSGlobalObjectE __ZN3JSC8Debugger6detachEPNS_14JSGlobalObjectE -__ZN3JSC8DebuggerC2Ev __ZN3JSC8DebuggerD2Ev __ZN3JSC8JSObject11hasInstanceEPNS_9ExecStateENS_7JSValueES3_ -__ZN3JSC8JSObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPS0_ -__ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_ +__ZN3JSC8JSObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j +__ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j __ZN3JSC8JSObject12lookupGetterEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE +__ZN3JSC8JSObject12markChildrenERNS_9MarkStackE __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj __ZN3JSC8JSObject15unwrappedObjectEv -__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE +__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC8JSObject17createInheritorIDEv +__ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEjbRNS_15PutPropertySlotE __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj __ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE __ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE +__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_7JSValueE __ZN3JSC8JSObject23allocatePropertyStorageEmm +__ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE -__ZN3JSC8JSObject4markEv +__ZN3JSC8JSString4RopeD1Ev __ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE __ZN3JSC8Profiler8profilerEv __ZN3JSC8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeENS_7JSValueE -__ZN3JSC8jsStringEPNS_12JSGlobalDataERKNS_7UStringE __ZN3JSC9CodeBlockD1Ev __ZN3JSC9CodeBlockD2Ev -__ZN3JSC9Structure13hasTransitionEPNS_7UString3RepEj +__ZN3JSC9MarkStack10s_pageSizeE +__ZN3JSC9MarkStack12releaseStackEPvm +__ZN3JSC9MarkStack13allocateStackEm +__ZN3JSC9MarkStack18initializePagesizeEv +__ZN3JSC9Structure13hasTransitionEPNS_11UStringImplEj __ZN3JSC9Structure17stopIgnoringLeaksEv __ZN3JSC9Structure18startIgnoringLeaksEv __ZN3JSC9Structure21addPropertyTransitionEPS0_RKNS_10IdentifierEjPNS_6JSCellERm @@ -268,9 +291,9 @@ __ZN3JSC9Structure25changePrototypeTransitionEPS0_NS_7JSValueE __ZN3JSC9Structure27despecifyDictionaryFunctionERKNS_10IdentifierE __ZN3JSC9Structure27despecifyFunctionTransitionEPS0_RKNS_10IdentifierE __ZN3JSC9Structure28addPropertyWithoutTransitionERKNS_10IdentifierEjPNS_6JSCellE -__ZN3JSC9Structure3getEPKNS_7UString3RepERjRPNS_6JSCellE +__ZN3JSC9Structure3getEPKNS_11UStringImplERjRPNS_6JSCellE __ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm -__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoE +__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoEj __ZN3JSC9StructureD1Ev __ZN3JSC9constructEPNS_9ExecStateENS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE __ZN3JSCeqERKNS_7UStringEPKc @@ -287,6 +310,7 @@ __ZN3WTF12isMainThreadEv __ZN3WTF12randomNumberEv __ZN3WTF13currentThreadEv __ZN3WTF13tryFastCallocEmm +__ZN3WTF13tryFastMallocEm __ZN3WTF15ThreadCondition4waitERNS_5MutexE __ZN3WTF15ThreadCondition6signalEv __ZN3WTF15ThreadCondition9broadcastEv @@ -295,6 +319,8 @@ __ZN3WTF15ThreadConditionC1Ev __ZN3WTF15ThreadConditionD1Ev __ZN3WTF16callOnMainThreadEPFvPvES0_ __ZN3WTF16fastZeroedMallocEm +__ZN3WTF18dateToDaysFrom1970Eiii +__ZN3WTF18monthFromDayInYearEib __ZN3WTF19initializeThreadingEv __ZN3WTF20fastMallocStatisticsEv __ZN3WTF21RefCountedLeakCounter16suppressMessagesEPKc @@ -303,9 +329,12 @@ __ZN3WTF21RefCountedLeakCounter9decrementEv __ZN3WTF21RefCountedLeakCounter9incrementEv __ZN3WTF21RefCountedLeakCounterC1EPKc __ZN3WTF21RefCountedLeakCounterD1Ev +__ZN3WTF23callOnMainThreadAndWaitEPFvPvES0_ +__ZN3WTF23dayInMonthFromDayInYearEib __ZN3WTF23waitForThreadCompletionEjPPv __ZN3WTF27releaseFastMallocFreeMemoryEv __ZN3WTF28setMainThreadCallbacksPausedEb +__ZN3WTF32doubleToStringInJavaScriptFormatEdPcPj __ZN3WTF36lockAtomicallyInitializedStaticMutexEv __ZN3WTF37parseDateFromNullTerminatedCharactersEPKc __ZN3WTF38unlockAtomicallyInitializedStaticMutexEv @@ -320,30 +349,41 @@ __ZN3WTF8Collator18setOrderLowerFirstEb __ZN3WTF8CollatorC1EPKc __ZN3WTF8CollatorD1Ev __ZN3WTF8fastFreeEPv +__ZN3WTF8msToYearEd +__ZN3WTF9dayInYearEdi __ZN3WTF9ByteArray6createEm +__ZNK3JSC10JSFunction23isHostFunctionNonInlineEv __ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE -__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE -__ZNK3JSC12DateInstance7getTimeERdRi -__ZNK3JSC12StringObject12toThisStringEPNS_9ExecStateE -__ZNK3JSC12StringObject8toStringEPNS_9ExecStateE +__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE __ZNK3JSC14JSGlobalObject14isDynamicScopeEv -__ZNK3JSC16FunctionBodyNode14isHostFunctionEv __ZNK3JSC16InternalFunction9classInfoEv __ZNK3JSC16JSVariableObject16isVariableObjectEv -__ZNK3JSC16JSVariableObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZNK3JSC17DebuggerCallFrame10thisObjectEv __ZNK3JSC17DebuggerCallFrame12functionNameEv __ZNK3JSC17DebuggerCallFrame22calculatedFunctionNameEv __ZNK3JSC17DebuggerCallFrame4typeEv __ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERNS_7JSValueE +__ZNK3JSC18PropertyDescriptor10enumerableEv +__ZNK3JSC18PropertyDescriptor12configurableEv +__ZNK3JSC18PropertyDescriptor16isDataDescriptorEv +__ZNK3JSC18PropertyDescriptor20isAccessorDescriptorEv +__ZNK3JSC18PropertyDescriptor6getterEv +__ZNK3JSC18PropertyDescriptor6setterEv +__ZNK3JSC18PropertyDescriptor8writableEv __ZNK3JSC4Heap10statisticsEv +__ZNK3JSC4Heap11objectCountEv +__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE __ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE __ZNK3JSC6JSCell14isGetterSetterEv +__ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE +__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateE +__ZNK3JSC6JSCell8toStringEPNS_9ExecStateE __ZNK3JSC6JSCell9classInfoEv -__ZNK3JSC6JSCell9getStringERNS_7UStringE -__ZNK3JSC6JSCell9getStringEv +__ZNK3JSC6JSCell9getStringEPNS_9ExecStateE +__ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE __ZNK3JSC6JSCell9getUInt32ERj +__ZNK3JSC6JSCell9toBooleanEPNS_9ExecStateE __ZNK3JSC7ArgList8getSliceEiRS0_ __ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateE __ZNK3JSC7JSValue19synthesizePrototypeEPNS_9ExecStateE @@ -360,12 +400,12 @@ __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateEj __ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE -__ZNK3JSC8JSObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE __ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE __ZNK3JSC8JSObject8toStringEPNS_9ExecStateE __ZNK3JSC8JSObject9classNameEv __ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE +__ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE __ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE __ZNK3JSC9HashTable11deleteTableEv __ZNK3WTF8Collator7collateEPKtmS2_m @@ -374,7 +414,7 @@ __ZTVN3JSC14JSGlobalObjectE __ZTVN3JSC15JSWrapperObjectE __ZTVN3JSC16InternalFunctionE __ZTVN3JSC16JSVariableObjectE -__ZTVN3JSC17JSAPIValueWrapperE +__ZTVN3JSC8DebuggerE __ZTVN3JSC8JSObjectE __ZTVN3JSC8JSStringE _jscore_fastmalloc_introspection diff --git a/JavaScriptCore.gyp/JavaScriptCore.gyp b/JavaScriptCore.gyp/JavaScriptCore.gyp new file mode 100644 index 0000000..66f40e9 --- /dev/null +++ b/JavaScriptCore.gyp/JavaScriptCore.gyp @@ -0,0 +1,191 @@ +# +# Copyright (C) 2009 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. +# + +{ + 'includes': [ + # FIXME: Sense whether upstream or downstream build, and + # include the right features.gypi + '../../WebKit/chromium/features.gypi', + '../JavaScriptCore.gypi', + ], + 'variables': { + # Location of the chromium src directory. + 'conditions': [ + ['inside_chromium_build==0', { + # Webkit is being built outside of the full chromium project. + 'chromium_src_dir': '../../WebKit/chromium', + },{ + # WebKit is checked out in src/chromium/third_party/WebKit + 'chromium_src_dir': '../../../..', + }], + ], + }, + 'targets': [ + { + # This target sets up defines and includes that are required by WTF and + # its dependents. + 'target_name': 'wtf_config', + 'type': 'none', + 'msvs_guid': '2E2D3301-2EC4-4C0F-B889-87073B30F673', + 'direct_dependent_settings': { + 'defines': [ + # Import features_defines from features.gypi + '<@(feature_defines)', + + # Turns on #if PLATFORM(CHROMIUM) + 'BUILDING_CHROMIUM__=1', + # Controls wtf/FastMalloc + # FIXME: consider moving into config.h + 'USE_SYSTEM_MALLOC=1', + ], + 'conditions': [ + ['OS=="win"', { + 'defines': [ + '__STD_C', + '_CRT_SECURE_NO_DEPRECATE', + '_SCL_SECURE_NO_DEPRECATE', + 'CRASH=__debugbreak', + ], + 'include_dirs': [ + '../os-win32', + ], + }], + ['OS=="mac"', { + 'defines': [ + # Use USE_NEW_THEME on Mac. + 'WTF_USE_NEW_THEME=1', + ], + }], + ['OS=="linux" or OS=="freebsd"', { + 'defines': [ + 'WTF_USE_PTHREADS=1', + ], + }], + ], + } + }, + { + 'target_name': 'wtf', + 'type': '<(library)', + 'msvs_guid': 'AA8A5A85-592B-4357-BC60-E0E91E026AF6', + 'dependencies': [ + 'wtf_config', + '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n', + '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc', + ], + 'include_dirs': [ + '../', + '../wtf', + '../wtf/unicode', + ], + 'sources': [ + '<@(javascriptcore_files)', + ], + 'sources/': [ + # First exclude everything ... + ['exclude', '../'], + # ... Then include what we want. + ['include', '../wtf/'], + # GLib/GTK, even though its name doesn't really indicate. + ['exclude', '/(gtk|glib)/.*\\.(cpp|h)$'], + ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx)\\.(cpp|mm)$'], + ['exclude', 'wtf/CurrentTime\\.cpp$'], + ['exclude', 'wtf/TC.*\\.(cpp|h)$'], + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '../', + '../wtf', + ], + }, + 'export_dependent_settings': [ + 'wtf_config', + '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n', + '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc', + ], + 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706], + 'conditions': [ + ['OS=="win"', { + 'sources/': [ + ['exclude', 'ThreadIdentifierDataPthreads\\.(h|cpp)$'], + ['exclude', 'ThreadingPthreads\\.cpp$'], + ['include', 'Thread(ing|Specific)Win\\.cpp$'] + ], + 'include_dirs!': [ + '<(SHARED_INTERMEDIATE_DIR)/webkit', + ], + }], + ], + }, + { + 'target_name': 'pcre', + 'type': '<(library)', + 'dependencies': [ + 'wtf', + ], + 'conditions': [ + ['OS=="win"', { + 'dependencies': ['<(chromium_src_dir)/build/win/system.gyp:cygwin'], + }], + ], + 'msvs_guid': '49909552-0B0C-4C14-8CF6-DB8A2ADE0934', + 'actions': [ + { + 'action_name': 'dftables', + 'inputs': [ + '../pcre/dftables', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/chartables.c', + ], + 'action': ['perl', '-w', '<@(_inputs)', '<@(_outputs)'], + }, + ], + 'include_dirs': [ + '<(INTERMEDIATE_DIR)', + ], + 'sources': [ + '<@(javascriptcore_files)', + ], + 'sources/': [ + # First exclude everything ... + ['exclude', '../'], + # ... Then include what we want. + ['include', '../pcre/'], + # ucptable.cpp is #included by pcre_ucp_searchfunchs.cpp and is not + # intended to be compiled directly. + ['exclude', '../pcre/ucptable.cpp$'], + ], + 'export_dependent_settings': [ + 'wtf', + ], + }, + ], # targets +} diff --git a/JavaScriptCore.gypi b/JavaScriptCore.gypi index 2d69c7d..24577da 100644 --- a/JavaScriptCore.gypi +++ b/JavaScriptCore.gypi @@ -1,7 +1,6 @@ { 'variables': { 'javascriptcore_files': [ - 'AllInOneFile.cpp', 'API/APICast.h', 'API/JavaScript.h', 'API/JavaScriptCore.h', @@ -19,6 +18,7 @@ 'API/JSClassRef.h', 'API/JSContextRef.cpp', 'API/JSContextRef.h', + 'API/JSContextRefPrivate.h', 'API/JSObjectRef.cpp', 'API/JSObjectRef.h', 'API/JSProfilerPrivate.cpp', @@ -64,6 +64,7 @@ 'bytecode/StructureStubInfo.h', 'bytecompiler/BytecodeGenerator.cpp', 'bytecompiler/BytecodeGenerator.h', + 'bytecompiler/NodesCodegen.cpp', 'bytecompiler/Label.h', 'bytecompiler/LabelScope.h', 'bytecompiler/RegisterID.h', @@ -148,8 +149,6 @@ 'pcre/ucpinternal.h', 'pcre/ucptable.cpp', 'profiler/CallIdentifier.h', - 'profiler/HeavyProfile.cpp', - 'profiler/HeavyProfile.h', 'profiler/Profile.cpp', 'profiler/Profile.h', 'profiler/ProfileGenerator.cpp', @@ -159,8 +158,6 @@ 'profiler/Profiler.cpp', 'profiler/Profiler.h', 'profiler/ProfilerServer.h', - 'profiler/TreeProfile.cpp', - 'profiler/TreeProfile.h', 'runtime/ArgList.cpp', 'runtime/ArgList.h', 'runtime/Arguments.cpp', @@ -194,6 +191,7 @@ 'runtime/DateConversion.h', 'runtime/DateInstance.cpp', 'runtime/DateInstance.h', + 'runtime/DateInstanceCache.h', 'runtime/DatePrototype.cpp', 'runtime/DatePrototype.h', 'runtime/Error.cpp', @@ -255,6 +253,7 @@ 'runtime/JSString.cpp', 'runtime/JSString.h', 'runtime/JSType.h', + 'runtime/JSTypeInfo.h', 'runtime/JSValue.cpp', 'runtime/JSValue.h', 'runtime/JSVariableObject.cpp', @@ -265,6 +264,9 @@ 'runtime/LiteralParser.h', 'runtime/Lookup.cpp', 'runtime/Lookup.h', + 'runtime/MarkStack.cpp', + 'runtime/MarkStack.h', + 'runtime/MarkStackWin.cpp', 'runtime/MathObject.cpp', 'runtime/MathObject.h', 'runtime/NativeErrorConstructor.cpp', @@ -284,6 +286,8 @@ 'runtime/ObjectPrototype.h', 'runtime/Operations.cpp', 'runtime/Operations.h', + 'runtime/PropertyDescriptor.cpp', + 'runtime/PropertyDescriptor.h', 'runtime/PropertyMapHashTable.h', 'runtime/PropertyNameArray.cpp', 'runtime/PropertyNameArray.h', @@ -323,9 +327,9 @@ 'runtime/TimeoutChecker.cpp', 'runtime/TimeoutChecker.h', 'runtime/Tracing.h', - 'runtime/TypeInfo.h', 'runtime/UString.cpp', 'runtime/UString.h', + 'runtime/WeakRandom.h', 'wrec/CharacterClass.cpp', 'wrec/CharacterClass.h', 'wrec/CharacterClassConstructor.cpp', @@ -363,8 +367,8 @@ 'wtf/FastMalloc.h', 'wtf/Forward.h', 'wtf/GetPtr.h', - 'wtf/GOwnPtr.cpp', - 'wtf/GOwnPtr.h', + 'wtf/gtk/GOwnPtr.cpp', + 'wtf/gtk/GOwnPtr.h', 'wtf/gtk/MainThreadGtk.cpp', 'wtf/gtk/ThreadingGtk.cpp', 'wtf/HashCountedSet.h', @@ -394,8 +398,6 @@ 'wtf/PassRefPtr.h', 'wtf/Platform.h', 'wtf/PtrAndFlags.h', - 'wtf/qt/MainThreadQt.cpp', - 'wtf/qt/ThreadingQt.cpp', 'wtf/RandomNumber.cpp', 'wtf/RandomNumber.h', 'wtf/RandomNumberSeed.h', @@ -408,11 +410,16 @@ 'wtf/SegmentedVector.h', 'wtf/StdLibExtras.h', 'wtf/StringExtras.h', + 'wtf/StringHashFunctions.h', 'wtf/TCPackedCache.h', + 'wtf/qt/MainThreadQt.cpp', + 'wtf/qt/ThreadingQt.cpp', 'wtf/TCPageMap.h', 'wtf/TCSpinLock.h', 'wtf/TCSystemAlloc.cpp', 'wtf/TCSystemAlloc.h', + 'wtf/ThreadIdentifierDataPthreads.cpp', + 'wtf/ThreadIdentifierDataPthreads.h', 'wtf/Threading.cpp', 'wtf/Threading.h', 'wtf/ThreadingNone.cpp', diff --git a/JavaScriptCore.iPhone.order b/JavaScriptCore.iPhone.order index 4cff982..f93c2ce 100644 --- a/JavaScriptCore.iPhone.order +++ b/JavaScriptCore.iPhone.order @@ -1,25 +1,27 @@ -// JavaScriptCore order file generated on Fri Feb 19 17:16:12 -0800 2010 by Andrew Turley (aturley@apple.com) +// JavaScriptCore order file generated on Thu Apr 15 15:17:53 -0700 2010 by Mike Knippers (knippers@apple.com) // Scenario included SpringBoard launch/unlock with passcode, launching all apps, MobileSafari page loads, // keyboard usage and general app interaction. __ZN3WTF10fastMallocEm __ZN3WTF10fastMallocILb1EEEPvm __ZN3WTF20TCMalloc_ThreadCache10InitModuleEv - stub helpers __ZN3WTFL15InitSizeClassesEv __Z20TCMalloc_SystemAllocmPmm __ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv +__ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t +__ZN3WTF20TCMalloc_ThreadCache14PickNextSampleEm __ZN3WTF25TCMalloc_Central_FreeList11RemoveRangeEPPvS2_Pi __ZN3WTF25TCMalloc_Central_FreeList18FetchFromSpansSafeEv +__ZN3WTF17TCMalloc_PageHeap3NewEm __ZN3WTF17TCMalloc_PageHeap10AllocLargeEm __ZN3WTF17TCMalloc_PageHeap8GrowHeapEm __ZN3WTFL13MetaDataAllocEm __ZN3WTF17TCMalloc_PageHeap6DeleteEPNS_4SpanE +__ZN3WTF17TCMalloc_PageHeap19IncrementalScavengeEm +__Z22TCMalloc_SystemReleasePvm +__ZN3WTF17TCMalloc_PageHeap5CarveEPNS_4SpanEmb __ZN3WTF16fastZeroedMallocEm __ZN3WTF8fastFreeEPv __ZN3WTF12isMainThreadEv -__ZN3WTFL25identifierByPthreadHandleERKP17_opaque_pthread_t -__ZN3WTFL35establishIdentifierForPthreadHandleERP17_opaque_pthread_t -__ZN3WTF9HashTableIjSt4pairIjP17_opaque_pthread_tENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEENSA_IS3_EEEESB_E6rehashEi __ZN3JSC19initializeThreadingEv __ZN3JSCL23initializeThreadingOnceEv __ZN3WTF19initializeThreadingEv @@ -27,207 +29,292 @@ __ZN3WTF20initializeMainThreadEv __ZN3WTF5MutexC1Ev __ZN3WTF28initializeMainThreadPlatformEv __ZN3JSC17initializeUStringEv +__ZN3JSC12JSGlobalData10storeVPtrsEv +__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoEj +__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC7JSArrayD1Ev +__ZN3JSC7JSArrayD2Ev +__ZN3JSC9StructureD1Ev +__ZN3JSC9StructureD2Ev +__ZN3JSC11JSByteArray15createStructureENS_7JSValueE +__ZN3JSC11JSByteArrayD1Ev +__ZN3JSC8JSStringD1Ev +__ZN3JSC8JSStringD2Ev +__ZN3JSC10JSFunctionC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC10JSFunctionD1Ev +__ZN3JSC10JSFunctionD2Ev +__ZN3JSC18VPtrHackExecutableD0Ev +__ZN3JSC16InternalFunctionD2Ev __ZN3WTF15initializeDatesEv +__ZN3WTF20equivalentYearForDSTEi __ZN3WTF11currentTimeEv __ZN3WTF14FastMallocZone4sizeEP14_malloc_zone_tPKv __ZN3WTF36lockAtomicallyInitializedStaticMutexEv __ZN3WTF38unlockAtomicallyInitializedStaticMutexEv -__ZN3JSC8DebuggerC2Ev __ZN3WTF5Mutex4lockEv __ZN3WTF5Mutex6unlockEv __ZN3WTF6strtodEPKcPPc -__ZN3JSC6JSLock12DropAllLocksC1Eb +__ZN3JSC6JSLock12DropAllLocksC1ENS_14JSLockBehaviorE +__ZN3JSC6JSLock12DropAllLocksC2ENS_14JSLockBehaviorE __ZN3JSCL17createJSLockCountEv __ZN3JSC6JSLock12DropAllLocksD1Ev __ZN3WTF20TCMalloc_ThreadCache18DestroyThreadCacheEPv __ZN3WTF20TCMalloc_ThreadCache11DeleteCacheEPS0_ -__ZN3WTF25TCMalloc_Central_FreeList11InsertRangeEPvS1_i +__ZN3WTF20TCMalloc_ThreadCache21ReleaseToCentralCacheEmi __ZN3WTF25TCMalloc_Central_FreeList18ReleaseListToSpansEPv -__ZN3WTF5MutexD1Ev -__ZN3WTF15ThreadConditionC1Ev -__ZN3WTF12createThreadEPFPvS0_ES0_PKc -__ZN3WTF20createThreadInternalEPFPvS0_ES0_PKc -__ZN3WTFL16threadEntryPointEPv -__ZN3WTF21setThreadNameInternalEPKc -__ZN3WTF13currentThreadEv -__ZN3WTF15ThreadCondition9broadcastEv -__ZN3WTF15ThreadCondition6signalEv -__ZN3WTF16callOnMainThreadEPFvPvES0_ -__ZN3WTF5DequeINS_19FunctionWithContextEE14expandCapacityEv -__ZN3WTF37scheduleDispatchFunctionsOnMainThreadEv --[WTFMainThreadCaller call] -__ZN3WTF31dispatchFunctionsFromMainThreadEv -__ZN3WTF11fastReallocEPvm -__ZN3WTF11fastReallocILb1EEEPvS1_m -__Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc -__ZL30calculateCompiledPatternLengthPKti24JSRegExpIgnoreCaseOptionR11CompileDataR9ErrorCode -__ZL11checkEscapePPKtS0_P9ErrorCodeib -__ZL13compileBranchiPiPPhPPKtS3_P9ErrorCodeS_S_R11CompileData -__Z15jsRegExpExecutePK8JSRegExpPKtiiPii -__ZL5matchPKtPKhiR9MatchData -__ZN3WTF25TCMalloc_Central_FreeList11ShrinkCacheEib -__ZN3JSC7UStringC1EPKti -__ZN3JSC7UStringC2EPKti __ZN3JSC12JSGlobalData12createLeakedEv __ZN3JSC9Structure18startIgnoringLeaksEv -__ZN3JSC7VPtrSetC2Ev -__ZN3JSC9StructureC1ENS_7JSValueERKNS_8TypeInfoE -__ZN3JSC7JSArrayC1EN3WTF10PassRefPtrINS_9StructureEEE -__ZN3JSC7JSArrayD1Ev -__ZN3JSC7JSArrayD2Ev -__ZN3WTF10RefCountedIN3JSC9StructureEE5derefEv -__ZN3JSC9StructureD1Ev -__ZN3JSC9StructureD2Ev -__ZN3JSC11JSByteArray15createStructureENS_7JSValueE -__ZN3JSC11JSByteArrayD1Ev -__ZN3JSC8JSStringD1Ev -__ZN3JSC10JSFunctionD1Ev -__ZN3JSC12JSGlobalDataC2EbRKNS_7VPtrSetE +__ZN3JSC12JSGlobalDataC2Eb __ZN3JSC21createIdentifierTableEv __ZN3JSC17CommonIdentifiersC1EPNS_12JSGlobalDataE __ZN3JSC17CommonIdentifiersC2EPNS_12JSGlobalDataE __ZN3JSC10Identifier3addEPNS_12JSGlobalDataEPKc -__ZN3WTF7HashSetIPN3JSC7UString3RepENS_7StrHashIS4_EENS_10HashTraitsIS4_EEE3addIPKcNS1_17CStringTranslatorEEESt4pairINS_24HashTableIteratorAdapterINS_9HashTableIS4_S4_NS_17IdentityExtractorIS4_EES6_S8_S8_EES4_EEbERKT_ -__ZN3WTF9HashTableIPN3JSC7UString3RepES4_NS_17IdentityExtractorIS4_EENS_7StrHashIS4_EENS_10HashTraitsIS4_EESA_E6rehashEi -__ZN3WTF9HashTableIPKcSt4pairIS2_NS_6RefPtrIN3JSC7UString3RepEEEENS_18PairFirstExtractorIS9_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSF_IS8_EEEESG_E6rehashEi +__ZNK3JSC11UStringImpl4hashEv +__ZN3WTF9HashTableIPKcSt4pairIS2_NS_6RefPtrIN3JSC11UStringImplEEEENS_18PairFirstExtractorIS8_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSE_IS7_EEEESF_E4findIS2_NS_22IdentityHashTranslatorIS2_S8_SC_EEEENS_17HashTableIteratorIS2_S8_SA_SC_SH_SF_EERKT_ +__ZN3WTF9HashTableIPKcSt4pairIS2_NS_6RefPtrIN3JSC11UStringImplEEEENS_18PairFirstExtractorIS8_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSE_IS7_EEEESF_E6rehashEi +__ZN3WTF9HashTableIPKcSt4pairIS2_NS_6RefPtrIN3JSC11UStringImplEEEENS_18PairFirstExtractorIS8_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSE_IS7_EEEESF_E3addIS2_S7_NS_17HashMapTranslatorIS8_SH_SC_EEEES3_INS_17HashTableIteratorIS2_S8_SA_SC_SH_SF_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi +__ZN3JSC5equalEPKNS_11UStringImplES2_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_ __ZN3JSC12SmallStringsC1Ev __ZN3JSC5LexerC1EPNS_12JSGlobalDataE -__ZN3JSC5LexerC2EPNS_12JSGlobalDataE +__ZN3JSC11ParserArenaC1Ev __ZN3JSC11InterpreterC1Ev __ZN3JSC11InterpreterC2Ev __ZN3JSC11Interpreter14privateExecuteENS0_13ExecutionFlagEPNS_12RegisterFileEPNS_9ExecStateEPNS_7JSValueE -__ZN3WTF9HashTableIPKvSt4pairIS2_N3JSC8OpcodeIDEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E6expandEv +__ZN3WTF9HashTableIPKvSt4pairIS2_N3JSC8OpcodeIDEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E4findIS2_NS_22IdentityHashTranslatorIS2_S6_SA_EEEENS_17HashTableIteratorIS2_S6_S8_SA_SF_SD_EERKT_ +__ZN3WTF9HashTableIPKvSt4pairIS2_N3JSC8OpcodeIDEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E6rehashEi +__ZN3WTF9HashTableIPKvSt4pairIS2_N3JSC8OpcodeIDEENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E3addIS2_S5_NS_17HashMapTranslatorIS6_SF_SA_EEEES3_INS_17HashTableIteratorIS2_S6_S8_SA_SF_SD_EEbERKT_RKT0_ __ZN3JSC14TimeoutCheckerC1Ev __ZN3JSC4HeapC1EPNS_12JSGlobalDataE +__ZN3JSC4Heap13allocateBlockEv +__ZN3WTF11fastReallocEPvm +__ZN3WTF11fastReallocILb1EEEPvS1_m +__ZN3JSC9MarkStack18initializePagesizeEv +__ZN3JSC9MarkStack13allocateStackEm __ZN3JSC27startProfilerServerIfNeededEv +[ProfilerServer sharedProfileServer] -[ProfilerServer init] +__ZN3JSC25setDefaultIdentifierTableEPNS_15IdentifierTableE +__ZN3JSC29createIdentifierTableSpecificEv +__ZN3JSCL37createIdentifierTableSpecificCallbackEv +__ZN3JSC25setCurrentIdentifierTableEPNS_15IdentifierTableE __ZN3JSC9Structure17stopIgnoringLeaksEv +__ZN3WTF5MutexD1Ev +__ZN3WTF25TCMalloc_Central_FreeList14MakeCacheSpaceEv +__ZN3WTF25TCMalloc_Central_FreeList11ShrinkCacheEib +__ZN3WTF16callOnMainThreadEPFvPvES0_ +__ZN3WTF5DequeINS_19FunctionWithContextEE14expandCapacityEv +__ZN3WTF37scheduleDispatchFunctionsOnMainThreadEv +-[WTFMainThreadCaller call] +__ZN3WTF31dispatchFunctionsFromMainThreadEv +__ZN3WTF15ThreadConditionC1Ev +__ZN3WTF12createThreadEPFPvS0_ES0_PKc +__ZN3WTF20createThreadInternalEPFPvS0_ES0_PKc +__ZN3WTFL16threadEntryPointEPv +__ZN3WTFL35establishIdentifierForPthreadHandleERKP17_opaque_pthread_t +__ZN3WTF9HashTableIjSt4pairIjP17_opaque_pthread_tENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEENSA_IS3_EEEESB_E6rehashEi +__ZN3WTF9HashTableIjSt4pairIjP17_opaque_pthread_tENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEENSA_IS3_EEEESB_E4findIjNS_22IdentityHashTranslatorIjS4_S8_EEEENS_17HashTableIteratorIjS4_S6_S8_SD_SB_EERKT_ +__ZN3WTF9HashTableIjSt4pairIjP17_opaque_pthread_tENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEENSA_IS3_EEEESB_E3addIjS3_NS_17HashMapTranslatorIS4_SD_S8_EEEES1_INS_17HashTableIteratorIjS4_S6_S8_SD_SB_EEbERKT_RKT0_ +__ZN3WTF31initializeCurrentThreadInternalEPKc +__ZN3WTF20ThreadIdentifierData10initializeEj +__ZN3WTF20ThreadIdentifierData23initializeKeyOnceHelperEv +__ZN3WTF13currentThreadEv +__ZN3WTF20ThreadIdentifierData10identifierEv +__ZN3WTF15ThreadCondition4waitERNS_5MutexE +__ZN3WTF15ThreadCondition9broadcastEv +__ZN3WTF15ThreadCondition6signalEv +__Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc +__ZL30calculateCompiledPatternLengthPKti24JSRegExpIgnoreCaseOptionR11CompileDataR9ErrorCode +__ZL11checkEscapePPKtS0_P9ErrorCodeib +__ZL13compileBranchiPiPPhPPKtS3_P9ErrorCodeS_S_R11CompileData +__Z15jsRegExpExecutePK8JSRegExpPKtiiPii +__ZL5matchPKtPKhiR9MatchData +__ZN3JSC7UStringC1EPKti +__ZN3JSC7UStringC2EPKti +__ZN3WTF13tryFastMallocEm +__ZN3WTF10fastMallocILb0EEEPvm +__ZN3JSC11UStringImpl12sharedBufferEv __ZN3JSC4Heap8allocateEm -__ZN3JSCL13allocateBlockILNS_8HeapTypeE0EEEPNS_14CollectorBlockEv -__ZN3JSC4Heap4heapENS_7JSValueE +__ZN3JSC6JSCellD1Ev __ZN3JSC4Heap7protectENS_7JSValueE __ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E6rehashEi +__ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E4findIS3_NS_22IdentityHashTranslatorIS3_S5_S9_EEEENS_17HashTableIteratorIS3_S5_S7_S9_SE_SC_EERKT_ +__ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E3addIS3_jNS_17HashMapTranslatorIS5_SE_S9_EEEES4_INS_17HashTableIteratorIS3_S5_S7_S9_SE_SC_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E3addIS3_S5_NS_22IdentityHashTranslatorIS3_S5_S9_EEEES4_INS_17HashTableIteratorIS3_S5_S7_S9_SE_SC_EEbERKT_RKT0_ __ZN3JSC14JSGlobalObjectnwEmPNS_12JSGlobalDataE __ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE __ZN3JSC14JSGlobalObject5resetENS_7JSValueE -__ZN3JSC4Heap12heapAllocateILNS_8HeapTypeE0EEEPvm +__ZN3JSC17FunctionPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC17FunctionPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_10IdentifierE __ZN3JSC8jsStringEPNS_12JSGlobalDataERKNS_7UStringE __ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE __ZN3JSC7UStringC1EPKc __ZN3JSCL9createRepEPKc __ZN3JSC8JSObject17putDirectInternalERKNS_10IdentifierENS_7JSValueEjbRNS_15PutPropertySlotEPNS_6JSCellE __ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm -__ZN3JSC9Structure3getEPKNS_7UString3RepERjRPNS_6JSCellE +__ZNK3JSC24StructureTransitionTable3getERKSt4pairIN3WTF6RefPtrINS_11UStringImplEEEjEPNS_6JSCellE +__ZN3JSC9Structure3getEPKNS_11UStringImplERjRPNS_6JSCellE __ZN3JSC9Structure21addPropertyTransitionEPS0_RKNS_10IdentifierEjPNS_6JSCellERm __ZN3JSC9Structure3putERKNS_10IdentifierEjPNS_6JSCellE +__ZN3JSC24StructureTransitionTable3addERKSt4pairIN3WTF6RefPtrINS_11UStringImplEEEjEPNS_9StructureEPNS_6JSCellE __ZN3JSC9Structure28addPropertyWithoutTransitionERKNS_10IdentifierEjPNS_6JSCellE __ZN3JSC17FunctionPrototype21addFunctionPropertiesEPNS_9ExecStateEPNS_9StructureEPPNS_17PrototypeFunctionES7_ -__ZN3JSC17PrototypeFunctionC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE +__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE +__ZN3JSC17PrototypeFunctionC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE __ZN3JSC8JSObject34putDirectFunctionWithoutTransitionEPNS_9ExecStateEPNS_16InternalFunctionEj -__ZN3JSC15ObjectPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC16InternalFunction4nameEPNS_9ExecStateE +__ZN3JSC9Structure3getERKNS_10IdentifierE +__ZN3JSC15ObjectPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC15ObjectPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ __ZN3JSC9Structure26rehashPropertyMapHashTableEj -__ZN3JSC15StringPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEE -__ZN3JSC16BooleanPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_ -__ZN3JSC15NumberPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_ -__ZN3JSCL13allocateBlockILNS_8HeapTypeE1EEEPNS_14CollectorBlockEv -__ZN3JSC15RegExpPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_ -__ZN3JSC14ErrorPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_ -__ZN3WTF6RefPtrIN3JSC7UString3RepEED1Ev -__ZN3JSC20NativeErrorPrototypeC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEERKNS_7UStringES9_ -__ZN3JSC17ObjectConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_15ObjectPrototypeE -__ZN3JSC19FunctionConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_17FunctionPrototypeE +__ZN3JSC8JSObject17createInheritorIDEv +__ZN3JSC14ArrayPrototypeC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC7JSArrayC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC15StringPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC15StringPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC16BooleanPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC16BooleanPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC13BooleanObjectC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC15NumberPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC15NumberPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC12NumberObjectC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC13DatePrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC12DateInstanceC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC12nonInlineNaNEv +__ZN3JSC15RegExpPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC15RegExpPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC14ErrorPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC14ErrorPrototypeC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_ +__ZN3JSC13ErrorInstanceC2EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC18jsNontrivialStringEPNS_12JSGlobalDataEPKc +__ZN3JSC20NativeErrorPrototypeC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7UStringES9_ +__ZN3JSC17ObjectConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15ObjectPrototypeEPS5_ +__ZN3JSC17ObjectConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15ObjectPrototypeEPS5_ +__ZN3JSC10Identifier3addEPNS_9ExecStateEPKc +__ZN3JSC19FunctionConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_17FunctionPrototypeE +__ZN3JSC19FunctionConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_17FunctionPrototypeE __ZNK3JSC16InternalFunction9classInfoEv -__ZN3JSC16ArrayConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_14ArrayPrototypeE +__ZN3JSC16ArrayConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_14ArrayPrototypeEPS5_ +__ZN3JSC16ArrayConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_14ArrayPrototypeEPS5_ __ZNK3JSC14ArrayPrototype9classInfoEv -__ZN3JSC17StringConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_PNS_15StringPrototypeE +__ZN3JSC17StringConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_PNS_15StringPrototypeE +__ZN3JSC17StringConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_PNS_15StringPrototypeE __ZNK3JSC15StringPrototype9classInfoEv -__ZN3JSC18BooleanConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_16BooleanPrototypeE +__ZN3JSC18BooleanConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_16BooleanPrototypeE +__ZN3JSC18BooleanConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_16BooleanPrototypeE __ZNK3JSC13BooleanObject9classInfoEv -__ZN3JSC17NumberConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_15NumberPrototypeE -__ZN3JSC15DateConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPS5_PNS_13DatePrototypeE +__ZN3JSC17NumberConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15NumberPrototypeE +__ZN3JSC17NumberConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15NumberPrototypeE +__ZN3JSC15DateConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_PNS_13DatePrototypeE +__ZN3JSC15DateConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPS5_PNS_13DatePrototypeE __ZNK3JSC13DatePrototype9classInfoEv -__ZN3JSC17RegExpConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_15RegExpPrototypeE -__ZN3JSC16ErrorConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_14ErrorPrototypeE +__ZN3JSC17RegExpConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15RegExpPrototypeE +__ZN3JSC17RegExpConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_15RegExpPrototypeE +__ZN3JSC16ErrorConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_14ErrorPrototypeE +__ZN3JSC16ErrorConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_14ErrorPrototypeE __ZNK3JSC13ErrorInstance9classInfoEv -__ZN3JSC22NativeErrorConstructorC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEPNS_20NativeErrorPrototypeE -__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_7UString3RepE -__ZN3WTF7HashSetIPN3JSC7UString3RepENS_7StrHashIS4_EENS_10HashTraitsIS4_EEE3addERKS4_ -__ZN3JSC10MathObjectC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEE +__ZN3JSC22NativeErrorConstructorC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_20NativeErrorPrototypeE +__ZN3JSC22NativeErrorConstructorC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_20NativeErrorPrototypeE +__ZNK3JSC6JSCell9getStringEPNS_9ExecStateE +__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_11UStringImplE +__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPNS_11UStringImplE +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E3addIS3_S3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ +__ZN3JSC8JSObject23allocatePropertyStorageEmm +__ZN3JSC10MathObjectC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC10MathObjectC2EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEE __ZN3JSC12SmallStrings24singleCharacterStringRepEh -__ZN3JSC7JSValueC1EPNS_9ExecStateEd -__ZN3WTF7HashMapINS_6RefPtrIN3JSC7UString3RepEEENS2_16SymbolTableEntryENS2_17IdentifierRepHashENS_10HashTraitsIS5_EENS2_26SymbolTableIndexHashTraitsEE3addEPS4_RKS6_ -__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEESt4pairIS5_NS2_16SymbolTableEntryEENS_18PairFirstExtractorIS8_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS5_EENS2_26SymbolTableIndexHashTraitsEEESE_E6expandEv +__ZN3JSC19SmallStringsStorageC2Ev +__ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_16SymbolTableEntryEENS_18PairFirstExtractorIS7_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS4_EENS2_26SymbolTableIndexHashTraitsEEESD_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_16SymbolTableEntryEENS_18PairFirstExtractorIS7_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS4_EENS2_26SymbolTableIndexHashTraitsEEESD_E3addIPS3_S6_NS_29RefPtrHashMapRawKeyTranslatorISI_S7_SF_SA_EEEES5_INS_17HashTableIteratorIS4_S7_S9_SA_SF_SD_EEbERKT_RKT0_ +__ZN3JSC18GlobalEvalFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEEPNS_14JSGlobalObjectE +__ZN3JSC14JSGlobalObject14resetPrototypeENS_7JSValueE __ZN3JSC9Structure25changePrototypeTransitionEPS0_NS_7JSValueE __ZN3JSC9Structure17copyPropertyTableEv __ZN3JSC14JSGlobalObject10globalExecEv -__ZN3JSC10Identifier3addEPNS_9ExecStateEPKc __ZN3JSC4Heap9unprotectENS_7JSValueE -__ZN3JSC6JSCellnwEmPNS_9ExecStateE -__ZN3JSC10Identifier11addSlowCaseEPNS_9ExecStateEPNS_7UString3RepE __ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE __ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSC7UString3Rep12sharedBufferEv __ZN3JSC14TimeoutChecker5resetEv __ZN3JSC8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeENS_7JSValueE -__ZN3JSC6JSLock4lockEb -__ZN3JSC6Parser5parseINS_11ProgramNodeEEEN3WTF10PassRefPtrIT_EEPNS_9ExecStateEPNS_8DebuggerERKNS_10SourceCodeEPiPNS_7UStringE +__ZN3JSC6JSLockC1EPNS_9ExecStateE +__ZN3JSC17ProgramExecutable7compileEPNS_9ExecStateEPNS_14ScopeChainNodeE +__ZN3JSC6Parser5parseINS_11ProgramNodeEEEN3WTF10PassRefPtrIT_EEPNS_12JSGlobalDataEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPiPNS_7UStringE __ZN3JSC6Parser5parseEPNS_12JSGlobalDataEPiPNS_7UStringE __ZN3JSC7UStringaSEPKc +__ZN3JSC5Lexer7setCodeERKNS_10SourceCodeERNS_11ParserArenaE __Z10jscyyparsePv __ZN3JSC5Lexer3lexEPvS1_ +__ZN3JSC5Lexer19shiftLineTerminatorEv __ZN3JSC10Identifier3addEPNS_12JSGlobalDataEPKti -__ZN3WTF7HashSetIPN3JSC7UString3RepENS_7StrHashIS4_EENS_10HashTraitsIS4_EEE3addINS1_11UCharBufferENS1_21UCharBufferTranslatorEEESt4pairINS_24HashTableIteratorAdapterINS_9HashTableIS4_S4_NS_17IdentityExtractorIS4_EES6_S8_S8_EES4_EEbERKT_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E18addPassingHashCodeINS1_11UCharBufferESC_NS_24HashSetTranslatorAdapterIS3_S9_SC_NS1_21UCharBufferTranslatorEEEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E18addPassingHashCodeIPKcSD_NS_24HashSetTranslatorAdapterIS3_S9_SD_NS1_17CStringTranslatorEEEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E20fullLookupForWritingINS1_11UCharBufferENS_24HashSetTranslatorAdapterIS3_S9_SC_NS1_21UCharBufferTranslatorEEEEESt4pairISG_IPS3_bEjERKT_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7StrHashIS3_EENS_10HashTraitsIS3_EES9_E20fullLookupForWritingIPKcNS_24HashSetTranslatorAdapterIS3_S9_SD_NS1_17CStringTranslatorEEEEESt4pairISH_IPS3_bEjERKT_ __ZN3WTF15SegmentedVectorIN3JSC10IdentifierELm64EE6appendIS2_EEvRKT_ +__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataE +__ZN3JSC11ParserArena14derefWithArenaEN3WTF10PassRefPtrINS_21ParserArenaRefCountedEEE __ZN3JSC5Lexer10sourceCodeEiii -__ZN3JSC16FunctionBodyNode13finishParsingERKNS_10SourceCodeEPNS_13ParameterNodeE -__ZN3JSC20ParserArenaDeletablenwEmPNS_12JSGlobalDataE -__ZN3WTF6VectorIPN3JSC20ParserArenaDeletableELm0EE14expandCapacityEm -__ZN3WTF6VectorIPN3JSC12FuncDeclNodeELm0EE14expandCapacityEm +__ZN3JSC11ParserArena20allocateFreeablePoolEv +__ZN3JSC16FunctionBodyNode13finishParsingERKNS_10SourceCodeEPNS_13ParameterNodeERKNS_10IdentifierE +__ZN3JSC18FunctionParametersC2EPNS_13ParameterNodeE +__ZN3WTF6VectorIPN3JSC20ParserArenaDeletableELm0EE14expandCapacityEmPKS3_ +__ZN3JSC13StatementNode6setLocEii +__ZN3WTF6VectorIPN3JSC16FunctionBodyNodeELm0EE14expandCapacityEmPKS3_ __ZN3JSC14SourceElements6appendEPNS_13StatementNodeE __ZNK3JSC13StatementNode16isEmptyStatementEv -__ZN3WTF6VectorIPN3JSC13StatementNodeELm0EE14expandCapacityEm -__ZN3WTF6VectorIN3JSC10IdentifierELm0EE14expandCapacityEm -__ZN3JSC5Lexer10scanRegExpEv +__ZN3WTF6VectorIPN3JSC13StatementNodeELm0EE14expandCapacityEmPKS3_ +__ZN3WTF6VectorIN3JSC10IdentifierELm0EE15reserveCapacityEm +__Z21mergeDeclarationListsIPN3JSC15ParserArenaDataIN3WTF6VectorISt4pairIPKNS0_10IdentifierEjELm0EEEEEET_SC_SC_ +__Z21mergeDeclarationListsIPN3JSC15ParserArenaDataIN3WTF6VectorIPNS0_16FunctionBodyNodeELm0EEEEEET_S9_S9_ +__ZN3JSC5Lexer10scanRegExpERPKNS_10IdentifierES4_t __ZN3WTF6VectorItLm0EE14expandCapacityEmPKt -__ZN3JSC7UStringC2ERKN3WTF6VectorItLm0EEE -__ZL20makeFunctionCallNodePvN3JSC8NodeInfoIPNS0_14ExpressionNodeEEENS1_IPNS0_13ArgumentsNodeEEEiii +__ZL20makeFunctionCallNodePN3JSC12JSGlobalDataENS_8NodeInfoIPNS_14ExpressionNodeEEENS2_IPNS_13ArgumentsNodeEEEiii __ZNK3JSC15DotAccessorNode10isLocationEv __ZNK3JSC14ExpressionNode13isResolveNodeEv __ZNK3JSC14ExpressionNode21isBracketAccessorNodeEv -__ZN3WTF6VectorIPN3JSC13StatementNodeELm0EE14shrinkCapacityEm -__ZN3JSC5Lexer7record8Ei -__ZL14makeAssignNodePvPN3JSC14ExpressionNodeENS0_8OperatorES2_bbiii -__ZN3JSC7UString3Rep7destroyEv +__ZN3JSC5Lexer10skipRegExpEv +__ZL14makeAssignNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeENS_8OperatorES3_bbiii __ZNK3JSC11ResolveNode10isLocationEv __ZNK3JSC11ResolveNode13isResolveNodeEv -__ZL26appendToVarDeclarationListPvRPN3JSC15ParserArenaDataIN3WTF6VectorISt4pairINS0_10IdentifierEjELm0EEEEERKS5_j -__ZN3WTF6VectorISt4pairIN3JSC10IdentifierEjELm0EE14expandCapacityEm +__ZN3WTF6VectorISt4pairIPKN3JSC10IdentifierEjELm0EE14expandCapacityEmPKS6_ __ZNK3JSC14ExpressionNode10isLocationEv +__ZN3JSC6Parser16didFinishParsingEPNS_14SourceElementsEPNS_15ParserArenaDataIN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEEEPNS3_INS5_IPNS_16FunctionBodyNodeELm0EEEEEjii __ZN3JSC5Lexer5clearEv -__ZN3JSC10Identifier6removeEPNS_7UString3RepE -__ZN3WTF6VectorIN3JSC10IdentifierELm64EE14shrinkCapacityEm -__ZN3JSC9ScopeNodeC2EPNS_12JSGlobalDataERKNS_10SourceCodeEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEPNS9_IPNS_12FuncDeclNodeELm0EEEji +__ZN3JSC11ProgramNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERKNS_10SourceCodeEji +__ZN3JSC9ScopeNodeC2EPNS_12JSGlobalDataERKNS_10SourceCodeEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS9_IPNS_16FunctionBodyNodeELm0EEEji +__ZN3JSC13ScopeNodeDataC2ERNS_11ParserArenaEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEEi __ZN3JSC11ParserArena10removeLastEv __ZN3JSC11ParserArena5resetEv -__ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE -__ZN3JSC11Interpreter7executeEPNS_11ProgramNodeEPNS_9ExecStateEPNS_14ScopeChainNodeEPNS_8JSObjectEPNS_7JSValueE -__ZN3JSC11ProgramNode16generateBytecodeEPNS_14ScopeChainNodeE -__ZN3JSC9CodeBlockC2EPNS_9ScopeNodeENS_8CodeTypeEN3WTF10PassRefPtrINS_14SourceProviderEEEj -__ZN3WTF9HashTableIPN3JSC16ProgramCodeBlockES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi -__ZN3JSC17BytecodeGeneratorC2EPNS_11ProgramNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_7UString3RepEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISE_EENS_26SymbolTableIndexHashTraitsEEEPNS_16ProgramCodeBlockE -__ZN3WTF6VectorIN3JSC11InstructionELm0EE14expandCapacityEm +__ZN3WTF15SegmentedVectorIN3JSC10IdentifierELm64EE5clearEv +__ZN3WTF15SegmentedVectorIN3JSC10IdentifierELm64EE17deleteAllSegmentsEv +__ZN3WTF6VectorIN3JSC10IdentifierELm64EE14shrinkCapacityEm +__ZN3WTF6VectorINS_6RefPtrIN3JSC21ParserArenaRefCountedEEELm0EE14shrinkCapacityEm +__ZN3JSC9CodeBlockC2EPNS_16ScriptExecutableENS_8CodeTypeEN3WTF10PassRefPtrINS_14SourceProviderEEEjPNS4_7HashMapINS4_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS4_10HashTraitsISB_EENS_26SymbolTableIndexHashTraitsEEE +__ZN3WTF9HashTableIPN3JSC15GlobalCodeBlockES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E3addIS3_S3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC15GlobalCodeBlockES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi +__ZN3JSC17BytecodeGeneratorC1EPNS_11ProgramNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_16ProgramCodeBlockE +__ZN3JSC17BytecodeGeneratorC2EPNS_11ProgramNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_16ProgramCodeBlockE +__ZN3JSC17BytecodeGenerator10emitOpcodeENS_8OpcodeIDE +__ZN3WTF15SegmentedVectorIN3JSC10RegisterIDELm32EE17ensureSegmentsForEm +__ZN3WTF6VectorIN3JSC10RegisterIDELm32EE4growEm +__ZN3JSC26BatchedTransitionOptimizerC2EPNS_8JSObjectE __ZN3JSC9Structure31toCacheableDictionaryTransitionEPS0_ __ZN3JSC9Structure22toDictionaryTransitionEPS0_NS0_14DictionaryKindE +__ZN3JSC24StructureTransitionTable6removeERKSt4pairIN3WTF6RefPtrINS_11UStringImplEEEjEPNS_6JSCellE __ZN3JSC8JSObject12removeDirectERKNS_10IdentifierE __ZN3JSC9Structure24removePropertyTransitionEPS0_RKNS_10IdentifierERm __ZN3JSC9Structure6removeERKNS_10IdentifierE __ZN3JSC17BytecodeGenerator12addGlobalVarERKNS_10IdentifierEbRPNS_10RegisterIDE -__ZN3JSC17BytecodeGenerator15emitNewFunctionEPNS_10RegisterIDEPNS_12FuncDeclNodeE -__ZN3JSC9CodeBlock25createRareDataIfNecessaryEv -__ZN3WTF6VectorINS_6RefPtrIN3JSC12FuncDeclNodeEEELm0EE14expandCapacityEm +__ZN3WTF15SegmentedVectorIN3JSC10RegisterIDELm32EE6appendIiEEvRKT_ +__ZN3JSC17BytecodeGenerator15emitNewFunctionEPNS_10RegisterIDEPNS_16FunctionBodyNodeE +__ZN3JSC9CodeBlock15addFunctionDeclEN3WTF17NonNullPassRefPtrINS_18FunctionExecutableEEE __ZN3JSC9Structure31removePropertyWithoutTransitionERKNS_10IdentifierE +__ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE __ZNK3JSC7UString14toStrictUInt32EPb __ZN3JSC9Structure26flattenDictionaryStructureEPNS_8JSObjectE __ZN3JSCL30comparePropertyMapEntryIndicesEPKvS1_ @@ -235,37 +322,51 @@ __ZN3JSC17BytecodeGenerator8generateEv __ZN3JSC11ProgramNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator13emitDebugHookENS_11DebugHookIDEii __ZN3JSC17BytecodeGenerator12newTemporaryEv -__ZN3JSC17BytecodeGenerator11newRegisterEv +__ZN3WTF15SegmentedVectorIN3JSC10RegisterIDELm32EE6appendImEEvRKT_ +__ZN3JSC17BytecodeGenerator8emitLoadEPNS_10RegisterIDENS_7JSValueE __ZN3JSC17BytecodeGenerator16addConstantValueENS_7JSValueE -__ZN3WTF9HashTableIPvSt4pairIS1_jENS_18PairFirstExtractorIS3_EENS_7PtrHashIS1_EENS_14PairHashTraitsIN3JSC24EncodedJSValueHashTraitsENS_10HashTraitsIjEEEESA_E6expandEv -__ZN3WTF6VectorIN3JSC8RegisterELm0EE14expandCapacityEm +__ZN3WTF6VectorIN3JSC8RegisterELm0EE14expandCapacityEmPKS2_ __ZN3JSC17BytecodeGenerator8emitMoveEPNS_10RegisterIDES2_ __ZN3JSC17BytecodeGenerator8emitNodeEPNS_10RegisterIDEPNS_4NodeE __ZN3WTF6VectorIN3JSC8LineInfoELm0EE14expandCapacityEm __ZN3JSC12FuncDeclNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC6IfNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator8newLabelEv -__ZN3JSC13LogicalOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3WTF15SegmentedVectorIN3JSC5LabelELm32EE6appendIPNS1_9CodeBlockEEEvRKT_ +__ZNK3JSC13LogicalOpNode26hasConditionContextCodegenEv +__ZN3JSC17BytecodeGenerator26emitNodeInConditionContextEPNS_14ExpressionNodeEPNS_5LabelES4_b +__ZN3JSC13LogicalOpNode30emitBytecodeInConditionContextERNS_17BytecodeGeneratorEPNS_5LabelES4_b +__ZNK3JSC14ExpressionNode26hasConditionContextCodegenEv __ZN3JSC12BinaryOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC14ExpressionNode6isNullEv __ZNK3JSC14ExpressionNode6isPureERNS_17BytecodeGeneratorE __ZN3JSC15DotAccessorNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC11ResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator11registerForERKNS_10IdentifierE -__ZN3WTF6VectorIN3JSC19ExpressionRangeInfoELm0EE14expandCapacityEm +__ZN3JSC17BytecodeGenerator18emitExpressionInfoEjjj +__ZN3WTF6VectorIN3JSC19ExpressionRangeInfoELm0EE14expandCapacityEmPKS2_ __ZN3JSC17BytecodeGenerator11emitGetByIdEPNS_10RegisterIDES2_RKNS_10IdentifierE -__ZN3WTF6VectorIjLm0EE14expandCapacityEm +__ZN3WTF6VectorIjLm0EE14expandCapacityEmPKj __ZN3JSC17BytecodeGenerator11addConstantERKNS_10IdentifierE -__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEESt4pairIS5_iENS_18PairFirstExtractorIS7_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS5_EENS2_17BytecodeGenerator28IdentifierMapIndexHashTraitsEEESD_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_iENS_18PairFirstExtractorIS6_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS4_EENS2_17BytecodeGenerator28IdentifierMapIndexHashTraitsEEESC_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_iENS_18PairFirstExtractorIS6_EENS2_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS4_EENS2_17BytecodeGenerator28IdentifierMapIndexHashTraitsEEESC_E3addIPS3_iNS_29RefPtrHashMapRawKeyTranslatorISI_S6_SF_S9_EEEES5_INS_17HashTableIteratorIS4_S6_S8_S9_SF_SC_EEbERKT_RKT0_ +__ZN3JSC9CodeBlock13addIdentifierERKNS_10IdentifierE __ZN3JSC17BytecodeGenerator12emitBinaryOpENS_8OpcodeIDEPNS_10RegisterIDES3_S3_NS_12OperandTypesE __ZN3JSC17BytecodeGenerator15emitJumpIfFalseEPNS_10RegisterIDEPNS_5LabelE +__ZNK3JSC14LogicalNotNode26hasConditionContextCodegenEv __ZN3JSC11UnaryOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC19FunctionCallDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator15emitMethodCheckEv +__ZN3JSC17BytecodeGenerator8emitCallEPNS_10RegisterIDES2_S2_PNS_13ArgumentsNodeEjjj __ZN3JSC17BytecodeGenerator8emitCallENS_8OpcodeIDEPNS_10RegisterIDES3_S3_PNS_13ArgumentsNodeEjjj __ZN3JSC16ArgumentListNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC10RegExpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringES5_ +__ZN3JSC6RegExpC2EPNS_12JSGlobalDataERKNS_7UStringES5_ +__ZNK3JSC7UString4findEti __ZN3JSC17BytecodeGenerator13emitNewRegExpEPNS_10RegisterIDEPNS_6RegExpE +__ZN3JSC9CodeBlock9addRegExpEPNS_6RegExpE +__ZN3JSC17BytecodeGenerator11emitUnaryOpENS_8OpcodeIDEPNS_10RegisterIDES3_ __ZN3JSC17BytecodeGenerator9emitLabelEPNS_5LabelE __ZN3JSC9BlockNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17ExprStatementNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE @@ -274,104 +375,106 @@ __ZN3JSC17BytecodeGenerator18findScopedPropertyERKNS_10IdentifierERiRmbRPNS_8JSO __ZN3JSC13AssignDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC12FuncExprNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator25emitNewFunctionExpressionEPNS_10RegisterIDEPNS_12FuncExprNodeE +__ZN3JSC9CodeBlock15addFunctionExprEN3WTF17NonNullPassRefPtrINS_18FunctionExecutableEEE __ZN3JSC17BytecodeGenerator11emitPutByIdEPNS_10RegisterIDERKNS_10IdentifierES2_ __ZN3JSC17AssignResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator15emitResolveBaseEPNS_10RegisterIDERKNS_10IdentifierE __ZN3JSC16VarStatementNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC13LogicalOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3WTF15SegmentedVectorIN3JSC5LabelELm32EE10removeLastEv __ZN3JSC17BytecodeGenerator14emitJumpIfTrueEPNS_10RegisterIDEPNS_5LabelE __ZN3JSC17ObjectLiteralNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator13emitNewObjectEPNS_10RegisterIDE __ZN3JSC21FunctionCallValueNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC10StringNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator8emitLoadEPNS_10RegisterIDERKNS_10IdentifierE -__ZN3WTF9HashTableIPN3JSC7UString3RepESt4pairIS4_PNS1_8JSStringEENS_18PairFirstExtractorIS8_EENS1_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS4_EENSD_IS7_EEEESE_E6expandEv +__ZN3WTF9HashTableIPN3JSC11UStringImplESt4pairIS3_PNS1_8JSStringEENS_18PairFirstExtractorIS7_EENS1_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENSC_IS6_EEEESD_E6rehashEi +__ZN3WTF9HashTableIPN3JSC11UStringImplESt4pairIS3_PNS1_8JSStringEENS_18PairFirstExtractorIS7_EENS1_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENSC_IS6_EEEESD_E3addIS3_S6_NS_17HashMapTranslatorIS7_SF_SA_EEEES4_INS_17HashTableIteratorIS3_S7_S9_SA_SF_SD_EEbERKT_RKT0_ +__ZN3JSC13jsOwnedStringEPNS_12JSGlobalDataERKNS_7UStringE +__ZN3JSC17BytecodeGenerator16emitUnaryNoDstOpENS_8OpcodeIDEPNS_10RegisterIDE __ZN3JSC12JSGlobalData22numericCompareFunctionEPNS_9ExecStateE __ZNK3JSC21UStringSourceProvider6lengthEv +__ZN3JSC18FunctionExecutable14fromGlobalCodeERKNS_10IdentifierEPNS_9ExecStateEPNS_8DebuggerERKNS_10SourceCodeEPiPNS_7UStringE __ZNK3JSC21UStringSourceProvider4dataEv -__ZN3JSC19extractFunctionBodyEPNS_11ProgramNodeE +__ZNK3JSC9ScopeNode15singleStatementEv __ZNK3JSC17ExprStatementNode15isExprStatementEv __ZNK3JSC12FuncExprNode14isFuncExprNodeEv -__ZN3JSC16FunctionBodyNode16generateBytecodeEPNS_14ScopeChainNodeE -__ZN3JSC6Parser14reparseInPlaceEPNS_12JSGlobalDataEPNS_16FunctionBodyNodeE -__ZL11makeSubNodePvPN3JSC14ExpressionNodeES2_b +__ZThn12_N3JSC11ProgramNodeD0Ev +__ZN3JSC9ScopeNodeD2Ev +__ZN3JSC11ParserArenaD1Ev +__ZN3JSC14SourceElementsD1Ev +__ZThn12_N3JSC16FunctionBodyNodeD0Ev +__ZN3WTF10RefCountedIN3JSC18FunctionParametersEE5derefEv +__ZN3WTF15SegmentedVectorIN3JSC10IdentifierELm64EED1Ev +__ZN3JSC18FunctionExecutable7compileEPNS_9ExecStateEPNS_14ScopeChainNodeE +__ZN3JSC6Parser5parseINS_16FunctionBodyNodeEEEN3WTF10PassRefPtrIT_EEPNS_12JSGlobalDataEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPiPNS_7UStringE +__ZL11makeSubNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b __ZN3JSC14ExpressionNode14stripUnaryPlusEv __ZNK3JSC14ExpressionNode8isNumberEv -__ZN3JSC9CodeBlockC1EPNS_9ScopeNodeENS_8CodeTypeEN3WTF10PassRefPtrINS_14SourceProviderEEEj -__ZN3JSC17BytecodeGeneratorC2EPNS_16FunctionBodyNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_7UString3RepEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISE_EENS_26SymbolTableIndexHashTraitsEEEPNS_9CodeBlockE +__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPS0_Lm0EEERKNS_10SourceCodeEji +__ZN3JSC16FunctionBodyNode13finishParsingEN3WTF10PassRefPtrINS_18FunctionParametersEEERKNS_10IdentifierE +__ZN3JSC17BytecodeGeneratorC1EPNS_16FunctionBodyNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_9CodeBlockE +__ZN3JSC17BytecodeGeneratorC2EPNS_16FunctionBodyNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_9CodeBlockE __ZN3JSC17BytecodeGenerator12addParameterERKNS_10IdentifierE __ZN3JSC16FunctionBodyNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC10ReturnNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC11ResolveNode6isPureERNS_17BytecodeGeneratorE +__ZN3JSC17BytecodeGenerator7isLocalERKNS_10IdentifierE __ZN3JSC17BytecodeGenerator10emitReturnEPNS_10RegisterIDE __ZNK3JSC9BlockNode7isBlockEv __ZNK3JSC10ReturnNode12isReturnNodeEv +__ZN3WTF6OwnPtrIN3JSC13ExceptionInfoEE5clearEv __ZN3JSC9CodeBlock11shrinkToFitEv -__ZN3WTF6VectorIN3JSC11InstructionELm0EE14shrinkCapacityEm __ZN3WTF6VectorIN3JSC10IdentifierELm0EE14shrinkCapacityEm -__ZN3JSC11ParserArenaD1Ev -__ZN3JSC11ResolveNodeD0Ev -__ZN3JSC7SubNodeD0Ev -__ZN3JSC14ExpressionNodeD2Ev -__ZN3JSC10ReturnNodeD0Ev -__ZN3JSC14SourceElementsD0Ev -__ZN3JSC9BlockNodeD0Ev +__ZN3WTF6VectorINS_6RefPtrIN3JSC18FunctionExecutableEEELm0EE14shrinkCapacityEm +__ZN3JSC17BytecodeGeneratorD2Ev +__ZN3WTF15SegmentedVectorIN3JSC10LabelScopeELm8EED1Ev +__ZN3WTF15SegmentedVectorIN3JSC10LabelScopeELm8EE17deleteAllSegmentsEv +__ZN3WTF15SegmentedVectorIN3JSC5LabelELm32EED1Ev +__ZN3WTF15SegmentedVectorIN3JSC5LabelELm32EE17deleteAllSegmentsEv +__ZN3WTF15SegmentedVectorIN3JSC10RegisterIDELm32EED1Ev __ZN3WTF6VectorIN3JSC11InstructionELm0EEaSERKS3_ -__ZThn12_N3JSC11ProgramNodeD0Ev -__ZN3JSC11ProgramNodeD0Ev -__ZN3JSC13ParameterNodeD0Ev -__ZN3JSC17ExprStatementNodeD0Ev -__ZThn12_N3JSC12FuncExprNodeD0Ev -__ZN3JSC12FuncExprNodeD0Ev -__ZThn12_N3JSC16FunctionBodyNodeD0Ev -__ZN3JSC16FunctionBodyNodeD0Ev -__ZN3JSC9CodeBlockD1Ev +__ZN3JSC18FunctionExecutableD0Ev +__ZN3JSC17FunctionCodeBlockD0Ev __ZN3JSC9CodeBlockD2Ev +__ZN3WTF6OwnPtrIN3JSC13ExceptionInfoEED1Ev +__ZN3JSC11UStringImplD1Ev +__ZN3JSC11UStringImplD2Ev +__ZN3JSC10Identifier6removeEPNS_11UStringImplE +__ZN3JSC22currentIdentifierTableEv __ZN3JSC21UStringSourceProviderD0Ev -__ZN3WTF6VectorIN3JSC8LineInfoELm0EE14shrinkCapacityEm -__ZN3WTF6VectorIN3JSC20GetByIdExceptionInfoELm0EE14shrinkCapacityEm -__ZN3WTF6VectorIN3JSC11HandlerInfoELm0EE14shrinkCapacityEm -__ZN3WTF6VectorINS_6RefPtrIN3JSC12FuncDeclNodeEEELm0EE14shrinkCapacityEm __ZN3WTF6VectorINS_6RefPtrIN3JSC6RegExpEEELm0EE14shrinkCapacityEm __ZN3WTF6VectorIN3JSC15SimpleJumpTableELm0EE14shrinkCapacityEm __ZN3WTF6VectorIN3JSC15StringJumpTableELm0EE14shrinkCapacityEm -__ZN3JSC15ParserArenaDataIN3WTF6VectorIPNS_12FuncDeclNodeELm0EEEED0Ev -__ZN3JSC15DotAccessorNodeD0Ev -__ZN3JSC12NotEqualNodeD0Ev -__ZN3JSC10RegExpNodeD0Ev -__ZN3JSC16ArgumentListNodeD0Ev -__ZN3JSC13ArgumentsNodeD0Ev -__ZN3JSC19FunctionCallDotNodeD0Ev -__ZN3JSC14LogicalNotNodeD0Ev -__ZN3JSC13LogicalOpNodeD0Ev -__ZN3JSC6IfNodeD0Ev -__ZN3JSC13AssignDotNodeD0Ev -__ZN3JSC17AssignResolveNodeD0Ev -__ZN3JSC17ObjectLiteralNodeD0Ev -__ZN3JSC15ParserArenaDataIN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEED0Ev -__ZN3JSC16VarStatementNodeD0Ev -__ZN3JSC21FunctionCallValueNodeD0Ev -__ZN3JSC10StringNodeD0Ev -__ZN3WTF14deleteOwnedPtrIN3JSC17BytecodeGeneratorEEEvPT_ +__ZN3JSC15ParserArenaDataIN3WTF6VectorIPNS_16FunctionBodyNodeELm0EEEED1Ev +__ZN3JSC15ParserArenaDataIN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEED1Ev +__ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE +__ZN3JSC11Interpreter7executeEPNS_17ProgramExecutableEPNS_9ExecStateEPNS_14ScopeChainNodeEPNS_8JSObjectEPNS_7JSValueE +__ZN3JSC12JSGlobalData14resetDateCacheEv __ZN3JSC14JSGlobalObject13copyGlobalsToERNS_12RegisterFileE -__ZN3JSC12FuncDeclNode12makeFunctionEPNS_9ExecStateEPNS_14ScopeChainNodeE +__ZN3JSC18FunctionExecutable4makeEPNS_9ExecStateEPNS_14ScopeChainNodeE +__ZN3JSC10JSFunctionC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_18FunctionExecutableEEEPNS_14ScopeChainNodeE +__ZNK3JSC7JSValue3getEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC11Interpreter15tryCacheGetByIDEPNS_9ExecStateEPNS_9CodeBlockEPNS_11InstructionENS_7JSValueERKNS_10IdentifierERKNS_12PropertySlotE __ZN3JSC7JSValue13equalSlowCaseEPNS_9ExecStateES0_S0_ __ZN3JSC10JSFunction18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC12FuncExprNode12makeFunctionEPNS_9ExecStateEPNS_14ScopeChainNodeE -__ZN3JSC9Structure13hasTransitionEPNS_7UString3RepEj +__ZN3JSC9Structure13hasTransitionEPNS_11UStringImplEj __ZN3JSC11Interpreter15tryCachePutByIDEPNS_9ExecStateEPNS_9CodeBlockEPNS_11InstructionENS_7JSValueERKNS_15PutPropertySlotE __ZN3JSC11Interpreter13resolveGlobalEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE __ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE __ZN3JSC10JSFunction11getCallDataERNS_8CallDataE -__ZL17combineCommaNodesPvPN3JSC14ExpressionNodeES2_ -__ZL15makePostfixNodePvPN3JSC14ExpressionNodeENS0_8OperatorEiii +__ZL15makePostfixNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeENS_8OperatorEiii __ZNK3JSC18EmptyStatementNode16isEmptyStatementEv +__ZNK3JSC10NumberNode8isNumberEv +__ZN3JSC17BytecodeGenerator6addVarERKNS_10IdentifierEbRPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator15isLocalConstantERKNS_10IdentifierE __ZNK3JSC16JSVariableObject16isVariableObjectEv __ZN3JSC17BytecodeGenerator16emitGetScopedVarEPNS_10RegisterIDEmiNS_7JSValueE __ZN3JSC7ForNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator13newLabelScopeENS_10LabelScope4TypeEPKNS_10IdentifierE +__ZN3WTF15SegmentedVectorIN3JSC10LabelScopeELm8EE6appendIS2_EEvRKT_ __ZN3JSC10NumberNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator8emitLoadEPNS_10RegisterIDEd -__ZN3WTF9HashTableIdSt4pairIdN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_9FloatHashIdEENS_14PairHashTraitsINS_10HashTraitsIdEENSA_IS3_EEEESB_E6expandEv __ZN3JSC17BytecodeGenerator8emitJumpEPNS_5LabelE __ZN3JSC15ConditionalNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZL14compileBracketiPiPPhPPKtS3_P9ErrorCodeiS_S_R11CompileData @@ -380,393 +483,470 @@ __ZN3JSC9BreakNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator11breakTargetERKNS_10IdentifierE __ZN3JSC17BytecodeGenerator14emitJumpScopesEPNS_5LabelEi __ZN3JSC18PostfixResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator10emitPreIncEPNS_10RegisterIDE __ZN3JSC19BracketAccessorNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator12emitGetByValEPNS_10RegisterIDES2_S2_ +__ZNK3JSC10NumberNode6isPureERNS_17BytecodeGeneratorE __ZN3JSC16PropertyListNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC10NumberNodeD0Ev -__ZN3JSC19BracketAccessorNodeD0Ev -__ZN3JSC18PostfixResolveNodeD0Ev -__ZN3JSC15ConditionalNodeD0Ev -__ZN3JSC9BreakNodeD0Ev -__ZN3JSC18EmptyStatementNodeD0Ev -__ZN3JSC7ForNodeD0Ev -__ZN3JSC12PropertyNodeD0Ev -__ZN3JSC16PropertyListNodeD0Ev __ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC17PrototypeFunction11getCallDataERNS_8CallDataE -__ZNK3JSC8JSString8toStringEPNS_9ExecStateE +__ZNK3JSC7JSValue3getEPNS_9ExecStateEjRNS_12PropertySlotE +__ZNK3JSC12PropertySlot8getValueEPNS_9ExecStateEj __ZN3JSC7UString4fromEj -__ZN3JSC7UString3Rep6createEPtiN3WTF10PassRefPtrINS3_21CrossThreadRefCountedINS3_16OwnFastMallocPtrItEEEEEE __ZNK3JSC8JSString9toBooleanEPNS_9ExecStateE -__ZN3JSC12RegExpObjectC1EN3WTF10PassRefPtrINS_9StructureEEENS2_INS_6RegExpEEE +__ZN3JSC12RegExpObjectC1EN3WTF17NonNullPassRefPtrINS_9StructureEEENS2_INS_6RegExpEEE __ZN3JSC12RegExpObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC18getStaticValueSlotINS_12RegExpObjectENS_8JSObjectEEEbPNS_9ExecStateEPKNS_9HashTableEPT_RKNS_10IdentifierERNS_12PropertySlotE __ZN3JSCL19regExpProtoFuncTestEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC6JSCell8isObjectEPKNS_9ClassInfoE __ZNK3JSC12RegExpObject9classInfoEv +__ZN3JSC12RegExpObject4testEPNS_9ExecStateERKNS_7ArgListE __ZN3JSC12RegExpObject5matchEPNS_9ExecStateERKNS_7ArgListE __ZNK3JSC7JSValue8toStringEPNS_9ExecStateE __ZN3JSC17RegExpConstructor12performMatchEPNS_6RegExpERKNS_7UStringEiRiS6_PPi __ZN3JSC6RegExp5matchERKNS_7UStringEiPN3WTF6VectorIiLm32EEE __ZN3JSC17RegExpConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC18getStaticValueSlotINS_17RegExpConstructorENS_16InternalFunctionEEEbPNS_9ExecStateEPKNS_9HashTableEPT_RKNS_10IdentifierERNS_12PropertySlotE __ZN3JSCL24regExpConstructorDollar1EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE __ZN3JSC11jsSubstringEPNS_12JSGlobalDataERKNS_7UStringEjj -__ZN3JSC20constructEmptyObjectEPNS_9ExecStateE -__ZN3WTF7HashMapISt4pairINS_6RefPtrIN3JSC7UString3RepEEEjES1_IPNS3_9StructureES9_ENS3_28StructureTransitionTableHashENS3_34StructureTransitionTableHashTraitsENS_10HashTraitsISA_EEE3addERKS7_RKSA_ -__ZN3WTF9HashTableISt4pairINS_6RefPtrIN3JSC7UString3RepEEEjES1_IS7_S1_IPNS3_9StructureES9_EENS_18PairFirstExtractorISB_EENS3_28StructureTransitionTableHashENS_14PairHashTraitsINS3_34StructureTransitionTableHashTraitsENS_10HashTraitsISA_EEEESG_E6rehashEi -__ZN3WTF7HashSetINS_6RefPtrIN3JSC7UString3RepEEENS2_17IdentifierRepHashENS_10HashTraitsIS5_EEE3addERKS5_ -__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEES5_NS_17IdentityExtractorIS5_EENS2_17IdentifierRepHashENS_10HashTraitsIS5_EESA_E6rehashEi +__ZN3JSC8JSString18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC15StringPrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSCL22stringProtoFuncIndexOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZNK3JSC8JSString12toThisStringEPNS_9ExecStateE +__ZNK3JSC7UString4findERKS0_i +__ZN3JSC7JSValue11strictEqualEPNS_9ExecStateES0_S0_ +__ZN3JSC24StructureTransitionTable21reifySingleTransitionEv +__ZN3WTF9HashTableISt4pairINS_6RefPtrIN3JSC11UStringImplEEEjES1_IS6_S1_IPNS3_9StructureES8_EENS_18PairFirstExtractorISA_EENS3_28StructureTransitionTableHashENS_14PairHashTraitsINS3_34StructureTransitionTableHashTraitsENS_10HashTraitsIS9_EEEESF_E4findIS6_NS_22IdentityHashTranslatorIS6_SA_SD_EEEENS_17HashTableIteratorIS6_SA_SC_SD_SI_SF_EERKT_ +__ZN3WTF9HashTableISt4pairINS_6RefPtrIN3JSC11UStringImplEEEjES1_IS6_S1_IPNS3_9StructureES8_EENS_18PairFirstExtractorISA_EENS3_28StructureTransitionTableHashENS_14PairHashTraitsINS3_34StructureTransitionTableHashTraitsENS_10HashTraitsIS9_EEEESF_E6rehashEi +__ZN3WTF9HashTableISt4pairINS_6RefPtrIN3JSC11UStringImplEEEjES1_IS6_S1_IPNS3_9StructureES8_EENS_18PairFirstExtractorISA_EENS3_28StructureTransitionTableHashENS_14PairHashTraitsINS3_34StructureTransitionTableHashTraitsENS_10HashTraitsIS9_EEEESF_E3addIS6_S9_NS_17HashMapTranslatorISA_SI_SD_EEEES1_INS_17HashTableIteratorIS6_SA_SC_SD_SI_SF_EEbERKT_RKT0_ +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEES4_NS_17IdentityExtractorIS4_EENS2_17IdentifierRepHashENS_10HashTraitsIS4_EES9_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEES4_NS_17IdentityExtractorIS4_EENS2_17IdentifierRepHashENS_10HashTraitsIS4_EES9_E3addIS4_S4_NS_22IdentityHashTranslatorIS4_S4_S7_EEEESt4pairINS_17HashTableIteratorIS4_S4_S6_S7_S9_S9_EEbERKT_RKT0_ __ZN3JSC11BooleanNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator8emitLoadEPNS_10RegisterIDEb __ZN3JSC10IfElseNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC13StatementNode12isReturnNodeEv -__ZN3JSC11BooleanNodeD0Ev -__ZN3JSC10IfElseNodeD0Ev -__ZN3JSC12JSActivationC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_16FunctionBodyNodeEEE -__ZN3JSC12JSActivationC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_16FunctionBodyNodeEEE +__ZN3JSC12JSActivationC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_18FunctionExecutableEEE __ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE -__ZN3JSC8JSString18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC15StringPrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC12JSActivation13copyRegistersEPNS_9ArgumentsE __ZN3JSCL20stringProtoFuncMatchEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC8JSString12toThisStringEPNS_9ExecStateE __ZNK3JSC6JSCell9classInfoEv +__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringE +__ZN3JSC6RegExpD1Ev __Z12jsRegExpFreeP8JSRegExp -__ZL11makeAddNodePvPN3JSC14ExpressionNodeES2_b +__ZL11makeAddNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b __ZNK3JSC19BracketAccessorNode10isLocationEv __ZNK3JSC19BracketAccessorNode21isBracketAccessorNodeEv -__ZL14makePrefixNodePvPN3JSC14ExpressionNodeENS0_8OperatorEiii +__ZL14makePrefixNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeENS_8OperatorEiii __ZN3JSC9ThrowNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC9EqualNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZNK3JSC10NumberNode6isPureERNS_17BytecodeGeneratorE -__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh -__ZN3JSC17BytecodeGenerator14emitEqualityOpENS_8OpcodeIDEPNS_10RegisterIDES3_S3_ __ZNK3JSC14ExpressionNode5isAddEv __ZNK3JSC12JSActivation14isDynamicScopeEv __ZN3JSC15StrictEqualNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC11BooleanNode6isPureERNS_17BytecodeGeneratorE +__ZN3JSC17BytecodeGenerator14emitEqualityOpENS_8OpcodeIDEPNS_10RegisterIDES3_S3_ __ZN3JSC23FunctionCallResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC7AddNode5isAddEv __ZN3JSC12BinaryOpNode10emitStrcatERNS_17BytecodeGeneratorEPNS_10RegisterIDES4_PNS_21ReadModifyResolveNodeE __ZNK3JSC10StringNode8isStringEv __ZNK3JSC14ExpressionNode8isStringEv +__ZN3JSC17BytecodeGenerator15emitToPrimitiveEPNS_10RegisterIDES2_ __ZN3JSC17BytecodeGenerator10emitStrcatEPNS_10RegisterIDES2_i __ZN3JSC17AssignBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator12emitPutByValEPNS_10RegisterIDES2_S2_ +__ZN3JSC9EqualNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC10StringNode6isPureERNS_17BytecodeGeneratorE __ZN3JSC17TypeOfResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSCeqERKNS_7UStringEPKc __ZN3JSC9ArrayNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator12emitNewArrayEPNS_10RegisterIDEPNS_11ElementNodeE __ZN3JSC13PrefixDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC9ThrowNodeD0Ev -__ZN3JSC9EqualNodeD0Ev -__ZN3JSC7AddNodeD0Ev -__ZN3JSC15StrictEqualNodeD0Ev -__ZN3JSC23FunctionCallResolveNodeD0Ev -__ZN3JSC17AssignBracketNodeD0Ev -__ZN3JSC17TypeOfResolveNodeD0Ev -__ZN3JSC9ArrayNodeD0Ev -__ZN3JSC13PrefixDotNodeD0Ev -__ZN3JSCL22stringProtoFuncIndexOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC7UString4findERKS0_i -__ZN3JSC11concatenateEPNS_7UString3RepES2_ +__ZN3JSC8JSStringC2EPNS_12JSGlobalDataEjPS0_S3_ +__ZN3JSC9ArgumentsC2EPNS_9ExecStateE __ZN3JSC9Arguments18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC9Arguments18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE __ZN3JSC17BytecodeGenerator16emitPutScopedVarEmiPNS_10RegisterIDENS_7JSValueE +__ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE __ZNK3JSC7UString8toUInt32EPbb __ZNK3JSC7UString8toDoubleEbb __ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE -__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC15ObjectPrototype18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE __ZNK3JSC8JSString11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE -__ZN3JSC7UString3Rep15reserveCapacityEi -__ZN3WTF11fastReallocILb0EEEPvS1_m -__ZN3JSC7UString6appendERKS0_ +__ZN3JSC8JSString40appendValueInConstructAndIncrementLengthEPNS_9ExecStateERjNS_7JSValueE __ZN3JSC16jsIsFunctionTypeENS_7JSValueE __ZNK3JSC9CodeBlock13refStructuresEPNS_11InstructionE +__ZN3JSC23normalizePrototypeChainEPNS_9ExecStateENS_7JSValueES2_RKNS_10IdentifierERm +__ZNK3JSC9Structure14prototypeChainEPNS_9ExecStateE __ZN3JSC14StructureChainC1EPNS_9StructureE __ZN3JSC14StructureChainC2EPNS_9StructureE -__ZNK3JSC14StructureChain11isCacheableEv +__ZN3JSC17ProgramExecutableD0Ev +__ZN3JSC16ProgramCodeBlockD0Ev +__ZN3JSC15GlobalCodeBlockD2Ev +__ZN3WTF9HashTableIPN3JSC15GlobalCodeBlockES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_ __ZNK3JSC9CodeBlock15derefStructuresEPNS_11InstructionE -__ZN3JSC6RegExpD1Ev -__ZThn12_N3JSC12FuncDeclNodeD0Ev -__ZN3JSC12FuncDeclNodeD0Ev -__ZNK3JSC10NumberNode8isNumberEv -__ZN3WTF6VectorIPNS0_IN3JSC10IdentifierELm64EEELm32EE14expandCapacityEm +__ZN3JSC9CodeBlock8RareDataD2Ev +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS1_INS2_14EvalExecutableEEEENS_18PairFirstExtractorIS8_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_E15deallocateTableEPS8_i +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS1_INS2_14EvalExecutableEEEENS_18PairFirstExtractorIS8_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_E4findIS4_NS_22IdentityHashTranslatorIS4_S8_SC_EEEENS_17HashTableIteratorIS4_S8_SA_SC_SH_SF_EERKT_ +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS1_INS2_14EvalExecutableEEEENS_18PairFirstExtractorIS8_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS1_INS2_14EvalExecutableEEEENS_18PairFirstExtractorIS8_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSE_IS7_EEEESF_E3addIPS3_S7_NS_29RefPtrHashMapRawKeyTranslatorISK_S8_SH_SC_EEEES5_INS_17HashTableIteratorIS4_S8_SA_SC_SH_SF_EEbERKT_RKT0_ +__ZN3WTF6VectorIN3JSC15StringJumpTableELm0EED1Ev +__ZN3WTF6VectorIPvLm0EE14expandCapacityEmPKS1_ +__ZN3WTF6VectorIPNS0_IN3JSC10IdentifierELm64EEELm32EE14expandCapacityEmPKS4_ __ZN3JSC19ReverseBinaryOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC8WithNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator13emitPushScopeEPNS_10RegisterIDE -__ZN3WTF6VectorIN3JSC18ControlFlowContextELm0EE14expandCapacityEm -__ZL17bracketIsAnchoredPKh +__ZN3WTF6VectorIN3JSC18ControlFlowContextELm0EE14expandCapacityEmPKS2_ +__ZN3JSC17BytecodeGenerator12emitPopScopeEv +__ZL33bracketFindFirstAssertedCharacterPKhb __ZL32branchFindFirstAssertedCharacterPKhb __ZL20branchNeedsLineStartPKhjj +__ZN3WTF9HashTableIxSt4pairIxjENS_18PairFirstExtractorIS2_EENS_7IntHashIxEENS_14PairHashTraitsIN3JSC24EncodedJSValueHashTraitsENS_10HashTraitsIjEEEES9_E4findIxNS_22IdentityHashTranslatorIxS2_S6_EEEENS_17HashTableIteratorIxS2_S4_S6_SC_S9_EERKT_ +__ZN3WTF9HashTableIxSt4pairIxjENS_18PairFirstExtractorIS2_EENS_7IntHashIxEENS_14PairHashTraitsIN3JSC24EncodedJSValueHashTraitsENS_10HashTraitsIjEEEES9_E6rehashEi +__ZN3WTF9HashTableIxSt4pairIxjENS_18PairFirstExtractorIS2_EENS_7IntHashIxEENS_14PairHashTraitsIN3JSC24EncodedJSValueHashTraitsENS_10HashTraitsIjEEEES9_E3addIxjNS_17HashMapTranslatorIS2_SC_S6_EEEES1_INS_17HashTableIteratorIxS2_S4_S6_SC_S9_EEbERKT_RKT0_ __ZN3JSC23CallFunctionCallDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator25emitJumpIfNotFunctionCallEPNS_10RegisterIDEPNS_5LabelE __ZN3JSC21ThrowableBinaryOpNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC11NewExprNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator13emitConstructEPNS_10RegisterIDES2_PNS_13ArgumentsNodeEjjj -__ZN3WTF6VectorIN3JSC20GetByIdExceptionInfoELm0EE14expandCapacityEm -__ZN3JSC11GreaterNodeD0Ev -__ZN3JSC18NotStrictEqualNodeD0Ev -__ZN3JSC8WithNodeD0Ev -__ZN3JSC11ElementNodeD0Ev -__ZN3JSC23CallFunctionCallDotNodeD0Ev -__ZN3JSC6InNodeD0Ev -__ZN3JSC11NewExprNodeD0Ev +__ZN3WTF6VectorIN3JSC20GetByIdExceptionInfoELm0EE14expandCapacityEmPKS2_ +__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh +__ZNK3JSC17RegExpConstructor14arrayOfMatchesEPNS_9ExecStateE __ZN3JSC18RegExpMatchesArrayC2EPNS_9ExecStateEPNS_24RegExpConstructorPrivateE -__ZN3JSC7JSArrayC2EN3WTF10PassRefPtrINS_9StructureEEEj +__ZN3JSC7JSArrayC2EN3WTF17NonNullPassRefPtrINS_9StructureEEEj +__ZN3JSC7JSArray19setLazyCreationDataEPv __ZNK3JSC7UString10getCStringERN3WTF6VectorIcLm32EEE +__ZN3JSC9ForInNodeC2EPNS_12JSGlobalDataERKNS_10IdentifierEPNS_14ExpressionNodeES7_PNS_13StatementNodeEiii +__ZN3JSC20ParserArenaDeletablenwEmPNS_12JSGlobalDataE __ZN3JSC9ForInNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17BytecodeGenerator20emitNextPropertyNameEPNS_10RegisterIDES2_PNS_5LabelE -__ZN3JSC9ForInNodeD0Ev -__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE -__ZN3JSC9Structure26getEnumerablePropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayEPNS_8JSObjectE -__ZN3JSC9Structure35getEnumerableNamesFromPropertyTableERNS_17PropertyNameArrayE -__ZN3JSC13jsOwnedStringEPNS_12JSGlobalDataERKNS_7UStringE -__ZN3JSC22JSPropertyNameIterator10invalidateEv +__ZN3JSC17BytecodeGenerator20emitGetPropertyNamesEPNS_10RegisterIDES2_S2_S2_PNS_5LabelE +__ZN3JSC17BytecodeGenerator18pushOptimisedForInEPNS_10RegisterIDES2_S2_S2_ +__ZN3WTF6VectorIN3JSC12ForInContextELm0EE14expandCapacityEmPKS2_ +__ZN3WTF11VectorMoverILb0EN3JSC12ForInContextEE4moveEPKS2_S5_PS2_ +__ZN3JSC17BytecodeGenerator20emitNextPropertyNameEPNS_10RegisterIDES2_S2_S2_S2_PNS_5LabelE +__ZN3JSC22JSPropertyNameIterator6createEPNS_9ExecStateEPNS_8JSObjectE +__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC9Structure16getPropertyNamesERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC17PropertyNameArray14addKnownUniqueEPNS_11UStringImplE +__ZN3WTF10RefCountedIN3JSC21PropertyNameArrayDataEE5derefEv +__ZN3JSC22JSPropertyNameIterator3getEPNS_9ExecStateEPNS_8JSObjectEm +__ZN3JSC9Structure27despecifyFunctionTransitionEPS0_RKNS_10IdentifierE +__ZN3JSC9Structure17despecifyFunctionERKNS_10IdentifierE __ZN3JSC9Structure22materializePropertyMapEv __ZNK3JSC14ExpressionNode11isCommaNodeEv +__ZN3JSC9CommaNodeC1EPNS_12JSGlobalDataEPNS_14ExpressionNodeES4_ __ZN3JSC8ThisNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC9CommaNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC8ThisNodeD0Ev -__ZN3JSC9CommaNodeD0Ev +__ZN3JSC9CommaNodeD1Ev __ZN3JSC9WhileNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC9WhileNodeD0Ev +__ZN3JSC17BytecodeGenerator11emitPostDecEPNS_10RegisterIDES2_ __ZN3JSC16ArrayConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL29constructWithArrayConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE __ZN3JSCL27constructArrayWithSizeQuirkEPNS_9ExecStateERKNS_7ArgListE -__ZNK3JSC7JSValue8toUInt32EPNS_9ExecStateE -__ZN3JSC7JSArray3putEPNS_9ExecStateEjNS_7JSValueE +__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEEj __ZN3JSC17RegExpConstructor3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE +__ZN3JSC9lookupPutINS_17RegExpConstructorEEEbPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEPKNS_9HashTableEPT_ __ZN3JSC8NullNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC8NullNodeD0Ev -__ZN3JSC8LessNodeD0Ev __ZN3JSC6JSCell11getCallDataERNS_8CallDataE __ZN3JSC10JSFunction3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSC14constructArrayEPNS_9ExecStateERKNS_7ArgListE -__ZN3JSC7JSArrayC2EN3WTF10PassRefPtrINS_9StructureEEERKNS_7ArgListE +__ZN3JSC7JSArrayC1EN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7ArgListE __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC14ArrayPrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSCL18arrayProtoFuncPushEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF6VectorIN3JSC10IdentifierELm20EE14expandCapacityEm +__ZN3JSC7JSArray4pushEPNS_9ExecStateENS_7JSValueE +__ZN3JSC7JSArray20increaseVectorLengthEj +__ZN3WTF14tryFastReallocEPvm +__ZN3WTF11fastReallocILb0EEEPvS1_m +__ZN3WTF6VectorIN3JSC10IdentifierELm20EE15reserveCapacityEm __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSC9Structure27despecifyFunctionTransitionEPS0_RKNS_10IdentifierE __ZN3JSC11Interpreter7resolveEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE __ZN3JSC11Interpreter14uncacheGetByIDEPNS_9CodeBlockEPNS_11InstructionE __ZN3JSC7JSArray3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC17NumberConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSC18getStaticValueSlotINS_17NumberConstructorENS_16InternalFunctionEEEbPNS_9ExecStateEPKNS_9HashTableEPT_RKNS_10IdentifierERNS_12PropertySlotE __ZNK3JSC8JSString12toThisObjectEPNS_9ExecStateE +__ZN3JSC12StringObjectC1EN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS_8JSStringE __ZN3JSCL22stringProtoFuncReplaceEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC12StringObject14toThisJSStringEPNS_9ExecStateE +__ZN3JSC6JSCell14toThisJSStringEPNS_9ExecStateE +__ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE +__ZNK3JSC8JSObject8toStringEPNS_9ExecStateE +__ZNK3JSC8JSObject11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE +__ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE +__ZNK3JSC8JSObject3getEPNS_9ExecStateERKNS_10IdentifierE +__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE +__ZN3JSCL23stringProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZNK3JSC12StringObject9classInfoEv __ZN3JSC8JSString14toThisJSStringEPNS_9ExecStateE __ZN3JSCL20stringProtoFuncSplitEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC19constructEmptyArrayEPNS_9ExecStateE +__ZN3JSC7JSArray3putEPNS_9ExecStateEjNS_7JSValueE __ZN3JSC7JSArray11putSlowCaseEPNS_9ExecStateEjNS_7JSValueE __ZN3JSC7TryNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator9emitCatchEPNS_10RegisterIDEPNS_5LabelES4_ -__ZN3WTF6VectorIN3JSC11HandlerInfoELm0EE14expandCapacityEm -__ZN3JSC17BytecodeGenerator16emitPushNewScopeEPNS_10RegisterIDERNS_10IdentifierES2_ -__ZN3JSC7TryNodeD0Ev +__ZN3JSC9CodeBlock19addExceptionHandlerERKNS_11HandlerInfoE +__ZN3WTF6VectorIN3JSC11HandlerInfoELm0EE14expandCapacityEmPKS2_ +__ZN3JSC17BytecodeGenerator16emitPushNewScopeEPNS_10RegisterIDERKNS_10IdentifierES2_ __ZNK3JSC9CommaNode11isCommaNodeEv +__ZN3JSC9CommaNode6appendEPNS_14ExpressionNodeE __ZN3JSCL21arrayProtoFuncForEachEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC11Interpreter20prepareForRepeatCallEPNS_16FunctionBodyNodeEPNS_9ExecStateEPNS_10JSFunctionEiPNS_14ScopeChainNodeEPNS_7JSValueE +__ZN3JSC11Interpreter20prepareForRepeatCallEPNS_18FunctionExecutableEPNS_9ExecStateEPNS_10JSFunctionEiPNS_14ScopeChainNodeEPNS_7JSValueE +__ZN3JSC17BytecodeGenerator11emitPostIncEPNS_10RegisterIDES2_ __ZN3JSC11Interpreter7executeERNS_16CallFrameClosureEPNS_7JSValueE __ZN3JSC10MathObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC11Interpreter13endRepeatCallERNS_16CallFrameClosureE -__ZN3JSC8JSObject23allocatePropertyStorageEmm +__ZN3JSC21getStaticFunctionSlotINS_8JSObjectEEEbPNS_9ExecStateEPKNS_9HashTableEPS1_RKNS_10IdentifierERNS_12PropertySlotE +__ZNK3JSC21UntypedPtrAndBitfieldanEm +__ZN3JSC11Interpreter13endRepeatCallERNS_16CallFrameClosureE +__ZN3JSC14LogicalNotNode30emitBytecodeInConditionContextERNS_17BytecodeGeneratorEPNS_5LabelES4_b __ZN3JSCL19arrayProtoFuncShiftEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE -__ZN3JSCL11getPropertyEPNS_9ExecStateEPNS_8JSObjectEj __ZN3JSC7JSArray14deletePropertyEPNS_9ExecStateEj __ZN3JSC7JSArray9setLengthEj __ZN3JSC10JSFunction16getConstructDataERNS_13ConstructDataE -__ZN3JSC8JSObject17createInheritorIDEv __ZN3JSCL25functionProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZNK3JSC10JSFunction9classInfoEv -__ZN3JSCplERKNS_7UStringES2_ -__ZN3JSC7UString6appendEPKc +__ZNK3JSC7UStringixEi +__ZNK3JSC18FunctionExecutable11paramStringEv +__ZN3WTF6VectorItLm64EE6appendIcEEvPKT_m +__ZN3JSC13StringBuilder7releaseEv +__ZN3JSC10makeStringIPKcNS_7UStringES2_S3_S2_S3_EES3_T_T0_T1_T2_T3_T4_ __ZN3JSC18RegExpMatchesArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE +__ZN3JSC7JSArray16lazyCreationDataEv __ZN3JSC18RegExpMatchesArray17fillArrayInstanceEPNS_9ExecStateE +__ZN3JSC24RegExpConstructorPrivateD1Ev __ZN3JSCL19arrayProtoFuncSliceEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZNK3JSC7JSValue9toIntegerEPNS_9ExecStateE __ZN3JSC24ApplyFunctionCallDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZNK3JSC14ExpressionNode13isSimpleArrayEv __ZN3JSC17BytecodeGenerator26emitJumpIfNotFunctionApplyEPNS_10RegisterIDEPNS_5LabelE +__ZN3JSC17BytecodeGenerator22willResolveToArgumentsERKNS_10IdentifierE +__ZN3JSC17BytecodeGenerator15emitLoadVarargsEPNS_10RegisterIDES2_ __ZN3JSC17BytecodeGenerator15emitCallVarargsEPNS_10RegisterIDES2_S2_S2_jjj -__ZN3JSC24ApplyFunctionCallDotNodeD0Ev __ZNK3JSC7JSArray9classInfoEv __ZN3JSC7JSArray15copyToRegistersEPNS_9ExecStateEPNS_8RegisterEj __ZNK3JSC7UString30spliceSubstringsWithSeparatorsEPKNS0_5RangeEiPKS0_i -__ZN3JSC7UString17expandPreCapacityEi +__ZN3JSC4Heap15recordExtraCostEm +__ZNK3JSC8JSObject3getEPNS_9ExecStateEj +__ZN3JSC4Heap9markRootsEv +__ZN3JSC4Heap30markStackObjectsConservativelyERNS_9MarkStackE +__ZN3JSC4Heap31markCurrentThreadConservativelyERNS_9MarkStackE +__ZN3JSC4Heap39markCurrentThreadConservativelyInternalERNS_9MarkStackE +__ZN3JSC4Heap18markConservativelyERNS_9MarkStackEPvS3_ +__ZN3JSC9MarkStack5drainEv +__ZN3JSC9MarkStack12markChildrenEPNS_6JSCellE +__ZN3JSC8JSObject12markChildrenERNS_9MarkStackE +__ZN3JSC14JSGlobalObject12markChildrenERNS_9MarkStackE +__ZN3JSC9CodeBlock13markAggregateERNS_9MarkStackE +__ZN3JSC18FunctionExecutable13markAggregateERNS_9MarkStackE +__ZN3JSC10JSFunction12markChildrenERNS_9MarkStackE +__ZN3JSC7JSArray12markChildrenERNS_9MarkStackE +__ZN3JSC7JSArray18markChildrenDirectERNS_9MarkStackE +__ZN3JSC15JSWrapperObject12markChildrenERNS_9MarkStackE +__ZN3JSC18GlobalEvalFunction12markChildrenERNS_9MarkStackE +__ZN3JSC12JSActivation12markChildrenERNS_9MarkStackE +__ZN3JSC9Arguments12markChildrenERNS_9MarkStackE +__ZN3JSCL12markIfNeededERNS_9MarkStackENS_7JSValueE +__ZN3JSC4Heap20markProtectedObjectsERNS_9MarkStackE +__ZN3JSC22JSPropertyNameIterator12markChildrenERNS_9MarkStackE +__ZN3JSC12SmallStrings12markChildrenERNS_9MarkStackE +__ZN3JSC9MarkStack7compactEv +__ZN3JSC4Heap12resizeBlocksEv +__ZNK3JSC4Heap11markedCellsEmm +__ZN3JSC17PrototypeFunctionD1Ev +__ZN3JSC12RegExpObjectD1Ev +__ZN3JSC12JSActivationD1Ev +__ZN3JSC12JSActivation16JSActivationDataD1Ev +__ZN3JSC16JSVariableObjectD2Ev +__ZN3JSC9ArgumentsD1Ev +__ZN3JSC9ArgumentsD2Ev +__ZN3JSC18RegExpMatchesArrayD1Ev +__ZN3JSC8JSObjectD1Ev +__ZN3JSC12StringObjectD1Ev +__ZN3JSC15JSWrapperObjectD2Ev __ZN3JSCL19isInvalidParamForInEPNS_9ExecStateEPNS_9CodeBlockEPKNS_11InstructionENS_7JSValueERS7_ -__ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE +__ZN3JSC15IdentifierArena21makeNumericIdentifierEPNS_12JSGlobalDataEd __ZN3JSC7UString4fromEd +__ZN3WTF32doubleToStringInJavaScriptFormatEdPcPj +__ZN3JSC7UStringC1EPKci __ZN3WTF4dtoaEPcdiPiS1_PS0_ __ZN3JSC12ContinueNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator14continueTargetERKNS_10IdentifierE __ZN3JSC13DeleteDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator14emitDeleteByIdEPNS_10RegisterIDES2_RKNS_10IdentifierE -__ZN3JSC12ContinueNodeD0Ev -__ZN3JSC13DeleteDotNodeD0Ev __ZN3JSC10JSFunction14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZNK3JSC7ArgList8getSliceEiRS0_ -__ZNK3JSC12StringObject12toThisStringEPNS_9ExecStateE -__ZNK3JSC8JSObject8toStringEPNS_9ExecStateE -__ZNK3JSC8JSObject11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE -__ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE +__ZN3JSC9Arguments13copyRegistersEv __ZN3JSCL22arrayProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF7HashSetIPN3JSC8JSObjectENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_ +__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E3addIS3_S3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ __ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi +__ZN3JSC14NumericStrings3addEi __ZN3JSC7UString4fromEi -__ZN3WTF6VectorItLm256EE6appendItEEvPKT_m +__ZN3WTF9HashTableIPN3JSC8JSObjectES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_ __ZN3JSCL21arrayProtoFuncIndexOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC12nonInlineNaNEv __ZN3JSC16ErrorConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL29constructWithErrorConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE __ZN3JSC14constructErrorEPNS_9ExecStateERKNS_7ArgListE -__ZN3WTF21CrossThreadRefCountedINS_16OwnFastMallocPtrItEEE5derefEv -__ZN3WTF6VectorINS_6RefPtrIN3JSC10RegisterIDEEELm16EE14expandCapacityEm -__ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE -__ZN3JSC11Interpreter7executeEPNS_16FunctionBodyNodeEPNS_9ExecStateEPNS_10JSFunctionEPNS_8JSObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7JSValueE +__ZN3JSC13ErrorInstanceC1EN3WTF17NonNullPassRefPtrINS_9StructureEEE +__ZN3JSC10JSFunction4callEPNS_9ExecStateENS_7JSValueERKNS_7ArgListE +__ZN3JSC11Interpreter7executeEPNS_18FunctionExecutableEPNS_9ExecStateEPNS_10JSFunctionEPNS_8JSObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7JSValueE +__ZN3WTF10RefCountedIN3JSC14StructureChainEE5derefEv __ZN3JSC15TypeOfValueNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC15TypeOfValueNodeD0Ev __ZN3JSC20jsTypeStringForValueEPNS_9ExecStateENS_7JSValueE -__ZN3JSC10Identifier5equalEPKNS_7UString3RepEPKc -__ZN3JSC13UnaryPlusNodeD0Ev __ZNK3JSC8JSString8toNumberEPNS_9ExecStateE +__ZNK3JSC7UString8toDoubleEv __ZN3JSC17BytecodeGenerator19emitResolveWithBaseEPNS_10RegisterIDES2_RKNS_10IdentifierE __ZN3JSC17RegExpConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL30constructWithRegExpConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE __ZN3JSC15constructRegExpEPNS_9ExecStateERKNS_7ArgListE __ZN3JSC18globalFuncUnescapeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC7UString6appendEt -__ZN3WTF6VectorIPN3JSC14ExpressionNodeELm8EE14expandCapacityEm +__ZN3WTF6VectorItLm64EE14expandCapacityEmPKt +__ZN3WTF6VectorIPN3JSC14ExpressionNodeELm8EE14expandCapacityEmPKS3_ +__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE -__ZN3JSC4Heap7collectEv -__ZN3JSC4Heap30markStackObjectsConservativelyEv -__ZN3JSC4Heap31markCurrentThreadConservativelyEv -__ZN3JSC4Heap39markCurrentThreadConservativelyInternalEv -__ZN3JSC4Heap18markConservativelyEPvS1_ -__ZN3JSC14JSGlobalObject4markEv -__ZN3JSC8JSObject4markEv -__ZN3JSC6JSCell4markEv -__ZN3JSC10JSFunction4markEv -__ZN3JSC16FunctionBodyNode4markEv -__ZN3JSC9CodeBlock4markEv -__ZN3JSC12JSActivation4markEv -__ZN3JSC9Arguments4markEv -__ZN3JSC7JSArray4markEv -__ZN3JSC15JSWrapperObject4markEv -__ZN3JSC18GlobalEvalFunction4markEv -__ZN3JSC19JSStaticScopeObject4markEv -__ZN3JSC4Heap20markProtectedObjectsEv -__ZN3JSC12SmallStrings4markEv -__ZN3JSC4Heap5sweepILNS_8HeapTypeE0EEEmv -__ZN3JSC12RegExpObjectD1Ev -__ZN3JSC12JSActivationD1Ev -__ZN3JSC12JSActivationD2Ev -__ZN3JSC9ArgumentsD1Ev -__ZN3JSC9ArgumentsD2Ev -__ZN3JSC18RegExpMatchesArrayD1Ev -__ZN3JSC8JSObjectD1Ev -__ZN3JSC22JSPropertyNameIteratorD1Ev -__ZN3JSC12StringObjectD1Ev -__ZN3JSC8JSObjectD2Ev -__ZN3JSC4Heap5sweepILNS_8HeapTypeE1EEEmv +__ZL11makeDivNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b +__ZNK3JSC8NullNode6isNullEv +__ZN3JSC21ReadModifyResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC15DateConstructor16getConstructDataERNS_13ConstructDataE +__ZN3JSCL28constructWithDateConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE +__ZN3JSC13constructDateEPNS_9ExecStateERKNS_7ArgListE +__ZN3JSC12DateInstanceC1EPNS_9ExecStateEd +__ZN3WTF8timeClipEd +__ZN3JSC13DatePrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSCL19dateProtoFuncGetDayEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZNK3JSC12DateInstance9classInfoEv +__ZNK3JSC12DateInstance26calculateGregorianDateTimeEPNS_9ExecStateE +__ZN3JSC17DateInstanceCache3addEd +__ZN3JSC21msToGregorianDateTimeEPNS_9ExecStateEdbRNS_17GregorianDateTimeE +__ZN3JSC12getUTCOffsetEPNS_9ExecStateE +__ZN3JSCL12getDSTOffsetEPNS_9ExecStateEdd +__ZN3WTFL18calculateDSTOffsetEdd +__ZN3WTF23dayInMonthFromDayInYearEib +__ZN3JSCL21dateProtoFuncGetHoursEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL23dateProtoFuncGetMinutesEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL30dateProtoFuncGetTimezoneOffsetEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL26stringProtoFuncToLowerCaseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL19mathProtoFuncRandomEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC14NumericStrings3addEd +__ZN3WTFL4multERNS_6BigIntERKS0_ +__ZN3WTF6VectorIjLm16EEaSERKS1_ +__ZN3WTF6BigInt6appendEj +__ZN3JSC8JSString4Rope20destructNonRecursiveEv __ZNK3JSC19JSStaticScopeObject14isDynamicScopeEv __ZN3JSC17ReadModifyDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17ReadModifyDotNodeD0Ev -__ZN3JSC7UString10BaseString20slowIsBufferReadOnlyEv __ZN3JSC18BooleanConstructor11getCallDataERNS_8CallDataE __ZN3JSCL22callBooleanConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZL17bracketIsAnchoredPKh __ZN3JSCL18arrayProtoFuncJoinEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF6VectorItLm256EE14expandCapacityEm +__ZN3WTF6VectorItLm256EE14expandCapacityEmPKt __ZN3JSC19FunctionConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL32constructWithFunctionConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE +__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListE __ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi __ZN3JSC12JSActivation18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC10SwitchNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC13CaseBlockNode20emitBytecodeForBlockERNS_17BytecodeGeneratorEPNS_10RegisterIDES4_ __ZN3JSC13CaseBlockNode18tryOptimizedSwitchERN3WTF6VectorIPNS_14ExpressionNodeELm8EEERiS7_ __ZN3JSCL17processClauseListEPNS_14ClauseListNodeERN3WTF6VectorIPNS_14ExpressionNodeELm8EEERNS_10SwitchKindERbRiSB_ -__ZN3WTF6VectorINS_6RefPtrIN3JSC5LabelEEELm8EE15reserveCapacityEm __ZN3JSC17BytecodeGenerator11beginSwitchEPNS_10RegisterIDENS_10SwitchInfo10SwitchTypeE __ZN3WTF6VectorIN3JSC10SwitchInfoELm0EE14expandCapacityEm -__ZN3WTF6VectorIiLm8EE14expandCapacityEm +__ZN3WTF6VectorISt4pairIiiELm8EE14expandCapacityEmPKS2_ __ZN3JSC17BytecodeGenerator9endSwitchEjPN3WTF6RefPtrINS_5LabelEEEPPNS_14ExpressionNodeEPS3_ii -__ZN3WTF6VectorIN3JSC15StringJumpTableELm0EE14expandCapacityEm -__ZN3JSC14CaseClauseNodeD0Ev -__ZN3JSC14ClauseListNodeD0Ev -__ZN3JSC13CaseBlockNodeD0Ev -__ZN3JSC10SwitchNodeD0Ev -__ZN3JSC5equalEPKNS_7UString3RepES3_ +__ZN3JSC9CodeBlock24addStringSwitchJumpTableEv +__ZN3WTF6VectorIN3JSC15StringJumpTableELm0EE14expandCapacityEmPKS2_ +__ZN3WTF11VectorMoverILb0EN3JSC15StringJumpTableEE4moveEPKS2_S5_PS2_ +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_14OffsetLocationEENS_18PairFirstExtractorIS7_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSD_IS6_EEEESE_E6rehashEi +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_14OffsetLocationEENS_18PairFirstExtractorIS7_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSD_IS6_EEEESE_E4findIS4_NS_22IdentityHashTranslatorIS4_S7_SB_EEEENS_17HashTableIteratorIS4_S7_S9_SB_SG_SE_EERKT_ +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_14OffsetLocationEENS_18PairFirstExtractorIS7_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSD_IS6_EEEESE_E3addIS4_S7_NS_22IdentityHashTranslatorIS4_S7_SB_EEEES5_INS_17HashTableIteratorIS4_S7_S9_SB_SG_SE_EEbERKT_RKT0_ +__ZN3WTF9HashTableINS_6RefPtrIN3JSC11UStringImplEEESt4pairIS4_NS2_14OffsetLocationEENS_18PairFirstExtractorIS7_EENS_7StrHashIS4_EENS_14PairHashTraitsINS_10HashTraitsIS4_EENSD_IS6_EEEESE_E3addIPS3_S6_NS_29RefPtrHashMapRawKeyTranslatorISJ_S7_SG_SB_EEEES5_INS_17HashTableIteratorIS4_S7_S9_SB_SG_SE_EEbERKT_RKT0_ +__ZN3JSC15StringJumpTable14offsetForValueEPNS_11UStringImplEi __ZN3JSC28globalFuncEncodeURIComponentEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL6encodeEPNS_9ExecStateERKNS_7ArgListEPKc __ZNK3JSC7UString10UTF8StringEb __ZN3WTF7Unicode18convertUTF16ToUTF8EPPKtS2_PPcS4_b -__ZN3JSCL26stringProtoFuncToLowerCaseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC7UStringC2EPtib -__ZN3WTF6VectorIPN3JSC14ExpressionNodeELm16EE14expandCapacityEm -__ZN3JSC7UString13appendNumericEi -__ZN3JSC11concatenateEPNS_7UString3RepEi -__ZNK3JSC8NullNode6isNullEv -__ZN3JSC13GreaterEqNodeD0Ev -__ZL12makeMultNodePvPN3JSC14ExpressionNodeES2_b -__ZN3JSC8MultNodeD0Ev -__ZN3JSCL19mathProtoFuncRandomEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF16weakRandomNumberEv -__ZN3JSC12jsNumberCellEPNS_9ExecStateEd +__ZN3JSC7CStringD1Ev +__ZN3WTF6VectorIPN3JSC14ExpressionNodeELm16EE14expandCapacityEmPKS3_ +__ZN3JSC8jsLessEqEPNS_9ExecStateENS_7JSValueES2_ +__ZN3WTF6VectorIN3JSC8JSString4Rope5FiberELm32EE14expandCapacityEm +__ZL12makeMultNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b __ZN3JSCL17mathProtoFuncCeilEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC7UString3Rep11computeHashEPKti -__ZN3WTF37parseDateFromNullTerminatedCharactersEPKc +__ZNK3JSC7JSValue17toPrimitiveStringEPNS_9ExecStateE +__ZN3JSC14jsIsObjectTypeENS_7JSValueE +__ZN3JSCL20arrayProtoFuncConcatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC18RegExpMatchesArray18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSCL20stringProtoFuncSliceEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC17StringConstructor11getCallDataERNS_8CallDataE +__ZN3JSCL21callStringConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC17BytecodeGenerator29uncheckedRegisterForArgumentsEv +__ZN3JSC23FunctionCallBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC20EvalFunctionCallNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC20EvalFunctionCallNodeD0Ev -__ZN3JSC11Interpreter22resolveBaseAndPropertyEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE +__ZN3JSC17BytecodeGenerator12emitCallEvalEPNS_10RegisterIDES2_S2_PNS_13ArgumentsNodeEjjj +__ZN3JSCL26stringProtoFuncToUpperCaseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZNK3JSC7UString12replaceRangeEiiRKS0_ +__ZN3JSCL19regExpProtoFuncExecEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC12RegExpObject4execEPNS_9ExecStateERKNS_7ArgListE +__ZN3WTF37parseDateFromNullTerminatedCharactersEPKc +__ZN3WTFL37parseDateFromNullTerminatedCharactersEPKcRbRi +__ZN3JSC14InstanceOfNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC17BytecodeGenerator14emitInstanceOfEPNS_10RegisterIDES2_S2_S2_ +__ZN3JSCL27isInvalidParamForInstanceOfEPNS_9ExecStateEPNS_9CodeBlockEPKNS_11InstructionENS_7JSValueERS7_ +__ZN3JSC8JSObject11hasInstanceEPNS_9ExecStateENS_7JSValueES3_ +__ZN3JSC19JSStaticScopeObject12markChildrenERNS_9MarkStackE +__ZN3JSC22JSPropertyNameIteratorD1Ev +__ZN3WTF21CrossThreadRefCountedINS_16OwnFastMallocPtrItEEE5derefEv +__ZN3JSC9parseDateEPNS_9ExecStateERKNS_7UStringE +__ZN3JSC37parseDateFromNullTerminatedCharactersEPNS_9ExecStateEPKc +__ZN3JSCL21dateProtoFuncSetHoursEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL23setNewValueFromTimeArgsEPNS_9ExecStateENS_7JSValueERKNS_7ArgListEib +__ZN3JSC21gregorianDateTimeToMSEPNS_9ExecStateERKNS_17GregorianDateTimeEdb +__ZN3JSCL20dateProtoFuncGetTimeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL18mathProtoFuncRoundEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC13jsAddSlowCaseEPNS_9ExecStateENS_7JSValueES2_ +__ZN3JSCL18mathProtoFuncFloorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC18globalFuncParseIntEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC15toInt32SlowCaseEdRb +__ZN3JSC12DateInstanceD1Ev +__ZNK3JSC7JSValue20toThisObjectSlowCaseEPNS_9ExecStateE +__ZN3JSC20globalFuncParseFloatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC15globalFuncIsNaNEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC11Interpreter8callEvalEPNS_9ExecStateEPNS_12RegisterFileEPNS_8RegisterEiiRNS_7JSValueE -__ZN3JSC13LiteralParser5Lexer3lexERNS1_18LiteralParserTokenE -__ZN3JSC13LiteralParser5parseENS0_11ParserStateE -__ZNK3WTF7HashMapINS_6RefPtrIN3JSC7UString3RepEEENS1_INS2_8EvalNodeEEENS_7StrHashIS5_EENS_10HashTraitsIS5_EENSA_IS7_EEE3getEPS4_ -__ZN3JSC6Parser5parseINS_8EvalNodeEEEN3WTF10PassRefPtrIT_EEPNS_9ExecStateEPNS_8DebuggerERKNS_10SourceCodeEPiPNS_7UStringE -__ZN3WTF9HashTableINS_6RefPtrIN3JSC7UString3RepEEESt4pairIS5_NS1_INS2_8EvalNodeEEEENS_18PairFirstExtractorIS9_EENS_7StrHashIS5_EENS_14PairHashTraitsINS_10HashTraitsIS5_EENSF_IS8_EEEESG_E6expandEv -__ZN3JSC9ExecState9thisValueEv -__ZN3JSC11Interpreter7executeEPNS_8EvalNodeEPNS_9ExecStateEPNS_8JSObjectEiPNS_14ScopeChainNodeEPNS_7JSValueE -__ZN3JSC8EvalNode16generateBytecodeEPNS_14ScopeChainNodeE -__ZN3JSC17BytecodeGeneratorC2EPNS_8EvalNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_7UString3RepEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISE_EENS_26SymbolTableIndexHashTraitsEEEPNS_13EvalCodeBlockE -__ZN3JSC8EvalNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC11Interpreter11resolveBaseEPNS_9ExecStateEPNS_11InstructionE -__ZN3JSC10LessEqNodeD0Ev -__ZN3JSC16globalFuncEscapeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZThn12_N3JSC8EvalNodeD0Ev -__ZN3JSC8EvalNodeD0Ev -__ZN3JSC22JSPropertyNameIterator4markEv -__ZN3JSC21ReadModifyResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC21ReadModifyResolveNodeD0Ev +__ZN3JSCL24stringProtoFuncSubstringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL29objectProtoFuncHasOwnPropertyEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZNK3JSC8JSObject14hasOwnPropertyEPNS_9ExecStateERKNS_10IdentifierE +__ZN3JSC9CodeBlock27addImmediateSwitchJumpTableEv +__ZN3WTF6VectorIN3JSC15SimpleJumpTableELm0EE15reserveCapacityEm +__ZN3WTF6VectorIiLm0EE4fillERKim +__ZN3JSC15SimpleJumpTable14offsetForValueEii +__ZN3JSC11Interpreter22resolveBaseAndPropertyEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE +__ZN3JSCL24regExpConstructorDollar2EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE +__ZN3JSCL24regExpConstructorDollar3EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE +__ZN3JSCL24regExpConstructorDollar4EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE +__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE +__ZN3JSC9CodeBlock27lineNumberForBytecodeOffsetEPNS_9ExecStateEj +__ZN3JSC9CodeBlock34reparseForExceptionInfoIfNecessaryEPNS_9ExecStateE +__ZN3JSC18FunctionExecutable20reparseExceptionInfoEPNS_12JSGlobalDataEPNS_14ScopeChainNodeEPNS_9CodeBlockE +__ZN3WTF6OwnPtrIN3JSC13ExceptionInfoEE3setEPS2_ __ZN3JSC28globalFuncDecodeURIComponentEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL6decodeEPNS_9ExecStateERKNS_7ArgListEPKcb -__ZNK3JSC12JSNumberCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE -__ZN3JSC7UString13appendNumericEd -__ZN3JSC11concatenateEPNS_7UString3RepEd -__ZN3JSC14jsIsObjectTypeENS_7JSValueE -__ZNK3JSC7JSValue20toThisObjectSlowCaseEPNS_9ExecStateE -__ZL11makeDivNodePvPN3JSC14ExpressionNodeES2_b -__ZN3JSC7DivNodeD0Ev -__ZN3JSC15DateConstructor16getConstructDataERNS_13ConstructDataE -__ZN3JSCL28constructWithDateConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE -__ZN3JSC13constructDateEPNS_9ExecStateERKNS_7ArgListE -__ZN3WTF17getCurrentUTCTimeEv -__ZN3WTF8timeClipEd -__ZN3JSC13DatePrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSCL30dateProtoFuncGetTimezoneOffsetEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC12DateInstance9classInfoEv -__ZNK3JSC12DateInstance21msToGregorianDateTimeEdbRN3WTF17GregorianDateTimeE -__ZN3WTF21msToGregorianDateTimeEdbRNS_17GregorianDateTimeE -__ZN3WTF12getUTCOffsetEv -__ZN3WTFL12getDSTOffsetEdd -__ZN3JSCL21dateProtoFuncGetHoursEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF13tryFastMallocEm -__ZN3JSC10BitAndNodeD0Ev -__ZN3JSC18globalFuncParseIntEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC17PrefixResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC21ReadModifyBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZL17makeLeftShiftNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b +__ZL18makeRightShiftNodePN3JSC12JSGlobalDataEPNS_14ExpressionNodeES3_b +__ZN3JSC17BytecodeGenerator10emitPreDecEPNS_10RegisterIDE +__ZN3JSCL25stringProtoFuncCharCodeAtEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC11DoWhileNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSCL16mathProtoFuncMaxEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL8parseIntERKNS_7UStringEi -__ZN3JSCL20dateProtoFuncGetTimeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC10JSONObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE +__ZN3JSCL22JSONProtoFuncStringifyEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC11StringifierC2EPNS_9ExecStateENS_7JSValueES3_ +__ZN3JSCL20unwrapBoxedPrimitiveEPNS_9ExecStateENS_7JSValueE +__ZN3JSC11Stringifier9stringifyENS_7JSValueE +__ZN3JSC11Stringifier22appendStringifiedValueERNS_13StringBuilderENS_7JSValueEPNS_8JSObjectERKNS_27PropertyNameForFunctionCallE +__ZN3JSC11Stringifier6toJSONENS_7JSValueERKNS_27PropertyNameForFunctionCallE +__ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE +__ZN3JSC11Stringifier6Holder18appendNextPropertyERS0_RNS_13StringBuilderE +__ZN3JSC11Stringifier6indentEv +__ZNK3JSC7UString6substrEii +__ZNK3JSC11Stringifier12startNewLineERNS_13StringBuilderE +__ZN3JSC11Stringifier18appendQuotedStringERNS_13StringBuilderERKNS_7UStringE +__ZN3JSC11Stringifier8unindentEv +__ZN3JSC11StringifierD2Ev __ZNK3JSC7JSValue19synthesizePrototypeEPNS_9ExecStateE __ZN3JSC26createNotAnObjectErrorStubEPNS_9ExecStateEb __ZN3JSC13JSNotAnObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE @@ -774,112 +954,42 @@ __ZN3JSC11Interpreter14throwExceptionERPNS_9ExecStateERNS_7JSValueEjb __ZNK3JSC22JSNotAnObjectErrorStub22isNotAnObjectErrorStubEv __ZN3JSC22createNotAnObjectErrorEPNS_9ExecStateEPNS_22JSNotAnObjectErrorStubEjPNS_9CodeBlockE __ZN3JSC9CodeBlock37getByIdExceptionInfoForBytecodeOffsetEPNS_9ExecStateEjRNS_8OpcodeIDE -__ZN3JSC9CodeBlock34reparseForExceptionInfoIfNecessaryEPNS_9ExecStateE __ZNK3JSC10ScopeChain10localDepthEv __ZNK3JSC12JSActivation9classInfoEv -__ZN3JSC6Parser7reparseINS_16FunctionBodyNodeEEEN3WTF10PassRefPtrIT_EEPNS_12JSGlobalDataEPS5_ -__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm0EEEPNS6_IPNS_12FuncDeclNodeELm0EEERKNS_10SourceCodeEji -__ZN3JSC13StatementNode6setLocEii -__ZN3JSC16FunctionBodyNode14copyParametersEv -__ZN3JSC16FunctionBodyNode13finishParsingEPNS_10IdentifierEm -__ZN3JSC16FunctionBodyNode31bytecodeForExceptionInfoReparseEPNS_14ScopeChainNodeEPNS_9CodeBlockE __ZN3JSC9CodeBlock43hasGlobalResolveInstructionAtBytecodeOffsetEj __ZN3JSC9CodeBlock32expressionRangeForBytecodeOffsetEPNS_9ExecStateEjRiS3_S3_ __ZN3JSCL18createErrorMessageEPNS_9ExecStateEPNS_9CodeBlockEiiiNS_7JSValueENS_7UStringE +__ZN3JSC10makeStringIPKcNS_7UStringES2_S3_S2_S3_S2_EES3_T_T0_T1_T2_T3_T4_T5_ __ZN3JSC5Error6createEPNS_9ExecStateENS_9ErrorTypeERKNS_7UStringEilS6_ __ZN3JSC22NativeErrorConstructor16getConstructDataERNS_13ConstructDataE +__ZN3JSC9constructEPNS_9ExecStateENS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE __ZN3JSCL35constructWithNativeErrorConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE __ZN3JSC22NativeErrorConstructor9constructEPNS_9ExecStateERKNS_7ArgListE __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj +__ZN3JSC20MarkedArgumentBufferD1Ev __ZN3JSC9CodeBlock24handlerForBytecodeOffsetEj __ZN3JSC11Interpreter20createExceptionScopeEPNS_9ExecStateEPKNS_11InstructionE -__ZN3JSC23FunctionCallBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC23FunctionCallBracketNodeD0Ev __ZN3JSCL20dateProtoFuncSetTimeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL24stringProtoFuncSubstringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL18mathProtoFuncFloorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL19dateProtoFuncGetDayEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL21dateProtoFuncGetMonthEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL20dateProtoFuncGetYearEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF6VectorIjLm16EE6resizeEm +__ZN3JSC16globalFuncEscapeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL24dateProtoFuncToGMTStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC10formatTimeERKN3WTF17GregorianDateTimeEb -__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZNK3JSC12JSNumberCell8toObjectEPNS_9ExecStateE -__ZN3JSC15constructNumberEPNS_9ExecStateENS_7JSValueE +__ZNK3JSC12DateInstance29calculateGregorianDateTimeUTCEPNS_9ExecStateE +__ZN3JSC20formatDateUTCVariantERKNS_17GregorianDateTimeERA100_c +__ZN3JSC13formatTimeUTCERKNS_17GregorianDateTimeERA100_c +__ZN3JSC10makeStringIPcPKcS1_EENS_7UStringET_T0_T1_ +__ZN3JSC18jsNontrivialStringEPNS_12JSGlobalDataERKNS_7UStringE __ZN3JSCL23numberProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC12JSNumberCell8toStringEPNS_9ExecStateE __ZN3JSC14PostfixDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC14PostfixDotNodeD0Ev -__ZN3JSCL19regExpProtoFuncExecEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL20stringProtoFuncSliceEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL22objectProtoFuncValueOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC14InstanceOfNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17BytecodeGenerator14emitInstanceOfEPNS_10RegisterIDES2_S2_S2_ -__ZN3JSC14InstanceOfNodeD0Ev -__ZN3JSCL27isInvalidParamForInstanceOfEPNS_9ExecStateEPNS_9CodeBlockEPKNS_11InstructionENS_7JSValueERS7_ -__ZN3JSC8JSObject11hasInstanceEPNS_9ExecStateENS_7JSValueES3_ -__ZN3JSCL20arrayProtoFuncConcatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC18RegExpMatchesArray18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC17StringConstructor11getCallDataERNS_8CallDataE -__ZN3JSCL21callStringConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC12StringObject8toStringEPNS_9ExecStateE -__ZN3JSCL26stringProtoFuncToUpperCaseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC7UString12replaceRangeEiiRKS0_ -__ZN3JSCL23stringProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC13jsAddSlowCaseEPNS_9ExecStateENS_7JSValueES2_ -__ZNK3JSC12StringObject9classInfoEv -__ZN3WTFL15dateToDayInYearEiii -__ZN3JSCL23dateProtoFuncGetMinutesEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL7dateNowEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC20globalFuncParseFloatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC19JSStaticScopeObjectD1Ev -__ZN3JSC19JSStaticScopeObjectD2Ev -__ZN3JSC13ErrorInstanceD1Ev -__ZN3JSC13JSNotAnObjectD1Ev -__ZN3JSC22JSNotAnObjectErrorStubD1Ev -__ZN3JSC12NumberObjectD1Ev -__ZN3JSC12DateInstanceD1Ev -__ZN3JSC17PrefixResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17PrefixResolveNodeD0Ev -__ZN3JSCL29objectProtoFuncHasOwnPropertyEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC17ObjectConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL30constructWithObjectConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE -__ZN3JSCL24regExpConstructorDollar2EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZN3JSCL24regExpConstructorDollar3EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZN3JSCL24regExpConstructorDollar4EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE -__ZN3JSC9CodeBlock27lineNumberForBytecodeOffsetEPNS_9ExecStateEj -__ZN3JSC21ReadModifyBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC7ModNodeD0Ev -__ZN3JSC21ReadModifyBracketNodeD0Ev -__ZN3JSC10BitXOrNodeD0Ev -__ZN3JSCL18mathProtoFuncRoundEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZL17makeLeftShiftNodePvPN3JSC14ExpressionNodeES2_b -__ZL18makeRightShiftNodePvPN3JSC14ExpressionNodeES2_b -__ZN3JSC13LeftShiftNodeD0Ev -__ZN3JSC14RightShiftNodeD0Ev -__ZN3JSCL25stringProtoFuncCharCodeAtEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC15toInt32SlowCaseEdRb -__ZN3JSC10NegateNodeD0Ev -__ZN3JSC11DoWhileNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC11DoWhileNodeD0Ev -__ZN3JSCL16mathProtoFuncMaxEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC17PrefixBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17PrefixBracketNodeD0Ev -__ZN3JSC10JSONObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSCL22JSONProtoFuncStringifyEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC11StringifierC2EPNS_9ExecStateENS_7JSValueES3_ -__ZN3JSC11Stringifier9stringifyENS_7JSValueE -__ZN3JSC11Stringifier22appendStringifiedValueERNS_7UStringENS_7JSValueEPNS_8JSObjectERKNS_27PropertyNameForFunctionCallE -__ZNK3JSC6JSCell9getStringERNS_7UStringE -__ZN3JSC11Stringifier6Holder18appendNextPropertyERS0_RNS_7UStringE -__ZNK3JSC7UString6substrEii -__ZNK3JSC7UStringixEi -__ZN3JSC11Stringifier18appendQuotedStringERNS_7UStringERKS1_ -__ZN3JSC7UString6appendEPKti -__ZN3JSC11StringifierD2Ev +__ZN3WTF9HashTableIdSt4pairIdN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_9FloatHashIdEENS_14PairHashTraitsINS_10HashTraitsIdEENSA_IS3_EEEESB_E4findIdNS_22IdentityHashTranslatorIdS4_S8_EEEENS_17HashTableIteratorIdS4_S6_S8_SD_SB_EERKT_ +__ZN3WTF9HashTableIdSt4pairIdN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_9FloatHashIdEENS_14PairHashTraitsINS_10HashTraitsIdEENSA_IS3_EEEESB_E6rehashEi +__ZN3WTF9HashTableIdSt4pairIdN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_9FloatHashIdEENS_14PairHashTraitsINS_10HashTraitsIdEENSA_IS3_EEEESB_E3addIdS3_NS_17HashMapTranslatorIS4_SD_S8_EEEES1_INS_17HashTableIteratorIdS4_S6_S8_SD_SB_EEbERKT_RKT0_ __ZN3JSCL18JSONProtoFuncParseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC13LiteralParser5Lexer3lexERNS1_18LiteralParserTokenE +__ZN3JSC13LiteralParser5parseENS0_11ParserStateE __ZN3JSC13LiteralParser5Lexer9lexStringILNS0_10ParserModeE0EEENS0_9TokenTypeERNS1_18LiteralParserTokenE __ZN3JSC13LiteralParser5Lexer9lexNumberERNS1_18LiteralParserTokenE __ZN3JSC18RegExpMatchesArray3putEPNS_9ExecStateEjNS_7JSValueE @@ -888,75 +998,67 @@ __ZNK3JSC8JSObject19isWatchdogExceptionEv __ZN3JSC11Interpreter15unwindCallFrameERPNS_9ExecStateENS_7JSValueERjRPNS_9CodeBlockE __ZN3JSC19JSStaticScopeObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE -__ZN3JSC17PropertyNameArray3addEPNS_7UString3RepE -__ZN3WTF7HashSetIPN3JSC7UString3RepENS_7PtrHashIS4_EENS_10HashTraitsIS4_EEE3addERKS4_ -__ZN3WTF9HashTableIPN3JSC7UString3RepES4_NS_17IdentityExtractorIS4_EENS_7PtrHashIS4_EENS_10HashTraitsIS4_EESA_E6rehashEi -__ZN3JSC17PrototypeFunctionD1Ev -__ZN3JSC15ObjectPrototypeD1Ev -__ZN3JSC17FunctionPrototypeD1Ev +__ZN3JSC17PropertyNameArray3addEPNS_11UStringImplE +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E3addIS3_S3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi +__ZN3JSCL21stringProtoFuncSubstrEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC4Heap17collectAllGarbageEv +__ZN3JSC4Heap5sweepEv __ZN3JSC14JSGlobalObjectD2Ev -__ZN3JSC18GlobalEvalFunctionD1Ev -__ZN3JSC10JSONObjectD1Ev -__ZN3JSC10MathObjectD1Ev -__ZN3JSC22NativeErrorConstructorD1Ev -__ZN3JSC16ErrorConstructorD1Ev -__ZN3JSC17RegExpConstructorD1Ev -__ZN3JSC15DateConstructorD1Ev -__ZN3JSC17NumberConstructorD1Ev -__ZN3JSC18BooleanConstructorD1Ev -__ZN3JSC17StringConstructorD1Ev -__ZN3JSC16ArrayConstructorD1Ev -__ZN3JSC19FunctionConstructorD1Ev -__ZN3JSC17ObjectConstructorD1Ev -__ZN3JSC20NativeErrorPrototypeD1Ev -__ZN3JSC14ErrorPrototypeD1Ev -__ZN3JSC15RegExpPrototypeD1Ev -__ZN3JSC13DatePrototypeD1Ev -__ZN3JSC12DateInstanceD2Ev -__ZN3JSC15NumberPrototypeD1Ev -__ZN3JSC16BooleanPrototypeD1Ev -__ZN3JSC15StringPrototypeD1Ev +__ZN3JSC17FunctionPrototypeD1Ev +__ZN3JSC15ObjectPrototypeD1Ev __ZN3JSC14ArrayPrototypeD1Ev +__ZN3JSC15StringPrototypeD1Ev +__ZN3JSC16BooleanPrototypeD1Ev +__ZN3JSC15NumberPrototypeD1Ev +__ZN3JSC13DatePrototypeD1Ev +__ZN3JSC15RegExpPrototypeD1Ev +__ZN3JSC14ErrorPrototypeD1Ev +__ZN3JSC13ErrorInstanceD2Ev +__ZN3JSC20NativeErrorPrototypeD1Ev +__ZN3JSC17ObjectConstructorD1Ev +__ZN3JSC19FunctionConstructorD1Ev +__ZN3JSC16ArrayConstructorD1Ev +__ZN3JSC17StringConstructorD1Ev +__ZN3JSC18BooleanConstructorD1Ev +__ZN3JSC17NumberConstructorD1Ev +__ZN3JSC15DateConstructorD1Ev +__ZN3JSC17RegExpConstructorD1Ev +__ZN3JSC16ErrorConstructorD1Ev +__ZN3JSC22NativeErrorConstructorD1Ev +__ZN3JSC10MathObjectD1Ev +__ZN3JSC10JSONObjectD1Ev +__ZN3JSC18GlobalEvalFunctionD1Ev +__ZN3JSC22JSNotAnObjectErrorStubD1Ev +__ZN3JSC13JSNotAnObjectD1Ev +__ZN3JSC13ErrorInstanceD1Ev +__ZN3JSC19JSStaticScopeObjectD1Ev +__ZN3JSC19JSStaticScopeObjectD2Ev __ZN3JSC17DeleteBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator15emitDeleteByValEPNS_10RegisterIDES2_S2_ -__ZN3JSC17DeleteBracketNodeD0Ev __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZNK3JSC8JSObject9classNameEv +__ZN3JSC10makeStringIPKcNS_7UStringES2_EES3_T_T0_T1_ __ZN3JSC17StringConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL30constructWithStringConstructorEPNS_9ExecStateEPNS_8JSObjectERKNS_7ArgListE +__ZN3JSC12StringObjectC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEERKNS_7UStringE __ZN3JSC12RegExpObject11getCallDataERNS_8CallDataE -__ZN3JSC4Heap15recordExtraCostEm -__ZN3JSC7JSArray4pushEPNS_9ExecStateENS_7JSValueE +__ZN3JSCL28substituteBackreferencesSlowERKNS_7UStringES2_PKiPNS_6RegExpEi __ZN3JSCL21dateProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC10formatDateERKNS_17GregorianDateTimeERA100_c +__ZN3JSC10formatTimeERKNS_17GregorianDateTimeERA100_c __ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE __ZN3JSCL20dateProtoFuncGetDateEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL18stringFromCharCodeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC11Interpreter11resolveSkipEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE -__ZN3JSC9Structure27despecifyDictionaryFunctionERKNS_10IdentifierE -__ZN3JSC17DeleteResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC17DeleteResolveNodeD0Ev -__ZN3JSCL21arrayProtoFuncUnShiftEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC11Interpreter14uncachePutByIDEPNS_9CodeBlockEPNS_11InstructionE -__ZNK3JSC9Arguments9classInfoEv -__ZN3JSC9Arguments15copyToRegistersEPNS_9ExecStateEPNS_8RegisterEj -__ZN3JSC9Arguments3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj -__ZN3WTF6VectorIPN3JSC9StructureELm8EE14expandCapacityEm -__ZN3JSC12StringObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE -__ZN3JSC9ExecState11stringTableEPS0_ +__ZN3JSC9MarkStack12releaseStackEPvm +__ZN3JSC14StructureChainD1Ev +__ZN3WTF11OwnArrayPtrINS_6RefPtrIN3JSC9StructureEEEE10safeDeleteEv +__ZN3JSC4Heap9freeBlockEm +__ZN3JSC4Heap12freeBlockPtrEPNS_14CollectorBlockE +__ZN3WTF13tryFastCallocEmm +__ZN3WTF10fastCallocILb0EEEPvmm __ZN3JSCL16mathProtoFuncMinEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTFL7multaddERNS_6BigIntEii -__ZN3WTF6VectorIjLm16EEaSERKS1_ -__ZN3WTFL4multERNS_6BigIntERKS0_ -__ZN3JSC18PostfixBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC18PostfixBracketNodeD0Ev -__ZN3JSCL21arrayProtoFuncReverseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__Z15jsc_pcre_xclassiPKh -__ZN3JSC8VoidNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC8VoidNodeD0Ev -__ZN3JSC12JSActivation3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZNK3JSC9ArrayNode13isSimpleArrayEv -__ZN3JSCL21stringProtoFuncCharAtEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC17NumberConstructor11getCallDataERNS_8CallDataE +__ZN3JSCL21callNumberConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL18regExpObjectSourceEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE __ZN3JSC17RegExpConstructor11getCallDataERNS_8CallDataE __ZN3JSCL21callRegExpConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE @@ -965,111 +1067,91 @@ __ZN3JSCL18arrayProtoFuncSortEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7Arg __ZN3JSC7JSArray4sortEPNS_9ExecStateE __ZN3JSC7JSArray17compactForSortingEv __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE -__ZN3WTF6VectorIN3JSC7UString5RangeELm16EE14expandCapacityEm -__ZN3WTF6VectorIN3JSC7UStringELm16EE14expandCapacityEm -__ZN3JSCL17arrayProtoFuncPopEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC7JSArray3popEv +__ZN3JSC9Structure27despecifyDictionaryFunctionERKNS_10IdentifierE +__ZN3JSCL18stringFromCharCodeEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC23jsSingleCharacterStringEPNS_12JSGlobalDataEt +__ZN3WTF6VectorIN3JSC7UString5RangeELm16EE15reserveCapacityEm +__ZN3WTF6VectorIN3JSC7UStringELm16EE15reserveCapacityEm +__ZN3JSC11Interpreter8callEvalEPNS_9ExecStateEPNS_12RegisterFileEPNS_8RegisterEiiRNS_7JSValueE +__ZN3JSC13EvalCodeCache3getEPNS_9ExecStateERKNS_7UStringEPNS_14ScopeChainNodeERNS_7JSValueE +__ZN3JSC14EvalExecutable7compileEPNS_9ExecStateEPNS_14ScopeChainNodeE +__ZN3JSC6Parser5parseINS_8EvalNodeEEEN3WTF10PassRefPtrIT_EEPNS_12JSGlobalDataEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPiPNS_7UStringE +__ZN3JSC8EvalNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERKNS_10SourceCodeEji +__ZN3JSC13EvalCodeBlockC2EPNS_14EvalExecutableEPNS_14JSGlobalObjectEN3WTF10PassRefPtrINS_14SourceProviderEEEi +__ZN3JSC17BytecodeGeneratorC1EPNS_8EvalNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_13EvalCodeBlockE +__ZN3JSC17BytecodeGeneratorC2EPNS_8EvalNodeEPKNS_8DebuggerERKNS_10ScopeChainEPN3WTF7HashMapINS9_6RefPtrINS_11UStringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS9_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEPNS_13EvalCodeBlockE +__ZN3JSC8EvalNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZThn12_N3JSC8EvalNodeD0Ev +__ZN3JSC9ExecState9thisValueEv +__ZN3JSC11Interpreter7executeEPNS_14EvalExecutableEPNS_9ExecStateEPNS_8JSObjectEiPNS_14ScopeChainNodeEPNS_7JSValueE +__ZN3JSC14EvalExecutableD0Ev +__ZN3JSC13EvalCodeBlockD0Ev +__ZN3JSCL21stringProtoFuncCharAtEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC26jsSingleCharacterSubstringEPNS_12JSGlobalDataERKNS_7UStringEj +__ZN3JSC8JSString18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE __ZN3JSCL21functionProtoFuncCallEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC17DeleteResolveNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSC11Interpreter11resolveBaseEPNS_9ExecStateEPNS_11InstructionE __ZN3JSC12JSActivation14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE -__ZN3JSCL9dateParseEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC12RegExpObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSCL24setRegExpObjectLastIndexEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueE -__ZN3JSCL28regExpConstructorLeftContextEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZN3JSCL21stringProtoFuncSubstrEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC28createUndefinedVariableErrorEPNS_9ExecStateERKNS_10IdentifierEjPNS_9CodeBlockE -__ZN3JSC36constructBooleanFromImmediateBooleanEPNS_9ExecStateENS_7JSValueE -__ZN3JSCL26stringProtoFuncLastIndexOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC7JSValue20toIntegerPreserveNaNEPNS_9ExecStateE -__ZNK3JSC7UString5rfindERKS0_i -__ZN3JSC19globalFuncEncodeURIEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC13UnaryPlusNode14stripUnaryPlusEv -__ZN3JSC8JSString18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE -__ZN3JSC13BooleanObjectD1Ev -__ZN3WTF17TCMalloc_PageHeap3NewEm -__ZNK3JSC21UStringSourceProvider8getRangeEii -__ZN3JSCL23dateProtoFuncGetSecondsEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE -__ZN3JSCL24dateProtoFuncGetFullYearEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL20dateProtoFuncSetYearEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF21gregorianDateTimeToMSERKNS_17GregorianDateTimeEdb -__ZN3JSCL27compareByStringPairForQSortEPKvS1_ -__ZN3JSCL29regExpConstructorRightContextEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZNK3JSC12NumberObject9classInfoEv -__ZN3JSCL19isNonASCIIIdentPartEi -__ZN3JSC8EvalNode4markEv -__ZN3WTF7Unicode18UTF8SequenceLengthEc -__ZN3WTF7Unicode18decodeUTF8SequenceEPKc -__ZN3JSC18globalFuncIsFiniteEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL24booleanProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL24dateProtoFuncToUTCStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_9StructureEEEiRKNS_10IdentifierEPFNS_7JSValueES2_PNS_8JSObjectESA_RKNS_7ArgListEE -__ZN3JSC16InternalFunction4nameEPNS_12JSGlobalDataE -__ZN3JSC16ArrayConstructor11getCallDataERNS_8CallDataE -__ZN3JSCL20callArrayConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL21stringProtoFuncConcatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZNK3JSC8JSString8toObjectEPNS_9ExecStateE -__ZN3JSC17ObjectConstructor11getCallDataERNS_8CallDataE -__ZN3JSCL21callObjectConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC13LiteralParser5Lexer9lexStringILNS0_10ParserModeE1EEENS0_9TokenTypeERNS1_18LiteralParserTokenE -__ZN3WTF6VectorIPNS0_IN3JSC10RegisterIDELm32EEELm32EE14expandCapacityEmPKS4_ -__ZN3WTF6VectorIPNS0_IN3JSC10RegisterIDELm32EEELm32EE15reserveCapacityEm -__ZN3JSCL16mathProtoFuncAbsEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL22numberProtoFuncToFixedEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL16integerPartNoExpEd -__ZN3JSCL16mathProtoFuncLogEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL16mathProtoFuncPowEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3WTF13tryFastCallocEmm -__ZN3JSC7JSArray11sortNumericEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataE -__ZN3JSCL22compareNumbersForQSortEPKvS1_ -__ZN3JSCL22functionProtoFuncApplyEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC9Arguments11fillArgListEPNS_9ExecStateERNS_20MarkedArgumentBufferE -__ZN3JSC7JSArray16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE -__ZN3JSC9ExecState10arrayTableEPS0_ -__ZN3JSCL23regExpProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL18regExpObjectGlobalEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZN3JSCL22regExpObjectIgnoreCaseEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZN3JSCL21regExpObjectMultilineEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZNK3JSC12JSNumberCell12toThisObjectEPNS_9ExecStateE -__ZN3JSCL22numberProtoFuncValueOfEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC12NumberObject11getJSNumberEv -__ZNK3JSC7JSValue16synthesizeObjectEPNS_9ExecStateE -__ZN3JSC13JSNotAnObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE -__ZN3JSCL22errorProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC10JSFunction15argumentsGetterEPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE -__ZNK3JSC11Interpreter17retrieveArgumentsEPNS_9ExecStateEPNS_10JSFunctionE -__ZN3JSCL21dateProtoFuncSetMonthEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSCL23setNewValueFromDateArgsEPNS_9ExecStateENS_7JSValueERKNS_7ArgListEib -__ZN3JSCL20dateProtoFuncSetDateEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC9BitOrNodeD0Ev -__ZN3JSC12JSGlobalData6createEb +__ZN3JSC18PostfixBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE +__ZN3JSCL21arrayProtoFuncUnShiftEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC10JSFunction19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC12JSGlobalData6createEv __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj -__ZN3JSC7CStringD1Ev +__ZN3JSC12JSGlobalData13startSamplingEv +__ZN3JSC11Interpreter13startSamplingEv +__ZN3JSC12JSGlobalData12stopSamplingEv +__ZN3JSC11Interpreter12stopSamplingEv __ZN3JSCL17mathProtoFuncSqrtEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC11Interpreter14uncachePutByIDEPNS_9CodeBlockEPNS_11InstructionE +__ZN3JSCL16mathProtoFuncAbsEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL16mathProtoFuncCosEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSCL16mathProtoFuncSinEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZN3JSC14BitwiseNotNodeD0Ev -__ZN3JSC22UnsignedRightShiftNodeD0Ev +__ZN3JSC16ArrayConstructor11getCallDataERNS_8CallDataE +__ZN3JSCL20callArrayConstructorEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3WTF6VectorIPN3JSC9StructureELm8EE14expandCapacityEmPKS3_ +__ZN3WTFL3i2bERNS_6BigIntEi +__ZN3WTFL3b2dERKNS_6BigIntEPi __ZN3JSC16toUInt32SlowCaseEdRb -__ZN3WTF6VectorIN3JSC15SimpleJumpTableELm0EE14expandCapacityEm -__ZN3WTF6VectorIiLm0EE15reserveCapacityEm -__ZN3JSC15SimpleJumpTable14offsetForValueEii +__ZN3WTF29RefPtrHashMapRawKeyTranslatorIPN3JSC11UStringImplESt4pairINS_6RefPtrIS2_EENS5_INS1_14EvalExecutableEEEENS_14PairHashTraitsINS_10HashTraitsIS6_EENSB_IS8_EEEENS_7StrHashIS6_EEE9translateERS9_S3_RKS8_ +__ZN3JSC11Interpreter11resolveSkipEPNS_9ExecStateEPNS_11InstructionERNS_7JSValueE +__ZN3JSCL24dateProtoFuncGetFullYearEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSCL23dateProtoFuncGetSecondsEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC9CodeBlock27addCharacterSwitchJumpTableEv +__ZN3JSCL16mathProtoFuncPowEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC7JSArray19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC9ExecState10arrayTableEPS0_ __ZN3JSC20MarkedArgumentBuffer10slowAppendENS_7JSValueE -__ZN3WTF7HashSetIPN3JSC20MarkedArgumentBufferENS_7PtrHashIS3_EENS_10HashTraitsIS3_EEE3addERKS3_ +__ZN3WTF9HashTableIPN3JSC20MarkedArgumentBufferES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E3addIS3_S3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEESt4pairINS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EEbERKT_RKT0_ __ZN3WTF9HashTableIPN3JSC20MarkedArgumentBufferES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi +__ZN3WTF9HashTableIPN3JSC20MarkedArgumentBufferES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_ +__ZN3JSC15ObjectPrototype3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE +__ZN3JSCL16mathProtoFuncLogEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC13LiteralParser5Lexer9lexStringILNS0_10ParserModeE1EEENS0_9TokenTypeERNS1_18LiteralParserTokenE +__ZNK3JSC9ArrayNode13isSimpleArrayEv +__ZNK3JSC9ArrayNode14toArgumentListEPNS_12JSGlobalDataE +__ZN3WTF9HashTableIPN3JSC11UStringImplES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E4findIS3_NS_22IdentityHashTranslatorIS3_S3_S7_EEEENS_17HashTableIteratorIS3_S3_S5_S7_S9_S9_EERKT_ __ZN3JSC7JSArray4sortEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataE +__ZN3WTF6VectorIN3JSC26AVLTreeNodeForArrayCompareELm0EE6resizeEm __ZN3WTF7AVLTreeIN3JSC32AVLTreeAbstractorForArrayCompareELj44ENS_18AVLTreeDefaultBSetILj44EEEE6insertEi +__ZN3JSC32AVLTreeAbstractorForArrayCompare15compare_key_keyENS_7JSValueES1_ __ZN3JSCltERKNS_7UStringES2_ __ZN3WTF7AVLTreeIN3JSC32AVLTreeAbstractorForArrayCompareELj44ENS_18AVLTreeDefaultBSetILj44EEEE7balanceEi +__ZN3JSCL21stringProtoFuncConcatEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE +__ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE +__ZN3JSC11Interpreter14dumpSampleDataEPNS_9ExecStateE __ZN3JSC4Heap7destroyEv +__ZN3JSC4Heap10freeBlocksEv +__ZN3JSC14JSGlobalObject25destroyJSGlobalObjectDataEPv +__ZN3JSC14JSGlobalObject18JSGlobalObjectDataD2Ev __ZN3JSC12JSGlobalDataD1Ev __ZN3JSC12JSGlobalDataD2Ev __ZN3JSC12RegisterFileD1Ev __ZNK3JSC9HashTable11deleteTableEv __ZN3JSC5LexerD1Ev -__ZN3JSC5LexerD2Ev -__ZN3WTF20deleteAllPairSecondsIP24OpaqueJSClassContextDataKNS_7HashMapIP13OpaqueJSClassS2_NS_7PtrHashIS5_EENS_10HashTraitsIS5_EENS8_IS2_EEEEEEvRT0_ __ZN3JSC17CommonIdentifiersD2Ev __ZN3JSC21deleteIdentifierTableEPNS_15IdentifierTableE +__ZN3JSC15IdentifierTableD2Ev __ZN3JSC4HeapD1Ev -__ZN3JSC12SmallStringsD1Ev +__ZN3JSC14NumericStringsD1Ev +__ZN3JSC12SmallStringsD1Ev \ No newline at end of file diff --git a/JavaScriptCore.order b/JavaScriptCore.order index 3ae3ec6..d6f6caa 100644 --- a/JavaScriptCore.order +++ b/JavaScriptCore.order @@ -1625,7 +1625,6 @@ __ZN3JSC18EmptyStatementNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10Registe __ZN3JSCL27compareByStringPairForQSortEPKvS1_ __Z22jsc_pcre_ucp_othercasej __ZN3JSCL35objectProtoFuncPropertyIsEnumerableEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC8JSObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZN3WTF7HashMapIjN3JSC7JSValueENS_7IntHashIjEENS_10HashTraitsIjEENS5_IS2_EEE3setERKjRKS2_ __ZN3WTF9HashTableIjSt4pairIjN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEE __ZN3JSC12RegisterFile21releaseExcessCapacityEv @@ -1841,7 +1840,6 @@ __ZN3JSC6JSCell14toThisJSStringEPNS_9ExecStateE __ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE __ZN3JSCL27objectProtoFuncLookupSetterEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE -__ZNK3JSC16JSVariableObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZN3JSC9ExecState22regExpConstructorTableEPS0_ __ZN3JSCL24regExpConstructorDollar7EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE __ZN3JSCL24regExpConstructorDollar8EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE diff --git a/JavaScriptCore.pri b/JavaScriptCore.pri index 91a8ce0..75737ae 100644 --- a/JavaScriptCore.pri +++ b/JavaScriptCore.pri @@ -1,99 +1,78 @@ # JavaScriptCore - Qt4 build info VPATH += $$PWD +CONFIG(standalone_package) { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated +} else { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated +} + CONFIG(debug, debug|release) { - isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug OBJECTS_DIR = obj/debug } else { # Release - isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release OBJECTS_DIR = obj/release } -INCLUDEPATH += $$GENERATED_SOURCES_DIR \ - $$PWD \ - $$PWD/parser \ - $$PWD/bytecompiler \ - $$PWD/debugger \ - $$PWD/runtime \ - $$PWD/wtf \ - $$PWD/wtf/unicode \ - $$PWD/interpreter \ - $$PWD/jit \ - $$PWD/profiler \ - $$PWD/wrec \ - $$PWD/yarr \ - $$PWD/API \ - $$PWD/.. \ - $$PWD/ForwardingHeaders \ - $$PWD/bytecode \ - $$PWD/assembler \ +symbian: { + # Need to guarantee this comes before system includes of /epoc32/include + MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler" +} + +INCLUDEPATH = \ + $$PWD \ + $$PWD/.. \ + $$PWD/assembler \ + $$PWD/bytecode \ + $$PWD/bytecompiler \ + $$PWD/debugger \ + $$PWD/interpreter \ + $$PWD/jit \ + $$PWD/parser \ + $$PWD/pcre \ + $$PWD/profiler \ + $$PWD/runtime \ + $$PWD/wrec \ + $$PWD/wtf \ + $$PWD/wtf/unicode \ + $$PWD/yarr \ + $$PWD/API \ + $$PWD/ForwardingHeaders \ + $$JSC_GENERATED_SOURCES_DIR \ + $$INCLUDEPATH DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF -GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP} win32-* { LIBS += -lwinmm } - -# Default rules to turn JIT on/off -!contains(DEFINES, ENABLE_JIT=.) { - isEqual(QT_ARCH,i386)|isEqual(QT_ARCH,windows) { - # Require gcc >= 4.1 - CONFIG(release):linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { - DEFINES += ENABLE_JIT=1 - } - win32-msvc* { - DEFINES += ENABLE_JIT=1 - } - } +contains(JAVASCRIPTCORE_JIT,yes) { + DEFINES+=ENABLE_JIT=1 + DEFINES+=ENABLE_YARR_JIT=1 + DEFINES+=ENABLE_YARR=1 +} +contains(JAVASCRIPTCORE_JIT,no) { + DEFINES+=ENABLE_JIT=0 + DEFINES+=ENABLE_YARR_JIT=0 + DEFINES+=ENABLE_YARR=0 } -# Rules when JIT enabled -contains(DEFINES, ENABLE_JIT=1) { - !contains(DEFINES, ENABLE_YARR=.): DEFINES += ENABLE_YARR=1 - !contains(DEFINES, ENABLE_YARR_JIT=.): DEFINES += ENABLE_YARR_JIT=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_CALL=.): DEFINES += ENABLE_JIT_OPTIMIZE_CALL=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=.): DEFINES += ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=1 - !contains(DEFINES, ENABLE_JIT_OPTIMIZE_ARITHMETIC=.): DEFINES += ENABLE_JIT_OPTIMIZE_ARITHMETIC=1 - linux-g++* { - !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=1 +# Rules when JIT enabled (not disabled) +!contains(DEFINES, ENABLE_JIT=0) { + linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { QMAKE_CXXFLAGS += -fno-stack-protector QMAKE_CFLAGS += -fno-stack-protector } - win32-msvc* { - !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_REGISTER=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_REGISTER=1 - } } -include(pcre/pcre.pri) - -LUT_FILES += \ - runtime/DatePrototype.cpp \ - runtime/JSONObject.cpp \ - runtime/NumberConstructor.cpp \ - runtime/StringPrototype.cpp \ - runtime/ArrayPrototype.cpp \ - runtime/MathObject.cpp \ - runtime/RegExpConstructor.cpp \ - runtime/RegExpObject.cpp - -KEYWORDLUT_FILES += \ - parser/Keywords.table +wince* { + INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/ce-compat + SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.c + DEFINES += WINCEBASIC +} -JSCBISON += \ - parser/Grammar.y +include(pcre/pcre.pri) SOURCES += \ - wtf/Assertions.cpp \ - wtf/ByteArray.cpp \ - wtf/HashTable.cpp \ - wtf/MainThread.cpp \ - wtf/RandomNumber.cpp \ - wtf/RefCountedLeakCounter.cpp \ - wtf/TypeTraits.cpp \ - wtf/unicode/CollatorDefault.cpp \ - wtf/unicode/icu/CollatorICU.cpp \ - wtf/unicode/UTF8.cpp \ API/JSBase.cpp \ API/JSCallbackConstructor.cpp \ API/JSCallbackFunction.cpp \ @@ -104,43 +83,39 @@ SOURCES += \ API/JSStringRef.cpp \ API/JSValueRef.cpp \ API/OpaqueJSString.cpp \ - runtime/InitializeThreading.cpp \ - runtime/JSGlobalData.cpp \ - runtime/JSGlobalObject.cpp \ - runtime/JSStaticScopeObject.cpp \ - runtime/JSVariableObject.cpp \ - runtime/JSActivation.cpp \ - runtime/JSNotAnObject.cpp \ - runtime/JSONObject.cpp \ - runtime/LiteralParser.cpp \ - runtime/TimeoutChecker.cpp \ + assembler/ARMAssembler.cpp \ + assembler/MacroAssemblerARM.cpp \ bytecode/CodeBlock.cpp \ - bytecode/StructureStubInfo.cpp \ bytecode/JumpTable.cpp \ - jit/JIT.cpp \ - jit/JITCall.cpp \ + bytecode/Opcode.cpp \ + bytecode/SamplingTool.cpp \ + bytecode/StructureStubInfo.cpp \ + bytecompiler/BytecodeGenerator.cpp \ + bytecompiler/NodesCodegen.cpp \ + debugger/DebuggerActivation.cpp \ + debugger/DebuggerCallFrame.cpp \ + debugger/Debugger.cpp \ + interpreter/CallFrame.cpp \ + interpreter/Interpreter.cpp \ + interpreter/RegisterFile.cpp \ + jit/ExecutableAllocatorPosix.cpp \ + jit/ExecutableAllocatorSymbian.cpp \ + jit/ExecutableAllocatorWin.cpp \ + jit/ExecutableAllocator.cpp \ jit/JITArithmetic.cpp \ + jit/JITCall.cpp \ + jit/JIT.cpp \ jit/JITOpcodes.cpp \ jit/JITPropertyAccess.cpp \ - jit/ExecutableAllocator.cpp \ jit/JITStubs.cpp \ - bytecompiler/BytecodeGenerator.cpp \ - runtime/ExceptionHelpers.cpp \ - runtime/JSPropertyNameIterator.cpp \ - interpreter/Interpreter.cpp \ - bytecode/Opcode.cpp \ - bytecode/SamplingTool.cpp \ - yarr/RegexCompiler.cpp \ - yarr/RegexInterpreter.cpp \ - yarr/RegexJIT.cpp \ - interpreter/RegisterFile.cpp - -win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp -else: SOURCES += jit/ExecutableAllocatorPosix.cpp - -# AllInOneFile.cpp helps gcc analize and optimize code -# Other compilers may be able to do this at link time -SOURCES += \ + parser/Lexer.cpp \ + parser/Nodes.cpp \ + parser/ParserArena.cpp \ + parser/Parser.cpp \ + profiler/Profile.cpp \ + profiler/ProfileGenerator.cpp \ + profiler/ProfileNode.cpp \ + profiler/Profiler.cpp \ runtime/ArgList.cpp \ runtime/Arguments.cpp \ runtime/ArrayConstructor.cpp \ @@ -151,60 +126,67 @@ SOURCES += \ runtime/CallData.cpp \ runtime/Collector.cpp \ runtime/CommonIdentifiers.cpp \ + runtime/Completion.cpp \ runtime/ConstructData.cpp \ - wtf/CurrentTime.cpp \ runtime/DateConstructor.cpp \ runtime/DateConversion.cpp \ runtime/DateInstance.cpp \ runtime/DatePrototype.cpp \ - debugger/Debugger.cpp \ - debugger/DebuggerCallFrame.cpp \ - debugger/DebuggerActivation.cpp \ - wtf/dtoa.cpp \ - runtime/Error.cpp \ runtime/ErrorConstructor.cpp \ + runtime/Error.cpp \ runtime/ErrorInstance.cpp \ runtime/ErrorPrototype.cpp \ - interpreter/CallFrame.cpp \ + runtime/ExceptionHelpers.cpp \ + runtime/Executable.cpp \ runtime/FunctionConstructor.cpp \ runtime/FunctionPrototype.cpp \ runtime/GetterSetter.cpp \ runtime/GlobalEvalFunction.cpp \ runtime/Identifier.cpp \ + runtime/InitializeThreading.cpp \ runtime/InternalFunction.cpp \ - runtime/Completion.cpp \ - runtime/JSArray.cpp \ + runtime/JSActivation.cpp \ runtime/JSAPIValueWrapper.cpp \ + runtime/JSArray.cpp \ runtime/JSByteArray.cpp \ runtime/JSCell.cpp \ runtime/JSFunction.cpp \ + runtime/JSGlobalData.cpp \ + runtime/JSGlobalObject.cpp \ runtime/JSGlobalObjectFunctions.cpp \ runtime/JSImmediate.cpp \ runtime/JSLock.cpp \ + runtime/JSNotAnObject.cpp \ runtime/JSNumberCell.cpp \ runtime/JSObject.cpp \ + runtime/JSONObject.cpp \ + runtime/JSPropertyNameIterator.cpp \ + runtime/JSStaticScopeObject.cpp \ runtime/JSString.cpp \ runtime/JSValue.cpp \ + runtime/JSVariableObject.cpp \ runtime/JSWrapperObject.cpp \ - parser/Lexer.cpp \ + runtime/LiteralParser.cpp \ runtime/Lookup.cpp \ + runtime/MarkStackPosix.cpp \ + runtime/MarkStackSymbian.cpp \ + runtime/MarkStackWin.cpp \ + runtime/MarkStack.cpp \ runtime/MathObject.cpp \ runtime/NativeErrorConstructor.cpp \ runtime/NativeErrorPrototype.cpp \ - parser/Nodes.cpp \ runtime/NumberConstructor.cpp \ runtime/NumberObject.cpp \ runtime/NumberPrototype.cpp \ runtime/ObjectConstructor.cpp \ runtime/ObjectPrototype.cpp \ runtime/Operations.cpp \ - parser/Parser.cpp \ - parser/ParserArena.cpp \ + runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ runtime/PrototypeFunction.cpp \ - runtime/RegExp.cpp \ runtime/RegExpConstructor.cpp \ + runtime/RegExp.cpp \ runtime/RegExpObject.cpp \ runtime/RegExpPrototype.cpp \ runtime/ScopeChain.cpp \ @@ -212,50 +194,38 @@ SOURCES += \ runtime/StringConstructor.cpp \ runtime/StringObject.cpp \ runtime/StringPrototype.cpp \ - runtime/Structure.cpp \ runtime/StructureChain.cpp \ + runtime/Structure.cpp \ + runtime/TimeoutChecker.cpp \ runtime/UString.cpp \ - profiler/HeavyProfile.cpp \ - profiler/Profile.cpp \ - profiler/ProfileGenerator.cpp \ - profiler/ProfileNode.cpp \ - profiler/Profiler.cpp \ - profiler/TreeProfile.cpp \ + runtime/UStringImpl.cpp \ + wtf/Assertions.cpp \ + wtf/ByteArray.cpp \ + wtf/CurrentTime.cpp \ wtf/DateMath.cpp \ + wtf/dtoa.cpp \ wtf/FastMalloc.cpp \ + wtf/HashTable.cpp \ + wtf/MainThread.cpp \ + wtf/qt/MainThreadQt.cpp \ + wtf/qt/ThreadingQt.cpp \ + wtf/RandomNumber.cpp \ + wtf/RefCountedLeakCounter.cpp \ + wtf/ThreadingNone.cpp \ wtf/Threading.cpp \ - wtf/qt/MainThreadQt.cpp - -!contains(DEFINES, ENABLE_SINGLE_THREADED=1) { - SOURCES += wtf/qt/ThreadingQt.cpp -} else { - DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0 - SOURCES += wtf/ThreadingNone.cpp -} - -# GENERATOR 1-A: LUT creator -lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h -lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} -lut.depend = ${QMAKE_FILE_NAME} -lut.input = LUT_FILES -lut.CONFIG += no_link -addExtraCompiler(lut) + wtf/TypeTraits.cpp \ + wtf/unicode/CollatorDefault.cpp \ + wtf/unicode/icu/CollatorICU.cpp \ + wtf/unicode/UTF8.cpp \ + yarr/RegexCompiler.cpp \ + yarr/RegexInterpreter.cpp \ + yarr/RegexJIT.cpp -# GENERATOR 1-B: particular LUT creator (for 1 file only) -keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h -keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} -keywordlut.depend = ${QMAKE_FILE_NAME} -keywordlut.input = KEYWORDLUT_FILES -keywordlut.CONFIG += no_link -addExtraCompiler(keywordlut) +# Generated files, simply list them for JavaScriptCore +SOURCES += \ + $${JSC_GENERATED_SOURCES_DIR}/Grammar.cpp -# GENERATOR 2: bison grammar -jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp -jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h -jscbison.depend = ${QMAKE_FILE_NAME} -jscbison.input = JSCBISON -jscbison.variable_out = GENERATED_SOURCES -jscbison.dependency_type = TYPE_C -jscbison.CONFIG = target_predeps -addExtraCompilerWithHeader(jscbison) +!contains(DEFINES, USE_SYSTEM_MALLOC) { + SOURCES += wtf/TCSystemAlloc.cpp +} diff --git a/JavaScriptCore.pro b/JavaScriptCore.pro index 28f0e6b..0d6becb 100644 --- a/JavaScriptCore.pro +++ b/JavaScriptCore.pro @@ -16,7 +16,6 @@ CONFIG(QTDIR_build) { include($$QT_SOURCE_TREE/src/qbase.pri) INSTALLS = DESTDIR = $$OLDDESTDIR - PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h DEFINES *= NDEBUG } @@ -33,12 +32,6 @@ INCLUDEPATH += $$GENERATED_SOURCES_DIR } } -include($$OUTPUT_DIR/config.pri) - -CONFIG -= warn_on -*-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing -#QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter - CONFIG(release):!CONFIG(QTDIR_build) { contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions @@ -59,17 +52,11 @@ win32-g++ { QMAKE_LIBDIR_POST += $$split(TMPPATH,";") } -DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 - DEFINES += WTF_CHANGES=1 include(JavaScriptCore.pri) QMAKE_EXTRA_TARGETS += generated_files -lessThan(QT_MINOR_VERSION, 4) { - DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE="" -} - *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 diff --git a/JavaScriptCoreSources.bkl b/JavaScriptCoreSources.bkl index 1bdf251..e69de29 100644 --- a/JavaScriptCoreSources.bkl +++ b/JavaScriptCoreSources.bkl @@ -1,191 +0,0 @@ - - - - - API/JSBase.cpp - API/JSCallbackConstructor.cpp - API/JSCallbackFunction.cpp - API/JSCallbackObject.cpp - API/JSClassRef.cpp - API/JSContextRef.cpp - API/JSObjectRef.cpp - API/JSStringRef.cpp - API/JSValueRef.cpp - API/OpaqueJSString.cpp - - - bytecompiler/BytecodeGenerator.cpp - - - debugger/Debugger.cpp - debugger/DebuggerActivation.cpp - debugger/DebuggerCallFrame.cpp - - - DerivedSources/JavaScriptCore/Grammar.cpp - wtf/dtoa.cpp - - - pcre/pcre_compile.cpp - pcre/pcre_exec.cpp - pcre/pcre_tables.cpp - pcre/pcre_ucp_searchfuncs.cpp - pcre/pcre_xclass.cpp - - - parser/Lexer.cpp - parser/Nodes.cpp - parser/Parser.cpp - parser/ParserArena.cpp - - - profiler/HeavyProfile.cpp - profiler/ProfileGenerator.cpp - profiler/ProfileNode.cpp - profiler/Profile.cpp - profiler/Profiler.cpp - profiler/TreeProfile.cpp - - - runtime/ArgList.cpp - runtime/Arguments.cpp - runtime/ArrayConstructor.cpp - runtime/ArrayPrototype.cpp - runtime/BooleanConstructor.cpp - runtime/BooleanObject.cpp - runtime/BooleanPrototype.cpp - runtime/CallData.cpp - runtime/Collector.cpp - runtime/CommonIdentifiers.cpp - runtime/ConstructData.cpp - runtime/DateConstructor.cpp - runtime/DateConversion.cpp - runtime/DateInstance.cpp - runtime/DatePrototype.cpp - runtime/Error.cpp - runtime/ErrorConstructor.cpp - runtime/ErrorInstance.cpp - runtime/ErrorPrototype.cpp - interpreter/CallFrame.cpp - runtime/FunctionConstructor.cpp - runtime/FunctionPrototype.cpp - runtime/GetterSetter.cpp - runtime/GlobalEvalFunction.cpp - runtime/Identifier.cpp - runtime/InitializeThreading.cpp - runtime/InternalFunction.cpp - runtime/Completion.cpp - runtime/JSActivation.cpp - runtime/JSArray.cpp - runtime/JSByteArray.cpp - runtime/JSCell.cpp - runtime/JSFunction.cpp - runtime/JSGlobalData.cpp - runtime/JSGlobalObject.cpp - runtime/JSGlobalObjectFunctions.cpp - runtime/JSImmediate.cpp - runtime/JSLock.cpp - runtime/JSNotAnObject.cpp - runtime/JSNumberCell.cpp - runtime/JSObject.cpp - runtime/JSONObject.cpp - runtime/JSPropertyNameIterator.cpp - runtime/JSStaticScopeObject.cpp - runtime/JSString.cpp - runtime/JSValue.cpp - runtime/JSVariableObject.cpp - runtime/JSWrapperObject.cpp - runtime/LiteralParser.cpp - runtime/Lookup.cpp - runtime/MathObject.cpp - runtime/NativeErrorConstructor.cpp - runtime/NativeErrorPrototype.cpp - runtime/NumberConstructor.cpp - runtime/NumberObject.cpp - runtime/NumberPrototype.cpp - runtime/ObjectConstructor.cpp - runtime/ObjectPrototype.cpp - runtime/Operations.cpp - runtime/PropertyNameArray.cpp - runtime/PropertySlot.cpp - runtime/PrototypeFunction.cpp - runtime/RegExp.cpp - runtime/RegExpConstructor.cpp - runtime/RegExpObject.cpp - runtime/RegExpPrototype.cpp - runtime/ScopeChain.cpp - runtime/SmallStrings.cpp - runtime/StringConstructor.cpp - runtime/StringObject.cpp - runtime/StringPrototype.cpp - runtime/Structure.cpp - runtime/StructureChain.cpp - runtime/UString.cpp - - - bytecode/CodeBlock.cpp - bytecode/StructureStubInfo.cpp - bytecode/JumpTable.cpp - runtime/ExceptionHelpers.cpp - runtime/TimeoutChecker.cpp - interpreter/Interpreter.cpp - bytecode/Opcode.cpp - bytecode/SamplingTool.cpp - interpreter/RegisterFile.cpp - jit/ExecutableAllocator.cpp - - - jit/ExecutableAllocatorWin.cpp - - - jit/ExecutableAllocatorPosix.cpp - - - wtf/Assertions.cpp - wtf/ByteArray.cpp - wtf/CurrentTime.cpp - wtf/DateMath.cpp - wtf/FastMalloc.cpp - wtf/HashTable.cpp - wtf/MainThread.cpp - wtf/RandomNumber.cpp - wtf/RefCountedLeakCounter.cpp - wtf/TCSystemAlloc.cpp - wtf/Threading.cpp - wtf/ThreadingNone.cpp - wtf/TypeTraits.cpp - wtf/wx/MainThreadWx.cpp - wtf/unicode/CollatorDefault.cpp - wtf/unicode/icu/CollatorICU.cpp - wtf/unicode/UTF8.cpp - - - diff --git a/assembler/ARMAssembler.cpp b/assembler/ARMAssembler.cpp new file mode 100644 index 0000000..6dd2b87 --- /dev/null +++ b/assembler/ARMAssembler.cpp @@ -0,0 +1,377 @@ +/* + * Copyright (C) 2009 University of Szeged + * 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 UNIVERSITY OF SZEGED ``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 UNIVERSITY OF SZEGED 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. + */ + +#include "config.h" + +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#include "ARMAssembler.h" + +namespace JSC { + +// Patching helpers + +void ARMAssembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr) +{ + ARMWord *ldr = reinterpret_cast(loadAddr); + ARMWord diff = reinterpret_cast(constPoolAddr) - ldr; + ARMWord index = (*ldr & 0xfff) >> 1; + + ASSERT(diff >= 1); + if (diff >= 2 || index > 0) { + diff = (diff + index - 2) * sizeof(ARMWord); + ASSERT(diff <= 0xfff); + *ldr = (*ldr & ~0xfff) | diff; + } else + *ldr = (*ldr & ~(0xfff | ARMAssembler::DT_UP)) | sizeof(ARMWord); +} + +// Handle immediates + +ARMWord ARMAssembler::getOp2(ARMWord imm) +{ + int rol; + + if (imm <= 0xff) + return OP2_IMM | imm; + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol = 8; + } + else { + imm = (imm << 24) | (imm >> 8); + rol = 0; + } + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol += 4; + } + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + return OP2_IMM | (imm >> 24) | (rol << 8); + + return INVALID_IMM; +} + +int ARMAssembler::genInt(int reg, ARMWord imm, bool positive) +{ + // Step1: Search a non-immediate part + ARMWord mask; + ARMWord imm1; + ARMWord imm2; + int rol; + + mask = 0xff000000; + rol = 8; + while(1) { + if ((imm & mask) == 0) { + imm = (imm << rol) | (imm >> (32 - rol)); + rol = 4 + (rol >> 1); + break; + } + rol += 2; + mask >>= 2; + if (mask & 0x3) { + // rol 8 + imm = (imm << 8) | (imm >> 24); + mask = 0xff00; + rol = 24; + while (1) { + if ((imm & mask) == 0) { + imm = (imm << rol) | (imm >> (32 - rol)); + rol = (rol >> 1) - 8; + break; + } + rol += 2; + mask >>= 2; + if (mask & 0x3) + return 0; + } + break; + } + } + + ASSERT((imm & 0xff) == 0); + + if ((imm & 0xff000000) == 0) { + imm1 = OP2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8); + imm2 = OP2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8); + } else if (imm & 0xc0000000) { + imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); + imm <<= 8; + rol += 4; + + if ((imm & 0xff000000) == 0) { + imm <<= 8; + rol += 4; + } + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8); + else + return 0; + } else { + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); + imm <<= 8; + rol += 4; + + if ((imm & 0xf0000000) == 0) { + imm <<= 4; + rol += 2; + } + + if ((imm & 0xc0000000) == 0) { + imm <<= 2; + rol += 1; + } + + if ((imm & 0x00ffffff) == 0) + imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8); + else + return 0; + } + + if (positive) { + mov_r(reg, imm1); + orr_r(reg, reg, imm2); + } else { + mvn_r(reg, imm1); + bic_r(reg, reg, imm2); + } + + return 1; +} + +ARMWord ARMAssembler::getImm(ARMWord imm, int tmpReg, bool invert) +{ + ARMWord tmp; + + // Do it by 1 instruction + tmp = getOp2(imm); + if (tmp != INVALID_IMM) + return tmp; + + tmp = getOp2(~imm); + if (tmp != INVALID_IMM) { + if (invert) + return tmp | OP2_INV_IMM; + mvn_r(tmpReg, tmp); + return tmpReg; + } + + return encodeComplexImm(imm, tmpReg); +} + +void ARMAssembler::moveImm(ARMWord imm, int dest) +{ + ARMWord tmp; + + // Do it by 1 instruction + tmp = getOp2(imm); + if (tmp != INVALID_IMM) { + mov_r(dest, tmp); + return; + } + + tmp = getOp2(~imm); + if (tmp != INVALID_IMM) { + mvn_r(dest, tmp); + return; + } + + encodeComplexImm(imm, dest); +} + +ARMWord ARMAssembler::encodeComplexImm(ARMWord imm, int dest) +{ +#if WTF_ARM_ARCH_AT_LEAST(7) + ARMWord tmp = getImm16Op2(imm); + if (tmp != INVALID_IMM) { + movw_r(dest, tmp); + return dest; + } + movw_r(dest, getImm16Op2(imm & 0xffff)); + movt_r(dest, getImm16Op2(imm >> 16)); + return dest; +#else + // Do it by 2 instruction + if (genInt(dest, imm, true)) + return dest; + if (genInt(dest, ~imm, false)) + return dest; + + ldr_imm(dest, imm); + return dest; +#endif +} + +// Memory load/store helpers + +void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset) +{ + if (offset >= 0) { + if (offset <= 0xfff) + dtr_u(isLoad, srcDst, base, offset); + else if (offset <= 0xfffff) { + add_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_u(isLoad, srcDst, ARMRegisters::S0, offset & 0xfff); + } else { + ARMWord reg = getImm(offset, ARMRegisters::S0); + dtr_ur(isLoad, srcDst, base, reg); + } + } else { + offset = -offset; + if (offset <= 0xfff) + dtr_d(isLoad, srcDst, base, offset); + else if (offset <= 0xfffff) { + sub_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_d(isLoad, srcDst, ARMRegisters::S0, offset & 0xfff); + } else { + ARMWord reg = getImm(offset, ARMRegisters::S0); + dtr_dr(isLoad, srcDst, base, reg); + } + } +} + +void ARMAssembler::baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset) +{ + ARMWord op2; + + ASSERT(scale >= 0 && scale <= 3); + op2 = lsl(index, scale); + + if (offset >= 0 && offset <= 0xfff) { + add_r(ARMRegisters::S0, base, op2); + dtr_u(isLoad, srcDst, ARMRegisters::S0, offset); + return; + } + if (offset <= 0 && offset >= -0xfff) { + add_r(ARMRegisters::S0, base, op2); + dtr_d(isLoad, srcDst, ARMRegisters::S0, -offset); + return; + } + + ldr_un_imm(ARMRegisters::S0, offset); + add_r(ARMRegisters::S0, ARMRegisters::S0, op2); + dtr_ur(isLoad, srcDst, base, ARMRegisters::S0); +} + +void ARMAssembler::doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset) +{ + if (offset & 0x3) { + if (offset <= 0x3ff && offset >= 0) { + fdtr_u(isLoad, srcDst, base, offset >> 2); + return; + } + if (offset <= 0x3ffff && offset >= 0) { + add_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 10) | (11 << 8)); + fdtr_u(isLoad, srcDst, ARMRegisters::S0, (offset >> 2) & 0xff); + return; + } + offset = -offset; + + if (offset <= 0x3ff && offset >= 0) { + fdtr_d(isLoad, srcDst, base, offset >> 2); + return; + } + if (offset <= 0x3ffff && offset >= 0) { + sub_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 10) | (11 << 8)); + fdtr_d(isLoad, srcDst, ARMRegisters::S0, (offset >> 2) & 0xff); + return; + } + offset = -offset; + } + + ldr_un_imm(ARMRegisters::S0, offset); + add_r(ARMRegisters::S0, ARMRegisters::S0, base); + fdtr_u(isLoad, srcDst, ARMRegisters::S0, 0); +} + +void* ARMAssembler::executableCopy(ExecutablePool* allocator) +{ + // 64-bit alignment is required for next constant pool and JIT code as well + m_buffer.flushWithoutBarrier(true); + if (m_buffer.uncheckedSize() & 0x7) + bkpt(0); + + char* data = reinterpret_cast(m_buffer.executableCopy(allocator)); + + for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) { + // The last bit is set if the constant must be placed on constant pool. + int pos = (*iter) & (~0x1); + ARMWord* ldrAddr = reinterpret_cast(data + pos); + ARMWord* addr = getLdrImmAddress(ldrAddr); + if (*addr != 0xffffffff) { + if (!(*iter & 1)) { + int diff = reinterpret_cast(data + *addr) - (ldrAddr + DefaultPrefetching); + + if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { + *ldrAddr = B | getConditionalField(*ldrAddr) | (diff & BRANCH_MASK); + continue; + } + } + *addr = reinterpret_cast(data + *addr); + } + } + + return data; +} + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) diff --git a/assembler/ARMAssembler.h b/assembler/ARMAssembler.h new file mode 100644 index 0000000..6967b37 --- /dev/null +++ b/assembler/ARMAssembler.h @@ -0,0 +1,836 @@ +/* + * Copyright (C) 2009 University of Szeged + * 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 UNIVERSITY OF SZEGED ``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 UNIVERSITY OF SZEGED 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 ARMAssembler_h +#define ARMAssembler_h + +#include + +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#include "AssemblerBufferWithConstantPool.h" +#include +namespace JSC { + + typedef uint32_t ARMWord; + + namespace ARMRegisters { + typedef enum { + r0 = 0, + r1, + r2, + r3, + S0 = r3, + r4, + r5, + r6, + r7, + r8, + S1 = r8, + r9, + r10, + r11, + r12, + r13, + sp = r13, + r14, + lr = r14, + r15, + pc = r15 + } RegisterID; + + typedef enum { + d0, + d1, + d2, + d3, + SD0 = d3 + } FPRegisterID; + + } // namespace ARMRegisters + + class ARMAssembler { + public: + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; + typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; + typedef SegmentedVector Jumps; + + ARMAssembler() { } + + // ARM conditional constants + typedef enum { + EQ = 0x00000000, // Zero + NE = 0x10000000, // Non-zero + CS = 0x20000000, + CC = 0x30000000, + MI = 0x40000000, + PL = 0x50000000, + VS = 0x60000000, + VC = 0x70000000, + HI = 0x80000000, + LS = 0x90000000, + GE = 0xa0000000, + LT = 0xb0000000, + GT = 0xc0000000, + LE = 0xd0000000, + AL = 0xe0000000 + } Condition; + + // ARM instruction constants + enum { + AND = (0x0 << 21), + EOR = (0x1 << 21), + SUB = (0x2 << 21), + RSB = (0x3 << 21), + ADD = (0x4 << 21), + ADC = (0x5 << 21), + SBC = (0x6 << 21), + RSC = (0x7 << 21), + TST = (0x8 << 21), + TEQ = (0x9 << 21), + CMP = (0xa << 21), + CMN = (0xb << 21), + ORR = (0xc << 21), + MOV = (0xd << 21), + BIC = (0xe << 21), + MVN = (0xf << 21), + MUL = 0x00000090, + MULL = 0x00c00090, + FADDD = 0x0e300b00, + FDIVD = 0x0e800b00, + FSUBD = 0x0e300b40, + FMULD = 0x0e200b00, + FCMPD = 0x0eb40b40, + DTR = 0x05000000, + LDRH = 0x00100090, + STRH = 0x00000090, + STMDB = 0x09200000, + LDMIA = 0x08b00000, + FDTR = 0x0d000b00, + B = 0x0a000000, + BL = 0x0b000000, + FMSR = 0x0e000a10, + FMRS = 0x0e100a10, + FSITOD = 0x0eb80bc0, + FTOSID = 0x0ebd0b40, + FMSTAT = 0x0ef1fa10, +#if WTF_ARM_ARCH_AT_LEAST(5) + CLZ = 0x016f0f10, + BKPT = 0xe120070, +#endif +#if WTF_ARM_ARCH_AT_LEAST(7) + MOVW = 0x03000000, + MOVT = 0x03400000, +#endif + }; + + enum { + OP2_IMM = (1 << 25), + OP2_IMMh = (1 << 22), + OP2_INV_IMM = (1 << 26), + SET_CC = (1 << 20), + OP2_OFSREG = (1 << 25), + DT_UP = (1 << 23), + DT_WB = (1 << 21), + // This flag is inlcuded in LDR and STR + DT_PRE = (1 << 24), + HDT_UH = (1 << 5), + DT_LOAD = (1 << 20), + }; + + // Masks of ARM instructions + enum { + BRANCH_MASK = 0x00ffffff, + NONARM = 0xf0000000, + SDT_MASK = 0x0c000000, + SDT_OFFSET_MASK = 0xfff, + }; + + enum { + BOFFSET_MIN = -0x00800000, + BOFFSET_MAX = 0x007fffff, + SDT = 0x04000000, + }; + + enum { + padForAlign8 = 0x00, + padForAlign16 = 0x0000, + padForAlign32 = 0xee120070, + }; + + static const ARMWord INVALID_IMM = 0xf0000000; + static const int DefaultPrefetching = 2; + + class JmpSrc { + friend class ARMAssembler; + public: + JmpSrc() + : m_offset(-1) + { + } + + private: + JmpSrc(int offset) + : m_offset(offset) + { + } + + int m_offset; + }; + + class JmpDst { + friend class ARMAssembler; + public: + JmpDst() + : m_offset(-1) + , m_used(false) + { + } + + bool isUsed() const { return m_used; } + void used() { m_used = true; } + private: + JmpDst(int offset) + : m_offset(offset) + , m_used(false) + { + ASSERT(m_offset == offset); + } + + int m_offset : 31; + int m_used : 1; + }; + + // Instruction formating + + void emitInst(ARMWord op, int rd, int rn, ARMWord op2) + { + ASSERT ( ((op2 & ~OP2_IMM) <= 0xfff) || (((op2 & ~OP2_IMMh) <= 0xfff)) ); + m_buffer.putInt(op | RN(rn) | RD(rd) | op2); + } + + void and_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | AND, rd, rn, op2); + } + + void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | AND | SET_CC, rd, rn, op2); + } + + void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | EOR, rd, rn, op2); + } + + void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | EOR | SET_CC, rd, rn, op2); + } + + void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | SUB, rd, rn, op2); + } + + void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | SUB | SET_CC, rd, rn, op2); + } + + void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | RSB, rd, rn, op2); + } + + void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | RSB | SET_CC, rd, rn, op2); + } + + void add_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ADD, rd, rn, op2); + } + + void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ADD | SET_CC, rd, rn, op2); + } + + void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ADC, rd, rn, op2); + } + + void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ADC | SET_CC, rd, rn, op2); + } + + void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | SBC, rd, rn, op2); + } + + void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | SBC | SET_CC, rd, rn, op2); + } + + void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | RSC, rd, rn, op2); + } + + void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | RSC | SET_CC, rd, rn, op2); + } + + void tst_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | TST | SET_CC, 0, rn, op2); + } + + void teq_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | TEQ | SET_CC, 0, rn, op2); + } + + void cmp_r(int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | CMP | SET_CC, 0, rn, op2); + } + + void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ORR, rd, rn, op2); + } + + void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | ORR | SET_CC, rd, rn, op2); + } + + void mov_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); + } + +#if WTF_ARM_ARCH_AT_LEAST(7) + void movw_r(int rd, ARMWord op2, Condition cc = AL) + { + ASSERT((op2 | 0xf0fff) == 0xf0fff); + m_buffer.putInt(static_cast(cc) | MOVW | RD(rd) | op2); + } + + void movt_r(int rd, ARMWord op2, Condition cc = AL) + { + ASSERT((op2 | 0xf0fff) == 0xf0fff); + m_buffer.putInt(static_cast(cc) | MOVT | RD(rd) | op2); + } +#endif + + void movs_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); + } + + void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | BIC, rd, rn, op2); + } + + void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | BIC | SET_CC, rd, rn, op2); + } + + void mvn_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | MVN, rd, ARMRegisters::r0, op2); + } + + void mvns_r(int rd, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | MVN | SET_CC, rd, ARMRegisters::r0, op2); + } + + void mul_r(int rd, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | MUL | RN(rd) | RS(rn) | RM(rm)); + } + + void muls_r(int rd, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm)); + } + + void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); + } + + void faddd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FADDD, dd, dn, dm); + } + + void fdivd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FDIVD, dd, dn, dm); + } + + void fsubd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FSUBD, dd, dn, dm); + } + + void fmuld_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FMULD, dd, dn, dm); + } + + void fcmpd_r(int dd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FCMPD, dd, 0, dm); + } + + void ldr_imm(int rd, ARMWord imm, Condition cc = AL) + { + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm, true); + } + + void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) + { + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm); + } + + void dtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, op2); + } + + void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + void dtr_d(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + + void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + void ldrh_r(int rd, int rn, int rm, Condition cc = AL) + { + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm); + } + + void ldrh_d(int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, op2); + } + + void ldrh_u(int rd, int rb, ARMWord op2, Condition cc = AL) + { + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, op2); + } + + void strh_r(int rn, int rm, int rd, Condition cc = AL) + { + emitInst(static_cast(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm); + } + + void fdtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + ASSERT(op2 <= 0xff); + emitInst(static_cast(cc) | FDTR | DT_UP | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + + void fdtr_d(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + ASSERT(op2 <= 0xff); + emitInst(static_cast(cc) | FDTR | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + + void push_r(int reg, Condition cc = AL) + { + ASSERT(ARMWord(reg) <= 0xf); + m_buffer.putInt(cc | DTR | DT_WB | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + void pop_r(int reg, Condition cc = AL) + { + ASSERT(ARMWord(reg) <= 0xf); + m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + inline void poke_r(int reg, Condition cc = AL) + { + dtr_d(false, ARMRegisters::sp, 0, reg, cc); + } + + inline void peek_r(int reg, Condition cc = AL) + { + dtr_u(true, reg, ARMRegisters::sp, 0, cc); + } + + void fmsr_r(int dd, int rn, Condition cc = AL) + { + emitInst(static_cast(cc) | FMSR, rn, dd, 0); + } + + void fmrs_r(int rd, int dn, Condition cc = AL) + { + emitInst(static_cast(cc) | FMRS, rd, dn, 0); + } + + void fsitod_r(int dd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FSITOD, dd, 0, dm); + } + + void ftosid_r(int fd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FTOSID, fd, 0, dm); + } + + void fmstat(Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | FMSTAT); + } + +#if WTF_ARM_ARCH_AT_LEAST(5) + void clz_r(int rd, int rm, Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | CLZ | RD(rd) | RM(rm)); + } +#endif + + void bkpt(ARMWord value) + { +#if WTF_ARM_ARCH_AT_LEAST(5) + m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf)); +#else + // Cannot access to Zero memory address + dtr_dr(true, ARMRegisters::S0, ARMRegisters::S0, ARMRegisters::S0); +#endif + } + + static ARMWord lsl(int reg, ARMWord value) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x00; + } + + static ARMWord lsr(int reg, ARMWord value) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x20; + } + + static ARMWord asr(int reg, ARMWord value) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(value <= 0x1f); + return reg | (value << 7) | 0x40; + } + + static ARMWord lsl_r(int reg, int shiftReg) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); + return reg | (shiftReg << 8) | 0x10; + } + + static ARMWord lsr_r(int reg, int shiftReg) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); + return reg | (shiftReg << 8) | 0x30; + } + + static ARMWord asr_r(int reg, int shiftReg) + { + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); + return reg | (shiftReg << 8) | 0x50; + } + + // General helpers + + int size() + { + return m_buffer.size(); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_buffer.ensureSpace(insnSpace, constSpace); + } + + int sizeOfConstantPool() + { + return m_buffer.sizeOfConstantPool(); + } + + JmpDst label() + { + return JmpDst(m_buffer.size()); + } + + JmpDst align(int alignment) + { + while (!m_buffer.isAligned(alignment)) + mov_r(ARMRegisters::r0, ARMRegisters::r0); + + return label(); + } + + JmpSrc jmp(Condition cc = AL, int useConstantPool = 0) + { + ensureSpace(sizeof(ARMWord), sizeof(ARMWord)); + int s = m_buffer.uncheckedSize(); + ldr_un_imm(ARMRegisters::pc, 0xffffffff, cc); + m_jumps.append(s | (useConstantPool & 0x1)); + return JmpSrc(s); + } + + void* executableCopy(ExecutablePool* allocator); + + // Patching helpers + + static ARMWord* getLdrImmAddress(ARMWord* insn) + { + // Must be an ldr ..., [pc +/- imm] + ASSERT((*insn & 0x0f7f0000) == 0x051f0000); + + ARMWord addr = reinterpret_cast(insn) + DefaultPrefetching * sizeof(ARMWord); + if (*insn & DT_UP) + return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); + return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); + } + + static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool) + { + // Must be an ldr ..., [pc +/- imm] + ASSERT((*insn & 0x0f7f0000) == 0x051f0000); + + if (*insn & 0x1) + return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); + return getLdrImmAddress(insn); + } + + static void patchPointerInternal(intptr_t from, void* to) + { + ARMWord* insn = reinterpret_cast(from); + ARMWord* addr = getLdrImmAddress(insn); + *addr = reinterpret_cast(to); + } + + static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) + { + value = (value << 1) + 1; + ASSERT(!(value & ~0xfff)); + return (load & ~0xfff) | value; + } + + static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr); + + // Patch pointers + + static void linkPointer(void* code, JmpDst from, void* to) + { + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void repatchInt32(void* from, int32_t to) + { + patchPointerInternal(reinterpret_cast(from), reinterpret_cast(to)); + } + + static void repatchPointer(void* from, void* to) + { + patchPointerInternal(reinterpret_cast(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(from); + ASSERT((*insn & 0x0ff00f00) == 0x05900000); + + *insn = (*insn & 0xf00ff0ff) | 0x02800000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + // Linkers + + void linkJump(JmpSrc from, JmpDst to) + { + ARMWord* insn = reinterpret_cast(m_buffer.data()) + (from.m_offset / sizeof(ARMWord)); + ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress()); + *addr = static_cast(to.m_offset); + } + + static void linkJump(void* code, JmpSrc from, void* to) + { + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkJump(void* from, void* to) + { + patchPointerInternal(reinterpret_cast(from) - sizeof(ARMWord), to); + } + + static void linkCall(void* code, JmpSrc from, void* to) + { + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkCall(void* from, void* to) + { + patchPointerInternal(reinterpret_cast(from) - sizeof(ARMWord), to); + } + + // Address operations + + static void* getRelocatedAddress(void* code, JmpSrc jump) + { + return reinterpret_cast(reinterpret_cast(code) + jump.m_offset / sizeof(ARMWord) + 1); + } + + static void* getRelocatedAddress(void* code, JmpDst label) + { + return reinterpret_cast(reinterpret_cast(code) + label.m_offset / sizeof(ARMWord)); + } + + // Address differences + + static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to) + { + return (to.m_offset + sizeof(ARMWord)) - from.m_offset; + } + + static int getDifferenceBetweenLabels(JmpDst from, JmpDst to) + { + return to.m_offset - from.m_offset; + } + + static unsigned getCallReturnOffset(JmpSrc call) + { + return call.m_offset + sizeof(ARMWord); + } + + // Handle immediates + + static ARMWord getOp2Byte(ARMWord imm) + { + ASSERT(imm <= 0xff); + return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ; + } + + static ARMWord getOp2(ARMWord imm); + +#if WTF_ARM_ARCH_AT_LEAST(7) + static ARMWord getImm16Op2(ARMWord imm) + { + if (imm <= 0xffff) + return (imm & 0xf000) << 4 | (imm & 0xfff); + return INVALID_IMM; + } +#endif + ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); + void moveImm(ARMWord imm, int dest); + ARMWord encodeComplexImm(ARMWord imm, int dest); + + // Memory load/store helpers + + void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); + void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); + + // Constant pool hnadlers + + static ARMWord placeConstantPoolBarrier(int offset) + { + offset = (offset - sizeof(ARMWord)) >> 2; + ASSERT((offset <= BOFFSET_MAX && offset >= BOFFSET_MIN)); + return AL | B | (offset & BRANCH_MASK); + } + + private: + ARMWord RM(int reg) + { + ASSERT(reg <= ARMRegisters::pc); + return reg; + } + + ARMWord RS(int reg) + { + ASSERT(reg <= ARMRegisters::pc); + return reg << 8; + } + + ARMWord RD(int reg) + { + ASSERT(reg <= ARMRegisters::pc); + return reg << 12; + } + + ARMWord RN(int reg) + { + ASSERT(reg <= ARMRegisters::pc); + return reg << 16; + } + + static ARMWord getConditionalField(ARMWord i) + { + return i & 0xf0000000; + } + + int genInt(int reg, ARMWord imm, bool positive); + + ARMBuffer m_buffer; + Jumps m_jumps; + }; + +} // namespace JSC + +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#endif // ARMAssembler_h diff --git a/assembler/ARMv7Assembler.h b/assembler/ARMv7Assembler.h index 7cf8873..4e394b2 100644 --- a/assembler/ARMv7Assembler.h +++ b/assembler/ARMv7Assembler.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) +#if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2) #include "AssemblerBuffer.h" #include @@ -37,7 +37,7 @@ namespace JSC { -namespace ARM { +namespace ARMRegisters { typedef enum { r0, r1, @@ -199,12 +199,12 @@ class ARMThumbImmediate { }; } PatternBytes; - ALWAYS_INLINE static int32_t countLeadingZerosPartial(uint32_t& value, int32_t& zeros, const int N) + ALWAYS_INLINE static void countLeadingZerosPartial(uint32_t& value, int32_t& zeros, const int N) { - if (value & ~((1<>= N; /* if any were set, lose the bottom N */ \ - else /* if none of the top N bits are set, */ \ - zeros += N; /* then we have identified N leading zeros */ + if (value & ~((1 << N) - 1)) /* check for any of the top N bits (of 2N bits) are set */ + value >>= N; /* if any were set, lose the bottom N */ + else /* if none of the top N bits are set, */ + zeros += N; /* then we have identified N leading zeros */ } static int32_t countLeadingZeros(uint32_t value) @@ -236,6 +236,11 @@ class ARMThumbImmediate { ARMThumbImmediate(ThumbImmediateType type, uint16_t value) : m_type(TypeUInt16) { + // Make sure this constructor is only reached with type TypeUInt16; + // this extra parameter makes the code a little clearer by making it + // explicit at call sites which type is being constructed + ASSERT_UNUSED(type, type == TypeUInt16); + m_value.asInt = value; } @@ -407,8 +412,13 @@ register writeback class ARMv7Assembler { public: - typedef ARM::RegisterID RegisterID; - typedef ARM::FPRegisterID FPRegisterID; + ~ARMv7Assembler() + { + ASSERT(m_jumpsToLink.isEmpty()); + } + + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; // (HS, LO, HI, LS) -> (AE, B, A, BE) // (VS, VC) -> (O, NO) @@ -477,10 +487,21 @@ public: private: + struct LinkRecord { + LinkRecord(intptr_t from, intptr_t to) + : from(from) + , to(to) + { + } + + intptr_t from; + intptr_t to; + }; + // ARMv7, Appx-A.6.3 bool BadReg(RegisterID reg) { - return (reg == ARM::sp) || (reg == ARM::pc); + return (reg == ARMRegisters::sp) || (reg == ARMRegisters::pc); } bool isSingleRegister(FPRegisterID reg) @@ -574,6 +595,7 @@ private: OP_SUB_SP_imm_T1 = 0xB080, OP_BKPT = 0xBE00, OP_IT = 0xBF00, + OP_NOP_T1 = 0xBF00, } OpcodeID; typedef enum { @@ -608,6 +630,7 @@ private: OP_MOV_imm_T3 = 0xF240, OP_SUB_imm_T4 = 0xF2A0, OP_MOVT = 0xF2C0, + OP_NOP_T2a = 0xF3AF, OP_LDRH_reg_T2 = 0xF830, OP_LDRH_imm_T3 = 0xF830, OP_STR_imm_T4 = 0xF840, @@ -626,6 +649,7 @@ private: typedef enum { OP_B_T4b = 0x9000, + OP_NOP_T2b = 0x8000, } OpcodeID2; struct FourFours { @@ -692,16 +716,16 @@ public: void add(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if (rn == ARM::sp) { + if (rn == ARMRegisters::sp) { if (!(rd & 8) && imm.isUInt10()) { m_formatter.oneWordOp5Reg3Imm8(OP_ADD_SP_imm_T1, rd, imm.getUInt10() >> 2); return; - } else if ((rd == ARM::sp) && imm.isUInt9()) { + } else if ((rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_ADD_SP_imm_T2, imm.getUInt9() >> 2); return; } @@ -725,9 +749,9 @@ public: void add(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_ADD_reg_T3, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -749,9 +773,9 @@ public: void add_S(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); if (!((rd | rn) & 8)) { @@ -770,9 +794,9 @@ public: // Not allowed in an IT (if then) block? void add_S(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_ADD_S_reg_T3, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -838,7 +862,7 @@ public: // Only allowed in IT (if then) block if last instruction. JmpSrc blx(RegisterID rm) { - ASSERT(rm != ARM::pc); + ASSERT(rm != ARMRegisters::pc); m_formatter.oneWordOp8RegReg143(OP_BLX, rm, (RegisterID)8); return JmpSrc(m_formatter.size()); } @@ -857,7 +881,7 @@ public: void cmn(RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); m_formatter.twoWordOp5i6Imm4Reg4EncodedImm(OP_CMN_imm, rn, (RegisterID)0xf, imm); @@ -865,7 +889,7 @@ public: void cmp(RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); if (!(rn & 8) && imm.isUInt8()) @@ -876,7 +900,7 @@ public: void cmp(RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_CMP_reg_T2, rn, FourFours(shift.hi4(), 0xf, shift.lo4(), rm)); } @@ -938,15 +962,15 @@ public: m_formatter.oneWordOp8Imm8(OP_IT, ifThenElse(cond, inst2if, inst3if, inst4if)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldr(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt7()) m_formatter.oneWordOp5Imm5Reg3Reg3(OP_LDR_imm_T1, imm.getUInt7() >> 2, rn, rt); - else if ((rn == ARM::sp) && !(rt & 8) && imm.isUInt10()) + else if ((rn == ARMRegisters::sp) && !(rt & 8) && imm.isUInt10()) m_formatter.oneWordOp5Reg3Imm8(OP_LDR_imm_T2, rt, imm.getUInt10() >> 2); else m_formatter.twoWordOp12Reg4Reg4Imm12(OP_LDR_imm_T3, rn, rt, imm.getUInt12()); @@ -965,8 +989,8 @@ public: // if (wback) REG[rn] = _tmp void ldr(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -985,10 +1009,10 @@ public: m_formatter.twoWordOp12Reg4Reg4Imm12(OP_LDR_imm_T4, rn, rt, offset); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldr(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -998,10 +1022,10 @@ public: m_formatter.twoWordOp12Reg4FourFours(OP_LDR_reg_T2, rn, FourFours(rt, 0, shift, rm)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldrh(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt6()) @@ -1023,8 +1047,8 @@ public: // if (wback) REG[rn] = _tmp void ldrh(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -1046,7 +1070,7 @@ public: void ldrh(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { ASSERT(!BadReg(rt)); // Memory hint - ASSERT(rn != ARM::pc); // LDRH (literal) + ASSERT(rn != ARMRegisters::pc); // LDRH (literal) ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -1197,16 +1221,16 @@ public: m_formatter.twoWordOp12Reg4FourFours(OP_SMULL_T1, rn, FourFours(rdLo, rdHi, 0, rm)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void str(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt7()) m_formatter.oneWordOp5Imm5Reg3Reg3(OP_STR_imm_T1, imm.getUInt7() >> 2, rn, rt); - else if ((rn == ARM::sp) && !(rt & 8) && imm.isUInt10()) + else if ((rn == ARMRegisters::sp) && !(rt & 8) && imm.isUInt10()) m_formatter.oneWordOp5Reg3Imm8(OP_STR_imm_T2, rt, imm.getUInt10() >> 2); else m_formatter.twoWordOp12Reg4Reg4Imm12(OP_STR_imm_T3, rn, rt, imm.getUInt12()); @@ -1225,8 +1249,8 @@ public: // if (wback) REG[rn] = _tmp void str(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -1245,10 +1269,10 @@ public: m_formatter.twoWordOp12Reg4Reg4Imm12(OP_STR_imm_T4, rn, rt, offset); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void str(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -1261,12 +1285,12 @@ public: void sub(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if ((rn == ARM::sp) && (rd == ARM::sp) && imm.isUInt9()) { + if ((rn == ARMRegisters::sp) && (rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_SUB_SP_imm_T1, imm.getUInt9() >> 2); return; } else if (!((rd | rn) & 8)) { @@ -1289,9 +1313,9 @@ public: void sub(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_SUB_reg_T2, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -1309,12 +1333,12 @@ public: void sub_S(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if ((rn == ARM::sp) && (rd == ARM::sp) && imm.isUInt9()) { + if ((rn == ARMRegisters::sp) && (rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_SUB_SP_imm_T1, imm.getUInt9() >> 2); return; } else if (!((rd | rn) & 8)) { @@ -1333,9 +1357,9 @@ public: // Not allowed in an IT (if then) block? void sub_S(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_SUB_S_reg_T2, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -1481,6 +1505,15 @@ public: void* executableCopy(ExecutablePool* allocator) { void* copy = m_formatter.executableCopy(allocator); + + unsigned jumpCount = m_jumpsToLink.size(); + for (unsigned i = 0; i < jumpCount; ++i) { + uint16_t* location = reinterpret_cast(reinterpret_cast(copy) + m_jumpsToLink[i].from); + uint16_t* target = reinterpret_cast(reinterpret_cast(copy) + m_jumpsToLink[i].to); + linkJumpAbsolute(location, target); + } + m_jumpsToLink.clear(); + ASSERT(copy); return copy; } @@ -1503,11 +1536,7 @@ public: { ASSERT(to.m_offset != -1); ASSERT(from.m_offset != -1); - - uint16_t* location = reinterpret_cast(reinterpret_cast(m_formatter.data()) + from.m_offset); - intptr_t relative = to.m_offset - from.m_offset; - - linkWithOffset(location, relative); + m_jumpsToLink.append(LinkRecord(from.m_offset, to.m_offset)); } static void linkJump(void* code, JmpSrc from, void* to) @@ -1515,9 +1544,7 @@ public: ASSERT(from.m_offset != -1); uint16_t* location = reinterpret_cast(reinterpret_cast(code) + from.m_offset); - intptr_t relative = reinterpret_cast(to) - reinterpret_cast(location); - - linkWithOffset(location, relative); + linkJumpAbsolute(location, to); } // bah, this mathod should really be static, since it is used by the LinkBuffer. @@ -1541,10 +1568,9 @@ public: ASSERT(!(reinterpret_cast(from) & 1)); ASSERT(!(reinterpret_cast(to) & 1)); - intptr_t relative = reinterpret_cast(to) - reinterpret_cast(from); - linkWithOffset(reinterpret_cast(from), relative); + linkJumpAbsolute(reinterpret_cast(from), to); - ExecutableAllocator::cacheFlush(reinterpret_cast(from) - 2, 2 * sizeof(uint16_t)); + ExecutableAllocator::cacheFlush(reinterpret_cast(from) - 5, 5 * sizeof(uint16_t)); } static void relinkCall(void* from, void* to) @@ -1613,14 +1639,14 @@ private: static void setInt32(void* code, uint32_t value) { uint16_t* location = reinterpret_cast(code); + ASSERT(isMOV_imm_T3(location - 4) && isMOVT(location - 2)); - uint16_t lo16 = value; - uint16_t hi16 = value >> 16; - - spliceHi5(location - 4, lo16); - spliceLo11(location - 3, lo16); - spliceHi5(location - 2, hi16); - spliceLo11(location - 1, hi16); + ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(value)); + ARMThumbImmediate hi16 = ARMThumbImmediate::makeUInt16(static_cast(value >> 16)); + location[-4] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOV_imm_T3, lo16); + location[-3] = twoWordOp5i6Imm4Reg4EncodedImmSecond((location[-3] >> 8) & 0xf, lo16); + location[-2] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16); + location[-1] = twoWordOp5i6Imm4Reg4EncodedImmSecond((location[-1] >> 8) & 0xf, hi16); ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t)); } @@ -1630,41 +1656,89 @@ private: setInt32(code, reinterpret_cast(value)); } - // Linking & patching: - // This method assumes that the JmpSrc being linked is a T4 b instruction. - static void linkWithOffset(uint16_t* instruction, intptr_t relative) - { - // Currently branches > 16m = mostly deathy. - if (((relative << 7) >> 7) != relative) { - // FIXME: This CRASH means we cannot turn the JIT on by default on arm-v7. - fprintf(stderr, "Error: Cannot link T4b.\n"); - CRASH(); - } - - // ARM encoding for the top two bits below the sign bit is 'peculiar'. - if (relative >= 0) - relative ^= 0xC00000; + static bool isB(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xf800) == OP_B_T4a) && ((instruction[1] & 0xd000) == OP_B_T4b); + } - // All branch offsets should be an even distance. - ASSERT(!(relative & 1)); + static bool isBX(void* address) + { + uint16_t* instruction = static_cast(address); + return (instruction[0] & 0xff87) == OP_BX; + } - int word1 = ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); - int word2 = ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); + static bool isMOV_imm_T3(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xFBF0) == OP_MOV_imm_T3) && ((instruction[1] & 0x8000) == 0); + } - instruction[-2] = OP_B_T4a | word1; - instruction[-1] = OP_B_T4b | word2; + static bool isMOVT(void* address) + { + uint16_t* instruction = static_cast(address); + return ((instruction[0] & 0xFBF0) == OP_MOVT) && ((instruction[1] & 0x8000) == 0); } - // These functions can be used to splice 16-bit immediates back into previously generated instructions. - static void spliceHi5(uint16_t* where, uint16_t what) + static bool isNOP_T1(void* address) { - uint16_t pattern = (what >> 12) | ((what & 0x0800) >> 1); - *where = (*where & 0xFBF0) | pattern; + uint16_t* instruction = static_cast(address); + return instruction[0] == OP_NOP_T1; } - static void spliceLo11(uint16_t* where, uint16_t what) + + static bool isNOP_T2(void* address) { - uint16_t pattern = ((what & 0x0700) << 4) | (what & 0x00FF); - *where = (*where & 0x8F00) | pattern; + uint16_t* instruction = static_cast(address); + return (instruction[0] == OP_NOP_T2a) && (instruction[1] == OP_NOP_T2b); + } + + static void linkJumpAbsolute(uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + const uint16_t JUMP_TEMPORARY_REGISTER = ARMRegisters::ip; + + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + ASSERT( (isMOV_imm_T3(instruction - 5) && isMOVT(instruction - 3) && isBX(instruction - 1)) + || (isNOP_T1(instruction - 5) && isNOP_T2(instruction - 4) && isB(instruction - 2)) ); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + if (((relative << 7) >> 7) == relative) { + // ARM encoding for the top two bits below the sign bit is 'peculiar'. + if (relative >= 0) + relative ^= 0xC00000; + + // All branch offsets should be an even distance. + ASSERT(!(relative & 1)); + // There may be a better way to fix this, but right now put the NOPs first, since in the + // case of an conditional branch this will be coming after an ITTT predicating *three* + // instructions! Looking backwards to modify the ITTT to an IT is not easy, due to + // variable wdith encoding - the previous instruction might *look* like an ITTT but + // actually be the second half of a 2-word op. + instruction[-5] = OP_NOP_T1; + instruction[-4] = OP_NOP_T2a; + instruction[-3] = OP_NOP_T2b; + instruction[-2] = OP_B_T4a | ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); + instruction[-1] = OP_B_T4b | ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); + } else { + ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) + 1)); + ARMThumbImmediate hi16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) >> 16)); + instruction[-5] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOV_imm_T3, lo16); + instruction[-4] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, lo16); + instruction[-3] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16); + instruction[-2] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, hi16); + instruction[-1] = OP_BX | (JUMP_TEMPORARY_REGISTER << 3); + } + } + + static uint16_t twoWordOp5i6Imm4Reg4EncodedImmFirst(uint16_t op, ARMThumbImmediate imm) + { + return op | (imm.m_value.i << 10) | imm.m_value.imm4; + } + static uint16_t twoWordOp5i6Imm4Reg4EncodedImmSecond(uint16_t rd, ARMThumbImmediate imm) + { + return (imm.m_value.imm3 << 12) | (rd << 8) | imm.m_value.imm8; } class ARMInstructionFormatter { @@ -1723,8 +1797,11 @@ private: void twoWordOp5i6Imm4Reg4EncodedImm(OpcodeID1 op, int imm4, RegisterID rd, ARMThumbImmediate imm) { - m_buffer.putShort(op | (imm.m_value.i << 10) | imm4); - m_buffer.putShort((imm.m_value.imm3 << 12) | (rd << 8) | imm.m_value.imm8); + ARMThumbImmediate newImm = imm; + newImm.m_value.imm4 = imm4; + + m_buffer.putShort(ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst(op, newImm)); + m_buffer.putShort(ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond(rd, newImm)); } void twoWordOp12Reg4Reg4Imm12(OpcodeID1 op, RegisterID reg1, RegisterID reg2, uint16_t imm) @@ -1749,10 +1826,12 @@ private: private: AssemblerBuffer m_buffer; } m_formatter; + + Vector m_jumpsToLink; }; } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_THUMB2) #endif // ARMAssembler_h diff --git a/assembler/AbstractMacroAssembler.h b/assembler/AbstractMacroAssembler.h index 0b23d02..198e8d1 100644 --- a/assembler/AbstractMacroAssembler.h +++ b/assembler/AbstractMacroAssembler.h @@ -173,16 +173,16 @@ public: struct Imm32 { explicit Imm32(int32_t value) : m_value(value) -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM) , m_isPointer(false) #endif { } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) explicit Imm32(ImmPtr ptr) : m_value(ptr.asIntptr()) -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM) , m_isPointer(true) #endif { @@ -190,7 +190,7 @@ public: #endif int32_t m_value; -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM) // We rely on being able to regenerate code to recover exception handling // information. Since ARMv7 supports 16-bit immediates there is a danger // that if pointer values change the layout of the generated code will change. @@ -321,7 +321,6 @@ public: } JmpSrc m_jmp; - private: Flags m_flags; }; diff --git a/assembler/AssemblerBufferWithConstantPool.h b/assembler/AssemblerBufferWithConstantPool.h index f15b7f3..af3c3be 100644 --- a/assembler/AssemblerBufferWithConstantPool.h +++ b/assembler/AssemblerBufferWithConstantPool.h @@ -34,6 +34,8 @@ #include "AssemblerBuffer.h" #include +#define ASSEMBLER_HAS_CONSTANT_POOL 1 + namespace JSC { /* @@ -84,7 +86,7 @@ namespace JSC { template class AssemblerBufferWithConstantPool: public AssemblerBuffer { - typedef WTF::SegmentedVector LoadOffsets; + typedef SegmentedVector LoadOffsets; public: enum { UniqueConst, @@ -177,6 +179,11 @@ public: return AssemblerBuffer::size(); } + int uncheckedSize() + { + return AssemblerBuffer::size(); + } + void* executableCopy(ExecutablePool* allocator) { flushConstantPool(false); @@ -207,10 +214,10 @@ public: } // This flushing mechanism can be called after any unconditional jumps. - void flushWithoutBarrier() + void flushWithoutBarrier(bool isForced = false) { // Flush if constant pool is more than 60% full to avoid overuse of this function. - if (5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) + if (isForced || 5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) flushConstantPool(false); } @@ -219,6 +226,11 @@ public: return m_pool; } + int sizeOfConstantPool() + { + return m_numConsts; + } + private: void correctDeltas(int insnSize) { @@ -276,7 +288,8 @@ private: { if (m_numConsts == 0) return; - if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t))) + int lastConstDelta = m_lastConstDelta > nextInsnSize ? m_lastConstDelta - nextInsnSize : 0; + if ((m_maxDistance < nextInsnSize + lastConstDelta + barrierSize + (int)sizeof(uint32_t))) flushConstantPool(); } @@ -284,8 +297,8 @@ private: { if (m_numConsts == 0) return; - if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t)) || - (m_numConsts + nextConstSize / sizeof(uint32_t) >= maxPoolSize)) + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + nextConstSize + barrierSize + (int)sizeof(uint32_t)) || + (m_numConsts * sizeof(uint32_t) + nextConstSize >= maxPoolSize)) flushConstantPool(); } diff --git a/assembler/MacroAssembler.h b/assembler/MacroAssembler.h index 43d27e7..76bd205 100644 --- a/assembler/MacroAssembler.h +++ b/assembler/MacroAssembler.h @@ -30,15 +30,19 @@ #if ENABLE(ASSEMBLER) -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM_THUMB2) #include "MacroAssemblerARMv7.h" namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; }; -#elif PLATFORM(X86) +#elif CPU(ARM_TRADITIONAL) +#include "MacroAssemblerARM.h" +namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; }; + +#elif CPU(X86) #include "MacroAssemblerX86.h" namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; }; -#elif PLATFORM(X86_64) +#elif CPU(X86_64) #include "MacroAssemblerX86_64.h" namespace JSC { typedef MacroAssemblerX86_64 MacroAssemblerBase; }; @@ -56,7 +60,7 @@ public: using MacroAssemblerBase::jump; using MacroAssemblerBase::branch32; using MacroAssemblerBase::branch16; -#if PLATFORM(X86_64) +#if CPU(X86_64) using MacroAssemblerBase::branchPtr; using MacroAssemblerBase::branchTestPtr; #endif @@ -129,7 +133,8 @@ public: // Ptr methods // On 32-bit platforms (i.e. x86), these methods directly map onto their 32-bit equivalents. -#if !PLATFORM(X86_64) + // FIXME: should this use a test for 32-bitness instead of this specific exception? +#if !CPU(X86_64) void addPtr(RegisterID src, RegisterID dest) { add32(src, dest); @@ -175,16 +180,6 @@ public: or32(imm, dest); } - void rshiftPtr(RegisterID shift_amount, RegisterID dest) - { - rshift32(shift_amount, dest); - } - - void rshiftPtr(Imm32 imm, RegisterID dest) - { - rshift32(imm, dest); - } - void subPtr(RegisterID src, RegisterID dest) { sub32(src, dest); diff --git a/assembler/MacroAssemblerARM.cpp b/assembler/MacroAssemblerARM.cpp new file mode 100644 index 0000000..b5b20fa --- /dev/null +++ b/assembler/MacroAssemblerARM.cpp @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2009 University of Szeged + * 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 UNIVERSITY OF SZEGED ``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 UNIVERSITY OF SZEGED 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. + */ + +#include "config.h" + +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#include "MacroAssemblerARM.h" + +#if OS(LINUX) +#include +#include +#include +#include +#include +#include +#endif + +namespace JSC { + +static bool isVFPPresent() +{ +#if OS(LINUX) + int fd = open("/proc/self/auxv", O_RDONLY); + if (fd > 0) { + Elf32_auxv_t aux; + while (read(fd, &aux, sizeof(Elf32_auxv_t))) { + if (aux.a_type == AT_HWCAP) { + close(fd); + return aux.a_un.a_val & HWCAP_VFP; + } + } + close(fd); + } +#endif + + return false; +} + +const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent(); + +#if CPU(ARMV5_OR_LOWER) +/* On ARMv5 and below, natural alignment is required. */ +void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) +{ + ARMWord op2; + + ASSERT(address.scale >= 0 && address.scale <= 3); + op2 = m_assembler.lsl(address.index, static_cast(address.scale)); + + if (address.offset >= 0 && address.offset + 0x2 <= 0xff) { + m_assembler.add_r(ARMRegisters::S0, address.base, op2); + m_assembler.ldrh_u(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset)); + m_assembler.ldrh_u(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset + 0x2)); + } else if (address.offset < 0 && address.offset >= -0xff) { + m_assembler.add_r(ARMRegisters::S0, address.base, op2); + m_assembler.ldrh_d(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset)); + m_assembler.ldrh_d(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset - 0x2)); + } else { + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, op2); + m_assembler.ldrh_r(dest, address.base, ARMRegisters::S0); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::OP2_IMM | 0x2); + m_assembler.ldrh_r(ARMRegisters::S0, address.base, ARMRegisters::S0); + } + m_assembler.orr_r(dest, dest, m_assembler.lsl(ARMRegisters::S0, 16)); +} +#endif + +} + +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) diff --git a/assembler/MacroAssemblerARM.h b/assembler/MacroAssemblerARM.h new file mode 100644 index 0000000..21b8de8 --- /dev/null +++ b/assembler/MacroAssemblerARM.h @@ -0,0 +1,933 @@ +/* + * Copyright (C) 2008 Apple Inc. + * Copyright (C) 2009 University of Szeged + * 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 MacroAssemblerARM_h +#define MacroAssemblerARM_h + +#include + +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#include "ARMAssembler.h" +#include "AbstractMacroAssembler.h" + +namespace JSC { + +class MacroAssemblerARM : public AbstractMacroAssembler { + static const int DoubleConditionMask = 0x0f; + static const int DoubleConditionBitSpecial = 0x10; + COMPILE_ASSERT(!(DoubleConditionBitSpecial & DoubleConditionMask), DoubleConditionBitSpecial_should_not_interfere_with_ARMAssembler_Condition_codes); +public: + enum Condition { + Equal = ARMAssembler::EQ, + NotEqual = ARMAssembler::NE, + Above = ARMAssembler::HI, + AboveOrEqual = ARMAssembler::CS, + Below = ARMAssembler::CC, + BelowOrEqual = ARMAssembler::LS, + GreaterThan = ARMAssembler::GT, + GreaterThanOrEqual = ARMAssembler::GE, + LessThan = ARMAssembler::LT, + LessThanOrEqual = ARMAssembler::LE, + Overflow = ARMAssembler::VS, + Signed = ARMAssembler::MI, + Zero = ARMAssembler::EQ, + NonZero = ARMAssembler::NE + }; + + enum DoubleCondition { + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. + DoubleEqual = ARMAssembler::EQ, + DoubleNotEqual = ARMAssembler::NE | DoubleConditionBitSpecial, + DoubleGreaterThan = ARMAssembler::GT, + DoubleGreaterThanOrEqual = ARMAssembler::GE, + DoubleLessThan = ARMAssembler::CC, + DoubleLessThanOrEqual = ARMAssembler::LS, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = ARMAssembler::EQ | DoubleConditionBitSpecial, + DoubleNotEqualOrUnordered = ARMAssembler::NE, + DoubleGreaterThanOrUnordered = ARMAssembler::HI, + DoubleGreaterThanOrEqualOrUnordered = ARMAssembler::CS, + DoubleLessThanOrUnordered = ARMAssembler::LT, + DoubleLessThanOrEqualOrUnordered = ARMAssembler::LE, + }; + + static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; + + static const Scale ScalePtr = TimesFour; + + void add32(RegisterID src, RegisterID dest) + { + m_assembler.adds_r(dest, dest, src); + } + + void add32(Imm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + add32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void add32(Imm32 imm, RegisterID dest) + { + m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void add32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + add32(ARMRegisters::S1, dest); + } + + void and32(RegisterID src, RegisterID dest) + { + m_assembler.ands_r(dest, dest, src); + } + + void and32(Imm32 imm, RegisterID dest) + { + ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.ands_r(dest, dest, w); + } + + void lshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + ASSERT(w != ARMAssembler::INVALID_IMM); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); + } + + void lshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); + } + + void mul32(RegisterID src, RegisterID dest) + { + if (src == dest) { + move(src, ARMRegisters::S0); + src = ARMRegisters::S0; + } + m_assembler.muls_r(dest, dest, src); + } + + void mul32(Imm32 imm, RegisterID src, RegisterID dest) + { + move(imm, ARMRegisters::S0); + m_assembler.muls_r(dest, src, ARMRegisters::S0); + } + + void neg32(RegisterID srcDest) + { + m_assembler.rsbs_r(srcDest, srcDest, ARMAssembler::getOp2(0)); + } + + void not32(RegisterID dest) + { + m_assembler.mvns_r(dest, dest); + } + + void or32(RegisterID src, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, src); + } + + void or32(Imm32 imm, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void rshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + ASSERT(w != ARMAssembler::INVALID_IMM); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); + } + + void rshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); + } + + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subs_r(dest, dest, src); + } + + void sub32(Imm32 imm, RegisterID dest) + { + m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void sub32(Imm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + sub32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void sub32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + sub32(ARMRegisters::S1, dest); + } + + void xor32(RegisterID src, RegisterID dest) + { + m_assembler.eors_r(dest, dest, src); + } + + void xor32(Imm32 imm, RegisterID dest) + { + m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void load32(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransfer32(true, dest, address.base, address.offset); + } + + void load32(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast(address.scale), address.offset); + } + +#if CPU(ARMV5_OR_LOWER) + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest); +#else + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } +#endif + + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(true, dest, address.base, ARMRegisters::S0); + 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::S0, address.base, m_assembler.lsl(address.index, address.scale)); + if (address.offset>=0) + m_assembler.ldrh_u(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset)); + else + m_assembler.ldrh_d(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset)); + } + + DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(false, src, address.base, ARMRegisters::S0); + return dataLabel; + } + + void store32(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransfer32(false, src, address.base, address.offset); + } + + void store32(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store32(Imm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void store32(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); + } + + void store32(Imm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void pop(RegisterID dest) + { + m_assembler.pop_r(dest); + } + + void push(RegisterID src) + { + m_assembler.push_r(src); + } + + void push(Address address) + { + load32(address, ARMRegisters::S1); + push(ARMRegisters::S1); + } + + void push(Imm32 imm) + { + move(imm, ARMRegisters::S0); + push(ARMRegisters::S0); + } + + void move(Imm32 imm, RegisterID dest) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(dest, imm.m_value); + else + m_assembler.moveImm(imm.m_value, dest); + } + + void move(RegisterID src, RegisterID dest) + { + m_assembler.mov_r(dest, src); + } + + void move(ImmPtr imm, RegisterID dest) + { + move(Imm32(imm), dest); + } + + void swap(RegisterID reg1, RegisterID reg2) + { + m_assembler.mov_r(ARMRegisters::S0, reg1); + m_assembler.mov_r(reg1, reg2); + m_assembler.mov_r(reg2, ARMRegisters::S0); + } + + void signExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + void zeroExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + Jump branch32(Condition cond, RegisterID left, RegisterID right, int useConstantPool = 0) + { + m_assembler.cmp_r(left, right); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + Jump branch32(Condition cond, RegisterID left, Imm32 right, int useConstantPool = 0) + { + if (right.m_isPointer) { + m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); + m_assembler.cmp_r(left, ARMRegisters::S0); + } else + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + Jump branch32(Condition cond, RegisterID left, Address right) + { + load32(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1); + } + + Jump branch32(Condition cond, Address left, RegisterID right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, Address left, Imm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, BaseIndex left, Imm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + { + load32WithUnalignedHalfWords(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch16(Condition cond, BaseIndex left, RegisterID right) + { + UNUSED_PARAM(cond); + UNUSED_PARAM(left); + UNUSED_PARAM(right); + ASSERT_NOT_REACHED(); + return jump(); + } + + Jump branch16(Condition cond, BaseIndex left, Imm32 right) + { + load16(left, ARMRegisters::S0); + move(right, ARMRegisters::S1); + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1); + return m_assembler.jmp(ARMCondition(cond)); + } + + Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) + { + ASSERT((cond == Zero) || (cond == NonZero)); + m_assembler.tst_r(reg, mask); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + ASSERT((cond == Zero) || (cond == NonZero)); + ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(ARMRegisters::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.tst_r(reg, w); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump jump() + { + return Jump(m_assembler.jmp()); + } + + void jump(RegisterID target) + { + move(target, ARMRegisters::pc); + } + + void jump(Address address) + { + load32(address, ARMRegisters::pc); + } + + Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + add32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void mull32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) { + move(src1, ARMRegisters::S0); + src1 = ARMRegisters::S0; + } + m_assembler.mull_r(ARMRegisters::S1, dest, src2, src1); + m_assembler.cmp_r(ARMRegisters::S1, m_assembler.asr(dest, 31)); + } + + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) { + mull32(src, dest, dest); + cond = NonZero; + } + else + mul32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) { + move(imm, ARMRegisters::S0); + mull32(ARMRegisters::S0, src, dest); + cond = NonZero; + } + else + mul32(imm, src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Signed) || (cond == Zero) || (cond == NonZero)); + or32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void breakpoint() + { + m_assembler.bkpt(0); + } + + Call nearCall() + { + prepareCall(); + return Call(m_assembler.jmp(ARMAssembler::AL, true), Call::LinkableNear); + } + + Call call(RegisterID target) + { + prepareCall(); + move(ARMRegisters::pc, target); + JmpSrc jmpSrc; + return Call(jmpSrc, Call::None); + } + + void call(Address address) + { + call32(address.base, address.offset); + } + + void ret() + { + m_assembler.mov_r(ARMRegisters::pc, linkRegister); + } + + void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + m_assembler.cmp_r(left, right); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + // ARM doesn't have byte registers + set32(cond, left, right, dest); + } + + void set8(Condition cond, Address left, RegisterID right, RegisterID dest) + { + // ARM doesn't have byte registers + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + // ARM doesn't have byte registers + set32(cond, left, right, dest); + } + + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + load32(address, ARMRegisters::S1); + if (mask.m_value == -1) + m_assembler.cmp_r(0, ARMRegisters::S1); + else + m_assembler.tst_r(ARMRegisters::S1, m_assembler.getImm(mask.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + // ARM doesn't have byte registers + setTest32(cond, address, mask, dest); + } + + void add32(Imm32 imm, RegisterID src, RegisterID dest) + { + m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void add32(Imm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + add32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void sub32(Imm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + sub32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void load32(void* address, RegisterID dest) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); + } + + Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Call call() + { + prepareCall(); + return Call(m_assembler.jmp(ARMAssembler::AL, true), Call::Linkable); + } + + Call tailRecursiveCall() + { + return Call::fromTailJump(jump()); + } + + Call makeTailRecursiveCall(Jump oldJump) + { + return Call::fromTailJump(oldJump); + } + + DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + { + DataLabelPtr dataLabel(this); + m_assembler.ldr_un_imm(dest, reinterpret_cast(initialValue.m_value)); + return dataLabel; + } + + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); + Jump jump = branch32(cond, left, ARMRegisters::S1, true); + return jump; + } + + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); + Jump jump = branch32(cond, ARMRegisters::S0, ARMRegisters::S1, true); + return jump; + } + + DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + { + DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + return dataLabel; + } + + DataLabelPtr storePtrWithPatch(ImplicitAddress address) + { + return storePtrWithPatch(ImmPtr(0), address); + } + + // Floating point operators + bool supportsFloatingPoint() const + { + return s_isVFPPresent; + } + + bool supportsFloatingPointTruncate() const + { + return false; + } + + void loadDouble(ImplicitAddress address, FPRegisterID dest) + { + m_assembler.doubleTransfer(true, dest, address.base, address.offset); + } + + void loadDouble(void* address, FPRegisterID dest) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, (ARMWord)address); + m_assembler.fdtr_u(true, dest, ARMRegisters::S0, 0); + } + + void storeDouble(FPRegisterID src, ImplicitAddress address) + { + m_assembler.doubleTransfer(false, src, address.base, address.offset); + } + + void addDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.faddd_r(dest, dest, src); + } + + void addDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + addDouble(ARMRegisters::SD0, dest); + } + + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fdivd_r(dest, dest, src); + } + + void divDouble(Address src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + loadDouble(src, ARMRegisters::SD0); + divDouble(ARMRegisters::SD0, dest); + } + + void subDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fsubd_r(dest, dest, src); + } + + void subDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + subDouble(ARMRegisters::SD0, dest); + } + + void mulDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fmuld_r(dest, dest, src); + } + + void mulDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + mulDouble(ARMRegisters::SD0, dest); + } + + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.fmsr_r(dest, src); + m_assembler.fsitod_r(dest, dest); + } + + void convertInt32ToDouble(Address src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + // flds does not worth the effort here + load32(src, ARMRegisters::S1); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + // flds does not worth the effort here + m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) + { + m_assembler.fcmpd_r(left, right); + m_assembler.fmstat(); + if (cond & DoubleConditionBitSpecial) + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS); + return Jump(m_assembler.jmp(static_cast(cond & ~DoubleConditionMask))); + } + + // Truncates 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, INT_MIN). + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + { + UNUSED_PARAM(src); + UNUSED_PARAM(dest); + ASSERT_NOT_REACHED(); + return jump(); + } + + // Convert 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, 0). + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + m_assembler.ftosid_r(ARMRegisters::SD0, src); + m_assembler.fmrs_r(dest, ARMRegisters::SD0); + + // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. + m_assembler.fsitod_r(ARMRegisters::SD0, ARMRegisters::SD0); + failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); + + // If the result is zero, it might have been -0.0, and 0.0 equals to -0.0 + failureCases.append(branchTest32(Zero, dest)); + } + + void zeroDouble(FPRegisterID srcDest) + { + m_assembler.mov_r(ARMRegisters::S0, ARMAssembler::getOp2(0)); + convertInt32ToDouble(ARMRegisters::S0, srcDest); + } + +protected: + ARMAssembler::Condition ARMCondition(Condition cond) + { + return static_cast(cond); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_assembler.ensureSpace(insnSpace, constSpace); + } + + int sizeOfConstantPool() + { + return m_assembler.sizeOfConstantPool(); + } + + void prepareCall() + { + ensureSpace(2 * sizeof(ARMWord), sizeof(ARMWord)); + + m_assembler.mov_r(linkRegister, ARMRegisters::pc); + } + + void call32(RegisterID base, int32_t offset) + { + if (base == ARMRegisters::sp) + offset += 4; + + if (offset >= 0) { + if (offset <= 0xfff) { + prepareCall(); + m_assembler.dtr_u(true, ARMRegisters::pc, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.add_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + prepareCall(); + m_assembler.dtr_u(true, ARMRegisters::pc, ARMRegisters::S0, offset & 0xfff); + } else { + ARMWord reg = m_assembler.getImm(offset, ARMRegisters::S0); + prepareCall(); + m_assembler.dtr_ur(true, ARMRegisters::pc, base, reg); + } + } else { + offset = -offset; + if (offset <= 0xfff) { + prepareCall(); + m_assembler.dtr_d(true, ARMRegisters::pc, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.sub_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + prepareCall(); + m_assembler.dtr_d(true, ARMRegisters::pc, ARMRegisters::S0, offset & 0xfff); + } else { + ARMWord reg = m_assembler.getImm(offset, ARMRegisters::S0); + prepareCall(); + m_assembler.dtr_dr(true, ARMRegisters::pc, base, reg); + } + } + } + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + ARMAssembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static const bool s_isVFPPresent; +}; + +} + +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + +#endif // MacroAssemblerARM_h diff --git a/assembler/MacroAssemblerARMv7.h b/assembler/MacroAssemblerARMv7.h index f7a8402..532a9cf 100644 --- a/assembler/MacroAssemblerARMv7.h +++ b/assembler/MacroAssemblerARMv7.h @@ -39,9 +39,9 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler { // FIXME: switch dataTempRegister & addressTempRegister, or possibly use r7? // - dTR is likely used more than aTR, and we'll get better instruction // encoding if it's in the low 8 registers. - static const ARM::RegisterID dataTempRegister = ARM::ip; - static const RegisterID addressTempRegister = ARM::r3; - static const FPRegisterID fpTempRegister = ARM::d7; + static const ARMRegisters::RegisterID dataTempRegister = ARMRegisters::ip; + static const RegisterID addressTempRegister = ARMRegisters::r3; + static const FPRegisterID fpTempRegister = ARMRegisters::d7; struct ArmAddress { enum AddressType { @@ -93,17 +93,25 @@ public: Zero = ARMv7Assembler::ConditionEQ, NonZero = ARMv7Assembler::ConditionNE }; - enum DoubleCondition { + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. DoubleEqual = ARMv7Assembler::ConditionEQ, + DoubleNotEqual = ARMv7Assembler::ConditionVC, // Not the right flag! check for this & handle differently. DoubleGreaterThan = ARMv7Assembler::ConditionGT, DoubleGreaterThanOrEqual = ARMv7Assembler::ConditionGE, DoubleLessThan = ARMv7Assembler::ConditionLO, DoubleLessThanOrEqual = ARMv7Assembler::ConditionLS, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = ARMv7Assembler::ConditionVS, // Not the right flag! check for this & handle differently. + DoubleNotEqualOrUnordered = ARMv7Assembler::ConditionNE, + DoubleGreaterThanOrUnordered = ARMv7Assembler::ConditionHI, + DoubleGreaterThanOrEqualOrUnordered = ARMv7Assembler::ConditionHS, + DoubleLessThanOrUnordered = ARMv7Assembler::ConditionLT, + DoubleLessThanOrEqualOrUnordered = ARMv7Assembler::ConditionLE, }; - static const RegisterID stackPointerRegister = ARM::sp; - static const RegisterID linkRegister = ARM::lr; + static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; // Integer arithmetic operations: // @@ -189,14 +197,19 @@ public: } } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.lsl(dest, dest, imm.m_value); + // Clamp the shift to the range 0..31 + ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(0x1f); + ASSERT(armImm.isValid()); + m_assembler.ARM_and(dataTempRegister, shift_amount, armImm); + + m_assembler.lsl(dest, dest, dataTempRegister); } - void lshift32(RegisterID shift_amount, RegisterID dest) + void lshift32(Imm32 imm, RegisterID dest) { - m_assembler.lsl(dest, dest, shift_amount); + m_assembler.lsl(dest, dest, imm.m_value & 0x1f); } void mul32(RegisterID src, RegisterID dest) @@ -233,12 +246,17 @@ public: void rshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.asr(dest, dest, shift_amount); + // Clamp the shift to the range 0..31 + ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(0x1f); + ASSERT(armImm.isValid()); + m_assembler.ARM_and(dataTempRegister, shift_amount, armImm); + + m_assembler.asr(dest, dest, dataTempRegister); } void rshift32(Imm32 imm, RegisterID dest) { - m_assembler.asr(dest, dest, imm.m_value); + m_assembler.asr(dest, dest, imm.m_value & 0x1f); } void sub32(RegisterID src, RegisterID dest) @@ -375,6 +393,11 @@ public: load32(setupArmAddress(address), dest); } + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) + { + load32(setupArmAddress(address), dest); + } + void load32(void* address, RegisterID dest) { move(ImmPtr(address), addressTempRegister); @@ -526,12 +549,30 @@ public: { m_assembler.vcmp_F64(left, right); m_assembler.vmrs_APSR_nzcv_FPSCR(); + + if (cond == DoubleNotEqual) { + // ConditionNE jumps if NotEqual *or* unordered - force the unordered cases not to jump. + Jump unordered = makeBranch(ARMv7Assembler::ConditionVS); + Jump result = makeBranch(ARMv7Assembler::ConditionNE); + unordered.link(this); + return result; + } + if (cond == DoubleEqualOrUnordered) { + Jump unordered = makeBranch(ARMv7Assembler::ConditionVS); + Jump notEqual = makeBranch(ARMv7Assembler::ConditionNE); + unordered.link(this); + // We get here if either unordered, or equal. + Jump result = makeJump(); + notEqual.link(this); + return result; + } return makeBranch(cond); } Jump branchTruncateDoubleToInt32(FPRegisterID, RegisterID) { ASSERT_NOT_REACHED(); + return jump(); } @@ -546,13 +587,13 @@ public: void pop(RegisterID dest) { // store postindexed with writeback - m_assembler.ldr(dest, ARM::sp, sizeof(void*), false, true); + m_assembler.ldr(dest, ARMRegisters::sp, sizeof(void*), false, true); } void push(RegisterID src) { // store preindexed with writeback - m_assembler.str(src, ARM::sp, -sizeof(void*), true, true); + m_assembler.str(src, ARMRegisters::sp, -sizeof(void*), true, true); } void push(Address address) @@ -716,6 +757,13 @@ public: return branch32(cond, addressTempRegister, right); } + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + { + // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ + load32WithUnalignedHalfWords(left, addressTempRegister); + return branch32(cond, addressTempRegister, right); + } + Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) { load32(left.m_ptr, dataTempRegister); @@ -977,13 +1025,15 @@ public: protected: ARMv7Assembler::JmpSrc makeJump() { - return m_assembler.b(); + moveFixedWidthEncoding(Imm32(0), dataTempRegister); + return m_assembler.bx(dataTempRegister); } ARMv7Assembler::JmpSrc makeBranch(ARMv7Assembler::Condition cond) { - m_assembler.it(cond); - return m_assembler.b(); + m_assembler.it(cond, true, true); + moveFixedWidthEncoding(Imm32(0), dataTempRegister); + return m_assembler.bx(dataTempRegister); } ARMv7Assembler::JmpSrc makeBranch(Condition cond) { return makeBranch(armV7Condition(cond)); } ARMv7Assembler::JmpSrc makeBranch(DoubleCondition cond) { return makeBranch(armV7Condition(cond)); } @@ -1038,7 +1088,7 @@ protected: return addressTempRegister; } - DataLabel32 moveFixedWidthEncoding(Imm32 imm, RegisterID dst) + void moveFixedWidthEncoding(Imm32 imm, RegisterID dst) { uint32_t value = imm.m_value; m_assembler.movT3(dst, ARMThumbImmediate::makeUInt16(value & 0xffff)); diff --git a/assembler/MacroAssemblerCodeRef.h b/assembler/MacroAssemblerCodeRef.h index 341a7ff..cae8bf6 100644 --- a/assembler/MacroAssemblerCodeRef.h +++ b/assembler/MacroAssemblerCodeRef.h @@ -37,7 +37,7 @@ // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid // instruction address on the platform (for example, check any alignment requirements). -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM_THUMB2) // ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded // into the processor are decorated with the bottom bit set, indicating that this is // thumb code (as oposed to 32-bit traditional ARM). The first test checks for both @@ -69,7 +69,13 @@ public: template explicit FunctionPtr(FunctionType* value) +#if COMPILER(RVCT) + // RVTC compiler needs C-style cast as it fails with the following error + // Error: #694: reinterpret_cast cannot cast away const or other type qualifiers + : m_value((void*)(value)) +#else : m_value(reinterpret_cast(value)) +#endif { ASSERT_VALID_CODE_POINTER(m_value); } @@ -124,7 +130,7 @@ public: } explicit MacroAssemblerCodePtr(void* value) -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM_THUMB2) // Decorate the pointer as a thumb code pointer. : m_value(reinterpret_cast(value) + 1) #else @@ -141,7 +147,7 @@ public: } void* executableAddress() const { return m_value; } -#if PLATFORM_ARM_ARCH(7) +#if CPU(ARM_THUMB2) // To use this pointer as a data address remove the decoration. void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast(m_value) - 1; } #else diff --git a/assembler/MacroAssemblerX86.h b/assembler/MacroAssemblerX86.h index 6e96240..ca7c31a 100644 --- a/assembler/MacroAssemblerX86.h +++ b/assembler/MacroAssemblerX86.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(X86) +#if ENABLE(ASSEMBLER) && CPU(X86) #include "MacroAssemblerX86Common.h" diff --git a/assembler/MacroAssemblerX86Common.h b/assembler/MacroAssemblerX86Common.h index c9e3569..449df86 100644 --- a/assembler/MacroAssemblerX86Common.h +++ b/assembler/MacroAssemblerX86Common.h @@ -36,6 +36,10 @@ namespace JSC { class MacroAssemblerX86Common : public AbstractMacroAssembler { + static const int DoubleConditionBitInvert = 0x10; + static const int DoubleConditionBitSpecial = 0x20; + static const int DoubleConditionBits = DoubleConditionBitInvert | DoubleConditionBitSpecial; + public: enum Condition { @@ -56,15 +60,26 @@ public: }; enum DoubleCondition { - DoubleEqual = X86Assembler::ConditionE, + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. + DoubleEqual = X86Assembler::ConditionE | DoubleConditionBitSpecial, DoubleNotEqual = X86Assembler::ConditionNE, DoubleGreaterThan = X86Assembler::ConditionA, DoubleGreaterThanOrEqual = X86Assembler::ConditionAE, - DoubleLessThan = X86Assembler::ConditionB, - DoubleLessThanOrEqual = X86Assembler::ConditionBE, + DoubleLessThan = X86Assembler::ConditionA | DoubleConditionBitInvert, + DoubleLessThanOrEqual = X86Assembler::ConditionAE | DoubleConditionBitInvert, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = X86Assembler::ConditionE, + DoubleNotEqualOrUnordered = X86Assembler::ConditionNE | DoubleConditionBitSpecial, + DoubleGreaterThanOrUnordered = X86Assembler::ConditionB | DoubleConditionBitInvert, + DoubleGreaterThanOrEqualOrUnordered = X86Assembler::ConditionBE | DoubleConditionBitInvert, + DoubleLessThanOrUnordered = X86Assembler::ConditionB, + DoubleLessThanOrEqualOrUnordered = X86Assembler::ConditionBE, }; + COMPILE_ASSERT( + !((X86Assembler::ConditionE | X86Assembler::ConditionNE | X86Assembler::ConditionA | X86Assembler::ConditionAE | X86Assembler::ConditionB | X86Assembler::ConditionBE) & DoubleConditionBits), + DoubleConditionBits_should_not_interfere_with_X86Assembler_Condition_codes); - static const RegisterID stackPointerRegister = X86::esp; + static const RegisterID stackPointerRegister = X86Registers::esp; // Integer arithmetic operations: // @@ -132,20 +147,20 @@ public: { // On x86 we can only shift by ecx; if asked to shift by another register we'll // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86::ecx) { - swap(shift_amount, X86::ecx); + if (shift_amount != X86Registers::ecx) { + swap(shift_amount, X86Registers::ecx); // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" if (dest == shift_amount) - m_assembler.shll_CLr(X86::ecx); + m_assembler.shll_CLr(X86Registers::ecx); // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::ecx) + else if (dest == X86Registers::ecx) m_assembler.shll_CLr(shift_amount); // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" else m_assembler.shll_CLr(dest); - swap(shift_amount, X86::ecx); + swap(shift_amount, X86Registers::ecx); } else m_assembler.shll_CLr(dest); } @@ -214,20 +229,20 @@ public: { // On x86 we can only shift by ecx; if asked to shift by another register we'll // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86::ecx) { - swap(shift_amount, X86::ecx); + if (shift_amount != X86Registers::ecx) { + swap(shift_amount, X86Registers::ecx); // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" if (dest == shift_amount) - m_assembler.sarl_CLr(X86::ecx); + m_assembler.sarl_CLr(X86Registers::ecx); // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::ecx) + else if (dest == X86Registers::ecx) m_assembler.sarl_CLr(shift_amount); // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" else m_assembler.sarl_CLr(dest); - swap(shift_amount, X86::ecx); + swap(shift_amount, X86Registers::ecx); } else m_assembler.sarl_CLr(dest); } @@ -306,6 +321,11 @@ public: m_assembler.movl_mr(address.offset, address.base, address.index, address.scale, dest); } + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) { m_assembler.movl_mr_disp32(address.offset, address.base, dest); @@ -411,20 +431,35 @@ public: void convertInt32ToDouble(Address src, FPRegisterID dest) { + ASSERT(isSSE2Present()); m_assembler.cvtsi2sd_mr(src.offset, src.base, dest); } Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { ASSERT(isSSE2Present()); - m_assembler.ucomisd_rr(right, left); - return Jump(m_assembler.jCC(x86Condition(cond))); - } - Jump branchDouble(DoubleCondition cond, FPRegisterID left, Address right) - { - m_assembler.ucomisd_mr(right.offset, right.base, left); - return Jump(m_assembler.jCC(x86Condition(cond))); + if (cond & DoubleConditionBitInvert) + m_assembler.ucomisd_rr(left, right); + else + m_assembler.ucomisd_rr(right, left); + + if (cond == DoubleEqual) { + Jump isUnordered(m_assembler.jp()); + Jump result = Jump(m_assembler.je()); + isUnordered.link(this); + return result; + } else if (cond == DoubleNotEqualOrUnordered) { + Jump isUnordered(m_assembler.jp()); + Jump isEqual(m_assembler.je()); + isUnordered.link(this); + Jump result = jump(); + isEqual.link(this); + return result; + } + + ASSERT(!(cond & DoubleConditionBitSpecial)); + return Jump(m_assembler.jCC(static_cast(cond & ~DoubleConditionBits))); } // Truncates 'src' to an integer, and places the resulting 'dest'. @@ -438,6 +473,25 @@ public: return branch32(Equal, dest, Imm32(0x80000000)); } + // Convert 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, 0). + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + ASSERT(isSSE2Present()); + m_assembler.cvttsd2si_rr(src, dest); + + // If the result is zero, it might have been -0.0, and the double comparison won't catch this! + failureCases.append(branchTest32(Zero, dest)); + + // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. + convertInt32ToDouble(dest, fpTemp); + m_assembler.ucomisd_rr(fpTemp, src); + failureCases.append(m_assembler.jp()); + failureCases.append(m_assembler.jne()); + } + void zeroDouble(FPRegisterID srcDest) { ASSERT(isSSE2Present()); @@ -488,7 +542,7 @@ public: m_assembler.movl_i32r(imm.m_value, dest); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void move(RegisterID src, RegisterID dest) { // Note: on 64-bit this is is a full register move; perhaps it would be @@ -499,15 +553,13 @@ public: void move(ImmPtr imm, RegisterID dest) { - if (CAN_SIGN_EXTEND_U32_64(imm.asIntptr())) - m_assembler.movl_i32r(static_cast(imm.asIntptr()), dest); - else - m_assembler.movq_i64r(imm.asIntptr(), dest); + m_assembler.movq_i64r(imm.asIntptr(), dest); } void swap(RegisterID reg1, RegisterID reg2) { - m_assembler.xchgq_rr(reg1, reg2); + if (reg1 != reg2) + m_assembler.xchgq_rr(reg1, reg2); } void signExtend32ToPtr(RegisterID src, RegisterID dest) @@ -607,6 +659,11 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + { + return branch32(cond, left, right); + } + Jump branch16(Condition cond, BaseIndex left, RegisterID right) { m_assembler.cmpw_rm(right, left.offset, left.base, left.index, left.scale); @@ -882,18 +939,13 @@ protected: return static_cast(cond); } - X86Assembler::Condition x86Condition(DoubleCondition cond) - { - return static_cast(cond); - } - private: // Only MacroAssemblerX86 should be using the following method; SSE2 is always available on // x86_64, and clients & subclasses of MacroAssembler should be using 'supportsFloatingPoint()'. friend class MacroAssemblerX86; -#if PLATFORM(X86) -#if PLATFORM(MAC) +#if CPU(X86) +#if OS(MAC_OS_X) // All X86 Macs are guaranteed to support at least SSE2, static bool isSSE2Present() @@ -901,7 +953,7 @@ private: return true; } -#else // PLATFORM(MAC) +#else // OS(MAC_OS_X) enum SSE2CheckState { NotCheckedSSE2, @@ -944,8 +996,8 @@ private: static SSE2CheckState s_sse2CheckState; -#endif // PLATFORM(MAC) -#elif !defined(NDEBUG) // PLATFORM(X86) +#endif // OS(MAC_OS_X) +#elif !defined(NDEBUG) // CPU(X86) // On x86-64 we should never be checking for SSE2 in a non-debug build, // but non debug add this method to keep the asserts above happy. diff --git a/assembler/MacroAssemblerX86_64.h b/assembler/MacroAssemblerX86_64.h index e3d296c..ec93f8c 100644 --- a/assembler/MacroAssemblerX86_64.h +++ b/assembler/MacroAssemblerX86_64.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(X86_64) +#if ENABLE(ASSEMBLER) && CPU(X86_64) #include "MacroAssemblerX86Common.h" @@ -38,7 +38,7 @@ namespace JSC { class MacroAssemblerX86_64 : public MacroAssemblerX86Common { protected: - static const X86::RegisterID scratchRegister = X86::r11; + static const X86Registers::RegisterID scratchRegister = X86Registers::r11; public: static const Scale ScalePtr = TimesEight; @@ -79,12 +79,12 @@ public: void load32(void* address, RegisterID dest) { - if (dest == X86::eax) + if (dest == X86Registers::eax) m_assembler.movl_mEAX(address); else { - move(X86::eax, dest); + move(X86Registers::eax, dest); m_assembler.movl_mEAX(address); - swap(X86::eax, dest); + swap(X86Registers::eax, dest); } } @@ -102,10 +102,10 @@ public: void store32(Imm32 imm, void* address) { - move(X86::eax, scratchRegister); - move(imm, X86::eax); + move(X86Registers::eax, scratchRegister); + move(imm, X86Registers::eax); m_assembler.movl_EAXm(address); - move(scratchRegister, X86::eax); + move(scratchRegister, X86Registers::eax); } Call call() @@ -192,33 +192,6 @@ public: m_assembler.orq_ir(imm.m_value, dest); } - void rshiftPtr(RegisterID shift_amount, RegisterID dest) - { - // On x86 we can only shift by ecx; if asked to shift by another register we'll - // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86::ecx) { - swap(shift_amount, X86::ecx); - - // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" - if (dest == shift_amount) - m_assembler.sarq_CLr(X86::ecx); - // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::ecx) - m_assembler.sarq_CLr(shift_amount); - // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" - else - m_assembler.sarq_CLr(dest); - - swap(shift_amount, X86::ecx); - } else - m_assembler.sarq_CLr(dest); - } - - void rshiftPtr(Imm32 imm, RegisterID dest) - { - m_assembler.sarq_i8r(imm.m_value, dest); - } - void subPtr(RegisterID src, RegisterID dest) { m_assembler.subq_rr(src, dest); @@ -258,12 +231,12 @@ public: void loadPtr(void* address, RegisterID dest) { - if (dest == X86::eax) + if (dest == X86Registers::eax) m_assembler.movq_mEAX(address); else { - move(X86::eax, dest); + move(X86Registers::eax, dest); m_assembler.movq_mEAX(address); - swap(X86::eax, dest); + swap(X86Registers::eax, dest); } } @@ -285,24 +258,19 @@ public: void storePtr(RegisterID src, void* address) { - if (src == X86::eax) + if (src == X86Registers::eax) m_assembler.movq_EAXm(address); else { - swap(X86::eax, src); + swap(X86Registers::eax, src); m_assembler.movq_EAXm(address); - swap(X86::eax, src); + swap(X86Registers::eax, src); } } void storePtr(ImmPtr imm, ImplicitAddress address) { - intptr_t ptr = imm.asIntptr(); - if (CAN_SIGN_EXTEND_32_64(ptr)) - m_assembler.movq_i32m(static_cast(ptr), address.offset, address.base); - else { - move(imm, scratchRegister); - storePtr(scratchRegister, address); - } + move(imm, scratchRegister); + storePtr(scratchRegister, address); } DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) @@ -339,17 +307,8 @@ public: Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) { - intptr_t imm = right.asIntptr(); - if (CAN_SIGN_EXTEND_32_64(imm)) { - if (!imm) - m_assembler.testq_rr(left, left); - else - m_assembler.cmpq_ir(imm, left); - return Jump(m_assembler.jCC(x86Condition(cond))); - } else { - move(right, scratchRegister); - return branchPtr(cond, left, scratchRegister); - } + move(right, scratchRegister); + return branchPtr(cond, left, scratchRegister); } Jump branchPtr(Condition cond, RegisterID left, Address right) diff --git a/assembler/X86Assembler.h b/assembler/X86Assembler.h index b5b8808..ab3d05f 100644 --- a/assembler/X86Assembler.h +++ b/assembler/X86Assembler.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && (PLATFORM(X86) || PLATFORM(X86_64)) +#if ENABLE(ASSEMBLER) && (CPU(X86) || CPU(X86_64)) #include "AssemblerBuffer.h" #include @@ -38,12 +38,8 @@ namespace JSC { inline bool CAN_SIGN_EXTEND_8_32(int32_t value) { return value == (int32_t)(signed char)value; } -#if PLATFORM(X86_64) -inline bool CAN_SIGN_EXTEND_32_64(intptr_t value) { return value == (intptr_t)(int32_t)value; } -inline bool CAN_SIGN_EXTEND_U32_64(intptr_t value) { return value == (intptr_t)(uint32_t)value; } -#endif -namespace X86 { +namespace X86Registers { typedef enum { eax, ecx, @@ -54,7 +50,7 @@ namespace X86 { esi, edi, -#if PLATFORM(X86_64) +#if CPU(X86_64) r8, r9, r10, @@ -80,8 +76,8 @@ namespace X86 { class X86Assembler { public: - typedef X86::RegisterID RegisterID; - typedef X86::XMMRegisterID XMMRegisterID; + typedef X86Registers::RegisterID RegisterID; + typedef X86Registers::XMMRegisterID XMMRegisterID; typedef XMMRegisterID FPRegisterID; typedef enum { @@ -122,12 +118,12 @@ private: OP_XOR_GvEv = 0x33, OP_CMP_EvGv = 0x39, OP_CMP_GvEv = 0x3B, -#if PLATFORM(X86_64) +#if CPU(X86_64) PRE_REX = 0x40, #endif OP_PUSH_EAX = 0x50, OP_POP_EAX = 0x58, -#if PLATFORM(X86_64) +#if CPU(X86_64) OP_MOVSXD_GvEv = 0x63, #endif PRE_OPERAND_SIZE = 0x66, @@ -300,7 +296,7 @@ public: // Arithmetic operations: -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void adcl_im(int imm, void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -350,7 +346,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void addq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_ADD_EvGv, src, dst); @@ -427,7 +423,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void andq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_AND_EvGv, src, dst); @@ -513,7 +509,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void orq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_OR_EvGv, src, dst); @@ -579,7 +575,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void subq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_SUB_EvGv, src, dst); @@ -645,7 +641,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void xorq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_XOR_EvGv, src, dst); @@ -693,7 +689,7 @@ public: m_formatter.oneByteOp(OP_GROUP2_EvCL, GROUP2_OP_SHL, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void sarq_CLr(RegisterID dst) { m_formatter.oneByteOp64(OP_GROUP2_EvCL, GROUP2_OP_SAR, dst); @@ -793,7 +789,7 @@ public: m_formatter.immediate32(imm); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void cmpq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_CMP_EvGv, src, dst); @@ -901,7 +897,7 @@ public: m_formatter.immediate32(imm); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void testq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_TEST_EvGv, src, dst); @@ -975,7 +971,7 @@ public: m_formatter.oneByteOp(OP_XCHG_EvGv, src, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void xchgq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_XCHG_EvGv, src, dst); @@ -1005,7 +1001,7 @@ public: void movl_mEAX(void* addr) { m_formatter.oneByteOp(OP_MOV_EAXOv); -#if PLATFORM(X86_64) +#if CPU(X86_64) m_formatter.immediate64(reinterpret_cast(addr)); #else m_formatter.immediate32(reinterpret_cast(addr)); @@ -1042,14 +1038,14 @@ public: void movl_EAXm(void* addr) { m_formatter.oneByteOp(OP_MOV_OvEAX); -#if PLATFORM(X86_64) +#if CPU(X86_64) m_formatter.immediate64(reinterpret_cast(addr)); #else m_formatter.immediate32(reinterpret_cast(addr)); #endif } -#if PLATFORM(X86_64) +#if CPU(X86_64) void movq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_MOV_EvGv, src, dst); @@ -1118,7 +1114,7 @@ public: #else void movl_rm(RegisterID src, void* addr) { - if (src == X86::eax) + if (src == X86Registers::eax) movl_EAXm(addr); else m_formatter.oneByteOp(OP_MOV_EvGv, src, addr); @@ -1126,7 +1122,7 @@ public: void movl_mr(void* addr, RegisterID dst) { - if (dst == X86::eax) + if (dst == X86Registers::eax) movl_mEAX(addr); else m_formatter.oneByteOp(OP_MOV_GvEv, dst, addr); @@ -1161,7 +1157,7 @@ public: { m_formatter.oneByteOp(OP_LEA, dst, base, offset); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void leaq_mr(int offset, RegisterID base, RegisterID dst) { m_formatter.oneByteOp64(OP_LEA, dst, base, offset); @@ -1327,7 +1323,7 @@ public: m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, base, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void cvtsi2sd_mr(void* address, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1347,7 +1343,7 @@ public: m_formatter.twoByteOp(OP2_MOVD_EdVd, (RegisterID)src, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void movq_rr(XMMRegisterID src, RegisterID dst) { m_formatter.prefix(PRE_SSE_66); @@ -1373,7 +1369,7 @@ public: m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, base, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void movsd_mr(void* address, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1539,7 +1535,7 @@ public: static void repatchLoadPtrToLEA(void* where) { -#if PLATFORM(X86_64) +#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(where) + 1; @@ -1683,7 +1679,7 @@ private: memoryModRM(reg, base, index, scale, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void oneByteOp(OneByteOpcodeID opcode, int reg, void* address) { m_buffer.ensureSpace(maxInstructionSize); @@ -1726,7 +1722,7 @@ private: memoryModRM(reg, base, index, scale, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void twoByteOp(TwoByteOpcodeID opcode, int reg, void* address) { m_buffer.ensureSpace(maxInstructionSize); @@ -1736,7 +1732,7 @@ private: } #endif -#if PLATFORM(X86_64) +#if CPU(X86_64) // Quad-word-sized operands: // // Used to format 64-bit operantions, planting a REX.w prefix. @@ -1892,23 +1888,23 @@ private: // Internals; ModRm and REX formatters. - static const RegisterID noBase = X86::ebp; - static const RegisterID hasSib = X86::esp; - static const RegisterID noIndex = X86::esp; -#if PLATFORM(X86_64) - static const RegisterID noBase2 = X86::r13; - static const RegisterID hasSib2 = X86::r12; + static const RegisterID noBase = X86Registers::ebp; + static const RegisterID hasSib = X86Registers::esp; + static const RegisterID noIndex = X86Registers::esp; +#if CPU(X86_64) + static const RegisterID noBase2 = X86Registers::r13; + static const RegisterID hasSib2 = X86Registers::r12; // Registers r8 & above require a REX prefixe. inline bool regRequiresRex(int reg) { - return (reg >= X86::r8); + return (reg >= X86Registers::r8); } // Byte operand register spl & above require a REX prefix (to prevent the 'H' registers be accessed). inline bool byteRegRequiresRex(int reg) { - return (reg >= X86::esp); + return (reg >= X86Registers::esp); } // Format a REX prefix byte. @@ -1971,7 +1967,7 @@ private: void memoryModRM(int reg, RegisterID base, int offset) { // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there. -#if PLATFORM(X86_64) +#if CPU(X86_64) if ((base == hasSib) || (base == hasSib2)) { #else if (base == hasSib) { @@ -1986,7 +1982,7 @@ private: m_buffer.putIntUnchecked(offset); } } else { -#if PLATFORM(X86_64) +#if CPU(X86_64) if (!offset && (base != noBase) && (base != noBase2)) #else if (!offset && (base != noBase)) @@ -2005,7 +2001,7 @@ private: void memoryModRM_disp32(int reg, RegisterID base, int offset) { // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there. -#if PLATFORM(X86_64) +#if CPU(X86_64) if ((base == hasSib) || (base == hasSib2)) { #else if (base == hasSib) { @@ -2022,7 +2018,7 @@ private: { ASSERT(index != noIndex); -#if PLATFORM(X86_64) +#if CPU(X86_64) if (!offset && (base != noBase) && (base != noBase2)) #else if (!offset && (base != noBase)) @@ -2037,7 +2033,7 @@ private: } } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void memoryModRM(int reg, void* address) { // noBase + ModRmMemoryNoDisp means noBase + ModRmMemoryDisp32! @@ -2052,6 +2048,6 @@ private: } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(X86) +#endif // ENABLE(ASSEMBLER) && CPU(X86) #endif // X86Assembler_h diff --git a/bytecode/CodeBlock.cpp b/bytecode/CodeBlock.cpp index 1f64992..fd56ece 100644 --- a/bytecode/CodeBlock.cpp +++ b/bytecode/CodeBlock.cpp @@ -33,6 +33,8 @@ #include "JIT.h" #include "JSValue.h" #include "Interpreter.h" +#include "JSFunction.h" +#include "JSStaticScopeObject.h" #include "Debugger.h" #include "BytecodeGenerator.h" #include @@ -49,7 +51,7 @@ static UString escapeQuotes(const UString& str) UString result = str; int pos = 0; while ((pos = result.find('\"', pos)) >= 0) { - result = result.substr(0, pos) + "\"\\\"\"" + result.substr(pos + 1); + result = makeString(result.substr(0, pos), "\"\\\"\"", result.substr(pos + 1)); pos += 4; } return result; @@ -60,49 +62,50 @@ static UString valueToSourceString(ExecState* exec, JSValue val) if (!val) return "0"; - if (val.isString()) { - UString result("\""); - result += escapeQuotes(val.toString(exec)) + "\""; - return result; - } + if (val.isString()) + return makeString("\"", escapeQuotes(val.toString(exec)), "\""); return val.toString(exec); } -static CString registerName(int r) +static CString constantName(ExecState* exec, int k, JSValue value) { - if (r == missingThisObjectMarker()) - return ""; - - return (UString("r") + UString::from(r)).UTF8String(); + return makeString(valueToSourceString(exec, value), "(@k", UString::from(k - FirstConstantRegisterIndex), ")").UTF8String(); } -static CString constantName(ExecState* exec, int k, JSValue value) +static CString idName(int id0, const Identifier& ident) { - return (valueToSourceString(exec, value) + "(@k" + UString::from(k) + ")").UTF8String(); + return makeString(ident.ustring(), "(@id", UString::from(id0), ")").UTF8String(); } -static CString idName(int id0, const Identifier& ident) +CString CodeBlock::registerName(ExecState* exec, int r) const { - return (ident.ustring() + "(@id" + UString::from(id0) +")").UTF8String(); + if (r == missingThisObjectMarker()) + return ""; + + if (isConstantRegisterIndex(r)) + return constantName(exec, r, getConstant(r)); + + return makeString("r", UString::from(r)).UTF8String(); } static UString regexpToSourceString(RegExp* regExp) { - UString pattern = UString("/") + regExp->pattern() + "/"; + char postfix[5] = { '/', 0, 0, 0, 0 }; + int index = 1; if (regExp->global()) - pattern += "g"; + postfix[index++] = 'g'; if (regExp->ignoreCase()) - pattern += "i"; + postfix[index++] = 'i'; if (regExp->multiline()) - pattern += "m"; + postfix[index] = 'm'; - return pattern; + return makeString("/", regExp->pattern(), postfix); } static CString regexpName(int re, RegExp* regexp) { - return (regexpToSourceString(regexp) + "(@re" + UString::from(re) + ")").UTF8String(); + return makeString(regexpToSourceString(regexp), "(@re", UString::from(re), ")").UTF8String(); } static UString pointerToSourceString(void* p) @@ -133,49 +136,44 @@ NEVER_INLINE static const char* debugHookName(int debugHookID) return ""; } -static int locationForOffset(const Vector::const_iterator& begin, Vector::const_iterator& it, int offset) -{ - return it - begin + offset; -} - -static void printUnaryOp(int location, Vector::const_iterator& it, const char* op) +void CodeBlock::printUnaryOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); } -static void printBinaryOp(int location, Vector::const_iterator& it, const char* op) +void CodeBlock::printBinaryOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); } -static void printConditionalJump(const Vector::const_iterator& begin, Vector::const_iterator& it, int location, const char* op) +void CodeBlock::printConditionalJump(ExecState* exec, const Vector::const_iterator&, Vector::const_iterator& it, int location, const char* op) const { int r0 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(r0).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(exec, r0).c_str(), offset, location + offset); } -static void printGetByIdOp(int location, Vector::const_iterator& it, const Vector& m_identifiers, const char* op) +void CodeBlock::printGetByIdOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); it += 4; } -static void printPutByIdOp(int location, Vector::const_iterator& it, const Vector& m_identifiers, const char* op) +void CodeBlock::printPutByIdOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); it += 4; } @@ -230,44 +228,44 @@ static void printGlobalResolveInfo(const GlobalResolveInfo& resolveInfo, unsigne static void printStructureStubInfo(const StructureStubInfo& stubInfo, unsigned instructionOffset) { - switch (stubInfo.opcodeID) { - case op_get_by_id_self: + switch (stubInfo.accessType) { + case access_get_by_id_self: printf(" [%4d] %s: %s\n", instructionOffset, "get_by_id_self", pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().c_str()); return; - case op_get_by_id_proto: + case access_get_by_id_proto: printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().c_str()); return; - case op_get_by_id_chain: + case access_get_by_id_chain: printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().c_str()); return; - case op_get_by_id_self_list: + case access_get_by_id_self_list: printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_self_list", pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().c_str(), stubInfo.u.getByIdSelfList.listSize); return; - case op_get_by_id_proto_list: + case access_get_by_id_proto_list: printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_proto_list", pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().c_str(), stubInfo.u.getByIdProtoList.listSize); return; - case op_put_by_id_transition: + case access_put_by_id_transition: printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().c_str()); return; - case op_put_by_id_replace: + case access_put_by_id_replace: printf(" [%4d] %s: %s\n", instructionOffset, "put_by_id_replace", pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().c_str()); return; - case op_get_by_id: + case access_get_by_id: printf(" [%4d] %s\n", instructionOffset, "get_by_id"); return; - case op_put_by_id: + case access_put_by_id: printf(" [%4d] %s\n", instructionOffset, "put_by_id"); return; - case op_get_by_id_generic: + case access_get_by_id_generic: printf(" [%4d] %s\n", instructionOffset, "op_get_by_id_generic"); return; - case op_put_by_id_generic: + case access_put_by_id_generic: printf(" [%4d] %s\n", instructionOffset, "op_put_by_id_generic"); return; - case op_get_array_length: + case access_get_array_length: printf(" [%4d] %s\n", instructionOffset, "op_get_array_length"); return; - case op_get_string_length: + case access_get_string_length: printf(" [%4d] %s\n", instructionOffset, "op_get_string_length"); return; default: @@ -360,7 +358,7 @@ void CodeBlock::dump(ExecState* exec) const unsigned registerIndex = m_numVars; size_t i = 0; do { - printf(" r%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).ascii()); + printf(" k%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).ascii()); ++i; ++registerIndex; } while (i < m_constantRegisters.size()); @@ -484,7 +482,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_enter_with_activation: { int r0 = (++it)->u.operand; - printf("[%4d] enter_with_activation %s\n", location, registerName(r0).c_str()); + printf("[%4d] enter_with_activation %s\n", location, registerName(exec, r0).c_str()); break; } case op_create_arguments: { @@ -497,148 +495,148 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_convert_this: { int r0 = (++it)->u.operand; - printf("[%4d] convert_this %s\n", location, registerName(r0).c_str()); + printf("[%4d] convert_this %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_object: { int r0 = (++it)->u.operand; - printf("[%4d] new_object\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] new_object\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_array: { int dst = (++it)->u.operand; int argv = (++it)->u.operand; int argc = (++it)->u.operand; - printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(dst).c_str(), registerName(argv).c_str(), argc); + printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, argv).c_str(), argc); break; } case op_new_regexp: { int r0 = (++it)->u.operand; int re0 = (++it)->u.operand; - printf("[%4d] new_regexp\t %s, %s\n", location, registerName(r0).c_str(), regexpName(re0, regexp(re0)).c_str()); + printf("[%4d] new_regexp\t %s, %s\n", location, registerName(exec, r0).c_str(), regexpName(re0, regexp(re0)).c_str()); break; } case op_mov: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] mov\t\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] mov\t\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_not: { - printUnaryOp(location, it, "not"); + printUnaryOp(exec, location, it, "not"); break; } case op_eq: { - printBinaryOp(location, it, "eq"); + printBinaryOp(exec, location, it, "eq"); break; } case op_eq_null: { - printUnaryOp(location, it, "eq_null"); + printUnaryOp(exec, location, it, "eq_null"); break; } case op_neq: { - printBinaryOp(location, it, "neq"); + printBinaryOp(exec, location, it, "neq"); break; } case op_neq_null: { - printUnaryOp(location, it, "neq_null"); + printUnaryOp(exec, location, it, "neq_null"); break; } case op_stricteq: { - printBinaryOp(location, it, "stricteq"); + printBinaryOp(exec, location, it, "stricteq"); break; } case op_nstricteq: { - printBinaryOp(location, it, "nstricteq"); + printBinaryOp(exec, location, it, "nstricteq"); break; } case op_less: { - printBinaryOp(location, it, "less"); + printBinaryOp(exec, location, it, "less"); break; } case op_lesseq: { - printBinaryOp(location, it, "lesseq"); + printBinaryOp(exec, location, it, "lesseq"); break; } case op_pre_inc: { int r0 = (++it)->u.operand; - printf("[%4d] pre_inc\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] pre_inc\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_pre_dec: { int r0 = (++it)->u.operand; - printf("[%4d] pre_dec\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] pre_dec\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_post_inc: { - printUnaryOp(location, it, "post_inc"); + printUnaryOp(exec, location, it, "post_inc"); break; } case op_post_dec: { - printUnaryOp(location, it, "post_dec"); + printUnaryOp(exec, location, it, "post_dec"); break; } case op_to_jsnumber: { - printUnaryOp(location, it, "to_jsnumber"); + printUnaryOp(exec, location, it, "to_jsnumber"); break; } case op_negate: { - printUnaryOp(location, it, "negate"); + printUnaryOp(exec, location, it, "negate"); break; } case op_add: { - printBinaryOp(location, it, "add"); + printBinaryOp(exec, location, it, "add"); ++it; break; } case op_mul: { - printBinaryOp(location, it, "mul"); + printBinaryOp(exec, location, it, "mul"); ++it; break; } case op_div: { - printBinaryOp(location, it, "div"); + printBinaryOp(exec, location, it, "div"); ++it; break; } case op_mod: { - printBinaryOp(location, it, "mod"); + printBinaryOp(exec, location, it, "mod"); break; } case op_sub: { - printBinaryOp(location, it, "sub"); + printBinaryOp(exec, location, it, "sub"); ++it; break; } case op_lshift: { - printBinaryOp(location, it, "lshift"); + printBinaryOp(exec, location, it, "lshift"); break; } case op_rshift: { - printBinaryOp(location, it, "rshift"); + printBinaryOp(exec, location, it, "rshift"); break; } case op_urshift: { - printBinaryOp(location, it, "urshift"); + printBinaryOp(exec, location, it, "urshift"); break; } case op_bitand: { - printBinaryOp(location, it, "bitand"); + printBinaryOp(exec, location, it, "bitand"); ++it; break; } case op_bitxor: { - printBinaryOp(location, it, "bitxor"); + printBinaryOp(exec, location, it, "bitxor"); ++it; break; } case op_bitor: { - printBinaryOp(location, it, "bitor"); + printBinaryOp(exec, location, it, "bitor"); ++it; break; } case op_bitnot: { - printUnaryOp(location, it, "bitnot"); + printUnaryOp(exec, location, it, "bitnot"); break; } case op_instanceof: { @@ -646,59 +644,59 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; int r3 = (++it)->u.operand; - printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str()); + printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str()); break; } case op_typeof: { - printUnaryOp(location, it, "typeof"); + printUnaryOp(exec, location, it, "typeof"); break; } case op_is_undefined: { - printUnaryOp(location, it, "is_undefined"); + printUnaryOp(exec, location, it, "is_undefined"); break; } case op_is_boolean: { - printUnaryOp(location, it, "is_boolean"); + printUnaryOp(exec, location, it, "is_boolean"); break; } case op_is_number: { - printUnaryOp(location, it, "is_number"); + printUnaryOp(exec, location, it, "is_number"); break; } case op_is_string: { - printUnaryOp(location, it, "is_string"); + printUnaryOp(exec, location, it, "is_string"); break; } case op_is_object: { - printUnaryOp(location, it, "is_object"); + printUnaryOp(exec, location, it, "is_object"); break; } case op_is_function: { - printUnaryOp(location, it, "is_function"); + printUnaryOp(exec, location, it, "is_function"); break; } case op_in: { - printBinaryOp(location, it, "in"); + printBinaryOp(exec, location, it, "in"); break; } case op_resolve: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve\t\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve\t\t %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_resolve_skip: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int skipLevels = (++it)->u.operand; - printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels); + printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels); break; } case op_resolve_global: { int r0 = (++it)->u.operand; JSValue scope = JSValue((++it)->u.jsCell); int id0 = (++it)->u.operand; - printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str()); it += 2; break; } @@ -706,244 +704,265 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r0 = (++it)->u.operand; int index = (++it)->u.operand; int skipLevels = (++it)->u.operand; - printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(r0).c_str(), index, skipLevels); + printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(exec, r0).c_str(), index, skipLevels); break; } case op_put_scoped_var: { int index = (++it)->u.operand; int skipLevels = (++it)->u.operand; int r0 = (++it)->u.operand; - printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(r0).c_str()); + printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(exec, r0).c_str()); break; } case op_get_global_var: { int r0 = (++it)->u.operand; JSValue scope = JSValue((++it)->u.jsCell); int index = (++it)->u.operand; - printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), index); + printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), index); break; } case op_put_global_var: { JSValue scope = JSValue((++it)->u.jsCell); int index = (++it)->u.operand; int r0 = (++it)->u.operand; - printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(r0).c_str()); + printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0).c_str()); break; } case op_resolve_base: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve_base\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_base\t %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_resolve_with_base: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_get_by_id: { - printGetByIdOp(location, it, m_identifiers, "get_by_id"); + printGetByIdOp(exec, location, it, "get_by_id"); break; } case op_get_by_id_self: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_self"); + printGetByIdOp(exec, location, it, "get_by_id_self"); break; } case op_get_by_id_self_list: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_self_list"); + printGetByIdOp(exec, location, it, "get_by_id_self_list"); break; } case op_get_by_id_proto: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_proto"); + printGetByIdOp(exec, location, it, "get_by_id_proto"); break; } case op_get_by_id_proto_list: { - printGetByIdOp(location, it, m_identifiers, "op_get_by_id_proto_list"); + printGetByIdOp(exec, location, it, "op_get_by_id_proto_list"); break; } case op_get_by_id_chain: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_chain"); + printGetByIdOp(exec, location, it, "get_by_id_chain"); break; } case op_get_by_id_generic: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_generic"); + printGetByIdOp(exec, location, it, "get_by_id_generic"); break; } case op_get_array_length: { - printGetByIdOp(location, it, m_identifiers, "get_array_length"); + printGetByIdOp(exec, location, it, "get_array_length"); break; } case op_get_string_length: { - printGetByIdOp(location, it, m_identifiers, "get_string_length"); + printGetByIdOp(exec, location, it, "get_string_length"); break; } case op_put_by_id: { - printPutByIdOp(location, it, m_identifiers, "put_by_id"); + printPutByIdOp(exec, location, it, "put_by_id"); break; } case op_put_by_id_replace: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_replace"); + printPutByIdOp(exec, location, it, "put_by_id_replace"); break; } case op_put_by_id_transition: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_transition"); + printPutByIdOp(exec, location, it, "put_by_id_transition"); break; } case op_put_by_id_generic: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_generic"); + printPutByIdOp(exec, location, it, "put_by_id_generic"); break; } case op_put_getter: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_put_setter: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_method_check: { - printf("[%4d] op_method_check\n", location); + printf("[%4d] method_check\n", location); break; } case op_del_by_id: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_get_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); + break; + } + case op_get_by_pname: { + int r0 = (++it)->u.operand; + int r1 = (++it)->u.operand; + int r2 = (++it)->u.operand; + int r3 = (++it)->u.operand; + int r4 = (++it)->u.operand; + int r5 = (++it)->u.operand; + printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), registerName(exec, r4).c_str(), registerName(exec, r5).c_str()); break; } case op_put_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); break; } case op_del_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); break; } case op_put_by_index: { int r0 = (++it)->u.operand; unsigned n0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(r0).c_str(), n0, registerName(r1).c_str()); + printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(exec, r0).c_str(), n0, registerName(exec, r1).c_str()); break; } case op_jmp: { int offset = (++it)->u.operand; - printf("[%4d] jmp\t\t %d(->%d)\n", location, offset, locationForOffset(begin, it, offset)); + printf("[%4d] jmp\t\t %d(->%d)\n", location, offset, location + offset); break; } case op_loop: { int offset = (++it)->u.operand; - printf("[%4d] loop\t\t %d(->%d)\n", location, offset, locationForOffset(begin, it, offset)); + printf("[%4d] loop\t\t %d(->%d)\n", location, offset, location + offset); break; } case op_jtrue: { - printConditionalJump(begin, it, location, "jtrue"); + printConditionalJump(exec, begin, it, location, "jtrue"); break; } case op_loop_if_true: { - printConditionalJump(begin, it, location, "loop_if_true"); + printConditionalJump(exec, begin, it, location, "loop_if_true"); + break; + } + case op_loop_if_false: { + printConditionalJump(exec, begin, it, location, "loop_if_false"); break; } case op_jfalse: { - printConditionalJump(begin, it, location, "jfalse"); + printConditionalJump(exec, begin, it, location, "jfalse"); break; } case op_jeq_null: { - printConditionalJump(begin, it, location, "jeq_null"); + printConditionalJump(exec, begin, it, location, "jeq_null"); break; } case op_jneq_null: { - printConditionalJump(begin, it, location, "jneq_null"); + printConditionalJump(exec, begin, it, location, "jneq_null"); break; } case op_jneq_ptr: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_jnless: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_jnlesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_loop_if_less: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); + break; + } + case op_jless: { + int r0 = (++it)->u.operand; + int r1 = (++it)->u.operand; + int offset = (++it)->u.operand; + printf("[%4d] jless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_loop_if_lesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_switch_imm: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_switch_char: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_switch_string: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_new_func: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; - printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(r0).c_str(), f0); + printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(exec, r0).c_str(), f0); break; } case op_new_func_exp: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; - printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(r0).c_str(), f0); + printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(exec, r0).c_str(), f0); break; } case op_call: { @@ -951,7 +970,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset); + printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset); break; } case op_call_eval: { @@ -959,7 +978,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset); + printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset); break; } case op_call_varargs: { @@ -967,16 +986,16 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), registerName(argCount).c_str(), registerOffset); + printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), registerName(exec, argCount).c_str(), registerOffset); break; } case op_load_varargs: { - printUnaryOp(location, it, "load_varargs"); + printUnaryOp(exec, location, it, "load_varargs"); break; } case op_tear_off_activation: { int r0 = (++it)->u.operand; - printf("[%4d] tear_off_activation\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] tear_off_activation\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_tear_off_arguments: { @@ -985,7 +1004,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_ret: { int r0 = (++it)->u.operand; - printf("[%4d] ret\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] ret\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_construct: { @@ -995,44 +1014,49 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int registerOffset = (++it)->u.operand; int proto = (++it)->u.operand; int thisRegister = (++it)->u.operand; - printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset, registerName(proto).c_str(), registerName(thisRegister).c_str()); + printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset, registerName(exec, proto).c_str(), registerName(exec, thisRegister).c_str()); break; } case op_construct_verify: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] construct_verify\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_strcat: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int count = (++it)->u.operand; - printf("[%4d] op_strcat\t %s, %s, %d\n", location, registerName(r0).c_str(), registerName(r1).c_str(), count); + printf("[%4d] strcat\t\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), count); break; } case op_to_primitive: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] op_to_primitive\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] to_primitive\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_get_pnames: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - printf("[%4d] get_pnames\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + int r0 = it[1].u.operand; + int r1 = it[2].u.operand; + int r2 = it[3].u.operand; + int r3 = it[4].u.operand; + int offset = it[5].u.operand; + printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), offset, location + offset); + it += OPCODE_LENGTH(op_get_pnames) - 1; break; } case op_next_pname: { - int dest = (++it)->u.operand; - int iter = (++it)->u.operand; - int offset = (++it)->u.operand; - printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(dest).c_str(), registerName(iter).c_str(), offset, locationForOffset(begin, it, offset)); + int dest = it[1].u.operand; + int iter = it[4].u.operand; + int offset = it[5].u.operand; + printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(exec, dest).c_str(), registerName(exec, iter).c_str(), offset, location + offset); + it += OPCODE_LENGTH(op_next_pname) - 1; break; } case op_push_scope: { int r0 = (++it)->u.operand; - printf("[%4d] push_scope\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] push_scope\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_pop_scope: { @@ -1043,41 +1067,41 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_jmp_scopes: { int scopeDelta = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jmp_scopes\t^%d, %d(->%d)\n", location, scopeDelta, offset, locationForOffset(begin, it, offset)); + printf("[%4d] jmp_scopes\t^%d, %d(->%d)\n", location, scopeDelta, offset, location + offset); break; } case op_catch: { int r0 = (++it)->u.operand; - printf("[%4d] catch\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] catch\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_throw: { int r0 = (++it)->u.operand; - printf("[%4d] throw\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] throw\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_error: { int r0 = (++it)->u.operand; int errorType = (++it)->u.operand; int k0 = (++it)->u.operand; - printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); + printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(exec, r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); break; } case op_jsr: { int retAddrDst = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(retAddrDst).c_str(), offset, locationForOffset(begin, it, offset)); + printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(exec, retAddrDst).c_str(), offset, location + offset); break; } case op_sret: { int retAddrSrc = (++it)->u.operand; - printf("[%4d] sret\t\t %s\n", location, registerName(retAddrSrc).c_str()); + printf("[%4d] sret\t\t %s\n", location, registerName(exec, retAddrSrc).c_str()); break; } case op_debug: { @@ -1089,17 +1113,17 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_profile_will_call: { int function = (++it)->u.operand; - printf("[%4d] profile_will_call %s\n", location, registerName(function).c_str()); + printf("[%4d] profile_will_call %s\n", location, registerName(exec, function).c_str()); break; } case op_profile_did_call: { int function = (++it)->u.operand; - printf("[%4d] profile_did_call\t %s\n", location, registerName(function).c_str()); + printf("[%4d] profile_did_call\t %s\n", location, registerName(exec, function).c_str()); break; } case op_end: { int r0 = (++it)->u.operand; - printf("[%4d] end\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] end\t\t %s\n", location, registerName(exec, r0).c_str()); break; } } @@ -1246,43 +1270,22 @@ void CodeBlock::dumpStatistics() #endif } -CodeBlock::CodeBlock(ScopeNode* ownerNode) +CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset, SymbolTable* symTab) : m_numCalleeRegisters(0) , m_numVars(0) , m_numParameters(0) - , m_ownerNode(ownerNode) + , m_ownerExecutable(ownerExecutable) , m_globalData(0) #ifndef NDEBUG , m_instructionCount(0) #endif - , m_needsFullScopeChain(false) - , m_usesEval(false) - , m_isNumericCompareFunction(false) - , m_codeType(NativeCode) - , m_source(0) - , m_sourceOffset(0) - , m_exceptionInfo(0) -{ -#if DUMP_CODE_BLOCK_STATISTICS - liveCodeBlockSet.add(this); -#endif -} - -CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset) - : m_numCalleeRegisters(0) - , m_numVars(0) - , m_numParameters(0) - , m_ownerNode(ownerNode) - , m_globalData(0) -#ifndef NDEBUG - , m_instructionCount(0) -#endif - , m_needsFullScopeChain(ownerNode->needsActivation()) - , m_usesEval(ownerNode->usesEval()) + , m_needsFullScopeChain(ownerExecutable->needsActivation()) + , m_usesEval(ownerExecutable->usesEval()) , m_isNumericCompareFunction(false) , m_codeType(codeType) , m_source(sourceProvider) , m_sourceOffset(sourceOffset) + , m_symbolTable(symTab) , m_exceptionInfo(new ExceptionInfo) { ASSERT(m_source); @@ -1319,7 +1322,7 @@ CodeBlock::~CodeBlock() if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { structure->deref(); // Both members must be filled at the same time - ASSERT(m_methodCallLinkInfos[i].cachedPrototypeStructure); + ASSERT(!!m_methodCallLinkInfos[i].cachedPrototypeStructure); m_methodCallLinkInfos[i].cachedPrototypeStructure->deref(); } } @@ -1350,7 +1353,6 @@ void CodeBlock::unlinkCallers() void CodeBlock::derefStructures(Instruction* vPC) const { - ASSERT(m_codeType != NativeCode); Interpreter* interpreter = m_globalData->interpreter; if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { @@ -1396,7 +1398,6 @@ void CodeBlock::derefStructures(Instruction* vPC) const void CodeBlock::refStructures(Instruction* vPC) const { - ASSERT(m_codeType != NativeCode); Interpreter* interpreter = m_globalData->interpreter; if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { @@ -1428,26 +1429,18 @@ void CodeBlock::refStructures(Instruction* vPC) const ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic)); } -void CodeBlock::mark() +void CodeBlock::markAggregate(MarkStack& markStack) { for (size_t i = 0; i < m_constantRegisters.size(); ++i) - if (!m_constantRegisters[i].marked()) - m_constantRegisters[i].mark(); - - for (size_t i = 0; i < m_functionExpressions.size(); ++i) - m_functionExpressions[i]->body()->mark(); - - if (m_rareData) { - for (size_t i = 0; i < m_rareData->m_functions.size(); ++i) - m_rareData->m_functions[i]->body()->mark(); - - m_rareData->m_evalCodeCache.mark(); - } + markStack.append(m_constantRegisters[i].jsValue()); + for (size_t i = 0; i < m_functionExprs.size(); ++i) + m_functionExprs[i]->markAggregate(markStack); + for (size_t i = 0; i < m_functionDecls.size(); ++i) + m_functionDecls[i]->markAggregate(markStack); } void CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) { - ASSERT(m_codeType != NativeCode); if (m_exceptionInfo) return; @@ -1464,61 +1457,11 @@ void CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) scopeChain = scopeChain->next; } - switch (m_codeType) { - case FunctionCode: { - FunctionBodyNode* ownerFunctionBodyNode = static_cast(m_ownerNode); - RefPtr newFunctionBody = m_globalData->parser->reparse(m_globalData, ownerFunctionBodyNode); - ASSERT(newFunctionBody); - newFunctionBody->finishParsing(ownerFunctionBodyNode->copyParameters(), ownerFunctionBodyNode->parameterCount()); - - m_globalData->scopeNodeBeingReparsed = newFunctionBody.get(); - - CodeBlock& newCodeBlock = newFunctionBody->bytecodeForExceptionInfoReparse(scopeChain, this); - ASSERT(newCodeBlock.m_exceptionInfo); - ASSERT(newCodeBlock.m_instructionCount == m_instructionCount); - -#if ENABLE(JIT) - JIT::compile(m_globalData, &newCodeBlock); - ASSERT(newFunctionBody->generatedJITCode().size() == ownerNode()->generatedJITCode().size()); -#endif - - m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release()); - - m_globalData->scopeNodeBeingReparsed = 0; - - break; - } - case EvalCode: { - EvalNode* ownerEvalNode = static_cast(m_ownerNode); - RefPtr newEvalBody = m_globalData->parser->reparse(m_globalData, ownerEvalNode); - - m_globalData->scopeNodeBeingReparsed = newEvalBody.get(); - - EvalCodeBlock& newCodeBlock = newEvalBody->bytecodeForExceptionInfoReparse(scopeChain, this); - ASSERT(newCodeBlock.m_exceptionInfo); - ASSERT(newCodeBlock.m_instructionCount == m_instructionCount); - -#if ENABLE(JIT) - JIT::compile(m_globalData, &newCodeBlock); - ASSERT(newEvalBody->generatedJITCode().size() == ownerNode()->generatedJITCode().size()); -#endif - - m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release()); - - m_globalData->scopeNodeBeingReparsed = 0; - - break; - } - default: - // CodeBlocks for Global code blocks are transient and therefore to not gain from - // from throwing out there exception information. - ASSERT_NOT_REACHED(); - } + m_exceptionInfo.set(m_ownerExecutable->reparseExceptionInfo(m_globalData, scopeChain, this)); } HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); if (!m_rareData) @@ -1537,14 +1480,13 @@ HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) int CodeBlock::lineNumberForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); ASSERT(m_exceptionInfo); if (!m_exceptionInfo->m_lineInfo.size()) - return m_ownerNode->source().firstLine(); // Empty function + return m_ownerExecutable->source().firstLine(); // Empty function int low = 0; int high = m_exceptionInfo->m_lineInfo.size(); @@ -1557,13 +1499,12 @@ int CodeBlock::lineNumberForBytecodeOffset(CallFrame* callFrame, unsigned byteco } if (!low) - return m_ownerNode->source().firstLine(); + return m_ownerExecutable->source().firstLine(); return m_exceptionInfo->m_lineInfo[low - 1].lineNumber; } int CodeBlock::expressionRangeForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); @@ -1603,7 +1544,6 @@ int CodeBlock::expressionRangeForBytecodeOffset(CallFrame* callFrame, unsigned b bool CodeBlock::getByIdExceptionInfoForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset, OpcodeID& opcodeID) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); @@ -1632,7 +1572,6 @@ bool CodeBlock::getByIdExceptionInfoForBytecodeOffset(CallFrame* callFrame, unsi #if ENABLE(JIT) bool CodeBlock::functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); if (!m_rareData || !m_rareData->m_functionRegisterInfos.size()) @@ -1659,7 +1598,6 @@ bool CodeBlock::functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& #if !ENABLE(JIT) bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); if (m_globalResolveInstructions.isEmpty()) return false; @@ -1680,7 +1618,6 @@ bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOff #else bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); if (m_globalResolveInfos.isEmpty()) return false; @@ -1700,18 +1637,6 @@ bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset) } #endif -#if ENABLE(JIT) -void CodeBlock::setJITCode(JITCode jitCode) -{ - ASSERT(m_codeType != NativeCode); - ownerNode()->setJITCode(jitCode); -#if !ENABLE(OPCODE_SAMPLING) - if (!BytecodeGenerator::dumpsGeneratedCode()) - m_instructions.clear(); -#endif -} -#endif - void CodeBlock::shrinkToFit() { m_instructions.shrinkToFit(); @@ -1727,7 +1652,8 @@ void CodeBlock::shrinkToFit() #endif m_identifiers.shrinkToFit(); - m_functionExpressions.shrinkToFit(); + m_functionDecls.shrinkToFit(); + m_functionExprs.shrinkToFit(); m_constantRegisters.shrinkToFit(); if (m_exceptionInfo) { @@ -1738,7 +1664,6 @@ void CodeBlock::shrinkToFit() if (m_rareData) { m_rareData->m_exceptionHandlers.shrinkToFit(); - m_rareData->m_functions.shrinkToFit(); m_rareData->m_regexps.shrinkToFit(); m_rareData->m_immediateSwitchJumpTables.shrinkToFit(); m_rareData->m_characterSwitchJumpTables.shrinkToFit(); diff --git a/bytecode/CodeBlock.h b/bytecode/CodeBlock.h index eaf5d1d..eb874cc 100644 --- a/bytecode/CodeBlock.h +++ b/bytecode/CodeBlock.h @@ -36,6 +36,7 @@ #include "JSGlobalObject.h" #include "JumpTable.h" #include "Nodes.h" +#include "PtrAndFlags.h" #include "RegExp.h" #include "UString.h" #include @@ -54,9 +55,13 @@ static const int FirstConstantRegisterIndex = 0x40000000; namespace JSC { + enum HasSeenShouldRepatch { + hasSeenShouldRepatch + }; + class ExecState; - enum CodeType { GlobalCode, EvalCode, FunctionCode, NativeCode }; + enum CodeType { GlobalCode, EvalCode, FunctionCode }; static ALWAYS_INLINE int missingThisObjectMarker() { return std::numeric_limits::max(); } @@ -105,25 +110,44 @@ namespace JSC { CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; - CodeBlock* ownerCodeBlock; + PtrAndFlags ownerCodeBlock; CodeBlock* callee; unsigned position; void setUnlinked() { callee = 0; } bool isLinked() { return callee; } + + bool seenOnce() + { + return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch); + } + + void setSeen() + { + ownerCodeBlock.setFlag(hasSeenShouldRepatch); + } }; struct MethodCallLinkInfo { MethodCallLinkInfo() : cachedStructure(0) - , cachedPrototypeStructure(0) { } + bool seenOnce() + { + return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); + } + + void setSeen() + { + cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); + } + CodeLocationCall callReturnLocation; CodeLocationDataLabelPtr structureLabel; Structure* cachedStructure; - Structure* cachedPrototypeStructure; + PtrAndFlags cachedPrototypeStructure; }; struct FunctionRegisterInfo { @@ -224,14 +248,24 @@ namespace JSC { } #endif - class CodeBlock : public WTF::FastAllocBase { + struct ExceptionInfo : FastAllocBase { + Vector m_expressionInfo; + Vector m_lineInfo; + Vector m_getByIdExceptionInfo; + +#if ENABLE(JIT) + Vector m_callReturnIndexVector; +#endif + }; + + class CodeBlock : public FastAllocBase { friend class JIT; + protected: + CodeBlock(ScriptExecutable* ownerExecutable, CodeType, PassRefPtr, unsigned sourceOffset, SymbolTable* symbolTable); public: - CodeBlock(ScopeNode* ownerNode); - CodeBlock(ScopeNode* ownerNode, CodeType, PassRefPtr, unsigned sourceOffset); - ~CodeBlock(); + virtual ~CodeBlock(); - void mark(); + void markAggregate(MarkStack&); void refStructures(Instruction* vPC) const; void derefStructures(Instruction* vPC) const; #if ENABLE(JIT_OPTIMIZE_CALL) @@ -305,7 +339,7 @@ namespace JSC { unsigned getBytecodeIndex(CallFrame* callFrame, ReturnAddressPtr returnAddress) { reparseForExceptionInfoIfNecessary(callFrame); - return binaryChop(m_exceptionInfo->m_callReturnIndexVector.begin(), m_exceptionInfo->m_callReturnIndexVector.size(), ownerNode()->generatedJITCode().offsetOf(returnAddress.value()))->bytecodeIndex; + return binaryChop(callReturnIndexVector().begin(), callReturnIndexVector().size(), ownerExecutable()->generatedJITCode().offsetOf(returnAddress.value()))->bytecodeIndex; } bool functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex); @@ -315,17 +349,19 @@ namespace JSC { bool isNumericCompareFunction() { return m_isNumericCompareFunction; } Vector& instructions() { return m_instructions; } + void discardBytecode() { m_instructions.clear(); } + #ifndef NDEBUG + unsigned instructionCount() { return m_instructionCount; } void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; } #endif #if ENABLE(JIT) - JITCode& getJITCode() { return ownerNode()->generatedJITCode(); } - void setJITCode(JITCode); - ExecutablePool* executablePool() { return ownerNode()->getExecutablePool(); } + JITCode& getJITCode() { return ownerExecutable()->generatedJITCode(); } + ExecutablePool* executablePool() { return ownerExecutable()->getExecutablePool(); } #endif - ScopeNode* ownerNode() const { return m_ownerNode; } + ScriptExecutable* ownerExecutable() const { return m_ownerExecutable; } void setGlobalData(JSGlobalData* globalData) { m_globalData = globalData; } @@ -341,8 +377,8 @@ namespace JSC { CodeType codeType() const { return m_codeType; } - SourceProvider* source() const { ASSERT(m_codeType != NativeCode); return m_source.get(); } - unsigned sourceOffset() const { ASSERT(m_codeType != NativeCode); return m_sourceOffset; } + SourceProvider* source() const { return m_source.get(); } + unsigned sourceOffset() const { return m_sourceOffset; } size_t numberOfJumpTargets() const { return m_jumpTargets.size(); } void addJumpTarget(unsigned jumpTarget) { m_jumpTargets.append(jumpTarget); } @@ -380,6 +416,7 @@ namespace JSC { bool hasExceptionInfo() const { return m_exceptionInfo; } void clearExceptionInfo() { m_exceptionInfo.clear(); } + ExceptionInfo* extractExceptionInfo() { ASSERT(m_exceptionInfo); return m_exceptionInfo.release(); } void addExpressionInfo(const ExpressionRangeInfo& expressionInfo) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_expressionInfo.append(expressionInfo); } void addGetByIdExceptionInfo(const GetByIdExceptionInfo& info) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_getByIdExceptionInfo.append(info); } @@ -401,16 +438,14 @@ namespace JSC { size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); } Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } - ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } + ALWAYS_INLINE bool isConstantRegisterIndex(int index) const { return index >= FirstConstantRegisterIndex; } ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } - unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; } - FuncExprNode* functionExpression(int index) const { return m_functionExpressions[index].get(); } - - unsigned addFunction(FuncDeclNode* n) { createRareDataIfNecessary(); unsigned size = m_rareData->m_functions.size(); m_rareData->m_functions.append(n); return size; } - FuncDeclNode* function(int index) const { ASSERT(m_rareData); return m_rareData->m_functions[index].get(); } - - bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); } + unsigned addFunctionDecl(NonNullPassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } + FunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } + int numberOfFunctionDecls() { return m_functionDecls.size(); } + unsigned addFunctionExpr(NonNullPassRefPtr n) { unsigned size = m_functionExprs.size(); m_functionExprs.append(n); return size; } + FunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); } @@ -431,9 +466,10 @@ namespace JSC { StringJumpTable& stringSwitchJumpTable(int tableIndex) { ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; } - SymbolTable& symbolTable() { return m_symbolTable; } + SymbolTable* symbolTable() { return m_symbolTable; } + SharedSymbolTable* sharedSymbolTable() { ASSERT(m_codeType == FunctionCode); return static_cast(m_symbolTable); } - EvalCodeCache& evalCodeCache() { ASSERT(m_codeType != NativeCode); createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } + EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } void shrinkToFit(); @@ -446,18 +482,24 @@ namespace JSC { private: #if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) void dump(ExecState*, const Vector::const_iterator& begin, Vector::const_iterator&) const; + + CString registerName(ExecState*, int r) const; + void printUnaryOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printBinaryOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printConditionalJump(ExecState*, const Vector::const_iterator&, Vector::const_iterator&, int location, const char* op) const; + void printGetByIdOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printPutByIdOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; #endif void reparseForExceptionInfoIfNecessary(CallFrame*); void createRareDataIfNecessary() { - ASSERT(m_codeType != NativeCode); if (!m_rareData) m_rareData.set(new RareData); } - ScopeNode* m_ownerNode; + ScriptExecutable* m_ownerExecutable; JSGlobalData* m_globalData; Vector m_instructions; @@ -493,26 +535,17 @@ namespace JSC { // Constant Pool Vector m_identifiers; Vector m_constantRegisters; - Vector > m_functionExpressions; - - SymbolTable m_symbolTable; + Vector > m_functionDecls; + Vector > m_functionExprs; - struct ExceptionInfo { - Vector m_expressionInfo; - Vector m_lineInfo; - Vector m_getByIdExceptionInfo; + SymbolTable* m_symbolTable; -#if ENABLE(JIT) - Vector m_callReturnIndexVector; -#endif - }; OwnPtr m_exceptionInfo; - struct RareData { + struct RareData : FastAllocBase { Vector m_exceptionHandlers; // Rare Constants - Vector > m_functions; Vector > m_regexps; // Jump Tables @@ -532,16 +565,16 @@ namespace JSC { // Program code is not marked by any function, so we make the global object // responsible for marking it. - class ProgramCodeBlock : public CodeBlock { + class GlobalCodeBlock : public CodeBlock { public: - ProgramCodeBlock(ScopeNode* ownerNode, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr sourceProvider) - : CodeBlock(ownerNode, codeType, sourceProvider, 0) + GlobalCodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset, JSGlobalObject* globalObject) + : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, &m_unsharedSymbolTable) , m_globalObject(globalObject) { m_globalObject->codeBlocks().add(this); } - ~ProgramCodeBlock() + ~GlobalCodeBlock() { if (m_globalObject) m_globalObject->codeBlocks().remove(this); @@ -551,20 +584,54 @@ namespace JSC { private: JSGlobalObject* m_globalObject; // For program and eval nodes, the global object that marks the constant pool. + SymbolTable m_unsharedSymbolTable; + }; + + class ProgramCodeBlock : public GlobalCodeBlock { + public: + ProgramCodeBlock(ProgramExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr sourceProvider) + : GlobalCodeBlock(ownerExecutable, codeType, sourceProvider, 0, globalObject) + { + } }; - class EvalCodeBlock : public ProgramCodeBlock { + class EvalCodeBlock : public GlobalCodeBlock { public: - EvalCodeBlock(ScopeNode* ownerNode, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth) - : ProgramCodeBlock(ownerNode, EvalCode, globalObject, sourceProvider) + EvalCodeBlock(EvalExecutable* ownerExecutable, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth) + : GlobalCodeBlock(ownerExecutable, EvalCode, sourceProvider, 0, globalObject) , m_baseScopeDepth(baseScopeDepth) { } int baseScopeDepth() const { return m_baseScopeDepth; } + const Identifier& variable(unsigned index) { return m_variables[index]; } + unsigned numVariables() { return m_variables.size(); } + void adoptVariables(Vector& variables) + { + ASSERT(m_variables.isEmpty()); + m_variables.swap(variables); + } + private: int m_baseScopeDepth; + Vector m_variables; + }; + + class FunctionCodeBlock : public CodeBlock { + public: + // Rather than using the usual RefCounted::create idiom for SharedSymbolTable we just use new + // as we need to initialise the CodeBlock before we could initialise any RefPtr to hold the shared + // symbol table, so we just pass as a raw pointer with a ref count of 1. We then manually deref + // in the destructor. + FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset) + : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, new SharedSymbolTable) + { + } + ~FunctionCodeBlock() + { + sharedSymbolTable()->deref(); + } }; inline Register& ExecState::r(int index) diff --git a/bytecode/EvalCodeCache.h b/bytecode/EvalCodeCache.h index f0ce73e..05834fc 100644 --- a/bytecode/EvalCodeCache.h +++ b/bytecode/EvalCodeCache.h @@ -29,6 +29,7 @@ #ifndef EvalCodeCache_h #define EvalCodeCache_h +#include "Executable.h" #include "JSGlobalObject.h" #include "Nodes.h" #include "Parser.h" @@ -41,44 +42,33 @@ namespace JSC { class EvalCodeCache { public: - PassRefPtr get(ExecState* exec, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) + PassRefPtr get(ExecState* exec, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) { - RefPtr evalNode; + RefPtr evalExecutable; if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject()) - evalNode = m_cacheMap.get(evalSource.rep()); + evalExecutable = m_cacheMap.get(evalSource.rep()); - if (!evalNode) { - int errorLine; - UString errorMessage; - - SourceCode source = makeSource(evalSource); - evalNode = exec->globalData().parser->parse(exec, exec->dynamicGlobalObject()->debugger(), source, &errorLine, &errorMessage); - if (evalNode) { - if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) - m_cacheMap.set(evalSource.rep(), evalNode); - } else { - exceptionValue = Error::create(exec, SyntaxError, errorMessage, errorLine, source.provider()->asID(), 0); + if (!evalExecutable) { + evalExecutable = EvalExecutable::create(exec, makeSource(evalSource)); + exceptionValue = evalExecutable->compile(exec, scopeChain); + if (exceptionValue) return 0; - } + + if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) + m_cacheMap.set(evalSource.rep(), evalExecutable); } - return evalNode.release(); + return evalExecutable.release(); } bool isEmpty() const { return m_cacheMap.isEmpty(); } - void mark() - { - EvalCacheMap::iterator end = m_cacheMap.end(); - for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr) - ptr->second->mark(); - } private: static const int maxCacheableSourceLength = 256; static const int maxCacheEntries = 64; - typedef HashMap, RefPtr > EvalCacheMap; + typedef HashMap, RefPtr > EvalCacheMap; EvalCacheMap m_cacheMap; }; diff --git a/bytecode/Instruction.h b/bytecode/Instruction.h index eeeac6f..bcef7fb 100644 --- a/bytecode/Instruction.h +++ b/bytecode/Instruction.h @@ -53,7 +53,7 @@ namespace JSC { class StructureChain; // Structure used by op_get_by_id_self_list and op_get_by_id_proto_list instruction to hold data off the main opcode stream. - struct PolymorphicAccessStructureList { + struct PolymorphicAccessStructureList : FastAllocBase { struct PolymorphicStubInfo { bool isChain; PolymorphicAccessStructureListStubRoutineType stubRoutine; diff --git a/bytecode/Opcode.h b/bytecode/Opcode.h index ec39f11..d9b2153 100644 --- a/bytecode/Opcode.h +++ b/bytecode/Opcode.h @@ -113,6 +113,7 @@ namespace JSC { macro(op_put_by_id_generic, 8) \ macro(op_del_by_id, 4) \ macro(op_get_by_val, 4) \ + macro(op_get_by_pname, 7) \ macro(op_put_by_val, 4) \ macro(op_del_by_val, 4) \ macro(op_put_by_index, 4) \ @@ -127,9 +128,11 @@ namespace JSC { macro(op_jneq_ptr, 4) \ macro(op_jnless, 4) \ macro(op_jnlesseq, 4) \ + macro(op_jless, 4) \ macro(op_jmp_scopes, 3) \ macro(op_loop, 2) \ macro(op_loop_if_true, 3) \ + macro(op_loop_if_false, 3) \ macro(op_loop_if_less, 4) \ macro(op_loop_if_lesseq, 4) \ macro(op_switch_imm, 4) \ @@ -152,8 +155,8 @@ namespace JSC { macro(op_strcat, 4) \ macro(op_to_primitive, 3) \ \ - macro(op_get_pnames, 3) \ - macro(op_next_pname, 4) \ + macro(op_get_pnames, 6) \ + macro(op_next_pname, 7) \ \ macro(op_push_scope, 2) \ macro(op_pop_scope, 1) \ @@ -193,7 +196,11 @@ namespace JSC { #undef VERIFY_OPCODE_ID #if HAVE(COMPUTED_GOTO) +#if COMPILER(RVCT) + typedef void* Opcode; +#else typedef const void* Opcode; +#endif #else typedef OpcodeID Opcode; #endif diff --git a/bytecode/SamplingTool.cpp b/bytecode/SamplingTool.cpp index 8651723..3f0babc 100644 --- a/bytecode/SamplingTool.cpp +++ b/bytecode/SamplingTool.cpp @@ -33,7 +33,7 @@ #include "Interpreter.h" #include "Opcode.h" -#if !PLATFORM(WIN_OS) +#if !OS(WINDOWS) #include #endif @@ -91,7 +91,7 @@ void SamplingFlags::stop() {} uint32_t SamplingFlags::s_flags = 1 << 15; -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) static void sleepForMicroseconds(unsigned us) { @@ -157,7 +157,7 @@ void SamplingThread::stop() } -void ScopeSampleRecord::sample(CodeBlock* codeBlock, Instruction* vPC) +void ScriptSampleRecord::sample(CodeBlock* codeBlock, Instruction* vPC) { if (!m_samples) { m_size = codeBlock->instructions().size(); @@ -196,8 +196,8 @@ void SamplingTool::doRun() #if ENABLE(CODEBLOCK_SAMPLING) if (CodeBlock* codeBlock = sample.codeBlock()) { - MutexLocker locker(m_scopeSampleMapMutex); - ScopeSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerNode()); + MutexLocker locker(m_scriptSampleMapMutex); + ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable()); ASSERT(record); record->sample(codeBlock, sample.vPC()); } @@ -209,13 +209,13 @@ void SamplingTool::sample() s_samplingTool->doRun(); } -void SamplingTool::notifyOfScope(ScopeNode* scope) +void SamplingTool::notifyOfScope(ScriptExecutable* script) { #if ENABLE(CODEBLOCK_SAMPLING) - MutexLocker locker(m_scopeSampleMapMutex); - m_scopeSampleMap->set(scope, new ScopeSampleRecord(scope)); + MutexLocker locker(m_scriptSampleMapMutex); + m_scopeSampleMap->set(script, new ScriptSampleRecord(script)); #else - UNUSED_PARAM(scope); + UNUSED_PARAM(script); #endif } @@ -254,10 +254,10 @@ static int compareLineCountInfoSampling(const void* left, const void* right) return (leftLineCount->line > rightLineCount->line) ? 1 : (leftLineCount->line < rightLineCount->line) ? -1 : 0; } -static int compareScopeSampleRecords(const void* left, const void* right) +static int compareScriptSampleRecords(const void* left, const void* right) { - const ScopeSampleRecord* const leftValue = *static_cast(left); - const ScopeSampleRecord* const rightValue = *static_cast(right); + const ScriptSampleRecord* const leftValue = *static_cast(left); + const ScriptSampleRecord* const rightValue = *static_cast(right); return (leftValue->m_sampleCount < rightValue->m_sampleCount) ? 1 : (leftValue->m_sampleCount > rightValue->m_sampleCount) ? -1 : 0; } @@ -318,26 +318,26 @@ void SamplingTool::dump(ExecState* exec) // (3) Build and sort 'codeBlockSamples' array. int scopeCount = m_scopeSampleMap->size(); - Vector codeBlockSamples(scopeCount); - ScopeSampleRecordMap::iterator iter = m_scopeSampleMap->begin(); + Vector codeBlockSamples(scopeCount); + ScriptSampleRecordMap::iterator iter = m_scopeSampleMap->begin(); for (int i = 0; i < scopeCount; ++i, ++iter) codeBlockSamples[i] = iter->second; - qsort(codeBlockSamples.begin(), scopeCount, sizeof(ScopeSampleRecord*), compareScopeSampleRecords); + qsort(codeBlockSamples.begin(), scopeCount, sizeof(ScriptSampleRecord*), compareScriptSampleRecords); // (4) Print data from 'codeBlockSamples' array. printf("\nCodeBlock samples\n\n"); for (int i = 0; i < scopeCount; ++i) { - ScopeSampleRecord* record = codeBlockSamples[i]; + ScriptSampleRecord* record = codeBlockSamples[i]; CodeBlock* codeBlock = record->m_codeBlock; double blockPercent = (record->m_sampleCount * 100.0) / m_sampleCount; if (blockPercent >= 1) { //Instruction* code = codeBlock->instructions().begin(); - printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_scope->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); + printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); if (i < 10) { HashMap lineCounts; codeBlock->dump(exec); diff --git a/bytecode/SamplingTool.h b/bytecode/SamplingTool.h index 7d7dc9c..8e3ed9e 100644 --- a/bytecode/SamplingTool.h +++ b/bytecode/SamplingTool.h @@ -38,6 +38,8 @@ namespace JSC { + class ScriptExecutable; + class SamplingFlags { friend class JIT; public: @@ -92,9 +94,9 @@ namespace JSC { class ScopeNode; struct Instruction; - struct ScopeSampleRecord { - ScopeSampleRecord(ScopeNode* scope) - : m_scope(scope) + struct ScriptSampleRecord { + ScriptSampleRecord(ScriptExecutable* executable) + : m_executable(executable) , m_codeBlock(0) , m_sampleCount(0) , m_opcodeSampleCount(0) @@ -103,7 +105,7 @@ namespace JSC { { } - ~ScopeSampleRecord() + ~ScriptSampleRecord() { if (m_samples) free(m_samples); @@ -111,7 +113,7 @@ namespace JSC { void sample(CodeBlock*, Instruction*); - RefPtr m_scope; + RefPtr m_executable; CodeBlock* m_codeBlock; int m_sampleCount; int m_opcodeSampleCount; @@ -119,7 +121,7 @@ namespace JSC { unsigned m_size; }; - typedef WTF::HashMap ScopeSampleRecordMap; + typedef WTF::HashMap ScriptSampleRecordMap; class SamplingThread { public: @@ -136,11 +138,11 @@ namespace JSC { class SamplingTool { public: - friend class CallRecord; + friend struct CallRecord; friend class HostCallRecord; #if ENABLE(OPCODE_SAMPLING) - class CallRecord : Noncopyable { + class CallRecord : public Noncopyable { public: CallRecord(SamplingTool* samplingTool) : m_samplingTool(samplingTool) @@ -170,7 +172,7 @@ namespace JSC { } }; #else - class CallRecord : Noncopyable { + class CallRecord : public Noncopyable { public: CallRecord(SamplingTool*) { @@ -193,7 +195,7 @@ namespace JSC { , m_sampleCount(0) , m_opcodeSampleCount(0) #if ENABLE(CODEBLOCK_SAMPLING) - , m_scopeSampleMap(new ScopeSampleRecordMap()) + , m_scopeSampleMap(new ScriptSampleRecordMap()) #endif { memset(m_opcodeSamples, 0, sizeof(m_opcodeSamples)); @@ -210,7 +212,7 @@ namespace JSC { void setup(); void dump(ExecState*); - void notifyOfScope(ScopeNode* scope); + void notifyOfScope(ScriptExecutable* scope); void sample(CodeBlock* codeBlock, Instruction* vPC) { @@ -266,8 +268,8 @@ namespace JSC { unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs]; #if ENABLE(CODEBLOCK_SAMPLING) - Mutex m_scopeSampleMapMutex; - OwnPtr m_scopeSampleMap; + Mutex m_scriptSampleMapMutex; + OwnPtr m_scopeSampleMap; #endif }; diff --git a/bytecode/StructureStubInfo.cpp b/bytecode/StructureStubInfo.cpp index bf3fdc4..018d832 100644 --- a/bytecode/StructureStubInfo.cpp +++ b/bytecode/StructureStubInfo.cpp @@ -31,44 +31,44 @@ namespace JSC { #if ENABLE(JIT) void StructureStubInfo::deref() { - switch (opcodeID) { - case op_get_by_id_self: + switch (accessType) { + case access_get_by_id_self: u.getByIdSelf.baseObjectStructure->deref(); return; - case op_get_by_id_proto: + case access_get_by_id_proto: u.getByIdProto.baseObjectStructure->deref(); u.getByIdProto.prototypeStructure->deref(); return; - case op_get_by_id_chain: + case access_get_by_id_chain: u.getByIdChain.baseObjectStructure->deref(); u.getByIdChain.chain->deref(); return; - case op_get_by_id_self_list: { + case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; polymorphicStructures->derefStructures(u.getByIdSelfList.listSize); delete polymorphicStructures; return; } - case op_get_by_id_proto_list: { + case access_get_by_id_proto_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList; polymorphicStructures->derefStructures(u.getByIdProtoList.listSize); delete polymorphicStructures; return; } - case op_put_by_id_transition: + case access_put_by_id_transition: u.putByIdTransition.previousStructure->deref(); u.putByIdTransition.structure->deref(); u.putByIdTransition.chain->deref(); return; - case op_put_by_id_replace: + case access_put_by_id_replace: u.putByIdReplace.baseObjectStructure->deref(); return; - case op_get_by_id: - case op_put_by_id: - case op_get_by_id_generic: - case op_put_by_id_generic: - case op_get_array_length: - case op_get_string_length: + case access_get_by_id: + case access_put_by_id: + case access_get_by_id_generic: + case access_put_by_id_generic: + case access_get_array_length: + case access_get_string_length: // These instructions don't ref their Structures. return; default: diff --git a/bytecode/StructureStubInfo.h b/bytecode/StructureStubInfo.h index 95dd266..8e2c489 100644 --- a/bytecode/StructureStubInfo.h +++ b/bytecode/StructureStubInfo.h @@ -35,15 +35,32 @@ namespace JSC { + enum AccessType { + access_get_by_id_self, + access_get_by_id_proto, + access_get_by_id_chain, + access_get_by_id_self_list, + access_get_by_id_proto_list, + access_put_by_id_transition, + access_put_by_id_replace, + access_get_by_id, + access_put_by_id, + access_get_by_id_generic, + access_put_by_id_generic, + access_get_array_length, + access_get_string_length, + }; + struct StructureStubInfo { - StructureStubInfo(OpcodeID opcodeID) - : opcodeID(opcodeID) + StructureStubInfo(AccessType accessType) + : accessType(accessType) + , seen(false) { } void initGetByIdSelf(Structure* baseObjectStructure) { - opcodeID = op_get_by_id_self; + accessType = access_get_by_id_self; u.getByIdSelf.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -51,7 +68,7 @@ namespace JSC { void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure) { - opcodeID = op_get_by_id_proto; + accessType = access_get_by_id_proto; u.getByIdProto.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -62,7 +79,7 @@ namespace JSC { void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain) { - opcodeID = op_get_by_id_chain; + accessType = access_get_by_id_chain; u.getByIdChain.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -73,7 +90,7 @@ namespace JSC { void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) { - opcodeID = op_get_by_id_self_list; + accessType = access_get_by_id_self_list; u.getByIdProtoList.structureList = structureList; u.getByIdProtoList.listSize = listSize; @@ -81,7 +98,7 @@ namespace JSC { void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize) { - opcodeID = op_get_by_id_proto_list; + accessType = access_get_by_id_proto_list; u.getByIdProtoList.structureList = structureList; u.getByIdProtoList.listSize = listSize; @@ -91,7 +108,7 @@ namespace JSC { void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain) { - opcodeID = op_put_by_id_transition; + accessType = access_put_by_id_transition; u.putByIdTransition.previousStructure = previousStructure; previousStructure->ref(); @@ -105,7 +122,7 @@ namespace JSC { void initPutByIdReplace(Structure* baseObjectStructure) { - opcodeID = op_put_by_id_replace; + accessType = access_put_by_id_replace; u.putByIdReplace.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -113,7 +130,19 @@ namespace JSC { void deref(); - OpcodeID opcodeID; + bool seenOnce() + { + return seen; + } + + void setSeen() + { + seen = true; + } + + int accessType : 31; + int seen : 1; + union { struct { Structure* baseObjectStructure; diff --git a/bytecompiler/BytecodeGenerator.cpp b/bytecompiler/BytecodeGenerator.cpp index 683372e..b0a0877 100644 --- a/bytecompiler/BytecodeGenerator.cpp +++ b/bytecompiler/BytecodeGenerator.cpp @@ -256,15 +256,15 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d m_nextGlobalIndex -= symbolTable->size(); for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - globalObject->removeDirect(funcDecl->m_ident); // Make sure our new function is not shadowed by an old property. - emitNewFunction(addGlobalVar(funcDecl->m_ident, false), funcDecl); + FunctionBodyNode* function = functionStack[i]; + globalObject->removeDirect(function->ident()); // Make sure our new function is not shadowed by an old property. + emitNewFunction(addGlobalVar(function->ident(), false), function); } Vector 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)); + if (!globalObject->hasProperty(exec, *varStack[i].first)) + newVars.append(addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); preserveLastVar(); @@ -272,16 +272,16 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d emitLoad(newVars[i], jsUndefined()); } else { for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - globalObject->putWithAttributes(exec, funcDecl->m_ident, funcDecl->makeFunction(exec, scopeChain.node()), DontDelete); + FunctionBodyNode* function = functionStack[i]; + globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(exec, function), scopeChain.node()), DontDelete); } for (size_t i = 0; i < varStack.size(); ++i) { - if (globalObject->hasProperty(exec, varStack[i].first)) + if (globalObject->hasProperty(exec, *varStack[i].first)) continue; int attributes = DontDelete; if (varStack[i].second & DeclarationStacks::IsConstant) attributes |= ReadOnly; - globalObject->putWithAttributes(exec, varStack[i].first, jsUndefined(), attributes); + globalObject->putWithAttributes(exec, *varStack[i].first, jsUndefined(), attributes); } preserveLastVar(); @@ -339,18 +339,18 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug const DeclarationStacks::FunctionStack& functionStack = functionBody->functionStack(); for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - const Identifier& ident = funcDecl->m_ident; + FunctionBodyNode* function = functionStack[i]; + const Identifier& ident = function->ident(); m_functions.add(ident.ustring().rep()); - emitNewFunction(addVar(ident, false), funcDecl); + emitNewFunction(addVar(ident, false), function); } const DeclarationStacks::VarStack& varStack = functionBody->varStack(); for (size_t i = 0; i < varStack.size(); ++i) - addVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); + addVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); - const Identifier* parameters = functionBody->parameters(); - size_t parameterCount = functionBody->parameterCount(); + FunctionParameters& parameters = *functionBody->parameters(); + size_t parameterCount = parameters.size(); m_nextParameterIndex = -RegisterFile::CallFrameHeaderSize - parameterCount - 1; m_parameters.grow(1 + parameterCount); // reserve space for "this" @@ -397,6 +397,18 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge codeBlock->setGlobalData(m_globalData); m_codeBlock->m_numParameters = 1; // Allocate space for "this" + const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack(); + for (size_t i = 0; i < functionStack.size(); ++i) + m_codeBlock->addFunctionDecl(makeFunction(m_globalData, functionStack[i])); + + const DeclarationStacks::VarStack& varStack = evalNode->varStack(); + unsigned numVariables = varStack.size(); + Vector variables; + variables.reserveCapacity(numVariables); + for (size_t i = 0; i < numVariables; ++i) + variables.append(*varStack[i].first); + codeBlock->adoptVariables(variables); + preserveLastVar(); } @@ -470,7 +482,8 @@ RegisterID* BytecodeGenerator::constRegisterFor(const Identifier& ident) return 0; SymbolTableEntry entry = symbolTable().get(ident.ustring().rep()); - ASSERT(!entry.isNull()); + if (entry.isNull()) + return 0; return ®isterFor(entry.getIndex()); } @@ -521,7 +534,7 @@ PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : 0); // Only loops have continue targets. + LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr