| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2964 { | 2964 { |
| 2965 PreservePositionScope scope(masm()->positions_recorder()); | 2965 PreservePositionScope scope(masm()->positions_recorder()); |
| 2966 VisitForStackValue(property->obj()); | 2966 VisitForStackValue(property->obj()); |
| 2967 } | 2967 } |
| 2968 if (is_named_call) { | 2968 if (is_named_call) { |
| 2969 EmitCallWithLoadIC(expr); | 2969 EmitCallWithLoadIC(expr); |
| 2970 } else { | 2970 } else { |
| 2971 EmitKeyedCallWithLoadIC(expr, property->key()); | 2971 EmitKeyedCallWithLoadIC(expr, property->key()); |
| 2972 } | 2972 } |
| 2973 } | 2973 } |
| 2974 } else if (call_type == Call::SUPER_CALL) { |
| 2975 SuperReference* super_ref = callee->AsSuperReference(); |
| 2976 DCHECK(super_ref != NULL); |
| 2977 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2978 __ CallRuntime(Runtime::kGetPrototype, 1); |
| 2979 __ Push(result_register()); |
| 2980 VisitForStackValue(super_ref->this_var()); |
| 2981 EmitCall(expr, CallICState::METHOD); |
| 2974 } else { | 2982 } else { |
| 2975 DCHECK(call_type == Call::OTHER_CALL); | 2983 DCHECK(call_type == Call::OTHER_CALL); |
| 2976 // Call to an arbitrary expression not handled specially above. | 2984 // Call to an arbitrary expression not handled specially above. |
| 2977 { PreservePositionScope scope(masm()->positions_recorder()); | 2985 { PreservePositionScope scope(masm()->positions_recorder()); |
| 2978 VisitForStackValue(callee); | 2986 VisitForStackValue(callee); |
| 2979 } | 2987 } |
| 2980 __ PushRoot(Heap::kUndefinedValueRootIndex); | 2988 __ PushRoot(Heap::kUndefinedValueRootIndex); |
| 2981 // Emit function call. | 2989 // Emit function call. |
| 2982 EmitCall(expr); | 2990 EmitCall(expr); |
| 2983 } | 2991 } |
| (...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5150 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5158 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5151 Assembler::target_address_at(call_target_address, | 5159 Assembler::target_address_at(call_target_address, |
| 5152 unoptimized_code)); | 5160 unoptimized_code)); |
| 5153 return OSR_AFTER_STACK_CHECK; | 5161 return OSR_AFTER_STACK_CHECK; |
| 5154 } | 5162 } |
| 5155 | 5163 |
| 5156 | 5164 |
| 5157 } } // namespace v8::internal | 5165 } } // namespace v8::internal |
| 5158 | 5166 |
| 5159 #endif // V8_TARGET_ARCH_X64 | 5167 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |