move most code from method_compiler to builder

rather use builder in two ways, than sometimes compiler and sometimes
builder
Also makes it possible to reuse builtin code in mom’s to_risc, as both
use builder. The builtin code by directly adding to compiler, the mom
code not.
This commit is contained in:
Torsten Ruger
2018-04-08 18:51:20 +03:00
parent c2860bef7a
commit 9867234c38
6 changed files with 117 additions and 102 deletions

View File

@ -2,12 +2,12 @@ module Mom
# A dynamic call calls a method at runtime. This off course implies that we don't know the
# method at compile time and so must "find" it. Resolving, or finding the method, is a
# a seperate step though, and here we assume that we know this Method instance.
# a seperate instruction though, and here we assume that we know this Method instance.
#
# Both (to be called) Method instance and the type of receiver are stored as
# variables here. The type is used to check before calling.
#
# Setting up the method is not part of the instructions scope. That setup
# Setting up the method is not part of this instructions scope. That setup
# includes the type check and any necccessay method resolution.
# See vool send statement
#