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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 285543002: Recognize List constructor and turn it into CreateArray ... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
===================================================================
--- runtime/vm/stub_code_arm64.cc (revision 36136)
+++ runtime/vm/stub_code_arm64.cc (working copy)
@@ -617,12 +617,17 @@
// and is computed as:
// RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)).
// Assert that length is a Smi.
+
+ // TODO(zra): Fix code below before enabling.
+ __ b(&slow_case);
__ tsti(R2, kSmiTagMask);
if (FLAG_use_slow_path) {
__ b(&slow_case);
} else {
__ b(&slow_case, NE);
}
+ __ cmp(R2, Operand(0));
+ __ b(&slow_case, LT);
__ LoadFieldFromOffset(R8, CTX, Context::isolate_offset(), kNoPP);
__ LoadFromOffset(R8, R8, Isolate::heap_offset(), kNoPP);
__ LoadFromOffset(R8, R8, Heap::new_space_offset(), kNoPP);
@@ -638,7 +643,8 @@
__ add(R3, R3, Operand(R2, LSL, 2)); // R2 is Smi.
ASSERT(kSmiTagShift == 1);
__ andi(R3, R3, ~(kObjectAlignment - 1));
- __ add(R7, R3, Operand(R0));
+ __ adds(R7, R3, Operand(R0));
+ __ b(&slow_case, VS);
// Check if the allocation fits into the remaining space.
// R0: potential new object start.
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698