start to compile send
still very hacked version of simple call, but a start
This commit is contained in:
@ -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
18
lib/mom/simple_call.rb
Normal 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
|
Reference in New Issue
Block a user