change program to inherit stright from code, not block (as it keeps the funcitons anyway)
This commit is contained in:
parent
513545f51b
commit
c9c484f353
@ -18,12 +18,12 @@ module Vm
|
|||||||
|
|
||||||
# throwing in a context for unspecified use (well one is to pass the programm/globals around)
|
# 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
|
# 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
|
# with a XXXMachine in it that derives from Vm::RegisterMachine
|
||||||
def initialize machine = nil
|
def initialize machine = nil
|
||||||
super("start" , nil)
|
super()
|
||||||
machine = RbConfig::CONFIG["host_cpu"] unless machine
|
machine = RbConfig::CONFIG["host_cpu"] unless machine
|
||||||
machine = "intel" if machine == "x86_64"
|
machine = "intel" if machine == "x86_64"
|
||||||
machine = machine.capitalize
|
machine = machine.capitalize
|
||||||
@ -33,6 +33,8 @@ module Vm
|
|||||||
@objects = []
|
@objects = []
|
||||||
# global functions
|
# global functions
|
||||||
@functions = []
|
@functions = []
|
||||||
|
|
||||||
|
@classes = []
|
||||||
@entry = Core::Kernel::main_start Vm::Block.new("main_entry",nil)
|
@entry = Core::Kernel::main_start Vm::Block.new("main_entry",nil)
|
||||||
#main gets executed between entry and exit
|
#main gets executed between entry and exit
|
||||||
@main = Block.new("main",nil)
|
@main = Block.new("main",nil)
|
||||||
@ -66,7 +68,11 @@ module Vm
|
|||||||
end
|
end
|
||||||
fun
|
fun
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_or_create_class name
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
# linking entry , main , exit
|
# linking entry , main , exit
|
||||||
# functions , objects
|
# functions , objects
|
||||||
def link_at( start , context)
|
def link_at( start , context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user