diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/interpreter/CallFrame.h | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-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/interpreter/CallFrame.h')
-rw-r--r-- | Source/JavaScriptCore/interpreter/CallFrame.h | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h index 2b0ea3aac..c09132c57 100644 --- a/Source/JavaScriptCore/interpreter/CallFrame.h +++ b/Source/JavaScriptCore/interpreter/CallFrame.h @@ -24,9 +24,10 @@ #define CallFrame_h #include "AbstractPC.h" -#include "JSGlobalData.h" +#include "VM.h" #include "JSStack.h" #include "MacroAssemblerCodeRef.h" +#include "Register.h" namespace JSC { @@ -59,43 +60,46 @@ namespace JSC { // the actual DOM window, which can't be "this" for security reasons. JSObject* globalThisValue() const; - JSGlobalData& globalData() const; + VM& vm() const; // Convenience functions for access to global data. // It takes a few memory references to get from a call frame to the global data // pointer, so these are inefficient, and should be used sparingly in new code. // But they're used in many places in legacy code, so they're not going away any time soon. - void clearException() { globalData().exception = JSValue(); } - JSValue exception() const { return globalData().exception; } - bool hadException() const { return globalData().exception; } + void clearException() { vm().exception = JSValue(); } + void clearSupplementaryExceptionInfo() + { + vm().clearExceptionStack(); + } + + JSValue exception() const { return vm().exception; } + bool hadException() const { return vm().exception; } - const CommonIdentifiers& propertyNames() const { return *globalData().propertyNames; } - const MarkedArgumentBuffer& emptyList() const { return *globalData().emptyList; } - Interpreter* interpreter() { return globalData().interpreter; } - Heap* heap() { return &globalData().heap; } + const CommonIdentifiers& propertyNames() const { return *vm().propertyNames; } + const MarkedArgumentBuffer& emptyList() const { return *vm().emptyList; } + Interpreter* interpreter() { return vm().interpreter; } + Heap* heap() { return &vm().heap; } #ifndef NDEBUG void dumpCaller(); #endif - static const HashTable* arrayConstructorTable(CallFrame* callFrame) { return callFrame->globalData().arrayConstructorTable; } - static const HashTable* arrayPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().arrayPrototypeTable; } - static const HashTable* booleanPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().booleanPrototypeTable; } - static const HashTable* dateTable(CallFrame* callFrame) { return callFrame->globalData().dateTable; } - static const HashTable* dateConstructorTable(CallFrame* callFrame) { return callFrame->globalData().dateConstructorTable; } - static const HashTable* errorPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().errorPrototypeTable; } - static const HashTable* globalObjectTable(CallFrame* callFrame) { return callFrame->globalData().globalObjectTable; } - static const HashTable* jsonTable(CallFrame* callFrame) { return callFrame->globalData().jsonTable; } - static const HashTable* mathTable(CallFrame* callFrame) { return callFrame->globalData().mathTable; } - static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame->globalData().numberConstructorTable; } - static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().numberPrototypeTable; } - static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->globalData().objectConstructorTable; } - static const HashTable* objectPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().objectPrototypeTable; } - static const HashTable* privateNamePrototypeTable(CallFrame* callFrame) { return callFrame->globalData().privateNamePrototypeTable; } - static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->globalData().regExpTable; } - static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->globalData().regExpConstructorTable; } - static const HashTable* regExpPrototypeTable(CallFrame* callFrame) { return callFrame->globalData().regExpPrototypeTable; } - static const HashTable* stringTable(CallFrame* callFrame) { return callFrame->globalData().stringTable; } - static const HashTable* stringConstructorTable(CallFrame* callFrame) { return callFrame->globalData().stringConstructorTable; } + static const HashTable* arrayConstructorTable(CallFrame* callFrame) { return callFrame->vm().arrayConstructorTable; } + static const HashTable* arrayPrototypeTable(CallFrame* callFrame) { return callFrame->vm().arrayPrototypeTable; } + static const HashTable* booleanPrototypeTable(CallFrame* callFrame) { return callFrame->vm().booleanPrototypeTable; } + static const HashTable* dateTable(CallFrame* callFrame) { return callFrame->vm().dateTable; } + static const HashTable* dateConstructorTable(CallFrame* callFrame) { return callFrame->vm().dateConstructorTable; } + static const HashTable* errorPrototypeTable(CallFrame* callFrame) { return callFrame->vm().errorPrototypeTable; } + static const HashTable* globalObjectTable(CallFrame* callFrame) { return callFrame->vm().globalObjectTable; } + static const HashTable* jsonTable(CallFrame* callFrame) { return callFrame->vm().jsonTable; } + static const HashTable* mathTable(CallFrame* callFrame) { return callFrame->vm().mathTable; } + static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame->vm().numberConstructorTable; } + static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame->vm().numberPrototypeTable; } + static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->vm().objectConstructorTable; } + static const HashTable* privateNamePrototypeTable(CallFrame* callFrame) { return callFrame->vm().privateNamePrototypeTable; } + static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->vm().regExpTable; } + static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->vm().regExpConstructorTable; } + static const HashTable* regExpPrototypeTable(CallFrame* callFrame) { return callFrame->vm().regExpPrototypeTable; } + static const HashTable* stringConstructorTable(CallFrame* callFrame) { return callFrame->vm().stringConstructorTable; } static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); } Register* registers() { return this; } @@ -108,7 +112,7 @@ namespace JSC { bool hasReturnPC() const { return !!this[JSStack::ReturnPC].vPC(); } void clearReturnPC() { registers()[JSStack::ReturnPC] = static_cast<Instruction*>(0); } #endif - AbstractPC abstractReturnPC(JSGlobalData& globalData) { return AbstractPC(globalData, this); } + AbstractPC abstractReturnPC(VM& vm) { return AbstractPC(vm, this); } #if USE(JSVALUE32_64) unsigned bytecodeOffsetForNonDFGCode() const; void setBytecodeOffsetForNonDFGCode(unsigned offset); @@ -144,7 +148,7 @@ namespace JSC { // #if's, we make a dummy implementation available anyway. InlineCallFrame* inlineCallFrame() const { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return 0; } #endif |