| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 | 274 |
| 275 function TestKeyDescriptor(obj) { | 275 function TestKeyDescriptor(obj) { |
| 276 for (var i in symbols) { | 276 for (var i in symbols) { |
| 277 var desc = Object.getOwnPropertyDescriptor(obj, symbols[i]); | 277 var desc = Object.getOwnPropertyDescriptor(obj, symbols[i]); |
| 278 assertEquals(i|0, desc.value) | 278 assertEquals(i|0, desc.value) |
| 279 assertTrue(desc.configurable) | 279 assertTrue(desc.configurable) |
| 280 assertEquals(i % 2 == 0, desc.writable) | 280 assertEquals(i % 2 == 0, desc.writable) |
| 281 assertEquals(i % 2 == 0, desc.enumerable) | 281 assertEquals(false, desc.enumerable) |
| 282 assertEquals(i % 2 == 0, | 282 assertEquals(false, |
| 283 Object.prototype.propertyIsEnumerable.call(obj, symbols[i])) | 283 Object.prototype.propertyIsEnumerable.call(obj, symbols[i])) |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 | 287 |
| 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) { |
| (...skipping 102 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 |