| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 var o19 = {}; | 204 var o19 = {}; |
| 205 o19.field1 = 100; | 205 o19.field1 = 100; |
| 206 o19.field2 = 1.6; | 206 o19.field2 = 1.6; |
| 207 o19.to_delete = 100; | 207 o19.to_delete = 100; |
| 208 | 208 |
| 209 assertFalse(%HaveSameMap(o18, o19)); | 209 assertFalse(%HaveSameMap(o18, o19)); |
| 210 | 210 |
| 211 delete o18.to_delete; | 211 delete o18.to_delete; |
| 212 delete o19.to_delete; | 212 delete o19.to_delete; |
| 213 | 213 |
| 214 assertTrue(%HaveSameMap(o18, o19)); | |
| 215 assertEquals(1, o18.field2); | 214 assertEquals(1, o18.field2); |
| 216 assertEquals(1.6, o19.field2); | 215 assertEquals(1.6, o19.field2); |
| 217 | 216 |
| 218 // Test megamorphic keyed stub behaviour in combination with representations. | 217 // Test megamorphic keyed stub behaviour in combination with representations. |
| 219 var some_object20 = {"a":1}; | 218 var some_object20 = {"a":1}; |
| 220 var o20 = {}; | 219 var o20 = {}; |
| 221 o20.smi = 1; | 220 o20.smi = 1; |
| 222 o20.dbl = 1.5; | 221 o20.dbl = 1.5; |
| 223 o20.obj = some_object20; | 222 o20.obj = some_object20; |
| 224 | 223 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 var o = {"s_to_t":18}; | 397 var o = {"s_to_t":18}; |
| 399 o.s_to_t = a; | 398 o.s_to_t = a; |
| 400 return o; | 399 return o; |
| 401 } | 400 } |
| 402 | 401 |
| 403 var st1 = smi_to_object(true); | 402 var st1 = smi_to_object(true); |
| 404 var st2 = smi_to_object(false); | 403 var st2 = smi_to_object(false); |
| 405 assertTrue(%HaveSameMap(st1, st2)); | 404 assertTrue(%HaveSameMap(st1, st2)); |
| 406 assertEquals(true, st1.s_to_t); | 405 assertEquals(true, st1.s_to_t); |
| 407 assertEquals(false, st2.s_to_t); | 406 assertEquals(false, st2.s_to_t); |
| OLD | NEW |