Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2226163004: [turbofan] Ensure nodes without kNoThrow have only IfSuccess or IfException uses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge with master Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 776d57ce10cfa0db12b1703f749e6e094ac386e2..bf0e237011a33de676c5b3446e71488334c3a520 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -1264,17 +1264,20 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) {
Node* if_is_proxy = graph()->NewNode(common()->IfTrue(), branch_is_proxy);
Node* e_is_proxy = effect;
- Node* runtime_has_in_proto_chain = control = graph()->NewNode(
- common()->Merge(2), if_is_access_check_needed, if_is_proxy);
+ control = graph()->NewNode(common()->Merge(2), if_is_access_check_needed,
+ if_is_proxy);
effect = graph()->NewNode(common()->EffectPhi(2), e_is_access_check_needed,
e_is_proxy, control);
// If we need an access check or the object is a Proxy, make a runtime call
// to finish the lowering.
- Node* bool_result_runtime_has_in_proto_chain_case = graph()->NewNode(
+ Node* runtimecall = graph()->NewNode(
javascript()->CallRuntime(Runtime::kHasInPrototypeChain), r.left(),
prototype, context, frame_state, effect, control);
+ Node* runtimecall_control =
+ graph()->NewNode(common()->IfSuccess(), runtimecall);
+
control = graph()->NewNode(common()->IfFalse(), branch_is_proxy);
Node* object_prototype = effect = graph()->NewNode(
@@ -1310,16 +1313,14 @@ Reduction JSTypedLowering::ReduceJSInstanceOf(Node* node) {
loop_object_map->ReplaceInput(1, load_object_map);
loop->ReplaceInput(1, control);
- control = graph()->NewNode(common()->Merge(3), runtime_has_in_proto_chain,
+ control = graph()->NewNode(common()->Merge(3), runtimecall_control,
if_eq_proto, if_null_proto);
- effect = graph()->NewNode(common()->EffectPhi(3),
- bool_result_runtime_has_in_proto_chain_case,
- e_eq_proto, e_null_proto, control);
+ effect = graph()->NewNode(common()->EffectPhi(3), runtimecall, e_eq_proto,
+ e_null_proto, control);
Node* result = graph()->NewNode(
- common()->Phi(MachineRepresentation::kTagged, 3),
- bool_result_runtime_has_in_proto_chain_case, jsgraph()->TrueConstant(),
- jsgraph()->FalseConstant(), control);
+ common()->Phi(MachineRepresentation::kTagged, 3), runtimecall,
+ jsgraph()->TrueConstant(), jsgraph()->FalseConstant(), control);
if (if_is_smi != nullptr) {
DCHECK_NOT_NULL(e_is_smi);
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698