Skip to content

Commit 17b55bf

Browse files
ofrobotsMylesBorins
authored andcommittedDec 26, 2018
deps: V8: cherry-pick 52a9e67
Original commit message: [turbofan] Fix ObjectCreate's side effect annotation. Bug: chromium:888923 Change-Id: Ifb22cd9b34f53de3cf6e47cd92f3c0abeb10ac79 Reviewed-on: https://chromium-review.googlesource.com/1245763 Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Jaroslav Sevcik <[email protected]> Cr-Commit-Position: refs/heads/master@{#56236} Refs: v8/v8@52a9e67 PR-URL: #25027 Refs: v8/v8@52a9e67 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 4209e12 commit 17b55bf

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed
 

‎common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
# Reset this number to 0 on major V8 upgrades.
3535
# Increment by one for each non-official patch applied to deps/v8.
36-
'v8_embedder_string': '-node.45',
36+
'v8_embedder_string': '-node.46',
3737

3838
# Enable disassembler for `--print-code` v8 options
3939
'v8_enable_disassembler': 1,

‎deps/v8/src/compiler/js-operator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
598598
V(CreateKeyValueArray, Operator::kEliminatable, 2, 1) \
599599
V(CreatePromise, Operator::kEliminatable, 0, 1) \
600600
V(CreateTypedArray, Operator::kNoProperties, 5, 1) \
601-
V(CreateObject, Operator::kNoWrite, 1, 1) \
601+
V(CreateObject, Operator::kNoProperties, 1, 1) \
602602
V(ObjectIsArray, Operator::kNoProperties, 1, 1) \
603603
V(HasProperty, Operator::kNoProperties, 2, 1) \
604604
V(HasInPrototypeChain, Operator::kNoProperties, 2, 1) \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2018 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() {
8+
function f(o) {
9+
o.x;
10+
Object.create(o);
11+
return o.y.a;
12+
}
13+
14+
f({ x : 0, y : { a : 1 } });
15+
f({ x : 0, y : { a : 2 } });
16+
%OptimizeFunctionOnNextCall(f);
17+
assertEquals(3, f({ x : 0, y : { a : 3 } }));
18+
})();
19+
20+
(function() {
21+
function f(o) {
22+
let a = o.y;
23+
Object.create(o);
24+
return o.x + a;
25+
}
26+
27+
f({ x : 42, y : 21 });
28+
f({ x : 42, y : 21 });
29+
%OptimizeFunctionOnNextCall(f);
30+
assertEquals(63, f({ x : 42, y : 21 }));
31+
})();

0 commit comments

Comments
 (0)
Please sign in to comment.