move put string to string where it belongs
This commit is contained in:
@ -24,11 +24,6 @@ module Register
|
||||
emit_syscall( function , :exit )
|
||||
return function
|
||||
end
|
||||
def putstring context
|
||||
function = Virtual::CompiledMethodInfo.create_method(:Kernel , :putstring , [] )
|
||||
emit_syscall( function , :putstring )
|
||||
function
|
||||
end
|
||||
def exit context
|
||||
function = Virtual::CompiledMethodInfo.create_method(:Kernel,:exit , [])
|
||||
function.info.return_type = Virtual::Integer
|
||||
@ -43,7 +38,6 @@ module Register
|
||||
return function
|
||||
end
|
||||
|
||||
private
|
||||
def emit_syscall function , name
|
||||
save_message( function )
|
||||
function.info.add_code Syscall.new( name )
|
||||
|
@ -73,5 +73,6 @@ module Register
|
||||
end
|
||||
|
||||
require_relative "integer"
|
||||
require_relative "array"
|
||||
require_relative "list"
|
||||
require_relative "kernel"
|
||||
require_relative "word"
|
||||
|
14
lib/register/builtin/word.rb
Normal file
14
lib/register/builtin/word.rb
Normal file
@ -0,0 +1,14 @@
|
||||
module Register
|
||||
module Builtin
|
||||
module Word
|
||||
module ClassMethods
|
||||
def putstring context
|
||||
function = Virtual::CompiledMethodInfo.create_method(:Word , :putstring , [] )
|
||||
Kernel.emit_syscall( function , :putstring )
|
||||
function
|
||||
end
|
||||
end
|
||||
extend ClassMethods
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user