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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 3961005: Implement --noinline-new flag fully on x64 and ia32 platforms. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 2 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/stub-cache-ia32.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
===================================================================
--- src/x64/macro-assembler-x64.cc (revision 5685)
+++ src/x64/macro-assembler-x64.cc (working copy)
@@ -1891,6 +1891,20 @@
Register scratch,
Label* gc_required,
AllocationFlags flags) {
+ if (!FLAG_inline_new) {
+ if (FLAG_debug_code) {
+ // Trash the registers to simulate an allocation failure.
+ movl(result, Immediate(0x7091));
+ if (result_end.is_valid()) {
+ movl(result_end, Immediate(0x7191));
+ }
+ if (scratch.is_valid()) {
+ movl(scratch, Immediate(0x7291));
+ }
+ }
+ jmp(gc_required);
+ return;
+ }
ASSERT(!result.is(result_end));
// Load address of new object into result.
@@ -1935,6 +1949,19 @@
Register scratch,
Label* gc_required,
AllocationFlags flags) {
+ if (!FLAG_inline_new) {
+ if (FLAG_debug_code) {
+ // Trash the registers to simulate an allocation failure.
+ movl(result, Immediate(0x7091));
+ movl(result_end, Immediate(0x7191));
+ if (scratch.is_valid()) {
+ movl(scratch, Immediate(0x7291));
+ }
+ // Register element_count is not modified by the function.
+ }
+ jmp(gc_required);
+ return;
+ }
ASSERT(!result.is(result_end));
// Load address of new object into result.
@@ -1964,6 +1991,21 @@
Register scratch,
Label* gc_required,
AllocationFlags flags) {
+ if (!FLAG_inline_new) {
+ if (FLAG_debug_code) {
+ // Trash the registers to simulate an allocation failure.
+ movl(result, Immediate(0x7091));
+ movl(result_end, Immediate(0x7191));
+ if (scratch.is_valid()) {
+ movl(scratch, Immediate(0x7291));
+ }
+ // object_size is left unchanged by this function.
+ }
+ jmp(gc_required);
+ return;
+ }
+ ASSERT(!result.is(result_end));
+
// Load address of new object into result.
LoadAllocationTopHelper(result, result_end, scratch, flags);
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698