Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 f(a, base) { | |
| 8 a[base + 4] = 23; | |
| 9 return a; | |
| 10 } | |
| 11 var i = 1073741824; | |
| 12 assertEquals(23, f({}, 1)[1 + 4]); | |
| 13 assertEquals(23, f([], 2)[2 + 4]); | |
| 14 %OptimizeFunctionOnNextCall(f); | |
| 15 assertEquals(23, f({}, i)[i + 4]); | |
| OLD | NEW |