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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 228643002: Make new space iterable when transitioning double array to objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace Smi(0) with one-map-filler Created 6 years, 8 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/arm64/codegen-arm64.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index 350a8fb2242a8a5f6ae66ddb9e518a930d90e77c..a22f36950a91cd60cf0a658e3b7e3a8cdaa4fbd0 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -783,7 +783,8 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
- Label loop, entry, convert_hole, gc_required, only_change_map, success;
+ Label loop, entry, convert_hole, gc_required, gc_cleanup, only_change_map,
+ success;
if (mode == TRACK_ALLOCATION_SITE) {
__ JumpIfJSArrayHasAllocationMemento(edx, edi, fail);
@@ -829,8 +830,16 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
OMIT_SMI_CHECK);
__ jmp(&success);
- // Call into runtime if GC is required.
+ __ bind(&gc_cleanup);
+#ifdef VERIFY_HEAP
+ // Make sure new space is iterable if we are verifying the heap.
+ __ mov(edx, masm->isolate()->factory()->one_pointer_filler_map());
+ __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), edx);
+ __ sub(ebx, Immediate(Smi::FromInt(1)));
+ __ j(not_sign, &gc_cleanup);
+#endif
__ bind(&gc_required);
+ // Call into runtime if GC is required.
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
__ pop(ebx);
__ pop(edx);
@@ -847,7 +856,7 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
__ j(equal, &convert_hole);
// Non-hole double, copy value into a heap number.
- __ AllocateHeapNumber(edx, esi, no_reg, &gc_required);
+ __ AllocateHeapNumber(edx, esi, no_reg, &gc_cleanup);
// edx: new heap number
if (CpuFeatures::IsSupported(SSE2)) {
CpuFeatureScope fscope(masm, SSE2);
« no previous file with comments | « src/arm64/codegen-arm64.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698