| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 17219)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -272,7 +272,6 @@
|
| M(UnaryMintOp) \
|
| M(CheckArrayBound) \
|
| M(Constraint) \
|
| - M(StringCharCodeAt) \
|
| M(StringFromCharCode)
|
|
|
|
|
| @@ -511,7 +510,6 @@
|
| friend class CheckSmiInstr;
|
| friend class CheckArrayBoundInstr;
|
| friend class CheckEitherNonSmiInstr;
|
| - friend class StringCharCodeAtInstr;
|
| friend class LICM;
|
| friend class DoubleToSmiInstr;
|
| friend class DoubleToDoubleInstr;
|
| @@ -2677,22 +2675,20 @@
|
| };
|
|
|
|
|
| -class StringCharCodeAtInstr : public TemplateDefinition<2> {
|
| +class LoadIndexedInstr : public TemplateDefinition<2> {
|
| public:
|
| - StringCharCodeAtInstr(Value* receiver,
|
| - Value* index,
|
| - intptr_t class_id)
|
| + LoadIndexedInstr(Value* array, Value* index, intptr_t class_id)
|
| : class_id_(class_id) {
|
| - ASSERT(receiver != NULL);
|
| + ASSERT(array != NULL);
|
| ASSERT(index != NULL);
|
| - inputs_[0] = receiver;
|
| + inputs_[0] = array;
|
| inputs_[1] = index;
|
| }
|
|
|
| - DECLARE_INSTRUCTION(StringCharCodeAt)
|
| + DECLARE_INSTRUCTION(LoadIndexed)
|
| virtual RawAbstractType* CompileType() const;
|
|
|
| - Value* receiver() const { return inputs_[0]; }
|
| + Value* array() const { return inputs_[0]; }
|
| Value* index() const { return inputs_[1]; }
|
| intptr_t class_id() const { return class_id_; }
|
|
|
| @@ -2702,6 +2698,8 @@
|
|
|
| virtual intptr_t ResultCid() const;
|
|
|
| + virtual Representation representation() const;
|
| +
|
| virtual bool AttributesEqual(Instruction* other) const;
|
|
|
| virtual bool AffectedBySideEffect() const { return true; }
|
| @@ -2711,7 +2709,7 @@
|
| private:
|
| const intptr_t class_id_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(StringCharCodeAtInstr);
|
| + DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr);
|
| };
|
|
|
|
|
| @@ -2720,8 +2718,8 @@
|
| explicit StringFromCharCodeInstr(Value* char_code,
|
| intptr_t cid) : cid_(cid) {
|
| ASSERT(char_code != NULL);
|
| - ASSERT(char_code->definition()->IsStringCharCodeAt() &&
|
| - (char_code->definition()->AsStringCharCodeAt()->class_id() ==
|
| + ASSERT(char_code->definition()->IsLoadIndexed() &&
|
| + (char_code->definition()->AsLoadIndexed()->class_id() ==
|
| kOneByteStringCid));
|
| inputs_[0] = char_code;
|
| }
|
| @@ -2748,44 +2746,6 @@
|
| };
|
|
|
|
|
| -class LoadIndexedInstr : public TemplateDefinition<2> {
|
| - public:
|
| - LoadIndexedInstr(Value* array, Value* index, intptr_t class_id)
|
| - : class_id_(class_id) {
|
| - ASSERT(array != NULL);
|
| - ASSERT(index != NULL);
|
| - inputs_[0] = array;
|
| - inputs_[1] = index;
|
| - }
|
| -
|
| - DECLARE_INSTRUCTION(LoadIndexed)
|
| - virtual RawAbstractType* CompileType() const;
|
| -
|
| - Value* array() const { return inputs_[0]; }
|
| - Value* index() const { return inputs_[1]; }
|
| - intptr_t class_id() const { return class_id_; }
|
| -
|
| - virtual bool CanDeoptimize() const { return false; }
|
| -
|
| - virtual bool HasSideEffect() const { return false; }
|
| -
|
| - virtual intptr_t ResultCid() const;
|
| -
|
| - virtual Representation representation() const;
|
| -
|
| - virtual bool AttributesEqual(Instruction* other) const;
|
| -
|
| - virtual bool AffectedBySideEffect() const { return true; }
|
| -
|
| - virtual void InferRange();
|
| -
|
| - private:
|
| - const intptr_t class_id_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr);
|
| -};
|
| -
|
| -
|
| class StoreIndexedInstr : public TemplateDefinition<3> {
|
| public:
|
| StoreIndexedInstr(Value* array,
|
|
|