removing builtin as a concept (wip)

the "old" way of generating compilers is now obsolete
we can use ruby code with mom macros to achieve the same
Three step wip
remove old builtin
fix tests (including adding necessary methods)
fixup and inclusion of builtin code to parfait
This commit is contained in:
2019-09-12 13:09:30 +03:00
parent 616dd3487c
commit dced6b12e6
24 changed files with 95 additions and 612 deletions

View File

@@ -1,21 +1,4 @@
module Mom
module Builtin
class Div4 < ::Mom::Instruction
def to_risc(compiler)
builder = compiler.builder(compiler.source)
integer_tmp = builder.allocate_int
builder.build do
integer_self! << message[:receiver]
integer_self.reduce_int
integer_1! << 2
integer_self.op :>> , integer_1
integer_tmp[Parfait::Integer.integer_index] << integer_self
message[:return_value] << integer_tmp
end
return compiler
end
end
end
class Div4 < Macro
def to_risc(compiler)
builder = compiler.builder(compiler.source)