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

Unified Diff: runtime/vm/aot_optimizer.h

Issue 2465793003: Reland "Recognize and optimize a.runtimeType == b.runtimeType pattern." (Closed)
Patch Set: Address Ryan's comment Created 4 years, 1 month 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/lib/string_patch.dart ('k') | runtime/vm/aot_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/aot_optimizer.h
diff --git a/runtime/vm/aot_optimizer.h b/runtime/vm/aot_optimizer.h
index 2a63a168d489a19b7af288717ed111d3a6f4d2ed..01a81ca2e8491c244f9e475e05442a49dbd915dc 100644
--- a/runtime/vm/aot_optimizer.h
+++ b/runtime/vm/aot_optimizer.h
@@ -13,13 +13,16 @@ namespace dart {
class CSEInstructionMap;
template <typename T> class GrowableArray;
class ParsedFunction;
+class Precompiler;
class RawBool;
class AotOptimizer : public FlowGraphVisitor {
public:
- AotOptimizer(FlowGraph* flow_graph,
+ AotOptimizer(Precompiler* precompiler,
+ FlowGraph* flow_graph,
bool use_speculative_inlining,
GrowableArray<intptr_t>* inlining_black_list);
+
virtual ~AotOptimizer() {}
FlowGraph* flow_graph() const { return flow_graph_; }
@@ -101,6 +104,9 @@ class AotOptimizer : public FlowGraphVisitor {
void ReplaceCall(Definition* call, Definition* replacement);
+ bool RecognizeRuntimeTypeGetter(InstanceCallInstr* call);
+ bool TryReplaceWithHaveSameRuntimeType(InstanceCallInstr* call);
+
bool InstanceCallNeedsClassCheck(InstanceCallInstr* call,
RawFunction::Kind kind) const;
@@ -131,6 +137,7 @@ class AotOptimizer : public FlowGraphVisitor {
bool IsAllowedForInlining(intptr_t deopt_id);
+ Precompiler* precompiler_;
FlowGraph* flow_graph_;
const bool use_speculative_inlining_;
« no previous file with comments | « runtime/lib/string_patch.dart ('k') | runtime/vm/aot_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698