start to compile send

still very hacked version of simple call, but a start
This commit is contained in:
Torsten Ruger
2017-04-15 20:58:39 +03:00
parent 265b25d5f4
commit 0d43987005
8 changed files with 130 additions and 43 deletions

View File

@ -6,5 +6,6 @@ module Mom
end
require_relative "simple_call"
require_relative "slot_load"
require_relative "return_sequence"

18
lib/mom/simple_call.rb Normal file
View File

@ -0,0 +1,18 @@
module Mom
# A SimpleCall is just that, a simple call. This could be called a function call too,
# meaning we managed to resolve the function at compile time and all we have to do is
# actually call it.
#
# As the call setup is done beforehand (for both simple and cached call), the
# calling really means just jumping to the address. Simple.
#
class SimpleCall < Instruction
attr_reader :method
def initialize(method)
@method = method
end
end
end