Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 661433002: Implement the new semantics for 'super(...)' (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports finished Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 / Copyright 2012 the V8 project authors. All rights reserved.
arv (Not doing code reviews) 2014/10/15 14:47:18 oops
Dmitry Lomov (no reviews) 2014/10/15 17:22:57 Done.
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"
11 #include "src/codegen.h" 11 #include "src/codegen.h"
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698