Commit 29445458 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Adding assertions to fast elements conversion.

Review URL: http://codereview.chromium.org/8437092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 48fed9a8
......@@ -180,6 +180,10 @@ void ElementsTransitionGenerator::GenerateSmiOnlyToDouble(
// Hole found, store the-hole NaN.
__ bind(&convert_hole);
if (FLAG_debug_code) {
__ CompareRoot(r9, Heap::kTheHoleValueRootIndex);
__ Assert(eq, "object found in smi-only array");
}
__ Strd(r4, r5, MemOperand(r7, 8, PostIndex));
__ bind(&entry);
......
......@@ -378,6 +378,12 @@ void ElementsTransitionGenerator::GenerateSmiOnlyToDouble(
// Found hole, store hole_nan_as_double instead.
__ bind(&convert_hole);
if (FLAG_debug_code) {
__ cmp(ebx, masm->isolate()->factory()->the_hole_value());
__ Assert(equal, "object found in smi-only array");
}
if (CpuFeatures::IsSupported(SSE2)) {
CpuFeatures::Scope use_sse2(SSE2);
__ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
......
......@@ -254,6 +254,12 @@ void ElementsTransitionGenerator::GenerateSmiOnlyToDouble(
xmm0);
__ jmp(&entry);
__ bind(&convert_hole);
if (FLAG_debug_code) {
__ CompareRoot(rbx, Heap::kTheHoleValueRootIndex);
__ Assert(equal, "object found in smi-only array");
}
__ movq(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), r15);
__ bind(&entry);
__ decq(r9);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment