removed the (too) fancy dsl. Also introduce register indirection

This commit is contained in:
Torsten Ruger
2014-06-07 17:59:44 +03:00
parent 6433a394e7
commit 36f237c633
26 changed files with 128 additions and 161 deletions

View File

@ -9,6 +9,7 @@ module Ast
if receiver.name == :self
function = context.current_class.get_or_create_function(name)
value = Vm::Integer.new(Vm::Function::RECEIVER_REG)
elsif receiver.is_a? ModuleName
c_name = receiver.name
clazz = context.object_space.get_or_create_class c_name
@ -23,6 +24,7 @@ module Ast
else
# should be case switch for basic tyes and dynamic dispatch for objects reference
value = context.locals[receiver.name]
raise "no value" unless value
function = context.current_class.get_or_create_function(name)
end
raise "No such method error #{clazz.to_s}:#{name}" if function == nil