File mu/Method


class mu.Method

Inherits

State supers
Common, mu

instance mu.Method

variables

public Type return_type;
The type returned by this method.

methods

id
  initWithType Type rt;
Designated initializer.

deferred int
  namePartsLength;
Return the number of name parts.


class mu.BuiltinMethod

Inherits

State supers
Method

methods

void
  initializeOperators;
Add all builtin methods (i.e., the operators) to the top_type.

protected void
       binop int op_kind
    argTypes (Type, Type) (at1, at2)
  returnType Type rt;
Hard worker for binary operators to initializeOperators.

protected void
       monop int op_kind
     argType Type at1
  returnType Type rt;
Hard worker for unary operators to initializeOperators.

instance mu.BuiltinMethod

variables

public int operator;
The BT_* thing.
public Type arg1;
The type of the first or only argument.

methods

id
  initWithOperator int op
        returnType Type rt
           argType Type at;
Designated initializer.

Type
  arg2;
Return the type of the second argument, or nil if this is a monop.

Meta
  meta;
Return the top_type.

int
  namePartsLength;
Return 1.

tom.OutputStream
  writeFields tom.OutputStream s;
Also write operator and arg1.


class mu.BuiltinBinop

Inherits

State supers
BuiltinMethod

instance mu.BuiltinBinop

variables

public Type arg2;
The type of the second argument.

methods

id
  initWithOperator int op
        returnType Type rt
          argTypes (Type, Type) (at1, at2);
Designated initializer.

int
  namePartsLength;
Return 2.

tom.OutputStream
  writeFields tom.OutputStream s;
Also write arg2.


class mu.CustomMethod

Inherits

State supers
Qualified, Context, Method

instance mu.CustomMethod

variables

Extension ext;
The extension containing this method.
tom.MutableArray name_parts;
The name-parts of the name of this method.
tom.MutableArray arguments;
The arguments to this method. The number of arguments can be one less than the number of name parts.
tom.MutableDictionary argument_singles;
The arguments, keyed on their name. This includes the implicit arguments self and cmd.
public ArgumentTuple return_names;
The names assigned to the return values. This will be a tuple of (tuples and) ArgumentSingle and Variable objects, or nil if not set.
public mutable Expression postcondition;
The postcondition for this method, as introduced by this method.
public mutable Expression precondition;
Similarly, the precondition.

methods

id
        init Type t
  qualifiers int q
   extension Extension e;
Designated initializer.

Extension
  extension;
Return the extension ext.

Meta
  meta;
Return the meta of the extension ext.

int
  namePartsLength;
Return the number of name parts.

void
  addNamePart tom.String n
    argument: Argument a = nil;
Undocumented.

void
  addArgumentSingle ArgumentSingle a;
Undocumented.

void
  addPrecondition Expression e
pre
  !precondition;
Add a precondition. We only support one of them for the moment.

void
  addPostcondition Expression e
pre
  !postcondition;
Add a postcondition. We only support one of them for the moment.

void
  setReturnValueNames ArgumentTuple t;
Undocumented.

ArgumentSingle (arg)
  argumentNamed tom.String name;
Undocumented.

Variable
  localEntityNamed tom.String name;
Return the argument with the name, or nil otherwise.

tom.Indexed
  arguments;
Undocumented.

tom.Indexed
  name_parts;
Undocumented.

Expression
  return_value;
Return a reference to the return_names. Do not return a singleton tuple. The default implementation simply returns nil.


Generated by tm 1.01.