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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2964 // Restore context register. | 2964 // Restore context register. |
2965 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2965 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2966 context()->DropAndPlug(1, eax); | 2966 context()->DropAndPlug(1, eax); |
2967 | 2967 |
2968 } else if (call_type == Call::GLOBAL_CALL) { | 2968 } else if (call_type == Call::GLOBAL_CALL) { |
2969 EmitCallWithLoadIC(expr); | 2969 EmitCallWithLoadIC(expr); |
2970 } else if (call_type == Call::LOOKUP_SLOT_CALL) { | 2970 } else if (call_type == Call::LOOKUP_SLOT_CALL) { |
2971 // Call to a lookup slot (dynamically introduced variable). | 2971 // Call to a lookup slot (dynamically introduced variable). |
2972 PushCalleeAndWithBaseObject(expr); | 2972 PushCalleeAndWithBaseObject(expr); |
2973 EmitCall(expr); | 2973 EmitCall(expr); |
2974 } else if (call_type == Call::PROPERTY_CALL) { | 2974 } else if (call_type == Call::NAMED_PROPERTY_CALL) { |
2975 Property* property = callee->AsProperty(); | 2975 Property* property = callee->AsProperty(); |
2976 bool is_named_call = property->key()->IsPropertyName(); | 2976 VisitForStackValue(property->obj()); |
2977 if (property->IsSuperAccess()) { | 2977 EmitCallWithLoadIC(expr); |
2978 if (is_named_call) { | 2978 } else if (call_type == Call::KEYED_PROPERTY_CALL) { |
2979 EmitSuperCallWithLoadIC(expr); | 2979 Property* property = callee->AsProperty(); |
2980 } else { | 2980 VisitForStackValue(property->obj()); |
2981 EmitKeyedSuperCallWithLoadIC(expr); | 2981 EmitKeyedCallWithLoadIC(expr, property->key()); |
2982 } | 2982 } else if (call_type == Call::NAMED_SUPER_PROPERTY_CALL) { |
2983 } else { | 2983 EmitSuperCallWithLoadIC(expr); |
2984 VisitForStackValue(property->obj()); | 2984 } else if (call_type == Call::KEYED_SUPER_PROPERTY_CALL) { |
2985 if (is_named_call) { | 2985 EmitKeyedSuperCallWithLoadIC(expr); |
2986 EmitCallWithLoadIC(expr); | |
2987 } else { | |
2988 EmitKeyedCallWithLoadIC(expr, property->key()); | |
2989 } | |
2990 } | |
2991 } else if (call_type == Call::SUPER_CALL) { | 2986 } else if (call_type == Call::SUPER_CALL) { |
2992 EmitSuperConstructorCall(expr); | 2987 EmitSuperConstructorCall(expr); |
2993 } else { | 2988 } else { |
2994 DCHECK(call_type == Call::OTHER_CALL); | 2989 DCHECK(call_type == Call::OTHER_CALL); |
2995 // Call to an arbitrary expression not handled specially above. | 2990 // Call to an arbitrary expression not handled specially above. |
2996 VisitForStackValue(callee); | 2991 VisitForStackValue(callee); |
2997 __ push(Immediate(isolate()->factory()->undefined_value())); | 2992 __ push(Immediate(isolate()->factory()->undefined_value())); |
2998 // Emit function call. | 2993 // Emit function call. |
2999 EmitCall(expr); | 2994 EmitCall(expr); |
3000 } | 2995 } |
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5054 Assembler::target_address_at(call_target_address, | 5049 Assembler::target_address_at(call_target_address, |
5055 unoptimized_code)); | 5050 unoptimized_code)); |
5056 return OSR_AFTER_STACK_CHECK; | 5051 return OSR_AFTER_STACK_CHECK; |
5057 } | 5052 } |
5058 | 5053 |
5059 | 5054 |
5060 } // namespace internal | 5055 } // namespace internal |
5061 } // namespace v8 | 5056 } // namespace v8 |
5062 | 5057 |
5063 #endif // V8_TARGET_ARCH_X87 | 5058 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |