| Index: runtime/vm/intermediate_language.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.cc (revision 14406)
|
| +++ runtime/vm/intermediate_language.cc (working copy)
|
| @@ -153,6 +153,13 @@
|
| }
|
|
|
|
|
| +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);
|
| @@ -1113,6 +1120,16 @@
|
| }
|
|
|
|
|
| +RawAbstractType* StringCharCodeAtInstr::CompileType() const {
|
| + return Type::IntType();
|
| +}
|
| +
|
| +
|
| +intptr_t StringCharCodeAtInstr::ResultCid() const {
|
| + return kSmiCid;
|
| +}
|
| +
|
| +
|
| RawAbstractType* LoadIndexedInstr::CompileType() const {
|
| switch (class_id_) {
|
| case kArrayCid:
|
| @@ -2605,6 +2622,26 @@
|
| }
|
|
|
|
|
| +intptr_t CheckArrayBoundInstr::LengthOffsetFor(intptr_t class_id) {
|
| + switch (class_id) {
|
| + case kGrowableObjectArrayCid:
|
| + return GrowableObjectArray::length_offset();
|
| + case kFloat64ArrayCid:
|
| + return Float64Array::length_offset();
|
| + case kFloat32ArrayCid:
|
| + return Float32Array::length_offset();
|
| + case kOneByteStringCid:
|
| + case kTwoByteStringCid:
|
| + return String::length_offset();
|
| + case kArrayCid:
|
| + case kImmutableArrayCid:
|
| + return Array::length_offset();
|
| + default:
|
| + UNREACHABLE();
|
| + return -1;
|
| + }
|
| +}
|
| +
|
| #undef __
|
|
|
| } // namespace dart
|
|
|