From 3c8aa761f02fba434a444f6ed068375f6e4fbc0e Mon Sep 17 00:00:00 2001 From: Andrei Popescu Date: Fri, 28 Aug 2009 12:56:47 +0100 Subject: Update V8 to 2780 to fix a crash and pick up some ARM optimizations --- V8Binding/v8/test/mjsunit/date-parse.js | 4 +- .../v8/test/mjsunit/debug-stepin-constructor.js | 4 ++ V8Binding/v8/test/mjsunit/mjsunit.status | 2 +- V8Binding/v8/test/mjsunit/simple-constructor.js | 66 +++++++++++++++++++++- 4 files changed, 71 insertions(+), 5 deletions(-) (limited to 'V8Binding/v8/test/mjsunit') diff --git a/V8Binding/v8/test/mjsunit/date-parse.js b/V8Binding/v8/test/mjsunit/date-parse.js index bb7ecd2..4bbb2c6 100644 --- a/V8Binding/v8/test/mjsunit/date-parse.js +++ b/V8Binding/v8/test/mjsunit/date-parse.js @@ -250,8 +250,8 @@ testCasesMisc.forEach(testDateParseMisc); // Test that we can parse our own date format. -// (Dates from 1970 to ~2070 with 95h steps.) -for (var i = 0; i < 24 * 365 * 100; i += 95) { +// (Dates from 1970 to ~2070 with 150h steps.) +for (var i = 0; i < 24 * 365 * 100; i += 150) { var ms = i * (3600 * 1000); var s = (new Date(ms)).toString(); assertEquals(ms, Date.parse(s), "parse own: " + s); diff --git a/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js b/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js index 6dbe5d1..6ee3347 100644 --- a/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js +++ b/V8Binding/v8/test/mjsunit/debug-stepin-constructor.js @@ -59,6 +59,10 @@ function f() { break_break_point_hit_count = 0; f(); assertEquals(5, break_break_point_hit_count); +f(); +assertEquals(10, break_break_point_hit_count); +f(); +assertEquals(15, break_break_point_hit_count); // Test step into constructor with builtin constructor. function g() { diff --git a/V8Binding/v8/test/mjsunit/mjsunit.status b/V8Binding/v8/test/mjsunit/mjsunit.status index 4bf67e8..6ac4938 100644 --- a/V8Binding/v8/test/mjsunit/mjsunit.status +++ b/V8Binding/v8/test/mjsunit/mjsunit.status @@ -52,7 +52,7 @@ debug-evaluate-recursive: CRASH || FAIL debug-changebreakpoint: CRASH || FAIL debug-clearbreakpoint: CRASH || FAIL debug-clearbreakpointgroup: PASS, FAIL if $mode == debug -debug-conditional-breakpoints: FAIL +debug-conditional-breakpoints: CRASH || FAIL debug-evaluate: CRASH || FAIL debug-ignore-breakpoints: CRASH || FAIL debug-multiple-breakpoints: CRASH || FAIL diff --git a/V8Binding/v8/test/mjsunit/simple-constructor.js b/V8Binding/v8/test/mjsunit/simple-constructor.js index b26d651..e9ae921 100755 --- a/V8Binding/v8/test/mjsunit/simple-constructor.js +++ b/V8Binding/v8/test/mjsunit/simple-constructor.js @@ -53,9 +53,11 @@ function f4(x) { } o1_1 = new f1(); +assertEquals(1, o1_1.x, "1"); o1_2 = new f1(); -assertArrayEquals(["x"], props(o1_1)); -assertArrayEquals(["x"], props(o1_2)); +assertEquals(1, o1_1.x, "2"); +assertArrayEquals(["x"], props(o1_1), "3"); +assertArrayEquals(["x"], props(o1_2), "4"); o2_1 = new f2(0); o2_2 = new f2(0); @@ -76,3 +78,63 @@ o4_1_1 = new f4(1); o4_1_2 = new f4(1); assertArrayEquals(["x", "y"], props(o4_1_1)); assertArrayEquals(["x", "y"], props(o4_1_2)); + +function f5(x, y) { + this.x = x; + this.y = y; +} + +function f6(x, y) { + this.y = y; + this.x = x; +} + +function f7(x, y, z) { + this.x = x; + this.y = y; +} + +function testArgs(fun) { + obj = new fun(); + assertArrayEquals(["x", "y"], props(obj)); + assertEquals(void 0, obj.x); + assertEquals(void 0, obj.y); + + obj = new fun("x"); + assertArrayEquals(["x", "y"], props(obj)); + assertEquals("x", obj.x); + assertEquals(void 0, obj.y); + + obj = new fun("x", "y"); + assertArrayEquals(["x", "y"], props(obj)); + assertEquals("x", obj.x); + assertEquals("y", obj.y); + + obj = new fun("x", "y", "z"); + assertArrayEquals(["x", "y"], props(obj)); + assertEquals("x", obj.x); + assertEquals("y", obj.y); +} + +for (var i = 0; i < 10; i++) { + testArgs(f5); + testArgs(f6); + testArgs(f7); +} + +function g(){ + this.x=1 +} + +o = new g(); +assertEquals(1, o.x); +o = new g(); +assertEquals(1, o.x); +g.prototype = {y:2} +o = new g(); +assertEquals(1, o.x); +assertEquals(2, o.y); +o = new g(); +assertEquals(1, o.x); +assertEquals(2, o.y); + -- cgit v1.1