Commit f94c7e8f authored by machenbach's avatar machenbach Committed by Commit bot

[foozzie] Disable optimizations for typed float arrays.

This disables optimizations when using typed float arrays in
correctness fuzzer test cases. Otherwise, different NaN patterns
in float typed arrays might lead to different observations when
using the buffer in an int array view.

BUG=chromium:683579
NOTRY=true
TBR=Jarin, mvstanton, Igor Sheludko

Review-Url: https://codereview.chromium.org/2649923008
Cr-Commit-Position: refs/heads/master@{#42626}
parent 29ede2bf
...@@ -58,6 +58,21 @@ Error.prepareStackTrace = function (error, structuredStackTrace) { ...@@ -58,6 +58,21 @@ Error.prepareStackTrace = function (error, structuredStackTrace) {
return ""; return "";
} }
// Mock buffer access in float typed arrays because of varying NaN patterns.
// Note, for now we just use noop forwarding proxies, because they already
// turn off optimizations.
function __MockTypedArray(arrayType) {
array_creation_handler = {
construct: function(target, args) {
return new Proxy(new arrayType(args), {});
},
};
return new Proxy(arrayType, array_creation_handler);
}
Float32Array = __MockTypedArray(Float32Array);
Float64Array = __MockTypedArray(Float64Array);
// Mock Worker. // Mock Worker.
var __magic_index_for_mocked_worker = 0 var __magic_index_for_mocked_worker = 0
// TODO(machenbach): Randomize this for each test case, but keep stable during // TODO(machenbach): Randomize this for each test case, but keep stable during
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment