| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 assertEquals(44, p[77] = 44) | 375 assertEquals(44, p[77] = 44) |
| 376 assertEquals("77", key) | 376 assertEquals("77", key) |
| 377 assertEquals(44, val) | 377 assertEquals(44, val) |
| 378 | 378 |
| 379 assertEquals(45, (function(n) { return p[n] = 45 })("c")) | 379 assertEquals(45, (function(n) { return p[n] = 45 })("c")) |
| 380 assertEquals("c", key) | 380 assertEquals("c", key) |
| 381 assertEquals(45, val) | 381 assertEquals(45, val) |
| 382 assertEquals(46, (function(n) { return p[n] = 46 })(99)) | 382 assertEquals(46, (function(n) { return p[n] = 46 })(99)) |
| 383 assertEquals("99", key) | 383 assertEquals("99", key) |
| 384 assertEquals(46, val) | 384 assertEquals(46, val) |
| 385 |
| 386 assertEquals(47, p["0"] = 47) |
| 387 assertEquals("0", key) |
| 388 assertEquals(47, val) |
| 385 } | 389 } |
| 386 | 390 |
| 387 TestSet({ | 391 TestSet({ |
| 388 set: function(r, k, v) { key = k; val = v; return true } | 392 set: function(r, k, v) { key = k; val = v; return true } |
| 389 }) | 393 }) |
| 390 | 394 |
| 391 TestSet({ | 395 TestSet({ |
| 392 set: function(r, k, v) { return this.set2(r, k, v) }, | 396 set: function(r, k, v) { return this.set2(r, k, v) }, |
| 393 set2: function(r, k, v) { key = k; val = v; return true } | 397 set2: function(r, k, v) { key = k; val = v; return true } |
| 394 }) | 398 }) |
| (...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2317 function f() { | 2321 function f() { |
| 2318 return o.x; | 2322 return o.x; |
| 2319 } | 2323 } |
| 2320 assertEquals(10, f()); | 2324 assertEquals(10, f()); |
| 2321 assertEquals(10, f()); | 2325 assertEquals(10, f()); |
| 2322 %OptimizeFunctionOnNextCall(f); | 2326 %OptimizeFunctionOnNextCall(f); |
| 2323 assertEquals(10, f()); | 2327 assertEquals(10, f()); |
| 2324 } | 2328 } |
| 2325 | 2329 |
| 2326 TestOptWithProxyPrototype(); | 2330 TestOptWithProxyPrototype(); |
| OLD | NEW |