com.russell_allen.smallworld
Class SmallInterpreter
java.lang.Object
com.russell_allen.smallworld.SmallInterpreter
class SmallInterpreter
- extends java.lang.Object
I do all of the heavy lifting, including
(currently) the loading and saving of
an image to file.
I hold references to specific objects in the system:
nil, true, false, Array, Block, Context, Integer and
the numbers 0-9.
From these references, you can get to Class, which holds
references to all the classes in the system in Class#classes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
imageFormatVersion
public static final int imageFormatVersion
- See Also:
- Constant Field Values
nilObject
public SmallObject nilObject
trueObject
public SmallObject trueObject
falseObject
public SmallObject falseObject
smallInts
public SmallInt[] smallInts
ArrayClass
public SmallObject ArrayClass
BlockClass
public SmallObject BlockClass
ContextClass
public SmallObject ContextClass
IntegerClass
public SmallObject IntegerClass
SmallInterpreter
SmallInterpreter()
loadImageFromInputStream
public boolean loadImageFromInputStream(java.io.InputStream name)
saveImageToOutputStream
private boolean saveImageToOutputStream(java.io.OutputStream name)
newInteger
SmallInt newInteger(int val)
methodLookup
private SmallObject methodLookup(SmallObject receiver,
SmallByteArray messageSelector,
SmallObject context,
SmallObject arguments)
throws SmallException
- Throws:
SmallException
buildContext
SmallObject buildContext(SmallObject oldContext,
SmallObject arguments,
SmallObject method)
execute
SmallObject execute(SmallObject context,
java.lang.Thread myThread,
java.lang.Thread parentThread)
throws SmallException
- Throws:
SmallException