Chromium Code Reviews| Index: runtime/vm/simulator_dbc.cc |
| diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc |
| index b1c648dc96d9e61026a30e3c64623a54b7d7c0e8..81d3c3c5e0f13b95d5523aa25e8b066e4ad5a2fb 100644 |
| --- a/runtime/vm/simulator_dbc.cc |
| +++ b/runtime/vm/simulator_dbc.cc |
| @@ -2194,6 +2194,46 @@ RawObject* Simulator::Call(const Code& code, |
| } |
| { |
| + BYTECODE(IfLe, A_D); |
| + const intptr_t lhs = reinterpret_cast<intptr_t>(FP[rA]); |
| + const intptr_t rhs = reinterpret_cast<intptr_t>(FP[rD]); |
| + if (lhs > rhs) { |
| + pc++; |
| + } |
| + DISPATCH(); |
| + } |
| + |
| + { |
| + BYTECODE(IfLt, A_D); |
| + const intptr_t lhs = reinterpret_cast<intptr_t>(FP[rA]); |
| + const intptr_t rhs = reinterpret_cast<intptr_t>(FP[rD]); |
| + if (lhs >= rhs) { |
| + pc++; |
| + } |
| + DISPATCH(); |
| + } |
| + |
| + { |
| + BYTECODE(IfGe, A_D); |
| + const intptr_t lhs = reinterpret_cast<intptr_t>(FP[rA]); |
| + const intptr_t rhs = reinterpret_cast<intptr_t>(FP[rD]); |
| + if (lhs < rhs) { |
| + pc++; |
| + } |
| + DISPATCH(); |
| + } |
| + |
| + { |
| + BYTECODE(IfGt, A_D); |
| + const intptr_t lhs = reinterpret_cast<intptr_t>(FP[rA]); |
| + const intptr_t rhs = reinterpret_cast<intptr_t>(FP[rD]); |
| + if (lhs <= rhs) { |
| + pc++; |
| + } |
| + DISPATCH(); |
| + } |
| + |
| + { |
| BYTECODE(IfEqStrictNum, A_D); |
| RawObject* lhs = FP[rA]; |
| RawObject* rhs = FP[rD]; |
| @@ -2277,6 +2317,17 @@ RawObject* Simulator::Call(const Code& code, |
| } |
| { |
| + BYTECODE(LoadIndexed, A_B_C); |
| + RawArray* array = static_cast<RawArray*>(FP[rB]); |
|
Vyacheslav Egorov (Google)
2016/06/30 15:55:26
Consider using RAW_CAST instead of assertions belo
zra
2016/06/30 17:32:31
Done here, and some others that I saw.
|
| + RawSmi* index = static_cast<RawSmi*>(FP[rC]); |
| + ASSERT(array->GetClassId() == kArrayCid); |
| + ASSERT(!index->IsHeapObject()); |
| + ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_)); |
| + FP[rA] = *(array->ptr()->data() + Smi::Value(index)); |
|
Vyacheslav Egorov (Google)
2016/06/30 15:55:26
I suggest array->ptr()->data[Smi::Value(index)] he
zra
2016/06/30 17:32:31
Done.
|
| + DISPATCH(); |
| + } |
| + |
| + { |
| BYTECODE(Deopt, A_D); |
| const bool is_lazy = rD == 0; |