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

Side by Side Diff: runtime/vm/stub_code_mips.cc

Issue 14935005: Implement a variation of scalar replacement for non-escaping allocations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 7 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 | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 __ addiu(SP, SP, Immediate(2 * kWordSize)); 444 __ addiu(SP, SP, Immediate(2 * kWordSize));
445 __ mov(FP, V0); 445 __ mov(FP, V0);
446 446
447 // Frame is fully rewritten at this point and it is safe to perform a GC. 447 // Frame is fully rewritten at this point and it is safe to perform a GC.
448 // Materialize any objects that were deferred by FillFrame because they 448 // Materialize any objects that were deferred by FillFrame because they
449 // require allocation. 449 // require allocation.
450 __ EnterStubFrame(); 450 __ EnterStubFrame();
451 if (preserve_result) { 451 if (preserve_result) {
452 __ Push(T1); // Preserve result, it will be GC-d here. 452 __ Push(T1); // Preserve result, it will be GC-d here.
453 } 453 }
454 __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); 454 __ PushObject(Smi::ZoneHandle()); // Space for the result.
455 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry);
456 // Result tells stub how many bytes to remove from the expression stack
457 // of the bottom-most frame. They were used as materialization arguments.
458 __ Pop(T1);
459 __ SmiUntag(T1);
455 if (preserve_result) { 460 if (preserve_result) {
456 __ Pop(V0); // Restore result. 461 __ Pop(V0); // Restore result.
457 } 462 }
463 __ LeaveStubFrame();
458 464
459 __ LeaveStubFrameAndReturn(); 465 // Return.
466 __ jr(RA);
467 __ delay_slot()->addu(SP, SP, T1); // Remove materialization arguments.
460 } 468 }
461 469
462 470
463 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { 471 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) {
464 __ Unimplemented("DeoptimizeLazy stub"); 472 __ Unimplemented("DeoptimizeLazy stub");
465 } 473 }
466 474
467 475
468 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { 476 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
469 GenerateDeoptimizationSequence(assembler, false); // Don't preserve V0. 477 GenerateDeoptimizationSequence(assembler, false); // Don't preserve V0.
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 __ Bind(&done); 2132 __ Bind(&done);
2125 __ lw(T0, Address(SP, 0 * kWordSize)); 2133 __ lw(T0, Address(SP, 0 * kWordSize));
2126 __ lw(T1, Address(SP, 1 * kWordSize)); 2134 __ lw(T1, Address(SP, 1 * kWordSize));
2127 __ Ret(); 2135 __ Ret();
2128 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); 2136 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize));
2129 } 2137 }
2130 2138
2131 } // namespace dart 2139 } // namespace dart
2132 2140
2133 #endif // defined TARGET_ARCH_MIPS 2141 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698