d22884ef02
Bug: v8:8801, v8:8394, v8:9183 Change-Id: Ie2858af4863511d5f67b662ac6f6f79512f55e7e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1662307 Commit-Queue: Mythri Alle <mythria@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#62223}
24 lines
520 B
JavaScript
24 lines
520 B
JavaScript
// Copyright 2014 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
function optimize(crankshaft_test) {
|
|
%PrepareFunctionForOptimization(crankshaft_test);
|
|
crankshaft_test();
|
|
crankshaft_test();
|
|
%OptimizeFunctionOnNextCall(crankshaft_test);
|
|
crankshaft_test();
|
|
}
|
|
|
|
function f() {
|
|
var v1 = 0;
|
|
var v2 = -0;
|
|
var t = v2++;
|
|
v2++;
|
|
return Math.max(v2++, v1++);
|
|
}
|
|
|
|
optimize(f);
|