| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index f250a5761ff8a421ae53a4f3974c22043f6e1634..8cc93e3e980e69d44179ac9d65a0f14058d86dec 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -258,22 +258,6 @@ void ThrowInstr::SetInputAt(intptr_t i, Value* value) {
|
| }
|
|
|
|
|
| -intptr_t GotoInstr::InputCount() const {
|
| - return 0;
|
| -}
|
| -
|
| -
|
| -Value* GotoInstr::InputAt(intptr_t i) const {
|
| - UNREACHABLE();
|
| - return NULL;
|
| -}
|
| -
|
| -
|
| -void GotoInstr::SetInputAt(intptr_t i, Value* value) {
|
| - UNREACHABLE();
|
| -}
|
| -
|
| -
|
| intptr_t ReturnInstr::InputCount() const {
|
| return 1;
|
| }
|
| @@ -503,9 +487,7 @@ void BlockEntryInstr::DiscoverBlocks(
|
| !next_instr->IsBranch()) {
|
| if (vars != NULL) next_instr->RecordAssignedVars(vars);
|
| set_last_instruction(next_instr);
|
| - GotoInstr* goto_instr = next_instr->AsGoto();
|
| - next_instr =
|
| - (goto_instr != NULL) ? goto_instr->successor() : next_instr->next();
|
| + next_instr = next_instr->next();
|
| }
|
| }
|
| if (next_instr != NULL) {
|
| @@ -557,15 +539,13 @@ void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
|
|
|
|
|
| intptr_t Instruction::SuccessorCount() const {
|
| - return 0;
|
| + ASSERT(next() == NULL || next()->IsBlockEntry());
|
| + return (next() != NULL) ? 1 : 0;
|
| }
|
|
|
|
|
| BlockEntryInstr* Instruction::SuccessorAt(intptr_t index) const {
|
| - // Called only if index is in range. Only control-transfer instructions
|
| - // can have non-zero successor counts and they override this function.
|
| - UNREACHABLE();
|
| - return NULL;
|
| + return next()->AsBlockEntry();
|
| }
|
|
|
|
|
| @@ -593,22 +573,6 @@ BlockEntryInstr* BranchInstr::SuccessorAt(intptr_t index) const {
|
| }
|
|
|
|
|
| -intptr_t GotoInstr::SuccessorCount() const {
|
| - return 1;
|
| -}
|
| -
|
| -
|
| -BlockEntryInstr* GotoInstr::SuccessorAt(intptr_t index) const {
|
| - ASSERT(index == 0);
|
| - return successor();
|
| -}
|
| -
|
| -
|
| -void Instruction::Goto(JoinEntryInstr* entry) {
|
| - set_next(new GotoInstr(entry));
|
| -}
|
| -
|
| -
|
| // ==== Support for propagating static type.
|
| RawAbstractType* ConstantVal::StaticType() const {
|
| if (value().IsInstance()) {
|
| @@ -1023,20 +987,6 @@ void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* GotoInstr::MakeLocationSummary() const {
|
| - return new LocationSummary(0, 0);
|
| -}
|
| -
|
| -
|
| -void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - // We can fall through if the successor is the next block in the list.
|
| - // Otherwise, we need a jump.
|
| - if (!compiler->IsNextBlock(successor())) {
|
| - __ jmp(compiler->GetBlockLabel(successor()));
|
| - }
|
| -}
|
| -
|
| -
|
| LocationSummary* BranchInstr::MakeLocationSummary() const {
|
| if (is_fused_with_comparison()) {
|
| return fused_with_comparison_->locs();
|
|
|