hello world runs through
slower it seems and source view doesn’t work yet
This commit is contained in:
parent
2feb287b50
commit
c2d69c767c
@ -25,12 +25,12 @@ class DebugServer < Opal::Server
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run DebugServer.new { |s|
|
run Opal::Server.new { |s|
|
||||||
s.main = 'debugger'
|
s.main = 'debugger.js.rb'
|
||||||
s.append_path 'lib'
|
s.append_path 'lib'
|
||||||
s.append_path 'assets'
|
s.append_path 'assets'
|
||||||
s.debug = !ENV["DEBUG"].nil?
|
# s.debug = !ENV["DEBUG"].nil?
|
||||||
s.source_map = true
|
# s.source_map = true
|
||||||
s.index_path = "index.html.erb"
|
s.index_path = "index.html.erb"
|
||||||
s.sprockets.cache = Sprockets::Cache::MemoryStore.new(5000)
|
s.sprockets.cache = Sprockets::Cache::MemoryStore.new(5000)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
require "opal"
|
require "opal"
|
||||||
require "opal-parser"
|
require "opal-parser"
|
||||||
|
require 'opal/compiler'
|
||||||
|
|
||||||
require "logger"
|
require "logger"
|
||||||
require 'browser'
|
require 'browser'
|
@ -18,7 +18,7 @@ class ObjectView < ListView
|
|||||||
return @element
|
return @element
|
||||||
end
|
end
|
||||||
|
|
||||||
def object_changed reg , at
|
def object_changed( reg , at)
|
||||||
#puts "Object changed in #{reg} , at #{at}"
|
#puts "Object changed in #{reg} , at #{at}"
|
||||||
for_object = @interpreter.get_register( reg )
|
for_object = @interpreter.get_register( reg )
|
||||||
return unless for_object == @object
|
return unless for_object == @object
|
||||||
@ -27,7 +27,7 @@ class ObjectView < ListView
|
|||||||
if(variable)
|
if(variable)
|
||||||
f = @object.get_instance_variable(variable)
|
f = @object.get_instance_variable(variable)
|
||||||
else
|
else
|
||||||
variable = (at - @object.class.get_length_index).to_s
|
variable = at.to_s
|
||||||
f = @object.get_internal_word(at)
|
f = @object.get_internal_word(at)
|
||||||
end
|
end
|
||||||
#puts "got var name #{variable}#{variable.class} for #{at}, #{f}"
|
#puts "got var name #{variable}#{variable.class} for #{at}, #{f}"
|
||||||
|
@ -39,9 +39,7 @@ class SourceView < ElementView
|
|||||||
def update_method
|
def update_method
|
||||||
i = @interpreter.instruction
|
i = @interpreter.instruction
|
||||||
if i.is_a?(Risc::FunctionReturn)
|
if i.is_a?(Risc::FunctionReturn)
|
||||||
object = @interpreter.get_register( i.register )
|
link = @interpreter.get_register( i.register )
|
||||||
#puts "Object #{object}"
|
|
||||||
link = object.get_internal_word( i.index )
|
|
||||||
#puts "Link #{link}"
|
#puts "Link #{link}"
|
||||||
raise "No link method" unless link
|
raise "No link method" unless link
|
||||||
i = link
|
i = link
|
||||||
|
Loading…
Reference in New Issue
Block a user