52636535fa
Bug: chromium:965513 Change-Id: I18ff91c98ad6106c5d4df260e6ead6a9e2425dbb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1622119 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Auto-Submit: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#61730}
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
// Copyright 2019 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 --opt
|
|
|
|
%EnsureFeedbackVectorForFunction(foo);
|
|
function foo(x) {
|
|
return x * (x == 1);
|
|
}
|
|
|
|
foo(0.5);
|
|
foo(1.5);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo(1.5);
|
|
assertOptimized(foo);
|