add little bit docs

This commit is contained in:
Torsten Ruger 2016-12-13 11:02:53 +02:00
parent 17023fdeb1
commit 357490ff5f
4 changed files with 16 additions and 17 deletions

View File

@ -19,8 +19,8 @@ And thus parfait can be used at run-time.
It's too simple: just slips off the mind like a fish into water.
Parfait has a brother, the Builtin module. Builtin contains everything that can not be coded in ruby,
but we still need (things like List access).
Parfait has a brother, the Builtin module. Builtin contains everything that can not be coded in
ruby, but we still need (things like List access).
### Vm vs language- core

View File

@ -1,4 +1,4 @@
# A method object is a description of the method, it's name etc
# A typed method object is a description of the method, it's name etc
#
# But the code that the method represents, the binary, is held as an array
# in one of these.
@ -6,7 +6,7 @@
module Parfait
# obviously not a "Word" but a ByteArray , but no such class yet
# As String on the other hand has no encoding (yet) it is close enough
# As our String (Word) on the other hand has no encoding (yet) it is close enough
class BinaryCode < Word
def to_s

View File

@ -1,9 +1,9 @@
# A Page (from the traditionally a memory page) represents a collection of
# A Page (from the traditional memory page) represents a collection of
# objects in a physically form. Ie the page holds the memory or data, that
# the objects are made up of.
# Pages have a total size, but more importantly and object size.
# Pages have a total size, but more importantly an object size.
# All objects of a Page are same sized, and multiples of the smallest
# object. The smallest object is usually a cache line, 16 bytes or
# an exponent of two larger.

View File

@ -6,21 +6,20 @@
# meaning one RubyMethod (untyped) has many TypedMethod implementations.
# The RubyMethod only holds ruby code, no binary.
# For reflection also holds arguments and such
# The Typed method has the following instance variables
# - name : This is the same as the ruby method name it implements
# - source: is currently the ast (or string) that represents the "code". This is historic
# and will change to the RubyMethod that it implements
# - instructions: The sequence of instructions the source (ast) was compiled to
# Instructions derive from class Instruction and form a linked list
# - binary: The binary (jumpable) code that the instructions get assembled into
# - arguments: A List of Variables that can/are passed
# - locals: A List of Variables that the method has
# - for_class: The class the Method is for (TODO, should be Type)
#
module Parfait
# static description of a method
# name
# arguments
# known local variable names
# executable code
# ps, the compiler injects its own info
class TypedMethod < Object
attributes [:name , :source , :instructions , :binary ,:arguments , :for_class, :locals ]