code.instr
Class MakeTerm
java.lang.Object
code.instr.MakeTerm
- All Implemented Interfaces:
- Instruction
public class MakeTerm
- extends java.lang.Object
- implements Instruction
Construct a term from a (root) symbol and a bunch of arguments. The
arguments are popped from the pre-term stack (where they were pushed in
reverse order). The number of arguments is the arity of the root symbol.
It would be nice to compute the arity only once. However, the
arity is not available at the time a MakeTerm instruction is
constructed. The compiler could include it in the byte code.
Or, one could consider a pass on the instructions after all
the modules have been loaded.
- Since:
- June 17, 2003
- Author:
- Sergio Antoy
|
Field Summary |
private int |
root
|
|
Constructor Summary |
MakeTerm(java.lang.String moduleName,
java.lang.String symbolName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
private final int root
MakeTerm
public MakeTerm(java.lang.String moduleName,
java.lang.String symbolName)
execute
public void execute(Computation computation)
- Description copied from interface:
Instruction
- This method executes whatever is intended by the Instruction.
- Specified by:
execute in interface Instruction
- Parameters:
computation - The instruction is executed
in the context of this Computation.
printAsTxtLoadable
public java.lang.String printAsTxtLoadable()
- Specified by:
printAsTxtLoadable in interface Instruction