OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 set 5E0(_) {}, | 253 set 5E0(_) {}, |
254 set 6e-0(_) {}, | 254 set 6e-0(_) {}, |
255 set 7E-0(_) {}, | 255 set 7E-0(_) {}, |
256 set 0x8(_) {}, | 256 set 0x8(_) {}, |
257 set 0X9(_) {}, | 257 set 0X9(_) {}, |
258 }); | 258 }); |
259 TestNumericNamesSetter(['1.2', '1.3'], { | 259 TestNumericNamesSetter(['1.2', '1.3'], { |
260 set 1.2(_) {; }, | 260 set 1.2(_) {; }, |
261 set 1.30(_) {; } | 261 set 1.30(_) {; } |
262 }); | 262 }); |
263 | |
264 | |
265 (function TestLiteralWithNullProto() { | |
266 // Assume dictionary usage for simple null prototype literal objects, | |
267 // this is equivalent to Object.create(null). | |
268 var obj = {__proto__:null}; | |
269 assertFalse(%HasFastProperties(obj)); | |
adamk
2016/10/25 11:14:24
You'll need --allow-natives-syntax in Flags
Camillo Bruni
2017/03/13 17:21:44
arg, bitten by my own smart aliases that add these
| |
270 assertEquals(Object.getPrototypeOf(obj), null); | |
271 // Once we add inline properties we probably don't want slow properties | |
272 // anymore. | |
273 var obj2 = {__proto__:null, a:1, b:2}; | |
adamk
2016/10/25 11:14:24
Please add a test with computed properties and non
Camillo Bruni
2017/03/13 17:21:44
done.
| |
274 assertTrue(%HasFastProperties(obj2)); | |
275 assertEquals(Object.getPrototypeOf(obj2), null); | |
276 | |
277 })() | |
OLD | NEW |