hello world runs through

slower it seems
and source view doesn’t work yet
This commit is contained in:
Torsten Ruger 2018-04-03 19:35:25 +03:00
parent 2feb287b50
commit c2d69c767c
4 changed files with 8 additions and 9 deletions

View File

@ -25,12 +25,12 @@ class DebugServer < Opal::Server
end
end
run DebugServer.new { |s|
s.main = 'debugger'
run Opal::Server.new { |s|
s.main = 'debugger.js.rb'
s.append_path 'lib'
s.append_path 'assets'
s.debug = !ENV["DEBUG"].nil?
s.source_map = true
# s.debug = !ENV["DEBUG"].nil?
# s.source_map = true
s.index_path = "index.html.erb"
s.sprockets.cache = Sprockets::Cache::MemoryStore.new(5000)
}

View File

@ -1,6 +1,7 @@
require "opal"
require "opal-parser"
require 'opal/compiler'
require "logger"
require 'browser'

View File

@ -18,7 +18,7 @@ class ObjectView < ListView
return @element
end
def object_changed reg , at
def object_changed( reg , at)
#puts "Object changed in #{reg} , at #{at}"
for_object = @interpreter.get_register( reg )
return unless for_object == @object
@ -27,7 +27,7 @@ class ObjectView < ListView
if(variable)
f = @object.get_instance_variable(variable)
else
variable = (at - @object.class.get_length_index).to_s
variable = at.to_s
f = @object.get_internal_word(at)
end
#puts "got var name #{variable}#{variable.class} for #{at}, #{f}"

View File

@ -39,9 +39,7 @@ class SourceView < ElementView
def update_method
i = @interpreter.instruction
if i.is_a?(Risc::FunctionReturn)
object = @interpreter.get_register( i.register )
#puts "Object #{object}"
link = object.get_internal_word( i.index )
link = @interpreter.get_register( i.register )
#puts "Link #{link}"
raise "No link method" unless link
i = link