change program to inherit stright from code, not block (as it keeps the funcitons anyway)

This commit is contained in:
Torsten Ruger 2014-05-31 12:38:15 +03:00
parent 513545f51b
commit c9c484f353

View File

@ -18,12 +18,12 @@ module Vm
# throwing in a context for unspecified use (well one is to pass the programm/globals around)
class Program < Block
class Program < Code
# Initialize with a string for cpu. Naming conventions are: for Machine XXX there exists a module XXX
# with a XXXMachine in it that derives from Vm::RegisterMachine
def initialize machine = nil
super("start" , nil)
super()
machine = RbConfig::CONFIG["host_cpu"] unless machine
machine = "intel" if machine == "x86_64"
machine = machine.capitalize
@ -33,6 +33,8 @@ module Vm
@objects = []
# global functions
@functions = []
@classes = []
@entry = Core::Kernel::main_start Vm::Block.new("main_entry",nil)
#main gets executed between entry and exit
@main = Block.new("main",nil)
@ -67,6 +69,10 @@ module Vm
fun
end
def get_or_create_class name
end
# linking entry , main , exit
# functions , objects
def link_at( start , context)