Skip to content

Commit 95b8a75

Browse files
committed
v8: Upgrade to 3.22.24.19
1 parent fc26fd6 commit 95b8a75

File tree

5 files changed

+92
-12
lines changed

5 files changed

+92
-12
lines changed

deps/v8/src/hydrogen-instructions.cc

+5-11
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,6 @@ HValue* HUnaryMathOperation::Canonicalize() {
13711371

13721372
if (op() == kMathFloor) {
13731373
HValue* val = value();
1374-
if (val->IsChange()) val = HChange::cast(val)->value();
13751374
if (val->IsDiv() && (val->UseCount() == 1)) {
13761375
HDiv* hdiv = HDiv::cast(val);
13771376
HValue* left = hdiv->left();
@@ -1410,17 +1409,8 @@ HValue* HUnaryMathOperation::Canonicalize() {
14101409
}
14111410
HMathFloorOfDiv* instr =
14121411
HMathFloorOfDiv::New(block()->zone(), context(), new_left, new_right);
1413-
// Replace this HMathFloor instruction by the new HMathFloorOfDiv.
14141412
instr->InsertBefore(this);
1415-
ReplaceAllUsesWith(instr);
1416-
Kill();
1417-
// We know the division had no other uses than this HMathFloor. Delete it.
1418-
// Dead code elimination will deal with |left| and |right| if
1419-
// appropriate.
1420-
hdiv->DeleteAndReplaceWith(NULL);
1421-
1422-
// Return NULL to remove this instruction from the graph.
1423-
return NULL;
1413+
return instr;
14241414
}
14251415
}
14261416
return this;
@@ -2463,6 +2453,7 @@ HConstant::HConstant(Handle<Object> handle, Representation r)
24632453
has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_);
24642454
double_value_ = n;
24652455
has_double_value_ = true;
2456+
// TODO(titzer): if this heap number is new space, tenure a new one.
24662457
} else {
24672458
is_internalized_string_ = handle->IsInternalizedString();
24682459
}
@@ -2661,6 +2652,9 @@ void HConstant::PrintDataTo(StringStream* stream) {
26612652
} else {
26622653
handle(Isolate::Current())->ShortPrint(stream);
26632654
}
2655+
if (!is_not_in_new_space_) {
2656+
stream->Add("[new space] ");
2657+
}
26642658
}
26652659

26662660

deps/v8/src/hydrogen-instructions.h

+2
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,8 @@ class HReturn V8_FINAL : public HTemplateControlInstruction<0, 3> {
14721472
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HReturn, HValue*);
14731473

14741474
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
1475+
// TODO(titzer): require an Int32 input for faster returns.
1476+
if (index == 2) return Representation::Smi();
14751477
return Representation::Tagged();
14761478
}
14771479

deps/v8/src/version.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define MAJOR_VERSION 3
3636
#define MINOR_VERSION 22
3737
#define BUILD_NUMBER 24
38-
#define PATCH_LEVEL 17
38+
#define PATCH_LEVEL 19
3939
// Use 1 for candidates and 0 otherwise.
4040
// (Boolean macro values are not supported by all preprocessors.)
4141
#define IS_CANDIDATE_VERSION 0
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2014 the V8 project authors. All rights reserved.
2+
// Redistribution and use in source and binary forms, with or without
3+
// modification, are permitted provided that the following conditions are
4+
// met:
5+
//
6+
// * Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// * Redistributions in binary form must reproduce the above
9+
// copyright notice, this list of conditions and the following
10+
// disclaimer in the documentation and/or other materials provided
11+
// with the distribution.
12+
// * Neither the name of Google Inc. nor the names of its
13+
// contributors may be used to endorse or promote products derived
14+
// from this software without specific prior written permission.
15+
//
16+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
28+
// Flags: --allow-natives-syntax
29+
30+
var a = { x: 1.1 };
31+
a.x = 0;
32+
var G = a.x;
33+
var o = { x: {} };
34+
35+
function func() {
36+
return {x: G};
37+
}
38+
39+
func();
40+
func();
41+
%OptimizeFunctionOnNextCall(func);
42+
assertEquals(0, func().x);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright 2014 the V8 project authors. All rights reserved.
2+
// Redistribution and use in source and binary forms, with or without
3+
// modification, are permitted provided that the following conditions are
4+
// met:
5+
//
6+
// * Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// * Redistributions in binary form must reproduce the above
9+
// copyright notice, this list of conditions and the following
10+
// disclaimer in the documentation and/or other materials provided
11+
// with the distribution.
12+
// * Neither the name of Google Inc. nor the names of its
13+
// contributors may be used to endorse or promote products derived
14+
// from this software without specific prior written permission.
15+
//
16+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
28+
// Flags: --allow-natives-syntax
29+
30+
function foo(x, y) {
31+
return Math.floor(x / y);
32+
}
33+
34+
function bar(x, y) {
35+
return foo(x + 1, y + 1);
36+
}
37+
38+
foo(16, "4");
39+
40+
bar(64, 2);
41+
%OptimizeFunctionOnNextCall(bar);
42+
bar(64, 2);

0 commit comments

Comments
 (0)