| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 15197)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -38,6 +38,7 @@
|
| V(_StringBase, get:length, StringBaseLength) \
|
| V(_StringBase, get:isEmpty, StringBaseIsEmpty) \
|
| V(_StringBase, charCodeAt, StringBaseCharCodeAt) \
|
| + V(_StringBase, [], StringBaseCharAt) \
|
| V(_IntegerImplementation, toDouble, IntegerToDouble) \
|
| V(_Double, toInt, DoubleToInteger) \
|
| V(::, sqrt, MathSqrt) \
|
| @@ -264,7 +265,8 @@
|
| M(UnaryMintOp) \
|
| M(CheckArrayBound) \
|
| M(Constraint) \
|
| - M(StringCharCodeAt)
|
| + M(StringCharCodeAt) \
|
| + M(StringFromCharCode)
|
|
|
|
|
| #define FORWARD_DECLARATION(type) class type##Instr;
|
| @@ -2682,6 +2684,36 @@
|
| };
|
|
|
|
|
| +class StringFromCharCodeInstr : public TemplateDefinition<1> {
|
| + public:
|
| + explicit StringFromCharCodeInstr(Value* char_code) {
|
| + ASSERT(char_code != NULL);
|
| + ASSERT(char_code->definition()->IsStringCharCodeAt() &&
|
| + (char_code->definition()->AsStringCharCodeAt()->class_id() ==
|
| + kOneByteStringCid));
|
| + inputs_[0] = char_code;
|
| + }
|
| +
|
| + DECLARE_INSTRUCTION(StringFromCharCode)
|
| + virtual RawAbstractType* CompileType() const;
|
| +
|
| + Value* char_code() const { return inputs_[0]; }
|
| +
|
| + virtual bool CanDeoptimize() const { return false; }
|
| +
|
| + virtual bool HasSideEffect() const { return false; }
|
| +
|
| + virtual intptr_t ResultCid() const;
|
| +
|
| + virtual bool AttributesEqual(Instruction* other) const { return true; }
|
| +
|
| + virtual bool AffectedBySideEffect() const { return false; }
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(StringFromCharCodeInstr);
|
| +};
|
| +
|
| +
|
| class LoadIndexedInstr : public TemplateDefinition<2> {
|
| public:
|
| LoadIndexedInstr(Value* array, Value* index, intptr_t class_id)
|
|
|