Chromium Code Reviews| Index: runtime/vm/intermediate_language_dbc.cc |
| diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc |
| index aca13bdda4f4d677e5fae7d59cca94a1699c7b3f..cbcd5875f623c13505e0022ebc9220139f796a27 100644 |
| --- a/runtime/vm/intermediate_language_dbc.cc |
| +++ b/runtime/vm/intermediate_language_dbc.cc |
| @@ -1119,9 +1119,14 @@ EMIT_NATIVE_CODE(CatchBlockEntry, 0) { |
| compiler->assembler()->CodeSize(), |
| catch_handler_types_, |
| needs_stacktrace()); |
| - __ MoveSpecial(-exception_var().index()-1, |
| + |
| + if (HasParallelMove()) { |
| + compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| + } |
| + |
| + __ MoveSpecial(LocalVarIndex(0, exception_var().index()), |
| Simulator::kExceptionSpecialIndex); |
| - __ MoveSpecial(-stacktrace_var().index()-1, |
| + __ MoveSpecial(LocalVarIndex(0, stacktrace_var().index()), |
| Simulator::kStacktraceSpecialIndex); |
| __ SetFrame(compiler->StackSize()); |
| } |
| @@ -1400,10 +1405,15 @@ EMIT_NATIVE_CODE(CheckClass, 1) { |
| (unary_checks().NumberOfChecks() > 1)); |
| const intptr_t may_be_smi = |
| (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) ? 1 : 0; |
| + bool is_dense_switch = false; |
| + intptr_t cid_mask = 0; |
| if (IsDenseSwitch()) { |
| ASSERT(cids_[0] < cids_[cids_.length() - 1]); |
| + cid_mask = ComputeCidMask(); |
| + is_dense_switch = Smi::IsValid(cid_mask); |
|
Florian Schneider
2016/10/04 17:07:57
I'll fix this in a follow-up CL by adding support
|
| + } |
| + if (is_dense_switch) { |
| const intptr_t low_cid = cids_[0]; |
| - const intptr_t cid_mask = ComputeCidMask(); |
| __ CheckDenseSwitch(value, may_be_smi); |
| __ Nop(compiler->ToEmbeddableCid(low_cid, this)); |
| __ Nop(__ AddConstant(Smi::Handle(Smi::New(cid_mask)))); |