forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregress-crbug-903043.js
More file actions
39 lines (32 loc) · 835 Bytes
/
regress-crbug-903043.js
File metadata and controls
39 lines (32 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2018 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() {
function foo() {
const x = 1e-1;
return Object.is(-0, x * (-1e-308));
}
assertFalse(foo());
assertFalse(foo());
%OptimizeFunctionOnNextCall(foo);
assertFalse(foo());
})();
(function() {
function foo(x) {
return Object.is(-0, x * (-1e-308));
}
assertFalse(foo(1e-1));
assertFalse(foo(1e-1));
%OptimizeFunctionOnNextCall(foo);
assertFalse(foo(1e-1));
})();
(function() {
function foo(x) {
return Object.is(-0, x);
}
assertFalse(foo(1e-1 * (-1e-308)));
assertFalse(foo(1e-1 * (-1e-308)));
%OptimizeFunctionOnNextCall(foo);
assertFalse(foo(1e-1 * (-1e-308)));
})();