summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp
index 85d881ed42..4496d6c5a1 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/src/3rdparty/javascriptcore/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)
@@ -139,12 +145,13 @@ JSGlobalData::JSGlobalData(bool isShared, const VPtrSet& vptrSet)
, 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
@@ -190,10 +197,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 +241,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;
}