ARM: Do not omit the write-barrier if the input value is a smi.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Jul 2013 12:31:59 +0000 (12:31 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Jul 2013 12:31:59 +0000 (12:31 +0000)
The input value isn't what is written into the field if the representation is double. A heap-number is written to the field instead; which requires a write-barrier.

BUG=chromium:254570
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18854018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/arm/stub-cache-arm.cc

index 00020f803352d21fc04d9aae306d101d8099c02e..3bec1c5af1afd17ad117cdd7e9a62dd4726006b3 100644 (file)
@@ -570,9 +570,6 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
     }
 
     if (!FLAG_track_fields || !representation.IsSmi()) {
-      // Skip updating write barrier if storing a smi.
-      __ JumpIfSmi(value_reg, &exit);
-
       // Update the write barrier for the array address.
       if (!FLAG_track_double_fields || !representation.IsDouble()) {
         __ mov(storage_reg, value_reg);
@@ -599,9 +596,6 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
     }
 
     if (!FLAG_track_fields || !representation.IsSmi()) {
-      // Skip updating write barrier if storing a smi.
-      __ JumpIfSmi(value_reg, &exit);
-
       // Update the write barrier for the array address.
       if (!FLAG_track_double_fields || !representation.IsDouble()) {
         __ mov(storage_reg, value_reg);