| 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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 // Property descriptor conversion. | 1303 // Property descriptor conversion. |
| 1304 | 1304 |
| 1305 var descget | 1305 var descget |
| 1306 | 1306 |
| 1307 function TestDescriptorGetOrder(handler) { | 1307 function TestDescriptorGetOrder(handler) { |
| 1308 var p = Proxy.create(handler) | 1308 var p = Proxy.create(handler) |
| 1309 var o = Object.create(p, {b: {value: 0}}) | 1309 var o = Object.create(p, {b: {value: 0}}) |
| 1310 TestDescriptorGetOrder2(function(n) { return p[n] }, "vV") | 1310 TestDescriptorGetOrder2(function(n) { return p[n] }, "vV") |
| 1311 TestDescriptorGetOrder2(function(n) { return n in p }, "") | 1311 TestDescriptorGetOrder2(function(n) { return n in p }, "") |
| 1312 TestDescriptorGetOrder2(function(n) { return o[n] }, "vV") | 1312 TestDescriptorGetOrder2(function(n) { return o[n] }, "vV") |
| 1313 TestDescriptorGetOrder2(function(n) { return n in o }, "eEcCvVwWgs") | 1313 TestDescriptorGetOrder2(function(n) { return n in o }, "") |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 function TestDescriptorGetOrder2(f, access) { | 1316 function TestDescriptorGetOrder2(f, access) { |
| 1317 descget = "" | 1317 descget = "" |
| 1318 assertTrue(f("a")) | 1318 assertTrue(f("a")) |
| 1319 assertEquals(access, descget) | 1319 assertEquals(access, descget) |
| 1320 descget = "" | 1320 descget = "" |
| 1321 assertTrue(f(99)) | 1321 assertTrue(f(99)) |
| 1322 assertEquals(access, descget) | 1322 assertEquals(access, descget) |
| 1323 descget = "" | 1323 descget = "" |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2321 function f() { | 2321 function f() { |
| 2322 return o.x; | 2322 return o.x; |
| 2323 } | 2323 } |
| 2324 assertEquals(10, f()); | 2324 assertEquals(10, f()); |
| 2325 assertEquals(10, f()); | 2325 assertEquals(10, f()); |
| 2326 %OptimizeFunctionOnNextCall(f); | 2326 %OptimizeFunctionOnNextCall(f); |
| 2327 assertEquals(10, f()); | 2327 assertEquals(10, f()); |
| 2328 } | 2328 } |
| 2329 | 2329 |
| 2330 TestOptWithProxyPrototype(); | 2330 TestOptWithProxyPrototype(); |
| OLD | NEW |