Changeset 128096 in webkit for trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
- Timestamp:
- Sep 10, 2012, 1:23:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r127810 r128096 1166 1166 } 1167 1167 1168 void DFG_OPERATION operationTearOffActivation(ExecState* exec, JSCell* activationCell , int32_t unmodifiedArgumentsRegister)1168 void DFG_OPERATION operationTearOffActivation(ExecState* exec, JSCell* activationCell) 1169 1169 { 1170 1170 JSGlobalData& globalData = exec->globalData(); 1171 1171 NativeCallFrameTracer tracer(&globalData, exec); 1172 if (!activationCell) { 1173 if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister).jsValue()) { 1174 if (!exec->codeBlock()->isStrictMode()) 1175 asArguments(v)->tearOff(exec); 1176 } 1172 jsCast<JSActivation*>(activationCell)->tearOff(exec->globalData()); 1173 } 1174 1175 void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell) 1176 { 1177 ASSERT(exec->codeBlock()->usesArguments()); 1178 if (activationCell) { 1179 jsCast<Arguments*>(argumentsCell)->didTearOffActivation(exec->globalData(), jsCast<JSActivation*>(activationCell)); 1177 1180 return; 1178 1181 } 1179 JSActivation* activation = jsCast<JSActivation*>(activationCell); 1180 activation->tearOff(exec->globalData()); 1181 if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister).jsValue()) 1182 asArguments(v)->didTearOffActivation(exec->globalData(), activation); 1183 } 1184 1185 1186 void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell) 1187 { 1188 ASSERT(exec->codeBlock()->usesArguments()); 1189 ASSERT(!exec->codeBlock()->needsFullScopeChain()); 1190 asArguments(argumentsCell)->tearOff(exec); 1182 jsCast<Arguments*>(argumentsCell)->tearOff(exec); 1191 1183 } 1192 1184 1193 1185 void DFG_OPERATION operationTearOffInlinedArguments( 1194 ExecState* exec, JSCell* argumentsCell, InlineCallFrame* inlineCallFrame) 1195 { 1196 // This should only be called when the inline code block uses arguments but does not 1197 // need a full scope chain. We could assert it, except that the assertion would be 1198 // rather expensive and may cause side effects that would greatly diverge debug-mode 1199 // behavior from release-mode behavior, since getting the code block of an inline 1200 // call frame implies call frame reification. 1201 asArguments(argumentsCell)->tearOff(exec, inlineCallFrame); 1186 ExecState* exec, JSCell* argumentsCell, JSCell* activationCell, InlineCallFrame* inlineCallFrame) 1187 { 1188 ASSERT_UNUSED(activationCell, !activationCell); // Currently, we don't inline functions with activations. 1189 jsCast<Arguments*>(argumentsCell)->tearOff(exec, inlineCallFrame); 1202 1190 } 1203 1191
Note:
See TracChangeset
for help on using the changeset viewer.