update for rubyx integer and api changes
This commit is contained in:
@ -36,11 +36,17 @@ class String
|
||||
arr
|
||||
end
|
||||
end
|
||||
module RubyX
|
||||
def self.debugger_options
|
||||
{ parfait: {factory: 50} }
|
||||
end
|
||||
end
|
||||
class MainView < ListView
|
||||
|
||||
def initialize
|
||||
compiler = RubyX::RubyXCompiler.new(RubyX.debugger_options)
|
||||
input = "class Space;def main(arg); return 1; end; end"
|
||||
linker = RubyX::RubyXCompiler.new.ruby_to_binary(input , :interpreter)
|
||||
linker = compiler.ruby_to_binary(input , :interpreter)
|
||||
@interpreter = Risc::Interpreter.new(linker)
|
||||
super( [LeftView.new(@interpreter) ,
|
||||
VoolView.new(@interpreter) ,
|
||||
|
@ -66,7 +66,8 @@ class SelectView < ElementView
|
||||
@interpreter.set_state :stopped
|
||||
@element.at_css(".selected").text = code
|
||||
ruby = as_main(get_codes[code])
|
||||
linker = RubyX::RubyXCompiler.new.ruby_to_binary(ruby, :interpreter)
|
||||
compiler = RubyX::RubyXCompiler.new(RubyX.debugger_options)
|
||||
linker = compiler.ruby_to_binary(ruby, :interpreter)
|
||||
@interpreter.start_program(linker)
|
||||
end
|
||||
|
||||
|
@ -58,6 +58,7 @@ class StatusView < ElementView
|
||||
end
|
||||
|
||||
def status_text
|
||||
return unless @interpreter.instruction
|
||||
return "#{@interpreter.instruction.to_s}" unless @interpreter.instruction.source
|
||||
source = @interpreter.instruction.source
|
||||
s = "#{source.to_s}"
|
||||
|
Reference in New Issue
Block a user