Changeset 36566 in webkit for trunk/JavaScriptCore/VM/CTI.cpp
- Timestamp:
- Sep 17, 2008, 3:40:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r36544 r36566 417 417 void CTI::compileOpCall(Instruction* instruction, unsigned i, CompileOpCallType type) 418 418 { 419 int dst = instruction[i + 1].u.operand; 420 int firstArg = instruction[i + 4].u.operand; 421 int argCount = instruction[i + 5].u.operand; 422 419 423 if (type == OpConstruct) { 420 424 emitPutArgConstant(reinterpret_cast<unsigned>(instruction + i), 16); 421 emitPutArgConstant( instruction[i + 5].u.operand, 12);422 emitPutArgConstant( instruction[i + 4].u.operand, 8);425 emitPutArgConstant(argCount, 12); 426 emitPutArgConstant(firstArg, 8); 423 427 emitGetPutArg(instruction[i + 3].u.operand, 4, X86::ecx); 424 428 } else { 425 429 emitPutArgConstant(reinterpret_cast<unsigned>(instruction + i), 16); 426 emitPutArgConstant( instruction[i + 5].u.operand, 12);427 emitPutArgConstant( instruction[i + 4].u.operand, 8);430 emitPutArgConstant(argCount, 12); 431 emitPutArgConstant(firstArg, 8); 428 432 // FIXME: should this be loaded dynamically off m_exec? 429 433 int thisVal = instruction[i + 3].u.operand; … … 452 456 emitPutArg(X86::ecx, 0); 453 457 } 458 459 // initializeCallFrame! 460 m_jit.movl_i32m(reinterpret_cast<unsigned>(m_codeBlock), (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::CallerCodeBlock) * sizeof(Register), X86::edi); 461 m_jit.movl_i32m(reinterpret_cast<unsigned>(instruction + i), (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::ReturnVPC) * sizeof(Register), X86::edi); 462 emitGetCTIParam(CTI_ARGS_scopeChain, X86::edx); 463 m_jit.movl_rm(X86::edx, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::CallerScopeChain) * sizeof(Register), X86::edi); 464 m_jit.movl_rm(X86::edi, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::CallerRegisters) * sizeof(Register), X86::edi); 465 m_jit.movl_i32m(dst, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::ReturnValueRegister) * sizeof(Register), X86::edi); 466 m_jit.movl_i32m(firstArg, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::ArgumentStartRegister) * sizeof(Register), X86::edi); 467 m_jit.movl_i32m(argCount, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::ArgumentCount) * sizeof(Register), X86::edi); 468 m_jit.movl_rm(X86::ecx, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::Callee) * sizeof(Register), X86::edi); 469 m_jit.movl_i32m(0, (firstArg - RegisterFile::CallFrameHeaderSize + RegisterFile::OptionalCalleeActivation) * sizeof(Register), X86::edi); 470 // CTIReturnEIP (set in callee) 454 471 455 472 // Fast check for JS function. … … 491 508 m_jit.link(wasEval, end); 492 509 493 emitPutResult( instruction[i + 1].u.operand);510 emitPutResult(dst); 494 511 } 495 512
Note:
See TracChangeset
for help on using the changeset viewer.