uk.ac.man.cs.rainbow.compiler.types
Class CompilerType
java.lang.Object
|
+--uk.ac.man.cs.rainbow.compiler.CompilerThing
|
+--uk.ac.man.cs.rainbow.compiler.CompilerNode
|
+--uk.ac.man.cs.rainbow.compiler.types.CompilerType
- All Implemented Interfaces:
- Argument, Cloneable, Type
- Direct Known Subclasses:
- AnyType, EnumerableType, NamedType, StructuredType, UndefinedType, UnionType
- public class CompilerType
- extends CompilerNode
- implements Cloneable, Type
Method Summary |
TaggedType |
anonymiseAndTagList()
|
RecordType |
anonymous_record_type()
|
void |
check_params(CompilerType formal_typeList,
SourcePosition sourcepos,
String context,
Errors errors)
|
CompilerType |
check_record_selection(String fieldname,
SourcePosition pos,
Errors errors)
|
void |
check_type(TCEnv env,
Errors errors)
|
CompilerType |
check_union_tag(String fieldname,
SourcePosition pos,
Errors errors)
|
CompilerType |
cloneAfterFirst(int n)
|
CompilerType |
cloneFirst(int n)
|
CompilerType |
cloneList()
|
CompilerType |
cloneType()
|
CompilerType |
cloneTypeNoNext()
|
CompilerType |
cloneTypeNoParent()
|
CompilerType |
cloneTypeNoParentNoNext()
|
void |
compatableWith(Argument arg)
|
CompilerType |
component_types()
|
boolean |
conforms_to(CompilerType other)
|
Type |
datamodelType()
|
RASMList |
default_initial_value(CGEnv env)
|
static CompilerType |
dontcare()
|
static CompilerType |
dontcareList(int length)
|
void |
extract_enum_or_union_names(TCEnv env,
SourcePosition spos,
Errors errors)
|
int |
field_selector(String fname)
|
CompilerType |
get_union_variant(String tagname)
|
CompilerType |
list_lub()
|
CompilerType |
listReplicate(int length)
|
CompilerType |
lub(CompilerType other)
|
ChannelList |
make_anon_channels(String prefix,
int unique_id,
int stackpos)
|
RASMList |
rasm_list_default_initial_value(CGEnv env)
|
CompilerType |
replicate()
|
CompilerType |
resolve_synonyms(TCEnv env,
Errors errors)
|
boolean |
structure_conforms(CompilerType other)
|
CompilerType |
structure()
|
Type |
subst(GeneralSubstitution s)
|
String |
toString()
|
boolean |
valid(TCEnv env)
|
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, rasm, setParent, typecheck, typecheck, typecheckGreen, typecheckGreen |
is_undefined
public boolean is_undefined
is_dontcare
public boolean is_dontcare
CompilerType
public CompilerType(SourcePosition sourcepos)
CompilerType
public CompilerType()
toString
public String toString()
- Overrides:
toString
in class CompilerNode
valid
public boolean valid(TCEnv env)
datamodelType
public Type datamodelType()
check_type
public void check_type(TCEnv env,
Errors errors)
cloneType
public CompilerType cloneType()
cloneTypeNoNext
public CompilerType cloneTypeNoNext()
cloneTypeNoParentNoNext
public CompilerType cloneTypeNoParentNoNext()
cloneTypeNoParent
public CompilerType cloneTypeNoParent()
cloneFirst
public CompilerType cloneFirst(int n)
cloneList
public CompilerType cloneList()
component_types
public CompilerType component_types()
cloneAfterFirst
public CompilerType cloneAfterFirst(int n)
structure
public CompilerType structure()
structure_conforms
public boolean structure_conforms(CompilerType other)
replicate
public CompilerType replicate()
listReplicate
public CompilerType listReplicate(int length)
anonymiseAndTagList
public TaggedType anonymiseAndTagList()
anonymous_record_type
public RecordType anonymous_record_type()
conforms_to
public boolean conforms_to(CompilerType other)
lub
public CompilerType lub(CompilerType other)
list_lub
public CompilerType list_lub()
dontcare
public static CompilerType dontcare()
dontcareList
public static CompilerType dontcareList(int length)
check_record_selection
public CompilerType check_record_selection(String fieldname,
SourcePosition pos,
Errors errors)
check_union_tag
public CompilerType check_union_tag(String fieldname,
SourcePosition pos,
Errors errors)
get_union_variant
public CompilerType get_union_variant(String tagname)
resolve_synonyms
public CompilerType resolve_synonyms(TCEnv env,
Errors errors)
field_selector
public int field_selector(String fname)
extract_enum_or_union_names
public void extract_enum_or_union_names(TCEnv env,
SourcePosition spos,
Errors errors)
make_anon_channels
public ChannelList make_anon_channels(String prefix,
int unique_id,
int stackpos)
check_params
public void check_params(CompilerType formal_typeList,
SourcePosition sourcepos,
String context,
Errors errors)
default_initial_value
public RASMList default_initial_value(CGEnv env)
rasm_list_default_initial_value
public RASMList rasm_list_default_initial_value(CGEnv env)
subst
public Type subst(GeneralSubstitution s)
- Specified by:
subst
in interface Type
compatableWith
public void compatableWith(Argument arg)
- Specified by:
compatableWith
in interface Argument
- Following copied from interface:
uk.ac.man.cs.rainbow.rapa.data.Argument
- Throws:
CompatabilityFailure
- If you are not allowed to map from this argument to the
given one.