make ints compile time mutable

to change the label value and use the allocated stubs
This commit is contained in:
Torsten Ruger
2018-05-29 17:03:55 +03:00
parent b81d9565de
commit 7847420d49
5 changed files with 26 additions and 2 deletions

View File

@ -1,6 +1,6 @@
module Mom
# A Label is the only legal target for a branch (this is true in Mom and Risc)
# A Label is the only legal target for a branch (in Mom, in Risc a BinaryCode is ok too)
#
# In the dynamic view (runtime) where the instructions form a graph,
# branches fan out, Labels collect. In other words a branch is the place where
@ -31,6 +31,7 @@ module Mom
# Off course some specific place still has to be responsible for actually
# adding the label to the instruction list (usually an if/while)
def to_risc(compiler)
@risc_label ||= Risc::Label.new(self,name)
end
end