| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 function TestEquality() { | 125 function TestEquality() { |
| 126 // Every symbol should equal itself, and non-strictly equal its wrapper. | 126 // Every symbol should equal itself, and non-strictly equal its wrapper. |
| 127 for (var i in symbols) { | 127 for (var i in symbols) { |
| 128 assertSame(symbols[i], symbols[i]) | 128 assertSame(symbols[i], symbols[i]) |
| 129 assertEquals(symbols[i], symbols[i]) | 129 assertEquals(symbols[i], symbols[i]) |
| 130 assertTrue(Object.is(symbols[i], symbols[i])) | 130 assertTrue(Object.is(symbols[i], symbols[i])) |
| 131 assertTrue(symbols[i] === symbols[i]) | 131 assertTrue(symbols[i] === symbols[i]) |
| 132 assertTrue(symbols[i] == symbols[i]) | 132 assertTrue(symbols[i] == symbols[i]) |
| 133 assertFalse(symbols[i] === Object(symbols[i])) | 133 assertFalse(symbols[i] === Object(symbols[i])) |
| 134 assertFalse(Object(symbols[i]) === symbols[i]) | 134 assertFalse(Object(symbols[i]) === symbols[i]) |
| 135 assertFalse(symbols[i] == Object(symbols[i])) | 135 assertTrue(symbols[i] == Object(symbols[i])) |
| 136 assertFalse(Object(symbols[i]) == symbols[i]) | 136 assertTrue(Object(symbols[i]) == symbols[i]) |
| 137 assertTrue(symbols[i] === symbols[i].valueOf()) | 137 assertTrue(symbols[i] === symbols[i].valueOf()) |
| 138 assertTrue(symbols[i].valueOf() === symbols[i]) | 138 assertTrue(symbols[i].valueOf() === symbols[i]) |
| 139 assertTrue(symbols[i] == symbols[i].valueOf()) | 139 assertTrue(symbols[i] == symbols[i].valueOf()) |
| 140 assertTrue(symbols[i].valueOf() == symbols[i]) | 140 assertTrue(symbols[i].valueOf() == symbols[i]) |
| 141 } | 141 } |
| 142 | 142 |
| 143 // All symbols should be distinct. | 143 // All symbols should be distinct. |
| 144 for (var i = 0; i < symbols.length; ++i) { | 144 for (var i = 0; i < symbols.length; ++i) { |
| 145 for (var j = i + 1; j < symbols.length; ++j) { | 145 for (var j = i + 1; j < symbols.length; ++j) { |
| 146 assertFalse(Object.is(symbols[i], symbols[j])) | 146 assertFalse(Object.is(symbols[i], symbols[j])) |
| (...skipping 248 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 |