Changeset 47597 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- Aug 20, 2009, 2:49:07 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r47412 r47597 588 588 void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) 589 589 { 590 ASSERT(calleeCodeBlock);591 590 RepatchBuffer repatchBuffer(callerCodeBlock); 592 591 593 592 // Currently we only link calls with the exact number of arguments. 594 593 // If this is a native call calleeCodeBlock is null so the number of parameters is unimportant 595 if ( callerArgCount == calleeCodeBlock->m_numParameters || calleeCodeBlock->codeType() == NativeCode) {594 if (!calleeCodeBlock || (callerArgCount == calleeCodeBlock->m_numParameters)) { 596 595 ASSERT(!callLinkInfo->isLinked()); 597 596 -
trunk/JavaScriptCore/jit/JITCall.cpp
r47186 r47597 440 440 store32(regT1, Address(callFrameRegister, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register)))); 441 441 442 loadPtr(Address(regT 2, OBJECT_OFFSETOF(JSFunction, m_data) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT1); // newScopeChain442 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_data) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT1); // newScopeChain 443 443 444 444 storePtr(ImmPtr(JSValue::encode(JSValue())), Address(callFrameRegister, RegisterFile::OptionalCalleeArguments * static_cast<int>(sizeof(Register)))); 445 storePtr(regT 2, Address(callFrameRegister, RegisterFile::Callee * static_cast<int>(sizeof(Register))));445 storePtr(regT0, Address(callFrameRegister, RegisterFile::Callee * static_cast<int>(sizeof(Register)))); 446 446 storePtr(regT1, Address(callFrameRegister, RegisterFile::ScopeChain * static_cast<int>(sizeof(Register)))); 447 447 } … … 453 453 454 454 // ecx holds func 455 emitPutJITStubArg(regT 2, 1);455 emitPutJITStubArg(regT0, 1); 456 456 emitPutJITStubArgConstant(argCount, 3); 457 457 emitPutJITStubArgConstant(registerOffset, 2); … … 463 463 464 464 // ecx holds func 465 emitPutJITStubArg(regT 2, 1);465 emitPutJITStubArg(regT0, 1); 466 466 emitPutJITStubArg(regT1, 3); 467 addPtr(Imm32(registerOffset), regT1, regT 0);468 emitPutJITStubArg(regT 0, 2);467 addPtr(Imm32(registerOffset), regT1, regT2); 468 emitPutJITStubArg(regT2, 2); 469 469 } 470 470 … … 477 477 478 478 // ecx holds func 479 emitPutJITStubArg(regT 2, 1);479 emitPutJITStubArg(regT0, 1); 480 480 emitPutJITStubArgConstant(registerOffset, 2); 481 481 emitPutJITStubArgConstant(argCount, 3); 482 emitPutJITStubArgFromVirtualRegister(proto, 4, regT 0);482 emitPutJITStubArgFromVirtualRegister(proto, 4, regT2); 483 483 emitPutJITStubArgConstant(thisRegister, 5); 484 484 } … … 491 491 492 492 emitGetVirtualRegister(argCountRegister, regT1); 493 emitGetVirtualRegister(callee, regT 2);493 emitGetVirtualRegister(callee, regT0); 494 494 compileOpCallVarargsSetupArgs(instruction); 495 495 496 496 // Check for JSFunctions. 497 emitJumpSlowCaseIfNotJSCell(regT 2);498 addSlowCase(branchPtr(NotEqual, Address(regT 2), ImmPtr(m_globalData->jsFunctionVPtr)));499 497 emitJumpSlowCaseIfNotJSCell(regT0); 498 addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsFunctionVPtr))); 499 500 500 // Speculatively roll the callframe, assuming argCount will match the arity. 501 mul32(Imm32(sizeof(Register)), regT 0, regT0);501 mul32(Imm32(sizeof(Register)), regT2, regT2); 502 502 intptr_t offset = (intptr_t)sizeof(Register) * (intptr_t)RegisterFile::CallerFrame; 503 addPtr(Imm32((int32_t)offset), regT 0, regT3);503 addPtr(Imm32((int32_t)offset), regT2, regT3); 504 504 addPtr(callFrameRegister, regT3); 505 505 storePtr(callFrameRegister, regT3); 506 addPtr(regT 0, callFrameRegister);506 addPtr(regT2, callFrameRegister); 507 507 emitNakedCall(m_globalData->jitStubs.ctiVirtualCall()); 508 508 … … 540 540 if (opcodeID == op_call_eval) { 541 541 JITStubCall stubCall(this, cti_op_call_eval); 542 stubCall.addArgument(callee, regT 2);542 stubCall.addArgument(callee, regT0); 543 543 stubCall.addArgument(JIT::Imm32(registerOffset)); 544 544 stubCall.addArgument(JIT::Imm32(argCount)); … … 547 547 } 548 548 549 emitGetVirtualRegister(callee, regT 2);549 emitGetVirtualRegister(callee, regT0); 550 550 // The arguments have been set up on the hot path for op_call_eval 551 551 if (opcodeID == op_call) … … 555 555 556 556 // Check for JSFunctions. 557 emitJumpSlowCaseIfNotJSCell(regT 2);558 addSlowCase(branchPtr(NotEqual, Address(regT 2), ImmPtr(m_globalData->jsFunctionVPtr)));557 emitJumpSlowCaseIfNotJSCell(regT0); 558 addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsFunctionVPtr))); 559 559 560 560 // First, in the case of a construct, allocate the new object. 561 561 if (opcodeID == op_construct) { 562 562 JITStubCall(this, cti_op_construct_JSConstruct).call(registerOffset - RegisterFile::CallFrameHeaderSize - argCount); 563 emitGetVirtualRegister(callee, regT 2);563 emitGetVirtualRegister(callee, regT0); 564 564 } 565 565 … … 607 607 if (opcodeID == op_call_eval) { 608 608 JITStubCall stubCall(this, cti_op_call_eval); 609 stubCall.addArgument(callee, regT 2);609 stubCall.addArgument(callee, regT0); 610 610 stubCall.addArgument(JIT::Imm32(registerOffset)); 611 611 stubCall.addArgument(JIT::Imm32(argCount)); … … 616 616 // This plants a check for a cached JSFunction value, so we can plant a fast link to the callee. 617 617 // This deliberately leaves the callee in ecx, used when setting up the stack frame below 618 emitGetVirtualRegister(callee, regT 2);618 emitGetVirtualRegister(callee, regT0); 619 619 DataLabelPtr addressOfLinkedFunctionCheck; 620 620 621 621 BEGIN_UNINTERRUPTED_SEQUENCE(sequenceOpCall); 622 622 623 Jump jumpToSlow = branchPtrWithPatch(NotEqual, regT 2, addressOfLinkedFunctionCheck, ImmPtr(JSValue::encode(JSValue())));623 Jump jumpToSlow = branchPtrWithPatch(NotEqual, regT0, addressOfLinkedFunctionCheck, ImmPtr(JSValue::encode(JSValue()))); 624 624 625 625 END_UNINTERRUPTED_SEQUENCE(sequenceOpCall); … … 636 636 int thisRegister = instruction[6].u.operand; 637 637 638 emitPutJITStubArg(regT 2, 1);639 emitPutJITStubArgFromVirtualRegister(proto, 4, regT 0);638 emitPutJITStubArg(regT0, 1); 639 emitPutJITStubArgFromVirtualRegister(proto, 4, regT2); 640 640 JITStubCall stubCall(this, cti_op_construct_JSConstruct); 641 641 stubCall.call(thisRegister); 642 emitGetVirtualRegister(callee, regT 2);642 emitGetVirtualRegister(callee, regT0); 643 643 } 644 644 … … 646 646 // Note that this omits to set up RegisterFile::CodeBlock, which is set in the callee 647 647 storePtr(ImmPtr(JSValue::encode(JSValue())), Address(callFrameRegister, (registerOffset + RegisterFile::OptionalCalleeArguments) * static_cast<int>(sizeof(Register)))); 648 storePtr(regT 2, Address(callFrameRegister, (registerOffset + RegisterFile::Callee) * static_cast<int>(sizeof(Register))));649 loadPtr(Address(regT 2, OBJECT_OFFSETOF(JSFunction, m_data) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT1); // newScopeChain648 storePtr(regT0, Address(callFrameRegister, (registerOffset + RegisterFile::Callee) * static_cast<int>(sizeof(Register)))); 649 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_data) + OBJECT_OFFSETOF(ScopeChain, m_node)), regT1); // newScopeChain 650 650 store32(Imm32(argCount), Address(callFrameRegister, (registerOffset + RegisterFile::ArgumentCount) * static_cast<int>(sizeof(Register)))); 651 651 storePtr(callFrameRegister, Address(callFrameRegister, (registerOffset + RegisterFile::CallerFrame) * static_cast<int>(sizeof(Register)))); … … 681 681 682 682 // Fast check for JS function. 683 Jump callLinkFailNotObject = emitJumpIfNotJSCell(regT 2);684 Jump callLinkFailNotJSFunction = branchPtr(NotEqual, Address(regT 2), ImmPtr(m_globalData->jsFunctionVPtr));683 Jump callLinkFailNotObject = emitJumpIfNotJSCell(regT0); 684 Jump callLinkFailNotJSFunction = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsFunctionVPtr)); 685 685 686 686 // First, in the case of a construct, allocate the new object. 687 687 if (opcodeID == op_construct) { 688 688 JITStubCall(this, cti_op_construct_JSConstruct).call(registerOffset - RegisterFile::CallFrameHeaderSize - argCount); 689 emitGetVirtualRegister(callee, regT 2);689 emitGetVirtualRegister(callee, regT0); 690 690 } 691 691 … … 694 694 addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister); 695 695 move(Imm32(argCount), regT1); 696 697 move(regT0, regT2); 696 698 697 699 m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(m_globalData->jitStubs.ctiVirtualCallLink()); -
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r47530 r47597 65 65 66 66 #if ENABLE(JIT_OPTIMIZE_CALL) 67 /* VirtualCallLink Trampoline */ 67 // VirtualCallLink Trampoline 68 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 68 69 Label virtualCallLinkBegin = align(); 69 70 // regT0 holds callee, regT1 holds argCount.71 70 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 72 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_codeBlock)), regT2); 73 Jump hasCodeBlock2 = branchTestPtr(NonZero, regT2);74 75 // Lazily generate a CodeBlock.76 preserveReturnAddressAfterCall(regT3); // return address71 72 Jump isNativeFunc2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 73 74 Jump hasCodeBlock2 = branch32(GreaterThan, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 75 preserveReturnAddressAfterCall(regT3); 77 76 restoreArgumentReference(); 78 77 Call callJSFunction2 = call(); 79 move(regT0, regT2); 80 emitGetJITStubArg(1, regT0); // callee 78 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 81 79 emitGetJITStubArg(5, regT1); // argCount 82 restoreReturnAddressBeforeReturn(regT3); // return address80 restoreReturnAddressBeforeReturn(regT3); 83 81 hasCodeBlock2.link(this); 84 82 85 // regT2 holds codeBlock.86 Jump isNativeFunc2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(CodeBlock, m_codeType)), Imm32(NativeCode));87 88 83 // Check argCount matches callee arity. 89 Jump arityCheckOkay2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF( CodeBlock, m_numParameters)), regT1);84 Jump arityCheckOkay2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), regT1); 90 85 preserveReturnAddressAfterCall(regT3); 91 86 emitPutJITStubArg(regT3, 3); // return address 92 emitPutJITStubArg(regT2, 7); // codeBlock93 87 restoreArgumentReference(); 94 88 Call callArityCheck2 = call(); 95 89 move(regT1, callFrameRegister); 96 emitGetJITStubArg(1, regT0); // callee97 90 emitGetJITStubArg(5, regT1); // argCount 98 restoreReturnAddressBeforeReturn(regT3); // return address 99 91 restoreReturnAddressBeforeReturn(regT3); 100 92 arityCheckOkay2.link(this); 93 101 94 isNativeFunc2.link(this); 102 95 … … 104 97 105 98 preserveReturnAddressAfterCall(regT3); 106 emitPutJITStubArg(regT3, 3); 99 emitPutJITStubArg(regT3, 3); // return address 107 100 restoreArgumentReference(); 108 101 Call callLazyLinkCall = call(); … … 111 104 #endif // ENABLE(JIT_OPTIMIZE_CALL) 112 105 113 /* VirtualCall Trampoline */ 106 // VirtualCall Trampoline 107 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 114 108 Label virtualCallBegin = align(); 115 116 // regT0 holds callee, regT1 holds argCount.117 109 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 118 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_codeBlock)), regT2); 119 Jump hasCodeBlock3 = branchTestPtr(NonZero, regT2);120 121 // Lazily generate a CodeBlock.122 preserveReturnAddressAfterCall(regT3); // return address110 111 Jump isNativeFunc3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 112 113 Jump hasCodeBlock3 = branch32(GreaterThan, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 114 preserveReturnAddressAfterCall(regT3); 123 115 restoreArgumentReference(); 124 116 Call callJSFunction1 = call(); 125 move(regT0, regT2);126 emitGetJITStubArg(1, regT0); // callee127 117 emitGetJITStubArg(5, regT1); // argCount 128 restoreReturnAddressBeforeReturn(regT3); // return address 118 restoreReturnAddressBeforeReturn(regT3); 119 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 129 120 hasCodeBlock3.link(this); 130 121 131 // regT2 holds codeBlock. 132 Jump isNativeFunc3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(CodeBlock, m_codeType)), Imm32(NativeCode)); 133 134 // Check argCount matches callee. 135 Jump arityCheckOkay3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1); 122 // Check argCount matches callee arity. 123 Jump arityCheckOkay3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), regT1); 136 124 preserveReturnAddressAfterCall(regT3); 137 125 emitPutJITStubArg(regT3, 3); // return address 138 emitPutJITStubArg(regT2, 7); // codeBlock139 126 restoreArgumentReference(); 140 127 Call callArityCheck1 = call(); 141 128 move(regT1, callFrameRegister); 142 emitGetJITStubArg(1, regT0); // callee143 129 emitGetJITStubArg(5, regT1); // argCount 144 restoreReturnAddressBeforeReturn(regT3); // return address145 130 restoreReturnAddressBeforeReturn(regT3); 131 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 146 132 arityCheckOkay3.link(this); 133 147 134 isNativeFunc3.link(this); 135 148 136 compileOpCallInitializeCallFrame(); 149 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT0); 150 loadPtr(Address(regT0, OBJECT_OFFSETOF(FunctionExecutable, m_jitCode)), regT0); 137 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCode)), regT0); 151 138 jump(regT0); 152 139 … … 1485 1472 COMPILE_ASSERT(sizeof(CodeType) == 4, CodeTypeEnumMustBe32Bit); 1486 1473 1474 // VirtualCallLink Trampoline 1475 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 1487 1476 Label virtualCallLinkBegin = align(); 1488 1489 // Load the callee CodeBlock* into eax 1490 loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_executable)), regT3);1491 loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionExecutable, m_codeBlock)), regT0); 1492 Jump hasCodeBlock2 = branch TestPtr(NonZero, regT0);1477 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 1478 1479 Jump isNativeFunc2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 1480 1481 Jump hasCodeBlock2 = branch32(GreaterThan, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 1493 1482 preserveReturnAddressAfterCall(regT3); 1494 1483 restoreArgumentReference(); 1495 1484 Call callJSFunction2 = call(); 1496 emitGetJITStubArg(1, regT2);1497 emitGetJITStubArg(3, regT1); 1485 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 1486 emitGetJITStubArg(3, regT1); // argCount 1498 1487 restoreReturnAddressBeforeReturn(regT3); 1499 1488 hasCodeBlock2.link(this); 1500 1489 1501 Jump isNativeFunc2 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_codeType)), Imm32(NativeCode));1502 1503 1490 // Check argCount matches callee arity. 1504 Jump arityCheckOkay2 = branch32(Equal, Address(regT 0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1);1491 Jump arityCheckOkay2 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), regT1); 1505 1492 preserveReturnAddressAfterCall(regT3); 1506 emitPutJITStubArg(regT3, 2); 1507 emitPutJITStubArg(regT0, 4); 1493 emitPutJITStubArg(regT3, 2); // return address 1508 1494 restoreArgumentReference(); 1509 1495 Call callArityCheck2 = call(); 1510 1496 move(regT1, callFrameRegister); 1511 emitGetJITStubArg(1, regT2); 1512 emitGetJITStubArg(3, regT1); 1497 emitGetJITStubArg(3, regT1); // argCount 1513 1498 restoreReturnAddressBeforeReturn(regT3); 1514 1499 arityCheckOkay2.link(this); 1500 1515 1501 isNativeFunc2.link(this); 1516 1502 1517 1503 compileOpCallInitializeCallFrame(); 1518 1519 1504 preserveReturnAddressAfterCall(regT3); 1520 emitPutJITStubArg(regT3, 2); 1505 emitPutJITStubArg(regT3, 2); // return address 1521 1506 restoreArgumentReference(); 1522 1507 Call callLazyLinkCall = call(); 1523 1508 restoreReturnAddressBeforeReturn(regT3); 1524 1525 1509 jump(regT0); 1526 1510 1511 // VirtualCall Trampoline 1512 // regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable. 1527 1513 Label virtualCallBegin = align(); 1528 1529 // Load the callee CodeBlock* into eax 1530 loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_executable)), regT3);1531 loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionExecutable, m_codeBlock)), regT0); 1532 Jump hasCodeBlock3 = branch TestPtr(NonZero, regT0);1514 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 1515 1516 Jump isNativeFunc3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 1517 1518 Jump hasCodeBlock3 = branch32(GreaterThan, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), Imm32(0)); 1533 1519 preserveReturnAddressAfterCall(regT3); 1534 1520 restoreArgumentReference(); 1535 1521 Call callJSFunction1 = call(); 1536 emitGetJITStubArg(1, regT2); 1537 emitGetJITStubArg(3, regT1); 1522 emitGetJITStubArg(3, regT1); // argCount 1538 1523 restoreReturnAddressBeforeReturn(regT3); 1539 loadPtr(Address(regT 2, OBJECT_OFFSETOF(JSFunction, m_executable)), regT3); // reload the function body nody, so we can reload the code pointer.1524 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 1540 1525 hasCodeBlock3.link(this); 1541 1526 1542 Jump isNativeFunc3 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_codeType)), Imm32(NativeCode));1543 1544 1527 // Check argCount matches callee arity. 1545 Jump arityCheckOkay3 = branch32(Equal, Address(regT 0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1);1528 Jump arityCheckOkay3 = branch32(Equal, Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_numParameters)), regT1); 1546 1529 preserveReturnAddressAfterCall(regT3); 1547 emitPutJITStubArg(regT3, 2); 1548 emitPutJITStubArg(regT0, 4); 1530 emitPutJITStubArg(regT3, 2); // return address 1549 1531 restoreArgumentReference(); 1550 1532 Call callArityCheck1 = call(); 1551 1533 move(regT1, callFrameRegister); 1552 emitGetJITStubArg(1, regT2); 1553 emitGetJITStubArg(3, regT1); 1534 emitGetJITStubArg(3, regT1); // argCount 1554 1535 restoreReturnAddressBeforeReturn(regT3); 1555 loadPtr(Address(regT 2, OBJECT_OFFSETOF(JSFunction, m_executable)), regT3); // reload the function body nody, so we can reload the code pointer.1536 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2); 1556 1537 arityCheckOkay3.link(this); 1538 1557 1539 isNativeFunc3.link(this); 1558 1540 1559 // load ctiCode from the new codeBlock.1560 loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionExecutable, m_jitCode)), regT0);1561 1562 1541 compileOpCallInitializeCallFrame(); 1542 loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCode)), regT0); 1563 1543 jump(regT0); 1564 1544 1565 1566 1545 Label nativeCallThunk = align(); 1567 1546 preserveReturnAddressAfterCall(regT0); -
trunk/JavaScriptCore/jit/JITStubs.cpp
r47412 r47597 1486 1486 executable->jitCode(callDataScopeChain); 1487 1487 1488 return &executable->generatedBytecode();1488 return function; 1489 1489 } 1490 1490 … … 1494 1494 1495 1495 CallFrame* callFrame = stackFrame.callFrame; 1496 CodeBlock* newCodeBlock = stackFrame.args[3].codeBlock();1497 ASSERT(newCodeBlock->codeType() != NativeCode);1496 JSFunction* callee = asFunction(stackFrame.args[0].jsValue()); 1497 CodeBlock* newCodeBlock = &callee->executable()->generatedBytecode(); 1498 1498 int argCount = stackFrame.args[2].int32(); 1499 1499 … … 1532 1532 } 1533 1533 1534 RETURN_POINTER_PAIR( newCodeBlock, callFrame);1534 RETURN_POINTER_PAIR(callee, callFrame); 1535 1535 } 1536 1536 … … 1546 1546 if (!executable->isHostFunction()) 1547 1547 codeBlock = &executable->bytecode(callee->scope().node()); 1548 else1549 codeBlock = &executable->generatedBytecode();1550 1548 CallLinkInfo* callLinkInfo = &stackFrame.callFrame->callerFrame()->codeBlock()->getCallLinkInfo(stackFrame.args[1].returnAddress()); 1551 1549
Note:
See TracChangeset
for help on using the changeset viewer.