homing in on line length 100
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
module Virtual
|
||||
|
||||
|
||||
# the first instruction we need is to stop. Off course in a real machine this would be a syscall, but that is just
|
||||
# an implementation (in a programm it would be a function).
|
||||
# the first instruction we need is to stop. Off course in a real machine this would be a syscall,
|
||||
# but that is just an implementation (in a programm it would be a function).
|
||||
# But in a virtual machine, not only do we need this instruction,
|
||||
# it is indeed the first instruction as just this instruction is the smallest possible programm for the machine.
|
||||
# it is indeed the first instruction as just this instruction is the smallest possible programm
|
||||
# for the machine.
|
||||
# As such it is the next instruction for any first instruction that we generate.
|
||||
class Halt < Instruction
|
||||
end
|
||||
|
@ -1,7 +1,9 @@
|
||||
module Virtual
|
||||
|
||||
# Get a instance variable by _name_ . So we have to resolve the name to an index to trnsform into a Slot
|
||||
# The slot may the be used in a set on left or right hand. The transformation is done by GetImplementation
|
||||
# Get a instance variable by _name_ . So we have to resolve the name to an index to
|
||||
# transform into a Slot
|
||||
# The slot may the be used in a set on left or right hand.
|
||||
# The transformation is done by GetImplementation
|
||||
class InstanceGet < Instruction
|
||||
def initialize name
|
||||
@name = name.to_sym
|
||||
|
@ -1,8 +1,8 @@
|
||||
module Virtual
|
||||
|
||||
# class for Set instructions, A set is basically a mem move.
|
||||
# to and from are indexes into the known objects(frame,message,self and new_message), these are represented as slots
|
||||
# (see there)
|
||||
# to and from are indexes into the known objects(frame,message,self and new_message),
|
||||
# these are represented as slots (see there)
|
||||
# from may be a Constant (Object,Integer,String,Class)
|
||||
class Set < Instruction
|
||||
def initialize to , from
|
||||
|
Reference in New Issue
Block a user