| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2946 __ InvokeFunction(rdi, count, CALL_FUNCTION, generator, CALL_AS_METHOD); | 2946 __ InvokeFunction(rdi, count, CALL_FUNCTION, generator, CALL_AS_METHOD); |
| 2947 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2947 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2948 } | 2948 } |
| 2949 | 2949 |
| 2950 | 2950 |
| 2951 void LCodeGen::DoCallKeyed(LCallKeyed* instr) { | 2951 void LCodeGen::DoCallKeyed(LCallKeyed* instr) { |
| 2952 ASSERT(ToRegister(instr->key()).is(rcx)); | 2952 ASSERT(ToRegister(instr->key()).is(rcx)); |
| 2953 ASSERT(ToRegister(instr->result()).is(rax)); | 2953 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2954 | 2954 |
| 2955 int arity = instr->arity(); | 2955 int arity = instr->arity(); |
| 2956 Handle<Code> ic = isolate()->stub_cache()->ComputeKeyedCallInitialize( | 2956 Handle<Code> ic = |
| 2957 arity, NOT_IN_LOOP); | 2957 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
| 2958 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2958 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2959 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2959 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2960 } | 2960 } |
| 2961 | 2961 |
| 2962 | 2962 |
| 2963 void LCodeGen::DoCallNamed(LCallNamed* instr) { | 2963 void LCodeGen::DoCallNamed(LCallNamed* instr) { |
| 2964 ASSERT(ToRegister(instr->result()).is(rax)); | 2964 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2965 | 2965 |
| 2966 int arity = instr->arity(); | 2966 int arity = instr->arity(); |
| 2967 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; | 2967 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; |
| 2968 Handle<Code> ic = | 2968 Handle<Code> ic = |
| 2969 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_IN_LOOP, mode); | 2969 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
| 2970 __ Move(rcx, instr->name()); | 2970 __ Move(rcx, instr->name()); |
| 2971 CallCode(ic, mode, instr); | 2971 CallCode(ic, mode, instr); |
| 2972 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2972 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2973 } | 2973 } |
| 2974 | 2974 |
| 2975 | 2975 |
| 2976 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 2976 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 2977 ASSERT(ToRegister(instr->result()).is(rax)); | 2977 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2978 | 2978 |
| 2979 int arity = instr->arity(); | 2979 int arity = instr->arity(); |
| 2980 CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_IMPLICIT); | 2980 CallFunctionStub stub(arity, RECEIVER_MIGHT_BE_IMPLICIT); |
| 2981 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2981 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2982 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2982 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2983 __ Drop(1); | 2983 __ Drop(1); |
| 2984 } | 2984 } |
| 2985 | 2985 |
| 2986 | 2986 |
| 2987 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 2987 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 2988 ASSERT(ToRegister(instr->result()).is(rax)); | 2988 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2989 int arity = instr->arity(); | 2989 int arity = instr->arity(); |
| 2990 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; | 2990 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; |
| 2991 Handle<Code> ic = | 2991 Handle<Code> ic = |
| 2992 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_IN_LOOP, mode); | 2992 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
| 2993 __ Move(rcx, instr->name()); | 2993 __ Move(rcx, instr->name()); |
| 2994 CallCode(ic, mode, instr); | 2994 CallCode(ic, mode, instr); |
| 2995 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2995 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2996 } | 2996 } |
| 2997 | 2997 |
| 2998 | 2998 |
| 2999 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 2999 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| 3000 ASSERT(ToRegister(instr->result()).is(rax)); | 3000 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3001 __ Move(rdi, instr->target()); | 3001 __ Move(rdi, instr->target()); |
| 3002 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION); | 3002 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION); |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4148 RegisterEnvironmentForDeoptimization(environment); | 4148 RegisterEnvironmentForDeoptimization(environment); |
| 4149 ASSERT(osr_pc_offset_ == -1); | 4149 ASSERT(osr_pc_offset_ == -1); |
| 4150 osr_pc_offset_ = masm()->pc_offset(); | 4150 osr_pc_offset_ = masm()->pc_offset(); |
| 4151 } | 4151 } |
| 4152 | 4152 |
| 4153 #undef __ | 4153 #undef __ |
| 4154 | 4154 |
| 4155 } } // namespace v8::internal | 4155 } } // namespace v8::internal |
| 4156 | 4156 |
| 4157 #endif // V8_TARGET_ARCH_X64 | 4157 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |