cc3195abda
Also add a primitive mjsunit test that uses such a function optimized by Turbofan. R=mstarzinger@chromium.org CC=adamk@chromium.org BUG=v8:1569 Review-Url: https://codereview.chromium.org/2472143002 Cr-Commit-Position: refs/heads/master@{#40826}
15 lines
344 B
JavaScript
15 lines
344 B
JavaScript
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// MODULE
|
|
// Flags: --allow-natives-syntax
|
|
|
|
export let x = 0;
|
|
function foo() { x++ };
|
|
foo();
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|
|
assertOptimized(foo);
|
|
assertEquals(2, x);
|