OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 function B() { | 49 function B() { |
50 this.x = 3; | 50 this.x = 3; |
51 } | 51 } |
52 | 52 |
53 var a_B = new B(); | 53 var a_B = new B(); |
54 var r = 1; | 54 var r = 1; |
55 var i = 0; | 55 var i = 0; |
56 var holder = new Array(); | 56 var holder = new Array(); |
57 while (i++ < 15000) { | 57 while (i++ < 2001) { |
58 if (i == 14000) { | 58 if (i == 1400) { |
59 gc(); | 59 gc(); |
60 } | 60 } |
61 var s = r % 100000000; | 61 var s = r % 100000000; |
62 var obj = new A(); | 62 var obj = new A(); |
63 holder[i % 1000] = obj; | 63 holder[i % 1000] = obj; |
64 while (s > 0) { | 64 while (s > 0) { |
65 var property_name = String.fromCharCode(s % 10 + 97); | 65 var property_name = String.fromCharCode(s % 10 + 97); |
66 obj[property_name] = a_B; | 66 obj[property_name] = a_B; |
67 s = s / 10; | 67 s = s / 10; |
68 } | 68 } |
69 if ( i % 101 == 0 ) { | 69 if (i % 101 == 0) { |
70 // Check that all object maps have no undefined properties | 70 // Check that all object maps have no undefined properties |
71 s = r % 100000000; | 71 s = r % 100000000; |
72 obj = new A(); | 72 obj = new A(); |
73 while (s > 0) { | 73 while (s > 0) { |
74 for (var p in obj) { | 74 for (var p in obj) { |
75 assertEquals(a_B, obj[p] ); | 75 assertEquals(a_B, obj[p] ); |
76 } | 76 } |
77 property_name = String.fromCharCode(s % 10 + 97); | 77 property_name = String.fromCharCode(s % 10 + 97); |
78 obj[property_name] = a_B; | 78 obj[property_name] = a_B; |
79 s = s / 10; | 79 s = s / 10; |
80 } | 80 } |
81 } | 81 } |
82 r = r * 7 % 100000000; | 82 r = r * 7 % 100000000; |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 dotest(); | 86 dotest(); |
OLD | NEW |