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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 2371133004: Omit unreachable fall through code for graph intrinsics, e.g. Array.length. (Closed)
Patch Set: Created 4 years, 3 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 | « runtime/vm/intrinsifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier.cc
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index 02c469dbfa1359be0b886a588d7e0f4f8c03073d..e0355c9ed1a87a087531f0400e5e384034859d60 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -215,16 +215,17 @@ bool Intrinsifier::GraphIntrinsify(const ParsedFunction& parsed_function,
}
-void Intrinsifier::Intrinsify(const ParsedFunction& parsed_function,
+// Returns true if fall-through code can be omitted.
+bool Intrinsifier::Intrinsify(const ParsedFunction& parsed_function,
FlowGraphCompiler* compiler) {
const Function& function = parsed_function.function();
if (!CanIntrinsify(function)) {
- return;
+ return false;
}
ASSERT(!compiler->flow_graph().IsCompiledForOsr());
if (GraphIntrinsify(parsed_function, compiler)) {
- return;
+ return compiler->intrinsic_slow_path_label()->IsUnused();
}
#define EMIT_CASE(class_name, function_name, enum_name, type, fp) \
@@ -255,6 +256,7 @@ void Intrinsifier::Intrinsify(const ParsedFunction& parsed_function,
#endif
#undef EMIT_INTRINSIC
+ return false;
}
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698