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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10984051: More compact code for strict compare with 0. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 12926)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -1134,6 +1134,16 @@
}
+void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
+ const Object& obj) {
+ if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
+ __ testq(reg, reg);
+ } else {
+ __ CompareObject(reg, obj);
+ }
+}
+
+
void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
Register reg,
Register temp,
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698