| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Flags: --allow-natives-syntax |
| 6 |
| 7 function iterateArray() { |
| 8 var array = new Array(); |
| 9 var it = array.entries(); |
| 10 it.next(); |
| 11 } |
| 12 |
| 13 function iterateTypedArray() { |
| 14 var array = new Uint8Array(); |
| 15 var it = array.entries(); |
| 16 it.next(); |
| 17 } |
| 18 |
| 19 function testArray() { |
| 20 iterateArray(); |
| 21 try { |
| 22 } catch (e) { |
| 23 } |
| 24 } |
| 25 testArray(); |
| 26 testArray(); |
| 27 %OptimizeFunctionOnNextCall(testArray); |
| 28 testArray(); |
| 29 |
| 30 function testTypedArray() { |
| 31 iterateTypedArray(); |
| 32 try { |
| 33 } catch (e) { |
| 34 } |
| 35 } |
| 36 testTypedArray(); |
| 37 testTypedArray(); |
| 38 %OptimizeFunctionOnNextCall(testTypedArray); |
| 39 testTypedArray(); |
| OLD | NEW |