OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3930 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3930 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
3931 if (instr->hydrogen()->IsTailCall()) { | 3931 if (instr->hydrogen()->IsTailCall()) { |
3932 if (NeedsEagerFrame()) __ mov(sp, fp); | 3932 if (NeedsEagerFrame()) __ mov(sp, fp); |
3933 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 3933 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
3934 } else { | 3934 } else { |
3935 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 3935 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
3936 } | 3936 } |
3937 } | 3937 } |
3938 | 3938 |
3939 | 3939 |
3940 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | |
3941 ASSERT(ToRegister(instr->context()).is(cp)); | |
3942 ASSERT(ToRegister(instr->result()).is(v0)); | |
3943 | |
3944 int arity = instr->arity(); | |
3945 Handle<Code> ic = | |
3946 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL); | |
3947 __ li(a2, Operand(instr->name())); | |
3948 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
3949 } | |
3950 | |
3951 | |
3952 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 3940 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
3953 ASSERT(ToRegister(instr->result()).is(v0)); | 3941 ASSERT(ToRegister(instr->result()).is(v0)); |
3954 CallKnownFunction(instr->hydrogen()->target(), | 3942 CallKnownFunction(instr->hydrogen()->target(), |
3955 instr->hydrogen()->formal_parameter_count(), | 3943 instr->hydrogen()->formal_parameter_count(), |
3956 instr->arity(), | 3944 instr->arity(), |
3957 instr, | 3945 instr, |
3958 CALL_AS_FUNCTION, | 3946 CALL_AS_FUNCTION, |
3959 A1_UNINITIALIZED); | 3947 A1_UNINITIALIZED); |
3960 } | 3948 } |
3961 | 3949 |
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5816 __ Subu(scratch, result, scratch); | 5804 __ Subu(scratch, result, scratch); |
5817 __ lw(result, FieldMemOperand(scratch, | 5805 __ lw(result, FieldMemOperand(scratch, |
5818 FixedArray::kHeaderSize - kPointerSize)); | 5806 FixedArray::kHeaderSize - kPointerSize)); |
5819 __ bind(&done); | 5807 __ bind(&done); |
5820 } | 5808 } |
5821 | 5809 |
5822 | 5810 |
5823 #undef __ | 5811 #undef __ |
5824 | 5812 |
5825 } } // namespace v8::internal | 5813 } } // namespace v8::internal |
OLD | NEW |