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

Side by Side Diff: src/x64/full-codegen-x64.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.
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_X64 7 #if V8_TARGET_ARCH_X64
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 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 { 2964 {
2965 PreservePositionScope scope(masm()->positions_recorder()); 2965 PreservePositionScope scope(masm()->positions_recorder());
2966 VisitForStackValue(property->obj()); 2966 VisitForStackValue(property->obj());
2967 } 2967 }
2968 if (is_named_call) { 2968 if (is_named_call) {
2969 EmitCallWithLoadIC(expr); 2969 EmitCallWithLoadIC(expr);
2970 } else { 2970 } else {
2971 EmitKeyedCallWithLoadIC(expr, property->key()); 2971 EmitKeyedCallWithLoadIC(expr, property->key());
2972 } 2972 }
2973 } 2973 }
2974 } else if (call_type == Call::SUPER_CALL) {
2975 SuperReference* super_ref = callee->AsSuperReference();
2976 DCHECK(super_ref != NULL);
2977 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
2978 __ CallRuntime(Runtime::kGetPrototype, 1);
2979 __ Push(result_register());
2980 VisitForStackValue(super_ref->this_var());
2981 EmitCall(expr, CallICState::METHOD);
2974 } else { 2982 } else {
2975 DCHECK(call_type == Call::OTHER_CALL); 2983 DCHECK(call_type == Call::OTHER_CALL);
2976 // Call to an arbitrary expression not handled specially above. 2984 // Call to an arbitrary expression not handled specially above.
2977 { PreservePositionScope scope(masm()->positions_recorder()); 2985 { PreservePositionScope scope(masm()->positions_recorder());
2978 VisitForStackValue(callee); 2986 VisitForStackValue(callee);
2979 } 2987 }
2980 __ PushRoot(Heap::kUndefinedValueRootIndex); 2988 __ PushRoot(Heap::kUndefinedValueRootIndex);
2981 // Emit function call. 2989 // Emit function call.
2982 EmitCall(expr); 2990 EmitCall(expr);
2983 } 2991 }
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5125 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5133 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5126 Assembler::target_address_at(call_target_address, 5134 Assembler::target_address_at(call_target_address,
5127 unoptimized_code)); 5135 unoptimized_code));
5128 return OSR_AFTER_STACK_CHECK; 5136 return OSR_AFTER_STACK_CHECK;
5129 } 5137 }
5130 5138
5131 5139
5132 } } // namespace v8::internal 5140 } } // namespace v8::internal
5133 5141
5134 #endif // V8_TARGET_ARCH_X64 5142 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698