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 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5135 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5143 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5136 Assembler::target_address_at(call_target_address, | 5144 Assembler::target_address_at(call_target_address, |
5137 unoptimized_code)); | 5145 unoptimized_code)); |
5138 return OSR_AFTER_STACK_CHECK; | 5146 return OSR_AFTER_STACK_CHECK; |
5139 } | 5147 } |
5140 | 5148 |
5141 | 5149 |
5142 } } // namespace v8::internal | 5150 } } // namespace v8::internal |
5143 | 5151 |
5144 #endif // V8_TARGET_ARCH_IA32 | 5152 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |