Skip to content

Commit 318d9d8

Browse files
committed
deps: upgrade v8 to 4.1.0.27
PR-URL: #1289 Reviewed-By: Johan Bergström <[email protected]>
1 parent c8fa8cc commit 318d9d8

File tree

6 files changed

+52
-5
lines changed

6 files changed

+52
-5
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 4
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 0
14-
#define V8_PATCH_LEVEL 25
14+
#define V8_PATCH_LEVEL 27
1515

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

deps/v8/src/compiler/js-builtin-reducer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ Reduction JSBuiltinReducer::ReduceMathMax(Node* node) {
151151
Node* const input = r.GetJSCallInput(i);
152152
value = graph()->NewNode(
153153
common()->Select(kMachNone),
154-
graph()->NewNode(simplified()->NumberLessThan(), input, value), input,
155-
value);
154+
graph()->NewNode(simplified()->NumberLessThan(), input, value), value,
155+
input);
156156
}
157157
return Replace(value);
158158
}

deps/v8/src/hydrogen-bce.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class BoundsCheckKey : public ZoneObject {
5656
constant = HConstant::cast(check->index());
5757
}
5858

59-
if (constant != NULL && constant->HasInteger32Value()) {
59+
if (constant != NULL && constant->HasInteger32Value() &&
60+
constant->Integer32Value() != kMinInt) {
6061
*offset = is_sub ? - constant->Integer32Value()
6162
: constant->Integer32Value();
6263
} else {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2015 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+
var asm = (function() {
6+
"use asm";
7+
var max = Math.max;
8+
return function f() { return max(0, -17); };
9+
})();
10+
11+
assertEquals(0, asm());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright 2015 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 f(a, i, bool) {
8+
var result;
9+
if (bool) {
10+
// Make sure i - -0x80000000 doesn't overflow in BCE, missing a check for
11+
// x-0 later on.
12+
result = f2(a, 0x7fffffff, i, i, -0x80000000);
13+
} else {
14+
result = f2(a, -3, 4, i, 0);
15+
}
16+
return result;
17+
}
18+
19+
function f2(a, c, x, i, d) {
20+
return a[x + c] + a[x - 0] + a[i - d];
21+
}
22+
23+
24+
var a = [];
25+
var i = 0;
26+
a.push(i++);
27+
a.push(i++);
28+
a.push(i++);
29+
a.push(i++);
30+
a.push(i++);
31+
f(a, 0, false);
32+
f(a, 0, false);
33+
f(a, 0, false);
34+
%OptimizeFunctionOnNextCall(f);
35+
%DebugPrint(f(a, -0x7fffffff, true));

deps/v8/test/unittests/compiler/js-builtin-reducer-unittest.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ TEST_F(JSBuiltinReducerTest, MathMax2) {
166166
if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) {
167167
ASSERT_TRUE(r.Changed());
168168
EXPECT_THAT(r.replacement(),
169-
IsSelect(kMachNone, IsNumberLessThan(p1, p0), p1, p0));
169+
IsSelect(kMachNone, IsNumberLessThan(p1, p0), p0, p1));
170170
} else {
171171
ASSERT_FALSE(r.Changed());
172172
EXPECT_EQ(IrOpcode::kJSCallFunction, call->opcode());

0 commit comments

Comments
 (0)