Reviewers: ulan,
Message:
PTAL
Description:
Store doubles before calling into the elements transition stub on ARM
BUG=
Please review this at https://chromiumcodereview.appspot.com/22854011/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/lithium-codegen-arm.cc
A + test/mjsunit/regress/regress-et-clobbers-doubles.js
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index
40208065e2c15126618951528ed1949458813a61..19bfecca8314d90a0eb9d84fb0df725202eb36e1
100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -4462,12 +4462,13 @@ void
LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
__ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg,
scratch, GetLinkRegisterState(), kDontSaveFPRegs);
} else {
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(
+ this, Safepoint::kWithRegistersAndDoubles);
__ Move(r0, object_reg);
__ Move(r1, to_map);
TransitionElementsKindStub stub(from_kind, to_kind);
__ CallStub(&stub);
- RecordSafepointWithRegisters(
+ RecordSafepointWithRegistersAndDoubles(
instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
}
__ bind(¬_applicable);
Index: test/mjsunit/regress/regress-et-clobbers-doubles.js
diff --git a/test/mjsunit/compare-nil.js
b/test/mjsunit/regress/regress-et-clobbers-doubles.js
similarity index 90%
copy from test/mjsunit/compare-nil.js
copy to test/mjsunit/regress/regress-et-clobbers-doubles.js
index
0895a31fb80cbe697b678eaa1005926d7d65829f..47fa47925fe48f8a339a807f7cf73ee40f35d29c
100644
--- a/test/mjsunit/compare-nil.js
+++ b/test/mjsunit/regress/regress-et-clobbers-doubles.js
@@ -26,11 +26,14 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
-
-function test(v) {
- return (v == null);
+function t_smi(a) {
+ a[0] = 1.5;
}
-assertFalse(test(true));
-assertFalse(test(true));
-assertTrue(test(null));
-assertTrue(test(null));
+
+t_smi([1,,3]);
+t_smi([1,,3]);
+t_smi([1,,3]);
+%OptimizeFunctionOnNextCall(t_smi);
+var ta = [1,,3];
+t_smi(ta);
+assertEquals([1.5,,3], ta);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.