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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11092090: Inline indexed load and store of typed array float64. (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
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 13666)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1062,15 +1062,77 @@
RawAbstractType* LoadIndexedInstr::CompileType() const {
- return Type::DynamicType();
+ switch (class_id_) {
+ case kArrayCid:
+ case kGrowableObjectArrayCid:
+ case kImmutableArrayCid:
+ return Type::DynamicType();
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return Type::Double();
+ default:
+ UNIMPLEMENTED();
+ return Type::IntType();
+ }
}
+intptr_t LoadIndexedInstr::ResultCid() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kGrowableObjectArrayCid:
+ case kImmutableArrayCid:
+ return kDynamicCid;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kDoubleCid;
+ default:
+ UNIMPLEMENTED();
+ return kSmiCid;
+ }
+}
+
+
+Representation LoadIndexedInstr::representation() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kGrowableObjectArrayCid:
+ case kImmutableArrayCid:
+ return kTagged;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
RawAbstractType* StoreIndexedInstr::CompileType() const {
return AbstractType::null();
}
+Representation StoreIndexedInstr::RequiredInputRepresentation(
+ intptr_t idx) const {
+ if ((idx == 0) || (idx == 1)) return kTagged;
+ ASSERT(idx == 2);
+ switch (class_id_) {
+ case kArrayCid:
+ case kGrowableObjectArrayCid:
+ case kImmutableArrayCid:
+ return kTagged;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
RawAbstractType* StoreInstanceFieldInstr::CompileType() const {
return value()->CompileType();
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698