diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp index 85d881e..99e266f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp @@ -33,14 +33,17 @@ #include "Collector.h" #include "CommonIdentifiers.h" #include "FunctionConstructor.h" +#include "GetterSetter.h" #include "Interpreter.h" #include "JSActivation.h" +#include "JSAPIValueWrapper.h" #include "JSArray.h" #include "JSByteArray.h" #include "JSClassRef.h" #include "JSFunction.h" #include "JSLock.h" #include "JSNotAnObject.h" +#include "JSPropertyNameIterator.h" #include "JSStaticScopeObject.h" #include "Parser.h" #include "Lexer.h" @@ -118,7 +121,10 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet) , stringStructure(JSString::createStructure(jsNull())) , notAnObjectErrorStubStructure(JSNotAnObjectErrorStub::createStructure(jsNull())) , notAnObjectStructure(JSNotAnObject::createStructure(jsNull())) -#if !USE(ALTERNATE_JSIMMEDIATE) + , propertyNameIteratorStructure(JSPropertyNameIterator::createStructure(jsNull())) + , getterSetterStructure(GetterSetter::createStructure(jsNull())) + , apiWrapperStructure(JSAPIValueWrapper::createStructure(jsNull())) +#if USE(JSVALUE32) , numberStructure(JSNumberCell::createStructure(jsNull())) #endif , jsArrayVPtr(vptrSet.jsArrayVPtr) @@ -134,17 +140,17 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet) #if ENABLE(JIT) , jitStubs(this) #endif - , timeoutChecker(new TimeoutChecker) , heap(this) , initializingLazyNumericCompareFunction(false) , head(0) , dynamicGlobalObject(0) - , scopeNodeBeingReparsed(0) + , functionCodeBlockBeingReparsed(0) , firstStringifierToMark(0) -{ -#ifdef QT_BUILD_SCRIPT_LIB - scriptpool = new SourcePool(); + , markStack(vptrSet.jsArrayVPtr) +#ifndef NDEBUG + , mainThreadOnly(false) #endif +{ #if PLATFORM(MAC) startProfilerServerIfNeeded(); #endif @@ -180,7 +186,6 @@ JSGlobalData::~JSGlobalData() delete parser; delete lexer; - delete timeoutChecker; deleteAllValues(opaqueJSClassData); @@ -190,10 +195,6 @@ JSGlobalData::~JSGlobalData() deleteIdentifierTable(identifierTable); delete clientData; -#ifdef QT_BUILD_SCRIPT_LIB - if (scriptpool) - delete scriptpool; -#endif } PassRefPtr<JSGlobalData> JSGlobalData::create(bool isShared) @@ -238,9 +239,8 @@ const Vector<Instruction>& JSGlobalData::numericCompareFunction(ExecState* exec) { if (!lazyNumericCompareFunction.size() && !initializingLazyNumericCompareFunction) { initializingLazyNumericCompareFunction = true; - RefPtr<ProgramNode> programNode = parser->parse<ProgramNode>(exec, 0, makeSource(UString("(function (v1, v2) { return v1 - v2; })")), 0, 0); - RefPtr<FunctionBodyNode> functionBody = extractFunctionBody(programNode.get()); - lazyNumericCompareFunction = functionBody->bytecode(exec->scopeChain()).instructions(); + RefPtr<FunctionExecutable> function = FunctionExecutable::fromGlobalCode(Identifier(exec, "numericCompare"), exec, 0, makeSource(UString("(function (v1, v2) { return v1 - v2; })")), 0, 0); + lazyNumericCompareFunction = function->bytecode(exec, exec->scopeChain()).instructions(); initializingLazyNumericCompareFunction = false; } |