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

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

Issue 661043003: MIPS: Implement the new semantics for 'super(...)'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 { 3042 {
3043 PreservePositionScope scope(masm()->positions_recorder()); 3043 PreservePositionScope scope(masm()->positions_recorder());
3044 VisitForStackValue(property->obj()); 3044 VisitForStackValue(property->obj());
3045 } 3045 }
3046 if (is_named_call) { 3046 if (is_named_call) {
3047 EmitCallWithLoadIC(expr); 3047 EmitCallWithLoadIC(expr);
3048 } else { 3048 } else {
3049 EmitKeyedCallWithLoadIC(expr, property->key()); 3049 EmitKeyedCallWithLoadIC(expr, property->key());
3050 } 3050 }
3051 } 3051 }
3052 } else if (call_type == Call::SUPER_CALL) {
3053 SuperReference* super_ref = callee->AsSuperReference();
3054 DCHECK(super_ref != NULL);
3055 __ lw(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
3056 __ Push(a0);
3057 __ CallRuntime(Runtime::kGetPrototype, 1);
3058 __ Push(result_register());
3059 VisitForStackValue(super_ref->this_var());
3060 EmitCall(expr, CallICState::METHOD);
3052 } else { 3061 } else {
3053 DCHECK(call_type == Call::OTHER_CALL); 3062 DCHECK(call_type == Call::OTHER_CALL);
3054 // Call to an arbitrary expression not handled specially above. 3063 // Call to an arbitrary expression not handled specially above.
3055 { PreservePositionScope scope(masm()->positions_recorder()); 3064 { PreservePositionScope scope(masm()->positions_recorder());
3056 VisitForStackValue(callee); 3065 VisitForStackValue(callee);
3057 } 3066 }
3058 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex); 3067 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex);
3059 __ push(a1); 3068 __ push(a1);
3060 // Emit function call. 3069 // Emit function call.
3061 EmitCall(expr); 3070 EmitCall(expr);
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
5191 Assembler::target_address_at(pc_immediate_load_address)) == 5200 Assembler::target_address_at(pc_immediate_load_address)) ==
5192 reinterpret_cast<uint32_t>( 5201 reinterpret_cast<uint32_t>(
5193 isolate->builtins()->OsrAfterStackCheck()->entry())); 5202 isolate->builtins()->OsrAfterStackCheck()->entry()));
5194 return OSR_AFTER_STACK_CHECK; 5203 return OSR_AFTER_STACK_CHECK;
5195 } 5204 }
5196 5205
5197 5206
5198 } } // namespace v8::internal 5207 } } // namespace v8::internal
5199 5208
5200 #endif // V8_TARGET_ARCH_MIPS 5209 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698