homing in on line length 100

This commit is contained in:
Torsten Ruger
2015-05-30 12:20:39 +03:00
parent 33d464f032
commit e651b57d08
29 changed files with 159 additions and 108 deletions

View File

@ -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

View File

@ -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

View File

@ -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