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