Skip to content

Commit 8e80fc7

Browse files
targosjasnell
authored andcommitted
deps: patch V8 to 9.0.257.17
Refs: v8/v8@9.0.257.16...9.0.257.17 PR-URL: #38237 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b4363f7 commit 8e80fc7

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

‎deps/v8/include/v8-version.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#defineV8_MAJOR_VERSION 9
1212
#defineV8_MINOR_VERSION 0
1313
#defineV8_BUILD_NUMBER 257
14-
#defineV8_PATCH_LEVEL16
14+
#defineV8_PATCH_LEVEL17
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

‎deps/v8/src/compiler/backend/x64/instruction-selector-x64.cc‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,9 @@ void InstructionSelector::VisitChangeInt32ToInt64(Node* node){
13961396
opcode = load_rep.IsSigned() ? kX64Movsxwq : kX64Movzxwq;
13971397
break;
13981398
case MachineRepresentation::kWord32:
1399-
opcode = load_rep.IsSigned() ? kX64Movsxlq : kX64Movl;
1399+
// ChangeInt32ToInt64 must interpret its input as a _signed_ 32-bit
1400+
// integer, so here we must sign-extend the loaded value in any case.
1401+
opcode = kX64Movsxlq;
14001402
break;
14011403
default:
14021404
UNREACHABLE();
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright 2021 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+
8+
(function(){
9+
constarr=newUint32Array([2**31]);
10+
functionfoo(){
11+
return(arr[0]^0)+1;
12+
}
13+
%PrepareFunctionForOptimization(foo);
14+
assertEquals(-(2**31)+1,foo());
15+
%OptimizeFunctionOnNextCall(foo);
16+
assertEquals(-(2**31)+1,foo());
17+
});
18+
19+
20+
// The remaining tests already passed without the bugfix.
21+
22+
23+
(function(){
24+
constarr=newUint16Array([2**15]);
25+
functionfoo(){
26+
return(arr[0]^0)+1;
27+
}
28+
%PrepareFunctionForOptimization(foo);
29+
assertEquals(2**15+1,foo());
30+
%OptimizeFunctionOnNextCall(foo);
31+
assertEquals(2**15+1,foo());
32+
})();
33+
34+
35+
(function(){
36+
constarr=newUint8Array([2**7]);
37+
functionfoo(){
38+
return(arr[0]^0)+1;
39+
}
40+
%PrepareFunctionForOptimization(foo);
41+
assertEquals(2**7+1,foo());
42+
%OptimizeFunctionOnNextCall(foo);
43+
assertEquals(2**7+1,foo());
44+
})();
45+
46+
47+
(function(){
48+
constarr=newInt32Array([-(2**31)]);
49+
functionfoo(){
50+
return(arr[0]>>>0)+1;
51+
}
52+
%PrepareFunctionForOptimization(foo);
53+
assertEquals(2**31+1,foo());
54+
%OptimizeFunctionOnNextCall(foo);
55+
assertEquals(2**31+1,foo());
56+
})();

0 commit comments

Comments
(0)