]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/repeated-put-by-id-reallocating-transition.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / repeated-put-by-id-reallocating-transition.js
CommitLineData
81345200
A
1function foo(o) {
2 o.a = 0
3 o.b = 1
4 o.c = 2
5 o.d = 3
6 o.e = 4
7 o.f = 5
8 o.g = 6
9 o.h = 7
10 o.i = 8
11 o.j = 9
12 o.k = 10
13 o.l = 11
14 o.m = 12
15 o.n = 13
16 o.o = 14
17 o.p = 15
18 o.q = 16
19 o.r = 17
20 o.s = 18
21 o.t = 19
22 o.u = 20
23 o.v = 21
24 o.w = 22
25 o.x = 23
26 o.y = 24
27 o.z = 25
28}
29
30noInline(foo);
31
32for (var i = 0; i < 100000; ++i) {
33 var o = {};
34 foo(o);
35 if (o.a != 0)
36 throw "Error: bad value for a: " + o.a;
37 if (o.b != 1)
38 throw "Error: bad value for b: " + o.b;
39 if (o.c != 2)
40 throw "Error: bad value for c: " + o.c;
41 if (o.d != 3)
42 throw "Error: bad value for d: " + o.d;
43 if (o.e != 4)
44 throw "Error: bad value for e: " + o.e;
45 if (o.f != 5)
46 throw "Error: bad value for f: " + o.f;
47 if (o.g != 6)
48 throw "Error: bad value for g: " + o.g;
49 if (o.h != 7)
50 throw "Error: bad value for h: " + o.h;
51 if (o.i != 8)
52 throw "Error: bad value for i: " + o.i;
53 if (o.j != 9)
54 throw "Error: bad value for j: " + o.j;
55 if (o.k != 10)
56 throw "Error: bad value for k: " + o.k;
57 if (o.l != 11)
58 throw "Error: bad value for l: " + o.l;
59 if (o.m != 12)
60 throw "Error: bad value for m: " + o.m;
61 if (o.n != 13)
62 throw "Error: bad value for n: " + o.n;
63 if (o.o != 14)
64 throw "Error: bad value for o: " + o.o;
65 if (o.p != 15)
66 throw "Error: bad value for p: " + o.p;
67 if (o.q != 16)
68 throw "Error: bad value for q: " + o.q;
69 if (o.r != 17)
70 throw "Error: bad value for r: " + o.r;
71 if (o.s != 18)
72 throw "Error: bad value for s: " + o.s;
73 if (o.t != 19)
74 throw "Error: bad value for t: " + o.t;
75 if (o.u != 20)
76 throw "Error: bad value for u: " + o.u;
77 if (o.v != 21)
78 throw "Error: bad value for v: " + o.v;
79 if (o.w != 22)
80 throw "Error: bad value for w: " + o.w;
81 if (o.x != 23)
82 throw "Error: bad value for x: " + o.x;
83 if (o.y != 24)
84 throw "Error: bad value for y: " + o.y;
85 if (o.z != 25)
86 throw "Error: bad value for z: " + o.z;
87}