small things
This commit is contained in:
parent
bd875be023
commit
021fab31db
@ -22,7 +22,6 @@ module Register
|
||||
attr_reader :constants
|
||||
attr_reader :space , :class_mappings , :init , :objects , :booted
|
||||
|
||||
|
||||
# idea being that later method missing could catch translate_xxx and translate to target xxx
|
||||
# now we just instantiate ArmTranslater and pass instructions
|
||||
def translate_arm
|
||||
|
@ -24,7 +24,7 @@ The compiler has a method for each class of typed tree, named along on_xxx with
|
||||
#### Compiler holds scope
|
||||
|
||||
The Compiler instance can hold arbitrary scope needed during the compilation.
|
||||
A class statement sets the current @clazz scope , a method definition the @method.
|
||||
A class statement sets the current @type scope , a method definition the @method.
|
||||
If either are not set when needed compile errors will follow. So easy, so nice.
|
||||
|
||||
All code is encoded as a stream of Instructions in the MethodSource.
|
||||
|
@ -14,6 +14,7 @@ class HelloTest < MiniTest::Test
|
||||
|
||||
def test_string_put
|
||||
@input = s(:statements, s(:class, :Object, s(:derives, nil), s(:statements, s(:function, :Integer, s(:name, :main), s(:parameters), s(:statements, s(:return, s(:call, s(:name, :putstring), s(:arguments), s(:receiver, s(:string, "Hello again\\n")))))))))
|
||||
check
|
||||
#FIXME: some more assembly tests need to get to the bottom of this one
|
||||
# check
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user