Reviewers: Toon Verwaest,
Description:
Fix representation generalization for doubles.
BUG=
Please review this at https://codereview.chromium.org/184393002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+14, -9 lines):
M src/property-details.h
A + test/mjsunit/regress/regress-347909.js
Index: src/property-details.h
diff --git a/src/property-details.h b/src/property-details.h
index
7bc553a46be211749cf1f3cac6b4e4311d419b72..3405bd904a7bc97dcbfc7afd04d96d6a3237b3b8
100644
--- a/src/property-details.h
+++ b/src/property-details.h
@@ -138,7 +138,7 @@ class Representation {
ASSERT(kind_ != kExternal);
ASSERT(other.kind_ != kExternal);
- if (IsHeapObject()) return other.IsDouble() || other.IsNone();
+ if (IsHeapObject()) return other.IsNone();
if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false;
if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false;
return kind_ > other.kind_;
Index: test/mjsunit/regress/regress-347909.js
diff --git a/test/mjsunit/regress/regress-347530.js
b/test/mjsunit/regress/regress-347909.js
similarity index 55%
copy from test/mjsunit/regress/regress-347530.js
copy to test/mjsunit/regress/regress-347909.js
index
330fda38c01b5b3c8cc3926fda0520b086aa7289..60ccbef845a4d7a22aa261f0331331660e9646e7
100644
--- a/test/mjsunit/regress/regress-347530.js
+++ b/test/mjsunit/regress/regress-347909.js
@@ -2,11 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-gc
-a = [];
-a[1000] = .1;
-a.length = 0;
-gc();
-gc();
-a[1000] = .1;
-assertEquals(.1, a[1000]);
+a = {y:1.5};
+a.y = 0;
+b = a.y;
+a.y= {};
+d = 1;
+function f() {
+ d = 0;
+ return {y: b};
+}
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+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.