Reviewers: Toon Verwaest,

Message:
Please take a look. This is the workaround we discussed. It is small and should
be safe to merge back.

I will follow up with a fix to disable double field tracking during snapshot
generation.

Description:
Initialize Date parse cache with SMI instead of double to workaround sharing
mutable heap numbers in snapshot.

This is the only field in the snapshot that was tracked as double.

[email protected]
TEST=mjsunit/regress/regress-280531.js
BUG=280531

Please review this at https://chromiumcodereview.appspot.com/112003005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -14 lines):
  M src/date.js
  A + test/mjsunit/regress/regress-280531.js


Index: src/date.js
diff --git a/src/date.js b/src/date.js
index 2363841085a220d50acbe7d8cc3539e692aef05a..f3d4af244f9692c223ee5b467ace6c52e177d46f 100644
--- a/src/date.js
+++ b/src/date.js
@@ -132,7 +132,7 @@ function TimeClip(time) {
 // strings over and over again.
 var Date_cache = {
   // Cached time value.
-  time: NAN,
+  time: 0,
   // String input for which the cached time is valid.
   string: null
 };
Index: test/mjsunit/regress/regress-280531.js
diff --git a/test/cctest/test-cpu-ia32.cc b/test/mjsunit/regress/regress-280531.js
similarity index 86%
copy from test/cctest/test-cpu-ia32.cc
copy to test/mjsunit/regress/regress-280531.js
index 245450bf92b595e417a53edff09a5849d74dd135..6799574f691f9c52a266e38dfcf9b96c9d3a6ff4 100644
--- a/test/cctest/test-cpu-ia32.cc
+++ b/test/mjsunit/regress/regress-280531.js
@@ -25,16 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-#include "v8.h"
-
-#include "cctest.h"
-#include "cpu.h"
-
-using namespace v8::internal;
-
-
-TEST(RequiredFeaturesX64) {
-  // Test for the features required by every x86 CPU in compat/legacy mode.
-  CPU cpu;
-  CHECK(cpu.has_sahf());
-}
+var contextA = Realm.create();
+var date1 = Realm.eval(contextA, "new Date('Thu, 29 Aug 2013 00:00:00 UTC')");
+new Date('Thu, 29 Aug 2013 00:00:01 UTC');
+var date2 = Realm.eval(contextA, "new Date('Thu, 29 Aug 2013 00:00:00 UTC')");
+assertEquals(date1, date2);


--
--
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.

Reply via email to