summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSScope.cpp
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/runtime/JSScope.cpp
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/runtime/JSScope.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/JSScope.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/JavaScriptCore/runtime/JSScope.cpp b/Source/JavaScriptCore/runtime/JSScope.cpp
index 8651a76ba..69ff1e478 100644
--- a/Source/JavaScriptCore/runtime/JSScope.cpp
+++ b/Source/JavaScriptCore/runtime/JSScope.cpp
@@ -30,6 +30,7 @@
#include "JSGlobalObject.h"
#include "JSNameScope.h"
#include "JSWithScope.h"
+#include "Operations.h"
namespace JSC {
@@ -56,7 +57,7 @@ bool JSScope::isDynamicScope(bool& requiresDynamicChecks) const
case NameScopeObjectType:
return static_cast<const JSNameScope*>(this)->isDynamicScope(requiresDynamicChecks);
default:
- ASSERT_NOT_REACHED();
+ RELEASE_ASSERT_NOT_REACHED();
break;
}
@@ -166,7 +167,7 @@ static bool executeResolveOperations(CallFrame* callFrame, JSScope* scope, const
case ResolveOperation::GetAndReturnGlobalProperty: {
JSGlobalObject* globalObject = scope->globalObject();
if (globalObject->structure() == pc->m_structure.get()) {
- result.setValue(globalObject->getDirectOffset(pc->m_offset));
+ result.setValue(globalObject->getDirect(pc->m_offset));
return true;
}
@@ -186,7 +187,7 @@ static bool executeResolveOperations(CallFrame* callFrame, JSScope* scope, const
return true;
}
- pc->m_structure.set(callFrame->globalData(), callFrame->codeBlock()->ownerExecutable(), structure);
+ pc->m_structure.set(callFrame->vm(), callFrame->codeBlock()->ownerExecutable(), structure);
pc->m_offset = slot.cachedOffset();
result.setValue(value);
return true;
@@ -302,7 +303,7 @@ template <JSScope::LookupMode mode, JSScope::ReturnValues returnValues> JSObject
if (putToBaseOperation) {
putToBaseOperation->m_isDynamic = requiresDynamicChecks;
putToBaseOperation->m_kind = PutToBaseOperation::GlobalPropertyPut;
- putToBaseOperation->m_structure.set(callFrame->globalData(), callFrame->codeBlock()->ownerExecutable(), globalObject->structure());
+ putToBaseOperation->m_structure.set(callFrame->vm(), callFrame->codeBlock()->ownerExecutable(), globalObject->structure());
setPutPropertyAccessOffset(putToBaseOperation, slot.cachedOffset());
}
switch (returnValues) {
@@ -345,7 +346,7 @@ template <JSScope::LookupMode mode, JSScope::ReturnValues returnValues> JSObject
if (putToBaseOperation) {
putToBaseOperation->m_kind = entry.isReadOnly() ? PutToBaseOperation::Readonly : PutToBaseOperation::VariablePut;
- putToBaseOperation->m_structure.set(callFrame->globalData(), callFrame->codeBlock()->ownerExecutable(), callFrame->lexicalGlobalObject()->activationStructure());
+ putToBaseOperation->m_structure.set(callFrame->vm(), callFrame->codeBlock()->ownerExecutable(), callFrame->lexicalGlobalObject()->activationStructure());
putToBaseOperation->m_offset = entry.getIndex();
putToBaseOperation->m_scopeDepth = (skipTopScopeNode ? 1 : 0) + scopeCount;
}
@@ -498,7 +499,7 @@ JSValue JSScope::resolveWithBase(CallFrame* callFrame, const Identifier& identif
if (JSObject* propertyBase = JSScope::resolveContainingScope<ReturnBaseAndValue>(callFrame, identifier, slot, operations, putToBaseOperations, false)) {
ASSERT(operations->size());
JSValue value = slot.getValue(callFrame, identifier);
- if (callFrame->globalData().exception)
+ if (callFrame->vm().exception)
return JSValue();
*base = propertyBase;
@@ -528,7 +529,7 @@ JSValue JSScope::resolveWithThis(CallFrame* callFrame, const Identifier& identif
if (JSObject* propertyBase = JSScope::resolveContainingScope<ReturnThisAndValue>(callFrame, identifier, slot, operations, 0, false)) {
ASSERT(operations->size());
JSValue value = slot.getValue(callFrame, identifier);
- if (callFrame->globalData().exception)
+ if (callFrame->vm().exception)
return JSValue();
ASSERT(value);
*base = propertyBase->structure()->typeInfo().isEnvironmentRecord() ? jsUndefined() : JSValue(propertyBase);
@@ -563,7 +564,7 @@ void JSScope::resolvePut(CallFrame* callFrame, JSValue base, const Identifier& p
goto genericHandler;
}
}
- operation->m_registerAddress->set(callFrame->globalData(), base.asCell(), value);
+ operation->m_registerAddress->set(callFrame->vm(), base.asCell(), value);
return;
case PutToBaseOperation::VariablePut: {
@@ -573,7 +574,7 @@ void JSScope::resolvePut(CallFrame* callFrame, JSValue base, const Identifier& p
goto genericHandler;
}
JSVariableObject* variableObject = jsCast<JSVariableObject*>(base);
- variableObject->registerAt(operation->m_offset).set(callFrame->globalData(), variableObject, value);
+ variableObject->registerAt(operation->m_offset).set(callFrame->vm(), variableObject, value);
return;
}
@@ -581,7 +582,7 @@ void JSScope::resolvePut(CallFrame* callFrame, JSValue base, const Identifier& p
JSObject* object = jsCast<JSObject*>(base);
if (operation->m_structure.get() != object->structure())
break;
- object->putDirectOffset(callFrame->globalData(), operation->m_offset, value);
+ object->putDirect(callFrame->vm(), operation->m_offset, value);
return;
}
@@ -606,7 +607,7 @@ void JSScope::resolvePut(CallFrame* callFrame, JSValue base, const Identifier& p
if (slot.base() != baseObject)
return;
ASSERT(!baseObject->hasInlineStorage());
- operation->m_structure.set(callFrame->globalData(), callFrame->codeBlock()->ownerExecutable(), baseObject->structure());
+ operation->m_structure.set(callFrame->vm(), callFrame->codeBlock()->ownerExecutable(), baseObject->structure());
setPutPropertyAccessOffset(operation, slot.cachedOffset());
return;
}