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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2962 // Restore context register. | 2962 // Restore context register. |
2963 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2963 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2964 context()->DropAndPlug(1, rax); | 2964 context()->DropAndPlug(1, rax); |
2965 } else if (call_type == Call::GLOBAL_CALL) { | 2965 } else if (call_type == Call::GLOBAL_CALL) { |
2966 EmitCallWithLoadIC(expr); | 2966 EmitCallWithLoadIC(expr); |
2967 | 2967 |
2968 } else if (call_type == Call::LOOKUP_SLOT_CALL) { | 2968 } else if (call_type == Call::LOOKUP_SLOT_CALL) { |
2969 // Call to a lookup slot (dynamically introduced variable). | 2969 // Call to a lookup slot (dynamically introduced variable). |
2970 PushCalleeAndWithBaseObject(expr); | 2970 PushCalleeAndWithBaseObject(expr); |
2971 EmitCall(expr); | 2971 EmitCall(expr); |
2972 } else if (call_type == Call::PROPERTY_CALL) { | 2972 } else if (call_type == Call::NAMED_PROPERTY_CALL) { |
2973 Property* property = callee->AsProperty(); | 2973 Property* property = callee->AsProperty(); |
2974 bool is_named_call = property->key()->IsPropertyName(); | 2974 VisitForStackValue(property->obj()); |
2975 if (property->IsSuperAccess()) { | 2975 EmitCallWithLoadIC(expr); |
2976 if (is_named_call) { | 2976 } else if (call_type == Call::KEYED_PROPERTY_CALL) { |
2977 EmitSuperCallWithLoadIC(expr); | 2977 Property* property = callee->AsProperty(); |
2978 } else { | 2978 VisitForStackValue(property->obj()); |
2979 EmitKeyedSuperCallWithLoadIC(expr); | 2979 EmitKeyedCallWithLoadIC(expr, property->key()); |
2980 } | 2980 } else if (call_type == Call::NAMED_SUPER_PROPERTY_CALL) { |
2981 } else { | 2981 EmitSuperCallWithLoadIC(expr); |
2982 VisitForStackValue(property->obj()); | 2982 } else if (call_type == Call::KEYED_SUPER_PROPERTY_CALL) { |
2983 if (is_named_call) { | 2983 EmitKeyedSuperCallWithLoadIC(expr); |
2984 EmitCallWithLoadIC(expr); | |
2985 } else { | |
2986 EmitKeyedCallWithLoadIC(expr, property->key()); | |
2987 } | |
2988 } | |
2989 } else if (call_type == Call::SUPER_CALL) { | 2984 } else if (call_type == Call::SUPER_CALL) { |
2990 EmitSuperConstructorCall(expr); | 2985 EmitSuperConstructorCall(expr); |
2991 } else { | 2986 } else { |
2992 DCHECK(call_type == Call::OTHER_CALL); | 2987 DCHECK(call_type == Call::OTHER_CALL); |
2993 // Call to an arbitrary expression not handled specially above. | 2988 // Call to an arbitrary expression not handled specially above. |
2994 VisitForStackValue(callee); | 2989 VisitForStackValue(callee); |
2995 __ PushRoot(Heap::kUndefinedValueRootIndex); | 2990 __ PushRoot(Heap::kUndefinedValueRootIndex); |
2996 // Emit function call. | 2991 // Emit function call. |
2997 EmitCall(expr); | 2992 EmitCall(expr); |
2998 } | 2993 } |
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5077 Assembler::target_address_at(call_target_address, | 5072 Assembler::target_address_at(call_target_address, |
5078 unoptimized_code)); | 5073 unoptimized_code)); |
5079 return OSR_AFTER_STACK_CHECK; | 5074 return OSR_AFTER_STACK_CHECK; |
5080 } | 5075 } |
5081 | 5076 |
5082 | 5077 |
5083 } // namespace internal | 5078 } // namespace internal |
5084 } // namespace v8 | 5079 } // namespace v8 |
5085 | 5080 |
5086 #endif // V8_TARGET_ARCH_X64 | 5081 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |