uk.ac.man.cs.rainbow.simulator
Class RASM.Parallel

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.simulator.Instruction
        |
        +--uk.ac.man.cs.rainbow.simulator.RASM.Parallel
All Implemented Interfaces:
Serializable
Enclosing class:
RASM

Deprecated. Use Parallel

public static class RASM.Parallel
extends Instruction

Execute in parallel.

Executes the code starting at addr0 in parallel with the code starting at addr1 in parallel with ... in parallel with the code starting at addrn-1. Execution resumes at the instruction following this one once both of those parallel executions have terminated.

Each of the executing sub-threads has a copy of the (top-most) stack frame (after all the addresses have been popped) as its sole stack frame, and after the termination of all of them, the stack frame of the parent thread will have the same stack frame at the top as all of the sub-threads received, though it will also have all the stack frames below the current one as well, unlike the sub-threads. Thus, it is a checked error for a sub-thread to attempt to return from its initial stack frame, even if the parent of that thread was not in its topmost frame. (In other words, the number of return instructions performed by a thread at any point must not exceed the number of call instructions performed by that thread - a sane restriction, in my opinion.)

v0 ... vm addr0 ... addrn-1 n v0 ... vm

See Also:
RASM.Exit, Serialized Form

Inner classes inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
Instruction.MACRO
 
Constructor Summary
RASM.Parallel()
          Deprecated.  
RASM.Parallel(RASMCode code)
          Deprecated.  
 
Method Summary
protected  boolean execute(RASMThread thread)
          Deprecated. Make this instruction execute in the given context.
 String toString()
          Deprecated.  
 
Methods inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
addClass, getInstruction, getInstruction, getInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RASM.Parallel

public RASM.Parallel()
Deprecated. 

RASM.Parallel

public RASM.Parallel(RASMCode code)
Deprecated. 
Method Detail

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

execute

protected boolean execute(RASMThread thread)
                   throws RainbowException
Deprecated. 
Description copied from class: Instruction
Make this instruction execute in the given context.
Overrides:
execute in class Instruction
Following copied from class: uk.ac.man.cs.rainbow.simulator.Instruction
Throws:
RainbowException - All sorts of things can go wrong during execution...