move parfait to architecture
typed will retired soon
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
%ul.nav
|
||||
%li
|
||||
%a{:href => "/rubyx/layers.html"} Layers of RubyX
|
||||
%li
|
||||
%a{:href => "/rubyx/parfait.html"} Parfait
|
||||
%li
|
||||
%a{:href => "/rubyx/memory.html"} Memory
|
||||
%li
|
||||
|
@ -1,8 +1,6 @@
|
||||
- title = "RubyX architectural layers"
|
||||
|
||||
= render "pages/rubyx/menu"
|
||||
|
||||
%h1#main-layers Main Layers
|
||||
%h1=title "RubyX architectural layers"
|
||||
%p
|
||||
To implement an object system to execute object oriented languages takes a large system.
|
||||
The parts or abstraction layers are detailed below.
|
||||
|
@ -1,8 +1,6 @@
|
||||
- title = "Types, memory layout and management"
|
||||
|
||||
= render "pages/rubyx/menu"
|
||||
|
||||
%h1#main-layers Memory management
|
||||
%h1=title "Types, memory layout and management"
|
||||
|
||||
%p Memory management must be one of the main horrors of computing. That’s why garbage collected languages like ruby are so great. Even simple malloc implementations tend to be quite complicated. Unnecessary so, if one used object oriented principles of data hiding.
|
||||
%h3#object-and-values Object and values
|
||||
|
@ -1,8 +1,6 @@
|
||||
- title = "Optimisation ideas"
|
||||
|
||||
= render "pages/rubyx/menu"
|
||||
|
||||
%h1 Optimisation ideas
|
||||
%h1=title "Optimisation ideas"
|
||||
|
||||
%p I won’t manage to implement all of these idea in the beginning, so i just jot them down.
|
||||
%h3#avoid-dynamic-lookup Avoid dynamic lookup
|
||||
|
35
app/views/pages/rubyx/parfait.html.haml
Normal file
35
app/views/pages/rubyx/parfait.html.haml
Normal file
@ -0,0 +1,35 @@
|
||||
= render "pages/rubyx/menu"
|
||||
|
||||
%h1= title "Parfait, a minimal runtime"
|
||||
|
||||
%h3#type-and-class Type and Class
|
||||
%p
|
||||
Each object has a type that describes the instance variables and basic types of the object.
|
||||
Types also reference the class they implement.
|
||||
Type objects are unique and constant, may not be changed over their lifetime.
|
||||
When a field is added to a class, a new Type is created. For a given class and combination
|
||||
of instance names and basic types, only one instance every exists describing that type (a bit
|
||||
similar to symbols)
|
||||
%p
|
||||
A Class describes a set of objects that respond to the same methods (the methods source is stored
|
||||
in the RubyMethod class).
|
||||
A Type describes a set of objects that have the same instance variables.
|
||||
%h3#method-message-and-frame Method, Message and Frame
|
||||
%p
|
||||
The TypedMethod class describes a callable method. It carries a name, argument and local variable
|
||||
type and several descriptions of the code.
|
||||
The typed ast is kept for debugging, the register model instruction stream for optimisation
|
||||
and further processing and finally the cpu specific binary
|
||||
represents the executable code.
|
||||
%p
|
||||
When TypedMethods are invoked, A message object (instance of Message class) is populated.
|
||||
Message objects are created at compile time and form a linked list.
|
||||
The data in the Message holds the receiver, return addresses, arguments and a frame.
|
||||
Frames are also created at compile time and just reused at runtime.
|
||||
%h3#space-and-support Space and support
|
||||
%p
|
||||
The single instance of Space hold a list of all Types and all Classes, which in turn hold
|
||||
the methods.
|
||||
Also the space holds messages and will hold memory management objects like pages.
|
||||
%p Words represent short immutable text and other word processing (buffers, text) is still tbd.
|
||||
%p Lists (aka Array) are number indexed, starting at one, and dictionaries (aka Hash) are mappings from words to objects.
|
@ -1,8 +1,6 @@
|
||||
- title = "Threads are broken"
|
||||
|
||||
= render "pages/rubyx/menu"
|
||||
|
||||
%h1 "Threads are broken"
|
||||
%h1= title "Threads are broken"
|
||||
|
||||
%p
|
||||
Having just read about rubys threads, i was moved to collect my thoughts on the topic. How this will influence implementation
|
||||
|
Reference in New Issue
Block a user