JML

org.multijava.util.backend
Class ControlFlow

java.lang.Object
  extended byorg.multijava.util.backend.ControlFlow

public class ControlFlow
extends Object

This is the entry point of the backend, this class constructs the control flow graf and applies optimizations


Field Summary
private  BasicBlock[] bblocks
           
private  BasicBlock[] eblocks
           
private  MethodEnv env
           
 
Constructor Summary
ControlFlow(MethodEnv env, InstructionHandle start, HandlerInfo[] handlers)
          Creates a new instruction handle.
 
Method Summary
private  void buildBasicBlocks(InstructionHandle start, HandlerInfo[] handlers)
           
private  void clean(HandlerInfo[] handlers, ArrayList vbblocks)
           
private  void closeBasicBlock(BasicBlock current, ArrayList body, ArrayList bblocks)
           
static BasicBlock findBasicBlock(InstructionHandle handle)
           
 InstructionHandle getInstructions()
           
private static boolean isEndOfBasicBlock(InstructionHandle handle)
           
 void optimize()
           
private  void resolveAccessors(InstructionHandle handlex)
           
private  void setMarked(boolean marked)
           
protected static void setMarked(BasicBlock[] bblocks, boolean marked)
           
 void trace()
          Prints a trace of the control flow structure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

env

private MethodEnv env

bblocks

private BasicBlock[] bblocks

eblocks

private BasicBlock[] eblocks
Constructor Detail

ControlFlow

public ControlFlow(MethodEnv env,
                   InstructionHandle start,
                   HandlerInfo[] handlers)
Creates a new instruction handle.

Method Detail

trace

public void trace()
Prints a trace of the control flow structure


optimize

public void optimize()

getInstructions

public InstructionHandle getInstructions()

findBasicBlock

public static BasicBlock findBasicBlock(InstructionHandle handle)

buildBasicBlocks

private void buildBasicBlocks(InstructionHandle start,
                              HandlerInfo[] handlers)

closeBasicBlock

private void closeBasicBlock(BasicBlock current,
                             ArrayList body,
                             ArrayList bblocks)

clean

private void clean(HandlerInfo[] handlers,
                   ArrayList vbblocks)

isEndOfBasicBlock

private static boolean isEndOfBasicBlock(InstructionHandle handle)

setMarked

private void setMarked(boolean marked)

setMarked

protected static final void setMarked(BasicBlock[] bblocks,
                                      boolean marked)

resolveAccessors

private void resolveAccessors(InstructionHandle handlex)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.