rename layout to type

this one goes to caleb for pointing it out.
Much better word
This commit is contained in:
Torsten Ruger
2016-02-25 11:50:10 -08:00
parent 3480b97eaa
commit d32b51c67b
39 changed files with 328 additions and 328 deletions

View File

@ -7,10 +7,10 @@ module Soml
for_class = @clazz
raise "no class" unless for_class
index = for_class.object_layout.variable_index(name)
index = for_class.object_type.variable_index(name)
#raise "class field already defined:#{name} for class #{for_class.name}" if index
#puts "Define field #{name} on class #{for_class.name}"
index = for_class.object_layout.add_instance_variable( name , type )
index = for_class.object_type.add_instance_variable( name , type )
# not sure how to run class code yet. later
raise "value #{value}" if value

View File

@ -10,9 +10,9 @@ module Soml
field_name = field_ast.first_from(:name)
index = clazz.object_layout.variable_index(field_name)
index = clazz.object_type.variable_index(field_name)
raise "field access, but no such field:#{field_name} for class #{clazz.name}" unless index
value = use_reg(clazz.object_layout.type_at(index))
value = use_reg(clazz.object_type.type_at(index))
add_code Register.get_slot(statement , receiver , index, value)