Changeset 36972 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- Sep 26, 2008, 3:40:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r36876 r36972 980 980 JSValue* result = CTI::execute(newCodeBlock->ctiCode, &newExec, &m_registerFile, r, scopeChain, newCodeBlock, exception); 981 981 #else 982 setScopeChain(&newExec, scopeChain, scopeChain ForCall(exec, functionBodyNode, newCodeBlock, scopeChain, r));982 setScopeChain(&newExec, scopeChain, scopeChain); 983 983 JSValue* result = privateExecute(Normal, &newExec, &m_registerFile, r, scopeChain, newCodeBlock, exception); 984 984 #endif … … 3299 3299 3300 3300 codeBlock = newCodeBlock; 3301 setScopeChain(exec, scopeChain, scopeChainForCall(exec, functionBodyNode, codeBlock, callDataScopeChain, r));3301 setScopeChain(exec, scopeChain, callDataScopeChain); 3302 3302 vPC = codeBlock->instructions.begin(); 3303 3303 … … 3390 3390 NEXT_OPCODE; 3391 3391 } 3392 BEGIN_OPCODE(op_init_activation) { 3393 size_t i = 0; 3394 3395 for (size_t count = codeBlock->numVars; i < count; ++i) 3396 r[i] = jsUndefined(); 3397 3398 for (size_t count = codeBlock->constantRegisters.size(), j = 0; j < count; ++i, ++j) 3399 r[i] = codeBlock->constantRegisters[j]; 3400 3401 JSActivation* activation = new (exec) JSActivation(exec, static_cast<FunctionBodyNode*>(codeBlock->ownerNode), r); 3402 r[RegisterFile::OptionalCalleeActivation] = activation; 3403 setScopeChain(exec, scopeChain, scopeChain->copy()->push(activation)); 3404 3405 ++vPC; 3406 NEXT_OPCODE; 3407 } 3392 3408 BEGIN_OPCODE(op_construct) { 3393 3409 /* construct dst(r) constr(r) constrProto(r) firstArg(r) argCount(n) registerOffset(n) … … 3448 3464 3449 3465 codeBlock = newCodeBlock; 3450 setScopeChain(exec, scopeChain, scopeChainForCall(exec, functionBodyNode, codeBlock, callDataScopeChain, r));3466 setScopeChain(exec, scopeChain, callDataScopeChain); 3451 3467 vPC = codeBlock->instructions.begin(); 3452 3468 … … 4471 4487 } 4472 4488 4473 void Machine::cti_ vm_updateScopeChain(CTI_ARGS)4489 void Machine::cti_op_push_activation(CTI_ARGS) 4474 4490 { 4475 4491 ExecState* exec = ARG_exec; 4476 4492 CodeBlock* codeBlock = ARG_codeBlock; 4477 4493 ScopeChainNode* scopeChain = ARG_scopeChain; 4478 4479 exec->machine()->setScopeChain(exec, scopeChain, scopeChainForCall(exec, static_cast<FunctionBodyNode*>(codeBlock->ownerNode), codeBlock, scopeChain, ARG_r)); 4480 4494 Register* r = ARG_r; 4495 4496 JSActivation* activation = new (exec) JSActivation(exec, static_cast<FunctionBodyNode*>(codeBlock->ownerNode), r); 4497 r[RegisterFile::OptionalCalleeActivation] = activation; 4498 4499 setScopeChain(exec, scopeChain, scopeChain->copy()->push(activation)); 4481 4500 ARG_setScopeChain(scopeChain); 4482 4501 }
Note:
See TracChangeset
for help on using the changeset viewer.