From 6a31d05340b22fc413ee83eaacd0a5565bbbe799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 25 Jul 2018 19:30:07 +0200 Subject: deps: update V8 to 6.8.275.24 PR-URL: https://github.com/nodejs/node/pull/21079 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Yang Guo --- deps/v8/src/compiler/js-inlining.cc | 58 +++++-------------------------------- 1 file changed, 7 insertions(+), 51 deletions(-) (limited to 'deps/v8/src/compiler/js-inlining.cc') 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())) { -- cgit v1.2.1