cf65162ae6
This change prevents constant folding of uninhabited RefenceEqual node because that could widen a type (from None type to the type of the boolean constant). Hopefully, this is a temporary workaround that will be replaced by a better dead code elimination. Bug: v8:6631 Change-Id: Ie25e7d710aaf1d37c9adba60f92438570843dd5d Reviewed-on: https://chromium-review.googlesource.com/627916 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#47545}
23 lines
369 B
JavaScript
23 lines
369 B
JavaScript
// Copyright 2017 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 h(x) {
|
|
return (x|0) && (1>>x == {})
|
|
}
|
|
|
|
function g() {
|
|
return h(1)
|
|
};
|
|
|
|
function f() {
|
|
return g(h({}))
|
|
};
|
|
|
|
f();
|
|
f();
|
|
%OptimizeFunctionOnNextCall(f);
|
|
f();
|