| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index fe19541f4639522a3e32fa470c46d6069197f926..81ee03a0c4b1a2bf972998a83bf0eee499c05ecb 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -188,7 +188,7 @@ Instruction* Instruction::RemoveFromGraph(bool return_previous) {
|
| }
|
|
|
|
|
| -void BindInstr::InsertBefore(BindInstr* next) {
|
| +void BindInstr::InsertBefore(Instruction* next) {
|
| ASSERT(previous_ == NULL);
|
| ASSERT(next_ == NULL);
|
| next_ = next;
|
| @@ -198,6 +198,16 @@ void BindInstr::InsertBefore(BindInstr* next) {
|
| }
|
|
|
|
|
| +void BindInstr::InsertAfter(Instruction* prev) {
|
| + ASSERT(previous_ == NULL);
|
| + ASSERT(next_ == NULL);
|
| + previous_ = prev;
|
| + next_ = prev->next_;
|
| + next_->previous_ = this;
|
| + previous_->next_ = this;
|
| +}
|
| +
|
| +
|
| void ForwardInstructionIterator::RemoveCurrentFromGraph() {
|
| current_ = current_->RemoveFromGraph(true); // Set current_ to previous.
|
| }
|
| @@ -1024,6 +1034,26 @@ intptr_t BinaryDoubleOpComp::ResultCid() const {
|
| }
|
|
|
|
|
| +RawAbstractType* UnboxedDoubleBinaryOpComp::CompileType() const {
|
| + return Type::DoubleInterface();
|
| +}
|
| +
|
| +
|
| +RawAbstractType* UnboxDoubleComp::CompileType() const {
|
| + return Type::null();
|
| +}
|
| +
|
| +
|
| +intptr_t BoxDoubleComp::ResultCid() const {
|
| + return kDoubleCid;
|
| +}
|
| +
|
| +
|
| +RawAbstractType* BoxDoubleComp::CompileType() const {
|
| + return Type::DoubleInterface();
|
| +}
|
| +
|
| +
|
| RawAbstractType* UnarySmiOpComp::CompileType() const {
|
| return Type::SmiType();
|
| }
|
| @@ -1055,6 +1085,11 @@ RawAbstractType* CheckSmiComp::CompileType() const {
|
| }
|
|
|
|
|
| +RawAbstractType* CheckEitherNonSmiComp::CompileType() const {
|
| + return AbstractType::null();
|
| +}
|
| +
|
| +
|
| // Optimizations that eliminate or simplify individual computations.
|
| Definition* Computation::TryReplace(BindInstr* instr) const {
|
| return instr;
|
| @@ -1090,6 +1125,15 @@ Definition* CheckSmiComp::TryReplace(BindInstr* instr) const {
|
| }
|
|
|
|
|
| +Definition* CheckEitherNonSmiComp::TryReplace(BindInstr* instr) const {
|
| + if ((left()->ResultCid() == kDoubleCid) ||
|
| + (right()->ResultCid() == kDoubleCid)) {
|
| + return NULL; // Remove from the graph.
|
| + }
|
| + return instr;
|
| +}
|
| +
|
| +
|
| // Shared code generation methods (EmitNativeCode, MakeLocationSummary, and
|
| // PrepareEntry). Only assembly code that can be shared across all architectures
|
| // can be used. Machine specific register allocation and code generation
|
|
|