OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 create1(0); | 84 create1(0); |
85 a = create1(0); | 85 a = create1(0); |
86 assertFalse(isHoley(a)); | 86 assertFalse(isHoley(a)); |
87 assertKind(elements_kind.fast_smi_only, a); | 87 assertKind(elements_kind.fast_smi_only, a); |
88 a[0] = "hello"; | 88 a[0] = "hello"; |
89 b = create1(10); | 89 b = create1(10); |
90 assertTrue(isHoley(b)); | 90 assertTrue(isHoley(b)); |
91 assertKind(elements_kind.fast, b); | 91 assertKind(elements_kind.fast, b); |
92 | 92 |
93 a = create1(100000); | 93 a = create1(100000); |
94 assertKind(elements_kind.fast_smi_only, a); | 94 assertKind(elements_kind.fast, a); |
95 | 95 |
96 function create3(arg1, arg2, arg3) { | 96 function create3(arg1, arg2, arg3) { |
97 return Array(arg1, arg2, arg3); | 97 return Array(arg1, arg2, arg3); |
98 } | 98 } |
99 | 99 |
100 create3(1,2,3); | 100 create3(1,2,3); |
101 create3(1,2,3); | 101 create3(1,2,3); |
102 a = create3(1,2,3); | 102 a = create3(1,2,3); |
103 a[0] = 3.035; | 103 a[0] = 3.035; |
104 assertKind(elements_kind.fast_double, a); | 104 assertKind(elements_kind.fast_double, a); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 199 } |
200 | 200 |
201 var realmBArray = Realm.eval(realmB, "Array"); | 201 var realmBArray = Realm.eval(realmB, "Array"); |
202 instanceof_check(Array); | 202 instanceof_check(Array); |
203 instanceof_check(Array); | 203 instanceof_check(Array); |
204 instanceof_check(Array); | 204 instanceof_check(Array); |
205 instanceof_check(realmBArray); | 205 instanceof_check(realmBArray); |
206 instanceof_check(realmBArray); | 206 instanceof_check(realmBArray); |
207 instanceof_check(realmBArray); | 207 instanceof_check(realmBArray); |
208 })(); | 208 })(); |
OLD | NEW |