Reviewers: William Hesse, Description: Fixes bug in the top-level compiler with the write barrier for assignments to context slots:
The test for a SMI before the write barrier tested the wrong register: r0 = target context address r1 = value to be written This change fixes the SMI test and tests r1 instead of r0. Please review this at http://codereview.chromium.org/384085 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/arm/fast-codegen-arm.cc Index: src/arm/fast-codegen-arm.cc =================================================================== --- src/arm/fast-codegen-arm.cc (revision 3293) +++ src/arm/fast-codegen-arm.cc (working copy) @@ -862,10 +862,10 @@ int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize; // Update the write barrier for the array store with r0 as the scratch - // register. Skip the write barrier if r0 is a smi. + // register. Skip the write barrier if the value written (r1) is a smi. // The smi test is part of RecordWrite on other platforms, not on arm. Label exit; - __ tst(r0, Operand(kSmiTagMask)); + __ tst(r1, Operand(kSmiTagMask)); __ b(eq, &exit); __ mov(r2, Operand(offset)); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
