diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-07-25 19:30:07 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-07-26 08:31:50 +0200 |
commit | 6a31d05340b22fc413ee83eaacd0a5565bbbe799 (patch) | |
tree | 78f9e1c2f417244842f6422f17e1816e70317100 /deps/v8/src/compiler/js-inlining.cc | |
parent | 4d94bb2b1f72b6b612983a517a39c5545724a3ad (diff) | |
download | node-new-6a31d05340b22fc413ee83eaacd0a5565bbbe799.tar.gz |
deps: update V8 to 6.8.275.24
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Diffstat (limited to 'deps/v8/src/compiler/js-inlining.cc')
-rw-r--r-- | deps/v8/src/compiler/js-inlining.cc | 58 |
1 files changed, 7 insertions, 51 deletions
diff --git a/deps/v8/src/compiler/js-inlining.cc b/deps/v8/src/compiler/js-inlining.cc index 139fe9afb8..08917ab78b 100644 --- a/deps/v8/src/compiler/js-inlining.cc +++ b/deps/v8/src/compiler/js-inlining.cc @@ -548,62 +548,18 @@ Reduction JSInliner::ReduceJSCall(Node* node) { uncaught_subcalls.push_back(create); // Adds {IfSuccess} & {IfException}. NodeProperties::ReplaceControlInput(node, create); NodeProperties::ReplaceEffectInput(node, create); - Node* node_success = - NodeProperties::FindSuccessfulControlProjection(node); // Placeholder to hold {node}'s value dependencies while {node} is // replaced. Node* dummy = graph()->NewNode(common()->Dead()); NodeProperties::ReplaceUses(node, dummy, node, node, node); Node* result; - if (FLAG_harmony_restrict_constructor_return && - IsClassConstructor(shared_info->kind())) { - Node* is_undefined = - graph()->NewNode(simplified()->ReferenceEqual(), node, - jsgraph()->UndefinedConstant()); - Node* branch_is_undefined = - graph()->NewNode(common()->Branch(), is_undefined, node_success); - Node* branch_is_undefined_true = - graph()->NewNode(common()->IfTrue(), branch_is_undefined); - Node* branch_is_undefined_false = - graph()->NewNode(common()->IfFalse(), branch_is_undefined); - Node* is_receiver = - graph()->NewNode(simplified()->ObjectIsReceiver(), node); - Node* branch_is_receiver = graph()->NewNode( - common()->Branch(), is_receiver, branch_is_undefined_false); - Node* branch_is_receiver_true = - graph()->NewNode(common()->IfTrue(), branch_is_receiver); - Node* branch_is_receiver_false = - graph()->NewNode(common()->IfFalse(), branch_is_receiver); - branch_is_receiver_false = - graph()->NewNode(javascript()->CallRuntime( - Runtime::kThrowConstructorReturnedNonObject), - context, NodeProperties::GetFrameStateInput(node), - node, branch_is_receiver_false); - uncaught_subcalls.push_back(branch_is_receiver_false); - branch_is_receiver_false = - graph()->NewNode(common()->Throw(), branch_is_receiver_false, - branch_is_receiver_false); - NodeProperties::MergeControlToEnd(graph(), common(), - branch_is_receiver_false); - Node* merge = - graph()->NewNode(common()->Merge(2), branch_is_undefined_true, - branch_is_receiver_true); - result = - graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), - create, node, merge); - ReplaceWithValue(node_success, node_success, node_success, merge); - // Fix input destroyed by the above {ReplaceWithValue} call. - NodeProperties::ReplaceControlInput(branch_is_undefined, node_success, - 0); - } else { - // Insert a check of the return value to determine whether the return - // value or the implicit receiver should be selected as a result of the - // call. - Node* check = graph()->NewNode(simplified()->ObjectIsReceiver(), node); - result = - graph()->NewNode(common()->Select(MachineRepresentation::kTagged), - check, node, create); - } + // Insert a check of the return value to determine whether the return + // value or the implicit receiver should be selected as a result of the + // call. + Node* check = graph()->NewNode(simplified()->ObjectIsReceiver(), node); + result = + graph()->NewNode(common()->Select(MachineRepresentation::kTagged), + check, node, create); receiver = create; // The implicit receiver. ReplaceWithValue(dummy, result); } else if (IsDerivedConstructor(shared_info->kind())) { |