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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 10828182: Fix x64 performance regression, array allocation was always going via runtime. Improvements: Havlak… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
===================================================================
--- runtime/vm/intrinsifier_x64.cc (revision 10316)
+++ runtime/vm/intrinsifier_x64.cc (working copy)
@@ -61,12 +61,13 @@
// RAX: potential new object start.
// RCX: potential next object start.
// RDI: allocation size.
- __ movq(R13, Immediate(heap->TopAddress()));
+ __ movq(R13, Immediate(heap->EndAddress()));
__ cmpq(RCX, Address(R13, 0));
__ j(ABOVE_EQUAL, &fall_through);
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
+ __ movq(R13, Immediate(heap->TopAddress()));
__ movq(Address(R13, 0), RCX);
__ addq(RAX, Immediate(kHeapObjectTag));
@@ -76,7 +77,7 @@
// RDI: allocation size.
{
Label size_tag_overflow, done;
- __ cmpl(RDI, Immediate(RawObject::SizeTag::kMaxSizeTag));
+ __ cmpq(RDI, Immediate(RawObject::SizeTag::kMaxSizeTag));
__ j(ABOVE, &size_tag_overflow, Assembler::kNearJump);
__ shlq(RDI, Immediate(RawObject::kSizeTagBit - kObjectAlignmentLog2));
__ jmp(&done, Assembler::kNearJump);
@@ -94,7 +95,7 @@
// RAX: new object start as a tagged pointer.
// RCX: new object end address.
// Store the type argument field.
- __ movl(RDI, Address(RSP, kTypeArgumentsOffset)); // type argument.
+ __ movq(RDI, Address(RSP, kTypeArgumentsOffset)); // type argument.
__ StoreIntoObjectNoBarrier(RAX,
FieldAddress(RAX, Array::type_arguments_offset()),
RDI);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698