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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11098009: Implement SmiToInt and DoubleToInt. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 13385)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1298,6 +1298,16 @@
}
+RawAbstractType* IntegerToIntegerInstr::CompileType() const {
+ return Type::IntType();
+}
+
+
+RawAbstractType* DoubleToIntegerInstr::CompileType() const {
+ return Type::IntType();
+}
+
+
RawAbstractType* CheckClassInstr::CompileType() const {
return AbstractType::null();
}
@@ -1863,6 +1873,24 @@
}
+LocationSummary* IntegerToIntegerInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ locs->set_in(0, Location::RequiresRegister());
+ locs->set_out(Location::SameAsFirstInput());
+ return locs;
+}
+
+
+void IntegerToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ Register value = locs()->in(0).reg();
+ Register result = locs()->out().reg();
+ ASSERT(value == result);
+}
+
+
Environment* Environment::From(const GrowableArray<Definition*>& definitions,
intptr_t fixed_parameter_count,
const Function& function) {

Powered by Google App Engine
This is Rietveld 408576698