uk.ac.man.cs.rainbow.compiler.green
Class Invoke

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.compiler.CompilerThing
        |
        +--uk.ac.man.cs.rainbow.compiler.CompilerNode
              |
              +--uk.ac.man.cs.rainbow.compiler.green.GreenComponent
                    |
                    +--uk.ac.man.cs.rainbow.compiler.green.Invoke

public class Invoke
extends GreenComponent

Invoke a procedure or function. Assume some preprocessing, so that the inputs match the formal parameters in a straightforward manner For procedures, channel inputs come down the pipe and value inputs are provided directly. For functions, the inputs are taken to be those coming down the pipe followed by those provided explicitly.

A standard component in a network also looks like this initially, and should be spotted and converted before we try to typecheck it.

 $Log: Invoke.java,v $
 Revision 1.2  2001/11/22 08:52:56  fellowsd
 Extended (and partitioned) code so as to cope with producing RAPA for
 calling functions as well as procedures.

 Revision 1.1  2001/11/09 10:04:58  fellowsd
 Added RAPA generator

 


Fields inherited from class uk.ac.man.cs.rainbow.compiler.green.GreenComponent
device_name, inputs_actually_required, out_types
 
Fields inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
next, sourcepos
 
Constructor Summary
Invoke(Identifier id, Expression explicitParameterList)
           
Invoke(SourcePosition sourcepos, String name, Expression explicitParameterList)
           
 
Method Summary
 ProcessTerm getRAPA(RapaEnv env)
           
 int inputs_required(TCEnv env)
           
 int num_inputs(GreenEnv env)
           
 int num_outputs(GreenEnv env)
           
 int num_params()
           
 String toString()
           
 CompilerType typecheckGreen(TCEnv env, Errors errors, CompilerType input_typeList)
           
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.green.GreenComponent
appendNextComponent, check_pipe, definitive_num_inputs, get_next, get_output_types, getInputChannels, getOutputChannels, rasm_list_nextComponent, rasm, set_delay_parameters, set_next, setNextComponents, setupNextComponents
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerNode
append, appendNotParent, dumpNode, dumpTree, getParent, indent, iterator, list_typecheck, list_typecheck, listLength, listToString, noParent, rasm_list, rasm, setParent, typecheck, typecheck, typecheckGreen
 
Methods inherited from class uk.ac.man.cs.rainbow.compiler.CompilerThing
className, crashHere, getSerial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Invoke

public Invoke(SourcePosition sourcepos,
              String name,
              Expression explicitParameterList)

Invoke

public Invoke(Identifier id,
              Expression explicitParameterList)
Method Detail

toString

public String toString()
Overrides:
toString in class GreenComponent

typecheckGreen

public CompilerType typecheckGreen(TCEnv env,
                                   Errors errors,
                                   CompilerType input_typeList)
Overrides:
typecheckGreen in class GreenComponent

inputs_required

public int inputs_required(TCEnv env)
Overrides:
inputs_required in class GreenComponent

num_inputs

public int num_inputs(GreenEnv env)
Overrides:
num_inputs in class GreenComponent

num_outputs

public int num_outputs(GreenEnv env)
Overrides:
num_outputs in class GreenComponent

num_params

public int num_params()
Overrides:
num_params in class GreenComponent

getRAPA

public ProcessTerm getRAPA(RapaEnv env)
Overrides:
getRAPA in class GreenComponent