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

Unified Diff: runtime/vm/aot_optimizer.h

Issue 2379733002: Recognize and optimize a.runtimeType == b.runtimeType pattern. (Closed)
Patch Set: Support polymorphic inlining of Object.get:runtimeType 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
Index: runtime/vm/aot_optimizer.h
diff --git a/runtime/vm/aot_optimizer.h b/runtime/vm/aot_optimizer.h
index f35536c681b409c6cf790724725c6b346ce6719e..9f77dd08798fcb040afbe7440b0355183b8ef5e2 100644
--- a/runtime/vm/aot_optimizer.h
+++ b/runtime/vm/aot_optimizer.h
@@ -13,15 +13,18 @@ namespace dart {
class CSEInstructionMap;
template <typename T> class GrowableArray;
class ParsedFunction;
+class Precompiler;
class RawBool;
class AotOptimizer : public FlowGraphVisitor {
public:
AotOptimizer(
+ Precompiler* precompiler,
FlowGraph* flow_graph,
bool use_speculative_inlining,
GrowableArray<intptr_t>* inlining_black_list)
: FlowGraphVisitor(flow_graph->reverse_postorder()),
+ precompiler_(precompiler),
flow_graph_(flow_graph),
use_speculative_inlining_(use_speculative_inlining),
inlining_black_list_(inlining_black_list) {
@@ -106,6 +109,8 @@ class AotOptimizer : public FlowGraphVisitor {
void ReplaceCall(Definition* call, Definition* replacement);
+ bool RecognizeRuntimeTypeGetter(InstanceCallInstr* call);
+
bool InstanceCallNeedsClassCheck(InstanceCallInstr* call,
RawFunction::Kind kind) const;
@@ -136,6 +141,7 @@ class AotOptimizer : public FlowGraphVisitor {
bool IsAllowedForInlining(intptr_t deopt_id);
+ Precompiler* precompiler_;
FlowGraph* flow_graph_;
const bool use_speculative_inlining_;

Powered by Google App Engine
This is Rietveld 408576698