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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 174524: Add allocation support to ia32 macro assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « src/ia32/macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
===================================================================
--- src/ia32/stub-cache-ia32.cc (revision 2767)
+++ src/ia32/stub-cache-ia32.cc (working copy)
@@ -1786,18 +1786,8 @@
// Make sure that the maximum heap object size will never cause us
// problems here.
ASSERT(Heap::MaxObjectSizeInPagedSpace() >= JSObject::kMaxInstanceSize);
- ExternalReference new_space_allocation_top =
- ExternalReference::new_space_allocation_top_address();
- __ mov(edx, Operand::StaticVariable(new_space_allocation_top));
- __ add(ecx, Operand(edx)); // Calculate new top.
- ExternalReference new_space_allocation_limit =
- ExternalReference::new_space_allocation_limit_address();
- __ cmp(ecx, Operand::StaticVariable(new_space_allocation_limit));
- __ j(above_equal, &generic_stub_call);
+ __ AllocateObjectInNewSpace(ecx, edx, ecx, no_reg, &generic_stub_call, false);
- // Update new space top.
- __ mov(Operand::StaticVariable(new_space_allocation_top), ecx);
-
// Allocated the JSObject, now initialize the fields and add the heap tag.
// ebx: initial map
// edx: JSObject
@@ -1860,9 +1850,9 @@
__ mov(ebx, eax);
__ pop(eax);
- // Remove caller arguments from the stack and return.
+ // Remove caller arguments and receiver from the stack and return.
__ pop(ecx);
- __ lea(esp, Operand(esp, ebx, times_4, 1 * kPointerSize)); // 1 ~ receiver
+ __ lea(esp, Operand(esp, ebx, times_pointer_size, 1 * kPointerSize));
__ push(ecx);
__ IncrementCounter(&Counters::constructed_objects, 1);
__ IncrementCounter(&Counters::constructed_objects_stub, 1);
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698