Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 --expose-gc | |
| 6 | |
| 7 var global = { }; | |
| 8 | |
| 9 function do_nothing() { } | |
| 10 | |
| 11 function f(opt_gc) { | |
| 12 var x = new Array(3); | |
| 13 x[0] = 10; | |
| 14 opt_gc(); | |
| 15 global[1] = 15.5; | |
| 16 return x; | |
| 17 } | |
| 18 | |
| 19 gc(); | |
| 20 global = f(gc); | |
| 21 global = f(do_nothing); | |
| 22 %OptimizeFunctionOnNextCall(f); | |
| 23 global = f(do_nothing); | |
| OLD | NEW |