Changeset 128096 in webkit for trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- Sep 10, 2012, 1:23:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r127958 r128096 4476 4476 } 4477 4477 DEFINE_OPCODE(op_tear_off_activation) { 4478 /* tear_off_activation activation(r) arguments(r)4478 /* tear_off_activation activation(r) 4479 4479 4480 4480 Copy locals and named parameters from the register file to the heap. 4481 Point the bindings in 'activation' and 'arguments' to this new backing 4482 store. (Note that 'arguments' may not have been created. If created, 4483 'arguments' already holds a copy of any extra / unnamed parameters.) 4481 Point the bindings in 'activation' to this new backing store. 4484 4482 4485 4483 This opcode appears before op_ret in functions that require full scope chains. … … 4487 4485 4488 4486 int activation = vPC[1].u.operand; 4489 int arguments = vPC[2].u.operand;4490 4487 ASSERT(codeBlock->needsFullScopeChain()); 4491 4488 JSValue activationValue = callFrame->r(activation).jsValue(); 4492 if (activationValue) {4489 if (activationValue) 4493 4490 asActivation(activationValue)->tearOff(*globalData); 4494 4491 4495 if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue())4496 asArguments(argumentsValue)->didTearOffActivation(*globalData, asActivation(activationValue));4497 } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {4498 if (!codeBlock->isStrictMode())4499 asArguments(argumentsValue)->tearOff(callFrame);4500 }4501 4502 4492 vPC += OPCODE_LENGTH(op_tear_off_activation); 4503 4493 NEXT_INSTRUCTION(); 4504 4494 } 4505 4495 DEFINE_OPCODE(op_tear_off_arguments) { 4506 /* tear_off_arguments arguments(r) 4496 /* tear_off_arguments arguments(r) activation(r) 4507 4497 4508 4498 Copy named parameters from the register file to the heap. Point the 4509 bindings in 'arguments' to this new backing store. (Note that 4510 'arguments' may not have been created. If created, 'arguments' already 4511 holds a copy of any extra / unnamed parameters.) 4499 bindings in 'arguments' to this new backing store. (If 'activation' 4500 was also copied to the heap, 'arguments' will point to its storage.) 4512 4501 4513 4502 This opcode appears before op_ret in functions that don't require full … … 4515 4504 */ 4516 4505 4517 int src1 = vPC[1].u.operand; 4518 ASSERT(!codeBlock->needsFullScopeChain() && codeBlock->ownerExecutable()->usesArguments()); 4519 4520 if (JSValue arguments = callFrame->r(unmodifiedArgumentsRegister(src1)).jsValue()) 4521 asArguments(arguments)->tearOff(callFrame); 4506 int arguments = vPC[1].u.operand; 4507 int activation = vPC[2].u.operand; 4508 ASSERT(codeBlock->usesArguments()); 4509 if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) { 4510 if (JSValue activationValue = callFrame->r(activation).jsValue()) 4511 asArguments(argumentsValue)->didTearOffActivation(callFrame->globalData(), asActivation(activationValue)); 4512 else 4513 asArguments(argumentsValue)->tearOff(callFrame); 4514 } 4522 4515 4523 4516 vPC += OPCODE_LENGTH(op_tear_off_arguments);
Note:
See TracChangeset
for help on using the changeset viewer.