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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 37715ed965671f187aaeac418a80667b4c072a02..f702ed5a1e1721f86eb496dcf525c8ce1ad9b43c 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -1009,6 +1009,12 @@ CompileType LoadFieldInstr::ComputeType() const {
}
+CompileType BinaryInt32OpInstr::ComputeType() const {
+ // TODO(vegorov): range analysis information shall be used here.
+ return CompileType::Int();
+}
+
+
CompileType BinarySmiOpInstr::ComputeType() const {
return CompileType::FromCid(kSmiCid);
}
@@ -1063,6 +1069,21 @@ bool BoxIntegerInstr::RecomputeType() {
}
+CompileType BoxIntNInstr::ComputeType() const {
+ return ValueFitsSmi() ? CompileType::FromCid(kSmiCid) : CompileType::Int();
+}
+
+
+CompileType UnboxIntNInstr::ComputeType() const {
+ return CompileType::Int();
+}
+
+
+bool BoxIntNInstr::RecomputeType() {
+ return UpdateType(ComputeType());
+}
+
+
CompileType UnboxIntegerInstr::ComputeType() const {
return CompileType::Int();
}
@@ -1305,6 +1326,11 @@ CompileType BoxInt32x4Instr::ComputeType() const {
}
+CompileType Int32ToDoubleInstr::ComputeType() const {
+ return CompileType::FromCid(kDoubleCid);
+}
+
+
CompileType SmiToDoubleInstr::ComputeType() const {
return CompileType::FromCid(kDoubleCid);
}

Powered by Google App Engine
This is Rietveld 408576698