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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 { | 2965 { |
2966 PreservePositionScope scope(masm()->positions_recorder()); | 2966 PreservePositionScope scope(masm()->positions_recorder()); |
2967 VisitForStackValue(property->obj()); | 2967 VisitForStackValue(property->obj()); |
2968 } | 2968 } |
2969 if (is_named_call) { | 2969 if (is_named_call) { |
2970 EmitCallWithLoadIC(expr); | 2970 EmitCallWithLoadIC(expr); |
2971 } else { | 2971 } else { |
2972 EmitKeyedCallWithLoadIC(expr, property->key()); | 2972 EmitKeyedCallWithLoadIC(expr, property->key()); |
2973 } | 2973 } |
2974 } | 2974 } |
| 2975 } else if (call_type == Call::SUPER_CALL) { |
| 2976 SuperReference* super_ref = callee->AsSuperReference(); |
| 2977 DCHECK(super_ref != NULL); |
| 2978 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 2979 __ CallRuntime(Runtime::kGetPrototype, 1); |
| 2980 __ push(result_register()); |
| 2981 VisitForStackValue(super_ref->this_var()); |
| 2982 EmitCall(expr, CallICState::METHOD); |
2975 } else { | 2983 } else { |
2976 DCHECK(call_type == Call::OTHER_CALL); | 2984 DCHECK(call_type == Call::OTHER_CALL); |
2977 // Call to an arbitrary expression not handled specially above. | 2985 // Call to an arbitrary expression not handled specially above. |
2978 { PreservePositionScope scope(masm()->positions_recorder()); | 2986 { PreservePositionScope scope(masm()->positions_recorder()); |
2979 VisitForStackValue(callee); | 2987 VisitForStackValue(callee); |
2980 } | 2988 } |
2981 __ push(Immediate(isolate()->factory()->undefined_value())); | 2989 __ push(Immediate(isolate()->factory()->undefined_value())); |
2982 // Emit function call. | 2990 // Emit function call. |
2983 EmitCall(expr); | 2991 EmitCall(expr); |
2984 } | 2992 } |
(...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5110 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5118 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5111 Assembler::target_address_at(call_target_address, | 5119 Assembler::target_address_at(call_target_address, |
5112 unoptimized_code)); | 5120 unoptimized_code)); |
5113 return OSR_AFTER_STACK_CHECK; | 5121 return OSR_AFTER_STACK_CHECK; |
5114 } | 5122 } |
5115 | 5123 |
5116 | 5124 |
5117 } } // namespace v8::internal | 5125 } } // namespace v8::internal |
5118 | 5126 |
5119 #endif // V8_TARGET_ARCH_IA32 | 5127 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |