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

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: CR feedback 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698