Reviewers: Benedikt Meurer,
Message:
PTAL
Description:
Move failing ASSERT on ARM to a more sane place.
Objects can actually be stored into themselves. This fails when no write
barrier is needed (eg, the object was just allocated).
Please review this at https://codereview.chromium.org/148733005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -6 lines):
M src/arm/lithium-codegen-arm.cc
M src/arm/macro-assembler-arm.cc
A + test/mjsunit/recursive-store-opt.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
3738d0078708e1ef5cc6841b285045b3ce613295..dde402303aef709c0f4b06e43003bff22448eb22
100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -4086,7 +4086,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField*
instr) {
// Do the store.
Register value = ToRegister(instr->value());
- ASSERT(!object.is(value));
SmiCheck check_needed =
instr->hydrogen()->value()->IsHeapObject()
? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index
1fab8c326f7f71ea5431cf26c7d9ead72b240d62..77c514ff546624baa7db121f21baf63702608e5e
100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -509,6 +509,7 @@ void MacroAssembler::RecordWrite(Register object,
SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check) {
+ ASSERT(!object.is(value));
if (emit_debug_code()) {
ldr(ip, MemOperand(address));
cmp(ip, value);
Index: test/mjsunit/recursive-store-opt.js
diff --git a/test/mjsunit/regress/regress-store-uncacheable.js
b/test/mjsunit/recursive-store-opt.js
similarity index 93%
copy from test/mjsunit/regress/regress-store-uncacheable.js
copy to test/mjsunit/recursive-store-opt.js
index
e9c9fc25b49c95293a5c0acea0bea8d073a79e0e..fb2649248dbabc642f864f671d0ce2273ad44bd7
100644
--- a/test/mjsunit/regress/regress-store-uncacheable.js
+++ b/test/mjsunit/recursive-store-opt.js
@@ -1,4 +1,4 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -27,14 +27,15 @@
// Flags: --allow-natives-syntax
+function g() {
+ this.x = this;
+}
+
function f() {
- var o = {};
- o["<abc>"] = 123;
+ return new g();
}
f();
f();
-f();
%OptimizeFunctionOnNextCall(f);
f();
-assertOptimized(f);
--
--
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.