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

Side by Side Diff: runtime/vm/stub_code_arm.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/object.cc ('k') | runtime/vm/stub_code_ia32.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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 __ LeaveStubFrame(); 387 __ LeaveStubFrame();
388 __ mov(FP, ShifterOperand(R0)); 388 __ mov(FP, ShifterOperand(R0));
389 389
390 // Frame is fully rewritten at this point and it is safe to perform a GC. 390 // Frame is fully rewritten at this point and it is safe to perform a GC.
391 // Materialize any objects that were deferred by FillFrame because they 391 // Materialize any objects that were deferred by FillFrame because they
392 // require allocation. 392 // require allocation.
393 __ EnterStubFrame(); 393 __ EnterStubFrame();
394 if (preserve_result) { 394 if (preserve_result) {
395 __ Push(R1); // Preserve result, it will be GC-d here. 395 __ Push(R1); // Preserve result, it will be GC-d here.
396 } 396 }
397 __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); 397 __ PushObject(Smi::ZoneHandle()); // Space for the result.
398 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry);
399 // Result tells stub how many bytes to remove from the expression stack
400 // of the bottom-most frame. They were used as materialization arguments.
401 __ Pop(R1);
398 if (preserve_result) { 402 if (preserve_result) {
399 __ Pop(R0); // Restore result. 403 __ Pop(R0); // Restore result.
400 } 404 }
401 __ LeaveStubFrame(); 405 __ LeaveStubFrame();
406 // Remove materialization arguments.
407 __ add(SP, SP, ShifterOperand(R1, ASR, kSmiTagSize));
402 __ Ret(); 408 __ Ret();
403 } 409 }
404 410
405 411
406 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { 412 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) {
407 // Correct return address to point just after the call that is being 413 // Correct return address to point just after the call that is being
408 // deoptimized. 414 // deoptimized.
409 __ AddImmediate(LR, -CallPattern::kFixedLengthInBytes); 415 __ AddImmediate(LR, -CallPattern::kFixedLengthInBytes);
410 GenerateDeoptimizationSequence(assembler, true); // Preserve R0. 416 GenerateDeoptimizationSequence(assembler, true); // Preserve R0.
411 } 417 }
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 __ Bind(&reference_compare); 1929 __ Bind(&reference_compare);
1924 __ cmp(left, ShifterOperand(right)); 1930 __ cmp(left, ShifterOperand(right));
1925 __ Bind(&done); 1931 __ Bind(&done);
1926 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); 1932 __ PopList((1 << R0) | (1 << R1) | (1 << R2));
1927 __ Ret(); 1933 __ Ret();
1928 } 1934 }
1929 1935
1930 } // namespace dart 1936 } // namespace dart
1931 1937
1932 #endif // defined TARGET_ARCH_ARM 1938 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698