summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/debugger
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/debugger
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/debugger')
-rw-r--r--Source/JavaScriptCore/debugger/Debugger.cpp25
-rw-r--r--Source/JavaScriptCore/debugger/Debugger.h4
-rw-r--r--Source/JavaScriptCore/debugger/DebuggerActivation.cpp11
-rw-r--r--Source/JavaScriptCore/debugger/DebuggerActivation.h14
-rw-r--r--Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp19
5 files changed, 38 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/debugger/Debugger.cpp b/Source/JavaScriptCore/debugger/Debugger.cpp
index 7eda52dc8..2c5a1261a 100644
--- a/Source/JavaScriptCore/debugger/Debugger.cpp
+++ b/Source/JavaScriptCore/debugger/Debugger.cpp
@@ -26,6 +26,7 @@
#include "Interpreter.h"
#include "JSFunction.h"
#include "JSGlobalObject.h"
+#include "Operations.h"
#include "Parser.h"
#include "Protect.h"
@@ -110,34 +111,34 @@ void Debugger::detach(JSGlobalObject* globalObject)
globalObject->setDebugger(0);
}
-void Debugger::recompileAllJSFunctions(JSGlobalData* globalData)
+void Debugger::recompileAllJSFunctions(VM* vm)
{
// If JavaScript is running, it's not safe to recompile, since we'll end
// up throwing away code that is live on the stack.
- ASSERT(!globalData->dynamicGlobalObject);
- if (globalData->dynamicGlobalObject)
+ ASSERT(!vm->dynamicGlobalObject);
+ if (vm->dynamicGlobalObject)
return;
Recompiler recompiler(this);
- globalData->heap.objectSpace().forEachLiveCell(recompiler);
+ vm->heap.objectSpace().forEachLiveCell(recompiler);
}
JSValue evaluateInGlobalCallFrame(const String& script, JSValue& exception, JSGlobalObject* globalObject)
{
CallFrame* globalCallFrame = globalObject->globalExec();
- JSGlobalData& globalData = globalObject->globalData();
+ VM& vm = globalObject->vm();
- EvalExecutable* eval = EvalExecutable::create(globalCallFrame, makeSource(script), false);
+ EvalExecutable* eval = EvalExecutable::create(globalCallFrame, vm.codeCache(), makeSource(script), false);
if (!eval) {
- exception = globalData.exception;
- globalData.exception = JSValue();
+ exception = vm.exception;
+ vm.exception = JSValue();
return exception;
}
- JSValue result = globalData.interpreter->execute(eval, globalCallFrame, globalObject, globalCallFrame->scope());
- if (globalData.exception) {
- exception = globalData.exception;
- globalData.exception = JSValue();
+ JSValue result = vm.interpreter->execute(eval, globalCallFrame, globalObject, globalCallFrame->scope());
+ if (vm.exception) {
+ exception = vm.exception;
+ vm.exception = JSValue();
}
ASSERT(result);
return result;
diff --git a/Source/JavaScriptCore/debugger/Debugger.h b/Source/JavaScriptCore/debugger/Debugger.h
index 3c4a4ed76..95dd62b06 100644
--- a/Source/JavaScriptCore/debugger/Debugger.h
+++ b/Source/JavaScriptCore/debugger/Debugger.h
@@ -28,7 +28,7 @@ namespace JSC {
class DebuggerCallFrame;
class ExecState;
- class JSGlobalData;
+ class VM;
class JSGlobalObject;
class JSValue;
class SourceProvider;
@@ -52,7 +52,7 @@ namespace JSC {
virtual void didReachBreakpoint(const DebuggerCallFrame&, intptr_t, int, int) = 0;
- void recompileAllJSFunctions(JSGlobalData*);
+ void recompileAllJSFunctions(VM*);
private:
HashSet<JSGlobalObject*> m_globalObjects;
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
index e23468035..eec2d6bd7 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
@@ -27,6 +27,7 @@
#include "DebuggerActivation.h"
#include "JSActivation.h"
+#include "Operations.h"
namespace JSC {
@@ -34,17 +35,17 @@ ASSERT_HAS_TRIVIAL_DESTRUCTOR(DebuggerActivation);
const ClassInfo DebuggerActivation::s_info = { "DebuggerActivation", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(DebuggerActivation) };
-DebuggerActivation::DebuggerActivation(JSGlobalData& globalData)
- : JSNonFinalObject(globalData, globalData.debuggerActivationStructure.get())
+DebuggerActivation::DebuggerActivation(VM& vm)
+ : JSNonFinalObject(vm, vm.debuggerActivationStructure.get())
{
}
-void DebuggerActivation::finishCreation(JSGlobalData& globalData, JSObject* activation)
+void DebuggerActivation::finishCreation(VM& vm, JSObject* activation)
{
- Base::finishCreation(globalData);
+ Base::finishCreation(vm);
ASSERT(activation);
ASSERT(activation->isActivationObject());
- m_activation.set(globalData, this, jsCast<JSActivation*>(activation));
+ m_activation.set(vm, this, jsCast<JSActivation*>(activation));
}
void DebuggerActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.h b/Source/JavaScriptCore/debugger/DebuggerActivation.h
index c934407fc..a33d6ddb2 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.h
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.h
@@ -34,10 +34,10 @@ namespace JSC {
public:
typedef JSNonFinalObject Base;
- static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object)
+ static DebuggerActivation* create(VM& vm, JSObject* object)
{
- DebuggerActivation* activation = new (NotNull, allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData);
- activation->finishCreation(globalData, object);
+ DebuggerActivation* activation = new (NotNull, allocateCell<DebuggerActivation>(vm.heap)) DebuggerActivation(vm);
+ activation->finishCreation(vm, object);
return activation;
}
@@ -53,18 +53,18 @@ namespace JSC {
JS_EXPORTDATA static const ClassInfo s_info;
- static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
- return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
+ return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
}
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags;
- JS_EXPORT_PRIVATE void finishCreation(JSGlobalData&, JSObject* activation);
+ JS_EXPORT_PRIVATE void finishCreation(VM&, JSObject* activation);
private:
- JS_EXPORT_PRIVATE DebuggerActivation(JSGlobalData&);
+ JS_EXPORT_PRIVATE DebuggerActivation(VM&);
WriteBarrier<JSActivation> m_activation;
};
diff --git a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
index e924ad34c..a5d045cb9 100644
--- a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
+++ b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
@@ -32,6 +32,7 @@
#include "JSFunction.h"
#include "CodeBlock.h"
#include "Interpreter.h"
+#include "Operations.h"
#include "Parser.h"
namespace JSC {
@@ -89,17 +90,17 @@ JSValue DebuggerCallFrame::evaluate(const String& script, JSValue& exception) co
if (!m_callFrame->codeBlock())
return JSValue();
- JSGlobalData& globalData = m_callFrame->globalData();
- EvalExecutable* eval = EvalExecutable::create(m_callFrame, makeSource(script), m_callFrame->codeBlock()->isStrictMode());
- if (globalData.exception) {
- exception = globalData.exception;
- globalData.exception = JSValue();
+ VM& vm = m_callFrame->vm();
+ EvalExecutable* eval = EvalExecutable::create(m_callFrame, m_callFrame->codeBlock()->unlinkedCodeBlock()->codeCacheForEval(), makeSource(script), m_callFrame->codeBlock()->isStrictMode());
+ if (vm.exception) {
+ exception = vm.exception;
+ vm.exception = JSValue();
}
- JSValue result = globalData.interpreter->execute(eval, m_callFrame, thisObject(), m_callFrame->scope());
- if (globalData.exception) {
- exception = globalData.exception;
- globalData.exception = JSValue();
+ JSValue result = vm.interpreter->execute(eval, m_callFrame, thisObject(), m_callFrame->scope());
+ if (vm.exception) {
+ exception = vm.exception;
+ vm.exception = JSValue();
}
ASSERT(result);
return result;