| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fb99a4e commit b7a7959
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | 34 | # Reset this number to 0 on major V8 upgrades. | |
| 35 | 35 | # Increment by one for each non-official patch applied to deps/v8. | |
| 36 | - 'v8_embedder_string': '-node.45', | ||
| 36 | + 'v8_embedder_string': '-node.46', | ||
| 37 | 37 | ||
| 38 | 38 | # Enable disassembler for `--print-code` v8 options | |
| 39 | 39 | 'v8_enable_disassembler': 1, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -598,7 +598,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) { | |||
| 598 | 598 | V(CreateKeyValueArray, Operator::kEliminatable, 2, 1) \ | |
| 599 | 599 | V(CreatePromise, Operator::kEliminatable, 0, 1) \ | |
| 600 | 600 | V(CreateTypedArray, Operator::kNoProperties, 5, 1) \ | |
| 601 | - V(CreateObject, Operator::kNoWrite, 1, 1) \ | ||
| 601 | + V(CreateObject, Operator::kNoProperties, 1, 1) \ | ||
| 602 | 602 | V(ObjectIsArray, Operator::kNoProperties, 1, 1) \ | |
| 603 | 603 | V(HasProperty, Operator::kNoProperties, 2, 1) \ | |
| 604 | 604 | V(HasInPrototypeChain, Operator::kNoProperties, 2, 1) \ | |
| Original file line number | Diff line number | Diff 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 | + })(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments