OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 function TestKeyDelete(obj) { | 288 function TestKeyDelete(obj) { |
289 for (var i in symbols) { | 289 for (var i in symbols) { |
290 delete obj[symbols[i]] | 290 delete obj[symbols[i]] |
291 } | 291 } |
292 for (var i in symbols) { | 292 for (var i in symbols) { |
293 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i])) | 293 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i])) |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 var objs = [{}, [], Object.create(null), Object(1), new Map, function(){}] | 298 var objs = [{}, [], Object.create({}), Object(1), new Map, function(){}] |
299 | 299 |
300 for (var i in objs) { | 300 for (var i in objs) { |
301 var obj = objs[i] | 301 var obj = objs[i] |
302 TestKeySet(obj) | 302 TestKeySet(obj) |
303 TestKeyDefine(obj) | 303 TestKeyDefine(obj) |
304 TestKeyGet(obj) | 304 TestKeyGet(obj) |
305 TestKeyHas(obj) | 305 TestKeyHas(obj) |
306 TestKeyEnum(obj) | 306 TestKeyEnum(obj) |
307 TestKeyNames(obj) | 307 TestKeyNames(obj) |
308 TestKeyDescriptor(obj) | 308 TestKeyDescriptor(obj) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 // Test non-monomorphic. | 396 // Test non-monomorphic. |
397 for (var i = 0; i < 1000; i++) { | 397 for (var i = 0; i < 1000; i++) { |
398 var oNew = Object.create(p); | 398 var oNew = Object.create(p); |
399 oNew["s" + i] = i; | 399 oNew["s" + i] = i; |
400 oNew[s1] = "bow-wow"; | 400 oNew[s1] = "bow-wow"; |
401 checkNonOwn(oNew); | 401 checkNonOwn(oNew); |
402 } | 402 } |
403 } | 403 } |
404 TestICs(); | 404 TestICs(); |
OLD | NEW |