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

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 1175803003: Inline instanceOf and 'as' operations; fix a bug in code emission (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 years, 6 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/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_mips.cc
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index 925796dcae2603319586a36f63c53c81ec63d605..fb4113af0811001c49da4736ee987e06be6e1f3a 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -591,7 +591,8 @@ void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos,
// We can only inline this null check if the type is instantiated at compile
// time, since an uninstantiated type at compile time could be Object or
// dynamic at run time.
- __ BranchEqual(A0, Object::null_object(), &is_not_instance);
+ __ BranchEqual(A0, Object::null_object(),
+ type.IsNullType() ? &is_instance : &is_not_instance);
}
// Generate inline instanceof test.
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698