Changeset 163946 in webkit for trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
- Timestamp:
- Feb 11, 2014, 9:42:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r163844 r163946 262 262 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 263 263 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 264 m_jit.move(JITCompiler::TrustedImmPtr(m_jit.graph().globalObjectFor( operand->codeOrigin)), localGlobalObjectGPR);264 m_jit.move(JITCompiler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode->origin.semantic)), localGlobalObjectGPR); 265 265 m_jit.loadPtr(JITCompiler::Address(resultGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 266 266 m_jit.comparePtr(invert ? JITCompiler::NotEqual : JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, resultGPR); … … 322 322 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 323 323 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 324 m_jit.move(TrustedImmPtr(m_jit.graph().globalObjectFor( operand->codeOrigin)), localGlobalObjectGPR);324 m_jit.move(TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode->origin.semantic)), localGlobalObjectGPR); 325 325 m_jit.loadPtr(JITCompiler::Address(resultGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 326 326 branchPtr(JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, invert ? notTaken : taken); … … 684 684 JITCompiler::Jump slowPath; 685 685 686 m_jit.emitStoreCodeOrigin(node-> codeOrigin);686 m_jit.emitStoreCodeOrigin(node->origin.semantic); 687 687 688 688 slowPath = m_jit.branchPtrWithPatch(MacroAssembler::NotEqual, calleeGPR, targetToCheck, MacroAssembler::TrustedImmPtr(0)); … … 713 713 jsValueResult(resultGPR, m_currentNode, DataFormatJS, UseChildrenCalledExplicitly); 714 714 715 m_jit.addJSCall(fastCall, slowCall, targetToCheck, callType, calleeGPR, m_currentNode-> codeOrigin);715 m_jit.addJSCall(fastCall, slowCall, targetToCheck, callType, calleeGPR, m_currentNode->origin.semantic); 716 716 } 717 717 … … 1873 1873 MacroAssembler::Equal, 1874 1874 MacroAssembler::Address(structureGPR, Structure::globalObjectOffset()), 1875 MacroAssembler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode-> codeOrigin))));1875 MacroAssembler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode->origin.semantic)))); 1876 1876 1877 1877 isNotMasqueradesAsUndefined.link(&m_jit); … … 2012 2012 MacroAssembler::Equal, 2013 2013 MacroAssembler::Address(scratchGPR, Structure::globalObjectOffset()), 2014 MacroAssembler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode-> codeOrigin))));2014 MacroAssembler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_currentNode->origin.semantic)))); 2015 2015 2016 2016 isNotMasqueradesAsUndefined.link(&m_jit); … … 2880 2880 flushRegisters(); 2881 2881 if (node->op() == PutByValDirect) 2882 callOperation(m_jit.isStrictModeFor(node-> codeOrigin) ? operationPutByValDirectStrict : operationPutByValDirectNonStrict, arg1GPR, arg2GPR, arg3GPR);2882 callOperation(m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValDirectStrict : operationPutByValDirectNonStrict, arg1GPR, arg2GPR, arg3GPR); 2883 2883 else 2884 callOperation(m_jit.isStrictModeFor(node-> codeOrigin) ? operationPutByValStrict : operationPutByValNonStrict, arg1GPR, arg2GPR, arg3GPR);2884 callOperation(m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValStrict : operationPutByValNonStrict, arg1GPR, arg2GPR, arg3GPR); 2885 2885 2886 2886 noResult(node); … … 3475 3475 3476 3476 case NewArray: { 3477 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node-> codeOrigin);3477 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic); 3478 3478 if (!globalObject->isHavingABadTime() && !hasArrayStorage(node->indexingType())) { 3479 3479 Structure* structure = globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()); … … 3646 3646 3647 3647 case NewArrayWithSize: { 3648 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node-> codeOrigin);3648 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic); 3649 3649 if (!globalObject->isHavingABadTime() && !hasArrayStorage(node->indexingType())) { 3650 3650 SpeculateStrictInt32Operand size(this, node->child1()); … … 3716 3716 3717 3717 case NewArrayBuffer: { 3718 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node-> codeOrigin);3718 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic); 3719 3719 IndexingType indexingType = node->indexingType(); 3720 3720 if (!globalObject->isHavingABadTime() && !hasArrayStorage(indexingType)) { … … 3773 3773 GPRReg resultGPR = result.gpr(); 3774 3774 3775 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node-> codeOrigin);3775 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic); 3776 3776 callOperation( 3777 3777 operationNewTypedArrayWithOneArgumentForType(node->typedArrayType()), … … 3817 3817 m_jit.move(thisValueGPR, tempGPR); 3818 3818 J_JITOperation_EJ function; 3819 if (m_jit.graph().executableFor(node-> codeOrigin)->isStrictMode())3819 if (m_jit.graph().executableFor(node->origin.semantic)->isStrictMode()) 3820 3820 function = operationToThisStrict; 3821 3821 else … … 3992 3992 base.use(); 3993 3993 3994 cachedGetById(node-> codeOrigin, baseGPR, resultGPR, node->identifierNumber());3994 cachedGetById(node->origin.semantic, baseGPR, resultGPR, node->identifierNumber()); 3995 3995 3996 3996 jsValueResult(resultGPR, node, UseChildrenCalledExplicitly); … … 4009 4009 JITCompiler::Jump notCell = m_jit.branchTest64(JITCompiler::NonZero, baseGPR, GPRInfo::tagMaskRegister); 4010 4010 4011 cachedGetById(node-> codeOrigin, baseGPR, resultGPR, node->identifierNumber(), notCell);4011 cachedGetById(node->origin.semantic, baseGPR, resultGPR, node->identifierNumber(), notCell); 4012 4012 4013 4013 jsValueResult(resultGPR, node, UseChildrenCalledExplicitly); … … 4041 4041 flushRegisters(); 4042 4042 4043 cachedGetById(node-> codeOrigin, baseGPR, resultGPR, node->identifierNumber(), JITCompiler::Jump(), DontSpill);4043 cachedGetById(node->origin.semantic, baseGPR, resultGPR, node->identifierNumber(), JITCompiler::Jump(), DontSpill); 4044 4044 4045 4045 jsValueResult(resultGPR, node, UseChildrenCalledExplicitly); … … 4059 4059 JITCompiler::Jump notCell = m_jit.branchTest64(JITCompiler::NonZero, baseGPR, GPRInfo::tagMaskRegister); 4060 4060 4061 cachedGetById(node-> codeOrigin, baseGPR, resultGPR, node->identifierNumber(), notCell, DontSpill);4061 cachedGetById(node->origin.semantic, baseGPR, resultGPR, node->identifierNumber(), notCell, DontSpill); 4062 4062 4063 4063 jsValueResult(resultGPR, node, UseChildrenCalledExplicitly); … … 4253 4253 GPRReg scratchGPR = scratch.gpr(); 4254 4254 4255 cachedPutById(node-> codeOrigin, baseGPR, valueGPR, scratchGPR, node->identifierNumber(), NotDirect);4255 cachedPutById(node->origin.semantic, baseGPR, valueGPR, scratchGPR, node->identifierNumber(), NotDirect); 4256 4256 4257 4257 noResult(node); … … 4268 4268 GPRReg scratchGPR = scratch.gpr(); 4269 4269 4270 cachedPutById(node-> codeOrigin, baseGPR, valueGPR, scratchGPR, node->identifierNumber(), Direct);4270 cachedPutById(node->origin.semantic, baseGPR, valueGPR, scratchGPR, node->identifierNumber(), Direct); 4271 4271 4272 4272 noResult(node); … … 4385 4385 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 4386 4386 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 4387 m_jit.move(TrustedImmPtr(m_jit.globalObjectFor(node-> codeOrigin)), localGlobalObjectGPR);4387 m_jit.move(TrustedImmPtr(m_jit.globalObjectFor(node->origin.semantic)), localGlobalObjectGPR); 4388 4388 m_jit.loadPtr(JITCompiler::Address(result.gpr(), Structure::globalObjectOffset()), remoteGlobalObjectGPR); 4389 4389 m_jit.comparePtr(JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, result.gpr()); … … 4530 4530 4531 4531 case CreateActivation: { 4532 RELEASE_ASSERT(!node-> codeOrigin.inlineCallFrame);4532 RELEASE_ASSERT(!node->origin.semantic.inlineCallFrame); 4533 4533 4534 4534 JSValueOperand value(this, node->child1()); … … 4567 4567 JITCompiler::Jump notCreated = m_jit.branchTest64(JITCompiler::Zero, resultGPR); 4568 4568 4569 if (node-> codeOrigin.inlineCallFrame) {4569 if (node->origin.semantic.inlineCallFrame) { 4570 4570 addSlowPathGenerator( 4571 4571 slowPathCall( 4572 4572 notCreated, this, operationCreateInlinedArguments, resultGPR, 4573 node-> codeOrigin.inlineCallFrame));4573 node->origin.semantic.inlineCallFrame)); 4574 4574 } else { 4575 4575 addSlowPathGenerator( … … 4582 4582 4583 4583 case TearOffActivation: { 4584 RELEASE_ASSERT(!node-> codeOrigin.inlineCallFrame);4584 RELEASE_ASSERT(!node->origin.semantic.inlineCallFrame); 4585 4585 4586 4586 JSValueOperand activationValue(this, node->child1()); … … 4591 4591 JITCompiler::Jump notCreated = m_jit.branchTest64(JITCompiler::Zero, activationValueGPR); 4592 4592 4593 SymbolTable* symbolTable = m_jit.symbolTableFor(node-> codeOrigin);4593 SymbolTable* symbolTable = m_jit.symbolTableFor(node->origin.semantic); 4594 4594 int registersOffset = JSActivation::registersOffset(symbolTable); 4595 4595 … … 4624 4624 JITCompiler::Jump created = m_jit.branchTest64(JITCompiler::NonZero, unmodifiedArgumentsValueGPR); 4625 4625 4626 if (node-> codeOrigin.inlineCallFrame) {4626 if (node->origin.semantic.inlineCallFrame) { 4627 4627 addSlowPathGenerator( 4628 4628 slowPathCall( 4629 4629 created, this, operationTearOffInlinedArguments, NoResult, 4630 unmodifiedArgumentsValueGPR, activationValueGPR, node-> codeOrigin.inlineCallFrame));4630 unmodifiedArgumentsValueGPR, activationValueGPR, node->origin.semantic.inlineCallFrame)); 4631 4631 } else { 4632 4632 addSlowPathGenerator( … … 4645 4645 if (!isEmptySpeculation( 4646 4646 m_state.variables().operand( 4647 m_jit.graph().argumentsRegisterFor(node-> codeOrigin)).m_type)) {4647 m_jit.graph().argumentsRegisterFor(node->origin.semantic)).m_type)) { 4648 4648 speculationCheck( 4649 4649 ArgumentsEscaped, JSValueRegs(), 0, … … 4651 4651 JITCompiler::NonZero, 4652 4652 JITCompiler::addressFor( 4653 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin))));4654 } 4655 4656 RELEASE_ASSERT(!node-> codeOrigin.inlineCallFrame);4653 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic)))); 4654 } 4655 4656 RELEASE_ASSERT(!node->origin.semantic.inlineCallFrame); 4657 4657 m_jit.load32(JITCompiler::payloadFor(JSStack::ArgumentCount), resultGPR); 4658 4658 m_jit.sub32(TrustedImm32(1), resultGPR); … … 4668 4668 JITCompiler::NonZero, 4669 4669 JITCompiler::addressFor( 4670 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin)));4671 4672 if (node-> codeOrigin.inlineCallFrame) {4670 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic))); 4671 4672 if (node->origin.semantic.inlineCallFrame) { 4673 4673 m_jit.move( 4674 Imm64(JSValue::encode(jsNumber(node-> codeOrigin.inlineCallFrame->arguments.size() - 1))),4674 Imm64(JSValue::encode(jsNumber(node->origin.semantic.inlineCallFrame->arguments.size() - 1))), 4675 4675 resultGPR); 4676 4676 } else { … … 4687 4687 slowPathCall( 4688 4688 created, this, operationGetArgumentsLength, resultGPR, 4689 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin).offset()));4689 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic).offset())); 4690 4690 4691 4691 jsValueResult(resultGPR, node); … … 4701 4701 if (!isEmptySpeculation( 4702 4702 m_state.variables().operand( 4703 m_jit.graph().argumentsRegisterFor(node-> codeOrigin)).m_type)) {4703 m_jit.graph().argumentsRegisterFor(node->origin.semantic)).m_type)) { 4704 4704 speculationCheck( 4705 4705 ArgumentsEscaped, JSValueRegs(), 0, … … 4707 4707 JITCompiler::NonZero, 4708 4708 JITCompiler::addressFor( 4709 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin))));4709 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic)))); 4710 4710 } 4711 4711 4712 4712 m_jit.add32(TrustedImm32(1), indexGPR, resultGPR); 4713 if (node-> codeOrigin.inlineCallFrame) {4713 if (node->origin.semantic.inlineCallFrame) { 4714 4714 speculationCheck( 4715 4715 Uncountable, JSValueRegs(), 0, … … 4717 4717 JITCompiler::AboveOrEqual, 4718 4718 resultGPR, 4719 Imm32(node-> codeOrigin.inlineCallFrame->arguments.size())));4719 Imm32(node->origin.semantic.inlineCallFrame->arguments.size()))); 4720 4720 } else { 4721 4721 speculationCheck( … … 4729 4729 JITCompiler::JumpList slowArgument; 4730 4730 JITCompiler::JumpList slowArgumentOutOfBounds; 4731 if (m_jit.symbolTableFor(node-> codeOrigin)->slowArguments()) {4732 RELEASE_ASSERT(!node-> codeOrigin.inlineCallFrame);4731 if (m_jit.symbolTableFor(node->origin.semantic)->slowArguments()) { 4732 RELEASE_ASSERT(!node->origin.semantic.inlineCallFrame); 4733 4733 const SlowArgument* slowArguments = m_jit.graph().m_slowArguments.get(); 4734 4734 … … 4736 4736 m_jit.branch32( 4737 4737 JITCompiler::AboveOrEqual, indexGPR, 4738 Imm32(m_jit.symbolTableFor(node-> codeOrigin)->parameterCount())));4738 Imm32(m_jit.symbolTableFor(node->origin.semantic)->parameterCount()))); 4739 4739 4740 4740 COMPILE_ASSERT(sizeof(SlowArgument) == 8, SlowArgument_size_is_eight_bytes); … … 4758 4758 m_jit.load64( 4759 4759 JITCompiler::BaseIndex( 4760 GPRInfo::callFrameRegister, resultGPR, JITCompiler::TimesEight, m_jit.offsetOfArgumentsIncludingThis(node-> codeOrigin)),4760 GPRInfo::callFrameRegister, resultGPR, JITCompiler::TimesEight, m_jit.offsetOfArgumentsIncludingThis(node->origin.semantic)), 4761 4761 resultGPR); 4762 4762 … … 4777 4777 JITCompiler::NonZero, 4778 4778 JITCompiler::addressFor( 4779 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin))));4779 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic)))); 4780 4780 4781 4781 m_jit.add32(TrustedImm32(1), indexGPR, resultGPR); 4782 if (node-> codeOrigin.inlineCallFrame) {4782 if (node->origin.semantic.inlineCallFrame) { 4783 4783 slowPath.append( 4784 4784 m_jit.branch32( 4785 4785 JITCompiler::AboveOrEqual, 4786 4786 resultGPR, 4787 Imm32(node-> codeOrigin.inlineCallFrame->arguments.size())));4787 Imm32(node->origin.semantic.inlineCallFrame->arguments.size()))); 4788 4788 } else { 4789 4789 slowPath.append( … … 4796 4796 JITCompiler::JumpList slowArgument; 4797 4797 JITCompiler::JumpList slowArgumentOutOfBounds; 4798 if (m_jit.symbolTableFor(node-> codeOrigin)->slowArguments()) {4799 RELEASE_ASSERT(!node-> codeOrigin.inlineCallFrame);4798 if (m_jit.symbolTableFor(node->origin.semantic)->slowArguments()) { 4799 RELEASE_ASSERT(!node->origin.semantic.inlineCallFrame); 4800 4800 const SlowArgument* slowArguments = m_jit.graph().m_slowArguments.get(); 4801 4801 … … 4803 4803 m_jit.branch32( 4804 4804 JITCompiler::AboveOrEqual, indexGPR, 4805 Imm32(m_jit.symbolTableFor(node-> codeOrigin)->parameterCount())));4805 Imm32(m_jit.symbolTableFor(node->origin.semantic)->parameterCount()))); 4806 4806 4807 4807 COMPILE_ASSERT(sizeof(SlowArgument) == 8, SlowArgument_size_is_eight_bytes); … … 4825 4825 m_jit.load64( 4826 4826 JITCompiler::BaseIndex( 4827 GPRInfo::callFrameRegister, resultGPR, JITCompiler::TimesEight, m_jit.offsetOfArgumentsIncludingThis(node-> codeOrigin)),4827 GPRInfo::callFrameRegister, resultGPR, JITCompiler::TimesEight, m_jit.offsetOfArgumentsIncludingThis(node->origin.semantic)), 4828 4828 resultGPR); 4829 4829 4830 if (node-> codeOrigin.inlineCallFrame) {4830 if (node->origin.semantic.inlineCallFrame) { 4831 4831 addSlowPathGenerator( 4832 4832 slowPathCall( 4833 4833 slowPath, this, operationGetInlinedArgumentByVal, resultGPR, 4834 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin).offset(),4835 node-> codeOrigin.inlineCallFrame,4834 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic).offset(), 4835 node->origin.semantic.inlineCallFrame, 4836 4836 indexGPR)); 4837 4837 } else { … … 4839 4839 slowPathCall( 4840 4840 slowPath, this, operationGetArgumentByVal, resultGPR, 4841 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin).offset(),4841 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic).offset(), 4842 4842 indexGPR)); 4843 4843 } … … 4851 4851 ASSERT(!isEmptySpeculation( 4852 4852 m_state.variables().operand( 4853 m_jit.graph().argumentsRegisterFor(node-> codeOrigin)).m_type));4853 m_jit.graph().argumentsRegisterFor(node->origin.semantic)).m_type)); 4854 4854 speculationCheck( 4855 4855 ArgumentsEscaped, JSValueRegs(), 0, … … 4857 4857 JITCompiler::NonZero, 4858 4858 JITCompiler::addressFor( 4859 m_jit.graph().machineArgumentsRegisterFor(node-> codeOrigin))));4859 m_jit.graph().machineArgumentsRegisterFor(node->origin.semantic)))); 4860 4860 noResult(node); 4861 4861 break; … … 4972 4972 4973 4973 case CheckTierUpAndOSREnter: { 4974 ASSERT(!node-> codeOrigin.inlineCallFrame);4974 ASSERT(!node->origin.semantic.inlineCallFrame); 4975 4975 4976 4976 GPRTemporary temp(this); … … 4984 4984 silentSpillAllRegisters(tempGPR); 4985 4985 m_jit.setupArgumentsWithExecState( 4986 TrustedImm32(node-> codeOrigin.bytecodeIndex),4986 TrustedImm32(node->origin.semantic.bytecodeIndex), 4987 4987 TrustedImm32(m_stream->size())); 4988 4988 appendCallSetResult(triggerOSREntryNow, tempGPR);
Note:
See TracChangeset
for help on using the changeset viewer.