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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11970038: Remove StringCharCodeAtInstr and handle it as part of LoadIndexed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 17219)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -156,13 +156,6 @@
}
-bool StringCharCodeAtInstr::AttributesEqual(Instruction* other) const {
- StringCharCodeAtInstr* other_load = other->AsStringCharCodeAt();
- ASSERT(other_load != NULL);
- return class_id() == other_load->class_id();
-}
-
-
bool LoadIndexedInstr::AttributesEqual(Instruction* other) const {
LoadIndexedInstr* other_load = other->AsLoadIndexed();
ASSERT(other_load != NULL);
@@ -1108,16 +1101,6 @@
}
-RawAbstractType* StringCharCodeAtInstr::CompileType() const {
- return Type::IntType();
-}
-
-
-intptr_t StringCharCodeAtInstr::ResultCid() const {
- return kSmiCid;
-}
-
-
RawAbstractType* StringFromCharCodeInstr::CompileType() const {
return Type::StringType();
}
@@ -1137,6 +1120,8 @@
case kExternalUint8ArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
return Type::IntType();
default:
UNIMPLEMENTED();
@@ -1159,6 +1144,8 @@
case kExternalUint8ArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
return kSmiCid;
default:
UNIMPLEMENTED();
@@ -1177,6 +1164,8 @@
case kExternalUint8ArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
return kTagged;
case kFloat32ArrayCid :
case kFloat64ArrayCid :
@@ -2700,22 +2689,6 @@
-void StringCharCodeAtInstr::InferRange() {
- switch (class_id_) {
- case kOneByteStringCid:
- range_ = new Range(RangeBoundary::FromConstant(0),
- RangeBoundary::FromConstant(0xFF));
- break;
- case kTwoByteStringCid:
- range_ = new Range(RangeBoundary::FromConstant(0),
- RangeBoundary::FromConstant(0xFFFF));
- break;
- default:
- UNIMPLEMENTED();
- }
-}
-
-
void LoadIndexedInstr::InferRange() {
switch (class_id()) {
case kInt8ArrayCid:
@@ -2736,6 +2709,14 @@
range_ = new Range(RangeBoundary::FromConstant(0),
RangeBoundary::FromConstant(65535));
break;
+ case kOneByteStringCid:
+ range_ = new Range(RangeBoundary::FromConstant(0),
+ RangeBoundary::FromConstant(0xFF));
+ break;
+ case kTwoByteStringCid:
+ range_ = new Range(RangeBoundary::FromConstant(0),
+ RangeBoundary::FromConstant(0xFFFF));
+ break;
default:
Definition::InferRange();
break;
« 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