Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/mjsunit/compiler/regress-store-holey-double-array.js

Issue 2060233002: [turbofan] Prevent storing signalling NaNs into holey double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix spelling, rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 (function StoreHoleBitPattern() {
8 function g(src, dst, i) {
9 dst[i] = src[i];
10 }
11
12 var b = new ArrayBuffer(16);
13 var i32 = new Int32Array(b);
14 i32[0] = 0xFFF7FFFF;
15 i32[1] = 0xFFF7FFFF;
16 i32[3] = 0xFFF7FFFF;
17 i32[4] = 0xFFF7FFFF;
18 var f64 = new Float64Array(b);
19
20 var a = [,0.1];
21
22 g(f64, a, 1);
23 g(f64, a, 1);
24 %OptimizeFunctionOnNextCall(g);
25 g(f64, a, 0);
26
27 assertTrue(Number.isNaN(a[0]));
28 })();
29
30
31 (function ConvertHoleToNumberAndStore() {
32 function g(a, i) {
33 var x = a[i];
34 a[i] = +x;
35 }
36
37 var a=[,0.1];
38 g(a, 1);
39 g(a, 1);
40 %OptimizeFunctionOnNextCall(g);
41 g(a, 0);
42 assertTrue(Number.isNaN(a[0]));
43 })();
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698