mostly renames from the type change
also making setters as explicit set_xx methods
This commit is contained in:
@ -8,7 +8,7 @@ module Register
|
||||
def __init__ context
|
||||
compiler = Typed::MethodCompiler.new.create_method(:Kernel,:__init__ )
|
||||
new_start = Register.label("__init__ start" , "__init__" )
|
||||
compiler.method.instructions = new_start
|
||||
compiler.method.set_instructions( new_start)
|
||||
compiler.set_current new_start
|
||||
|
||||
space = Parfait::Space.object_space
|
||||
|
@ -21,7 +21,7 @@ module Register
|
||||
type = object.get_type
|
||||
keep(type , depth + 1)
|
||||
return if object.is_a? Symbol
|
||||
type.instance_names.each do |name|
|
||||
type.names.each do |name|
|
||||
#puts "Keep #{name} for #{object.class}"
|
||||
inst = object.get_instance_variable name
|
||||
keep(inst , depth + 1)
|
||||
|
@ -88,7 +88,7 @@ module Register
|
||||
clazz = Parfait::Space.object_space.get_class_by_name(real_name)
|
||||
raise "Class name not given #{real_name}" unless clazz
|
||||
index = clazz.instance_type.variable_index( instance_name )
|
||||
raise "Instance name=#{instance_name} not found on #{real_name}" unless index.is_a?(Numeric)
|
||||
raise "Instance name=#{instance_name} not found on #{real_name}:#{clazz.instance_type}" unless index.is_a?(Numeric)
|
||||
return index # the type word is at index 0, but type is a list and starts at 1 == type
|
||||
end
|
||||
|
||||
|
@ -133,7 +133,7 @@ module Typed
|
||||
def init_method
|
||||
source = "_init_method"
|
||||
name = "#{method.for_type.name}.#{method.name}"
|
||||
@method.instructions = Register.label(source, name)
|
||||
@method.set_instructions( Register.label(source, name))
|
||||
@current = enter = method.instructions
|
||||
add_label( source, "return #{name}")
|
||||
#load the return address into pc, affecting return. (other cpus have commands for this, but not arm)
|
||||
|
Reference in New Issue
Block a user