Changeset 37670 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- Oct 17, 2008, 7:51:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/Machine.cpp
r37651 r37670 4545 4545 } 4546 4546 4547 void Machine::cti_op_call_profiler(CTI_ARGS) 4548 { 4549 ASSERT(*ARG_profilerReference); 4550 (*ARG_profilerReference)->willExecute(ARG_callFrame, static_cast<JSFunction*>(ARG_src1)); 4551 } 4552 4547 4553 VoidPtrPair Machine::cti_op_call_JSFunction(CTI_ARGS) 4548 4554 { … … 4551 4557 ASSERT(ARG_src1->getCallData(callData) == CallTypeJS); 4552 4558 #endif 4553 4554 if (UNLIKELY(*ARG_profilerReference != 0))4555 (*ARG_profilerReference)->willExecute(ARG_callFrame, static_cast<JSFunction*>(ARG_src1));4556 4559 4557 4560 ScopeChainNode* callDataScopeChain = static_cast<JSFunction*>(ARG_src1)->m_scopeChain.node(); … … 4592 4595 VoidPtrPair pair = { newCodeBlock, CallFrame::create(r) }; 4593 4596 return pair; 4597 } 4598 4599 void* Machine::cti_vm_lazyLinkCall(CTI_ARGS) 4600 { 4601 Machine* machine = ARG_globalData->machine; 4602 CallFrame* callFrame = CallFrame::create(ARG_callFrame); 4603 CallFrame* callerCallFrame = callFrame->callerFrame(); 4604 CodeBlock* callerCodeBlock = callerCallFrame->codeBlock(); 4605 4606 JSFunction* callee = static_cast<JSFunction*>(ARG_src1); 4607 CodeBlock* codeBlock = &callee->m_body->byteCode(callee->m_scopeChain.node()); 4608 if (!codeBlock->ctiCode) 4609 CTI::compile(machine, callFrame, codeBlock); 4610 4611 int argCount = ARG_int3; 4612 CTI::linkCall(callerCodeBlock, callee, codeBlock, codeBlock->ctiCode, CTI_RETURN_ADDRESS, argCount); 4613 4614 return codeBlock->ctiCode; 4594 4615 } 4595 4616 … … 4716 4737 } 4717 4738 4718 VoidPtrPair Machine::cti_op_construct_JSConstruct(CTI_ARGS) 4719 { 4720 CallFrame* callFrame = ARG_callFrame; 4721 4722 JSFunction* constructor = static_cast<JSFunction*>(ARG_src1); 4723 JSValue* constrProtoVal = ARG_src2; 4724 int firstArg = ARG_int3; 4725 int registerOffset = ARG_int4; 4726 int argCount = ARG_int5; 4727 4739 JSValue* Machine::cti_op_construct_JSConstructFast(CTI_ARGS) 4740 { 4728 4741 #ifndef NDEBUG 4729 4742 ConstructData constructData; 4730 ASSERT( ARG_src1->getConstructData(constructData) == ConstructTypeJS);4743 ASSERT(static_cast<JSFunction*>(ARG_src1)->getConstructData(constructData) == ConstructTypeJS); 4731 4744 #endif 4732 4745 4733 if (*ARG_profilerReference) 4734 (*ARG_profilerReference)->willExecute(callFrame, constructor); 4746 StructureID* structure; 4747 if (ARG_src2->isObject()) 4748 structure = static_cast<JSObject*>(ARG_src2)->inheritorID(); 4749 else 4750 structure = static_cast<JSFunction*>(ARG_src1)->m_scopeChain.node()->globalObject()->emptyObjectStructure(); 4751 return new (ARG_globalData) JSObject(structure); 4752 } 4753 4754 VoidPtrPair Machine::cti_op_construct_JSConstruct(CTI_ARGS) 4755 { 4756 CallFrame* callFrame = ARG_callFrame; 4757 4758 JSFunction* constructor = static_cast<JSFunction*>(ARG_src1); 4759 int registerOffset = ARG_int2; 4760 int argCount = ARG_int3; 4761 JSValue* constrProtoVal = ARG_src5; 4762 int firstArg = ARG_int6; 4763 4764 #ifndef NDEBUG 4765 ConstructData constructData; 4766 ASSERT(constructor->getConstructData(constructData) == ConstructTypeJS); 4767 #endif 4735 4768 4736 4769 ScopeChainNode* callDataScopeChain = constructor->m_scopeChain.node(); … … 4784 4817 4785 4818 JSValue* constrVal = ARG_src1; 4786 int firstArg= ARG_int3;4787 int argCount = ARG_int5;4819 int argCount = ARG_int3; 4820 int firstArg = ARG_int6; 4788 4821 4789 4822 ConstructData constructData; … … 4811 4844 ASSERT(constructType == ConstructTypeNone); 4812 4845 4813 ARG_globalData->exception = createNotAConstructorError(callFrame, constrVal, ARG_instr 6, callFrame->codeBlock());4846 ARG_globalData->exception = createNotAConstructorError(callFrame, constrVal, ARG_instr4, callFrame->codeBlock()); 4814 4847 VM_THROW_EXCEPTION(); 4815 4848 }
Note:
See TracChangeset
for help on using the changeset viewer.