84cff42c59
Having no value argument in DataView setters (e.g. setFloat64) caused wrong behavior in compiled code. Bug: chromium:1071190 Change-Id: I37ddba8555dafad321f8d4c1352da8a501a98453 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2170091 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#67451}
24 lines
549 B
JavaScript
24 lines
549 B
JavaScript
// Copyright 2020 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 test() {
|
|
const a = new DataView(new ArrayBuffer(32));
|
|
const b = new DataView(new ArrayBuffer(32));
|
|
a.setFloat64(0);
|
|
b.setFloat64(0, undefined);
|
|
|
|
for(let i = 0; i < 8; ++i) {
|
|
assertEquals(a.getUint8(i), b.getUint8(i));
|
|
}
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(test);
|
|
test();
|
|
test();
|
|
%OptimizeFunctionOnNextCall(test);
|
|
test();
|