summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGOperations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOperations.cpp')
-rw-r--r--Source/JavaScriptCore/dfg/DFGOperations.cpp44
1 files changed, 39 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
index 67ae7bf03..3452b2f0d 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
@@ -1193,9 +1193,11 @@ void DFG_OPERATION operationTearOffInlinedArguments(
EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
// Here we can assume that the argumernts were created. Because otherwise the JIT code would
// have not made this call.
- Identifier ident(&exec->globalData(), "length");
+ Identifier ident(&globalData, "length");
JSValue baseValue = exec->uncheckedR(argumentsRegister).jsValue();
PropertySlot slot(baseValue);
return JSValue::encode(baseValue.get(exec, ident, slot));
@@ -1203,6 +1205,9 @@ EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState* exec, int32_
EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t argumentsRegister, int32_t index)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
JSValue argumentsValue = exec->uncheckedR(argumentsRegister).jsValue();
// If there are no arguments, and we're accessing out of bounds, then we have to create the
@@ -1216,6 +1221,9 @@ EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t
EncodedJSValue DFG_OPERATION operationGetInlinedArgumentByVal(
ExecState* exec, int32_t argumentsRegister, InlineCallFrame* inlineCallFrame, int32_t index)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
JSValue argumentsValue = exec->uncheckedR(argumentsRegister).jsValue();
// If there are no arguments, and we're accessing out of bounds, then we have to create the
@@ -1239,6 +1247,10 @@ JSCell* DFG_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExec
JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)
{
ASSERT(functionExecutableAsCell->inherits(&FunctionExecutable::s_info));
+
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
FunctionExecutable* functionExecutable =
static_cast<FunctionExecutable*>(functionExecutableAsCell);
return JSFunction::create(exec, functionExecutable, exec->scope());
@@ -1257,6 +1269,8 @@ size_t DFG_OPERATION operationIsFunction(EncodedJSValue value)
void DFG_OPERATION operationReallocateStorageAndFinishPut(ExecState* exec, JSObject* base, Structure* structure, PropertyOffset offset, EncodedJSValue value)
{
JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
ASSERT(structure->outOfLineCapacity() > base->structure()->outOfLineCapacity());
ASSERT(!globalData.heap.storageAllocator().fastPathShouldSucceed(structure->outOfLineCapacity() * sizeof(JSValue)));
base->setStructureAndReallocateStorageIfNecessary(globalData, structure);
@@ -1265,31 +1279,51 @@ void DFG_OPERATION operationReallocateStorageAndFinishPut(ExecState* exec, JSObj
char* DFG_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState* exec)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
return reinterpret_cast<char*>(
- Butterfly::createUninitialized(exec->globalData(), 0, initialOutOfLineCapacity, false, 0));
+ Butterfly::createUninitialized(globalData, 0, initialOutOfLineCapacity, false, 0));
}
char* DFG_OPERATION operationAllocatePropertyStorage(ExecState* exec, size_t newSize)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
return reinterpret_cast<char*>(
- Butterfly::createUninitialized(exec->globalData(), 0, newSize, false, 0));
+ Butterfly::createUninitialized(globalData, 0, newSize, false, 0));
}
char* DFG_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState* exec, JSObject* object)
{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
ASSERT(!object->structure()->outOfLineCapacity());
- Butterfly* result = object->growOutOfLineStorage(exec->globalData(), 0, initialOutOfLineCapacity);
+ Butterfly* result = object->growOutOfLineStorage(globalData, 0, initialOutOfLineCapacity);
object->setButterflyWithoutChangingStructure(result);
return reinterpret_cast<char*>(result);
}
char* DFG_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState* exec, JSObject* object, size_t newSize)
{
- Butterfly* result = object->growOutOfLineStorage(exec->globalData(), object->structure()->outOfLineCapacity(), newSize);
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
+ Butterfly* result = object->growOutOfLineStorage(globalData, object->structure()->outOfLineCapacity(), newSize);
object->setButterflyWithoutChangingStructure(result);
return reinterpret_cast<char*>(result);
}
+char* DFG_OPERATION operationEnsureArrayStorage(ExecState* exec, JSObject* object)
+{
+ JSGlobalData& globalData = exec->globalData();
+ NativeCallFrameTracer tracer(&globalData, exec);
+
+ return reinterpret_cast<char*>(object->ensureArrayStorage(globalData));
+}
+
double DFG_OPERATION operationFModOnInts(int32_t a, int32_t b)
{
return fmod(a, b);