Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: patch V8 to 9.0.257.17 #38237

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 9
#define V8_MINOR_VERSION 0
#define V8_BUILD_NUMBER 257
#define V8_PATCH_LEVEL 16
#define V8_PATCH_LEVEL 17

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
4 changes: 3 additions & 1 deletion deps/v8/src/compiler/backend/x64/instruction-selector-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,9 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node) {
opcode = load_rep.IsSigned() ? kX64Movsxwq : kX64Movzxwq;
break;
case MachineRepresentation::kWord32:
opcode = load_rep.IsSigned() ? kX64Movsxlq : kX64Movl;
// ChangeInt32ToInt64 must interpret its input as a _signed_ 32-bit
// integer, so here we must sign-extend the loaded value in any case.
opcode = kX64Movsxlq;
break;
default:
UNREACHABLE();
Expand Down
56 changes: 56 additions & 0 deletions deps/v8/test/mjsunit/compiler/regress-1196683.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright 2021 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() {
const arr = new Uint32Array([2**31]);
function foo() {
return (arr[0] ^ 0) + 1;
}
%PrepareFunctionForOptimization(foo);
assertEquals(-(2**31) + 1, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(-(2**31) + 1, foo());
});


// The remaining tests already passed without the bugfix.


(function() {
const arr = new Uint16Array([2**15]);
function foo() {
return (arr[0] ^ 0) + 1;
}
%PrepareFunctionForOptimization(foo);
assertEquals(2**15 + 1, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(2**15 + 1, foo());
})();


(function() {
const arr = new Uint8Array([2**7]);
function foo() {
return (arr[0] ^ 0) + 1;
}
%PrepareFunctionForOptimization(foo);
assertEquals(2**7 + 1, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(2**7 + 1, foo());
})();


(function() {
const arr = new Int32Array([-(2**31)]);
function foo() {
return (arr[0] >>> 0) + 1;
}
%PrepareFunctionForOptimization(foo);
assertEquals(2**31 + 1, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(2**31 + 1, foo());
})();