980448dfcd
Since we no longer support the ignition-staging configuration any longer, we can retire the three tier pipeline and the CompileBaseline functionallity. We still need support for JSFunction self healing due to liveedit (which for --no-turbo might end up replacing a forced Ignition function with a FCG function) - we can remove this once we remove --no-turbo support. BUG=v8:4280 Change-Id: I5482abd17785324654e022affd6bdb555b19b181 Reviewed-on: https://chromium-review.googlesource.com/452620 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#44141}
114 lines
2.7 KiB
JavaScript
114 lines
2.7 KiB
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 --crankshaft
|
|
|
|
(function() {
|
|
function eq(a, b) { return a == b; }
|
|
|
|
var o = { [Symbol.toPrimitive]: () => "o" };
|
|
|
|
assertTrue(eq(o, o));
|
|
assertTrue(eq(o, o));
|
|
%OptimizeFunctionOnNextCall(eq);
|
|
assertTrue(eq(o, o));
|
|
assertTrue(eq("o", o));
|
|
assertTrue(eq(o, "o"));
|
|
%OptimizeFunctionOnNextCall(eq);
|
|
assertTrue(eq(o, o));
|
|
assertTrue(eq("o", o));
|
|
assertTrue(eq(o, "o"));
|
|
assertOptimized(eq);
|
|
})();
|
|
|
|
(function() {
|
|
function ne(a, b) { return a != b; }
|
|
|
|
var o = { [Symbol.toPrimitive]: () => "o" };
|
|
|
|
assertFalse(ne(o, o));
|
|
assertFalse(ne(o, o));
|
|
%OptimizeFunctionOnNextCall(ne);
|
|
assertFalse(ne(o, o));
|
|
assertFalse(ne("o", o));
|
|
assertFalse(ne(o, "o"));
|
|
%OptimizeFunctionOnNextCall(ne);
|
|
assertFalse(ne(o, o));
|
|
assertFalse(ne("o", o));
|
|
assertFalse(ne(o, "o"));
|
|
assertOptimized(ne);
|
|
})();
|
|
|
|
(function() {
|
|
function eq(a, b) { return a == b; }
|
|
|
|
var a = {};
|
|
var b = {b};
|
|
var u = %GetUndetectable();
|
|
|
|
assertTrue(eq(a, a));
|
|
assertTrue(eq(b, b));
|
|
assertFalse(eq(a, b));
|
|
assertFalse(eq(b, a));
|
|
assertTrue(eq(a, a));
|
|
assertTrue(eq(b, b));
|
|
assertFalse(eq(a, b));
|
|
assertFalse(eq(b, a));
|
|
%OptimizeFunctionOnNextCall(eq);
|
|
assertTrue(eq(a, a));
|
|
assertTrue(eq(b, b));
|
|
assertFalse(eq(a, b));
|
|
assertFalse(eq(b, a));
|
|
assertTrue(eq(null, u));
|
|
assertTrue(eq(undefined, u));
|
|
assertTrue(eq(u, null));
|
|
assertTrue(eq(u, undefined));
|
|
%OptimizeFunctionOnNextCall(eq);
|
|
assertTrue(eq(a, a));
|
|
assertTrue(eq(b, b));
|
|
assertFalse(eq(a, b));
|
|
assertFalse(eq(b, a));
|
|
assertTrue(eq(null, u));
|
|
assertTrue(eq(undefined, u));
|
|
assertTrue(eq(u, null));
|
|
assertTrue(eq(u, undefined));
|
|
assertOptimized(eq);
|
|
})();
|
|
|
|
(function() {
|
|
function ne(a, b) { return a != b; }
|
|
|
|
var a = {};
|
|
var b = {b};
|
|
var u = %GetUndetectable();
|
|
|
|
assertFalse(ne(a, a));
|
|
assertFalse(ne(b, b));
|
|
assertTrue(ne(a, b));
|
|
assertTrue(ne(b, a));
|
|
assertFalse(ne(a, a));
|
|
assertFalse(ne(b, b));
|
|
assertTrue(ne(a, b));
|
|
assertTrue(ne(b, a));
|
|
%OptimizeFunctionOnNextCall(ne);
|
|
assertFalse(ne(a, a));
|
|
assertFalse(ne(b, b));
|
|
assertTrue(ne(a, b));
|
|
assertTrue(ne(b, a));
|
|
assertFalse(ne(null, u));
|
|
assertFalse(ne(undefined, u));
|
|
assertFalse(ne(u, null));
|
|
assertFalse(ne(u, undefined));
|
|
%OptimizeFunctionOnNextCall(ne);
|
|
assertFalse(ne(a, a));
|
|
assertFalse(ne(b, b));
|
|
assertTrue(ne(a, b));
|
|
assertTrue(ne(b, a));
|
|
assertFalse(ne(null, u));
|
|
assertFalse(ne(undefined, u));
|
|
assertFalse(ne(u, null));
|
|
assertFalse(ne(u, undefined));
|
|
assertOptimized(ne);
|
|
})();
|