copied salama in for reload

but have to rethink approach
This commit is contained in:
Torsten Ruger 2015-07-17 22:44:20 +03:00
parent b5b0630060
commit 4305ddaf1d
7 changed files with 32 additions and 13 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
# database # database
db db
#salama copied lib (for reloads)
app/main/lib
# rdoc generated # rdoc generated
rdoc rdoc

View File

@ -14,7 +14,7 @@ gem 'csso-rails', '~> 0.3.4', require: false
gem 'uglifier', '>= 2.4.0', require: false gem 'uglifier', '>= 2.4.0', require: false
gem "parslet" , path: "../parslet" gem "parslet" , path: "../parslet"
gem "salama" , path: "../salama" #gem "salama" , path: "../salama"
gem "salama-reader" , path: "../salama-reader" gem "salama-reader" , path: "../salama-reader"
gem "salama-object-file" , path: "../salama-object-file" gem "salama-object-file" , path: "../salama-object-file"

View File

@ -3,13 +3,6 @@ PATH
specs: specs:
parslet (1.7.0) parslet (1.7.0)
PATH
remote: ../salama
specs:
salama (0.2.0)
salama-object-file (~> 0.2)
salama-reader (~> 0.2)
PATH PATH
remote: ../salama-object-file remote: ../salama-object-file
specs: specs:
@ -170,7 +163,6 @@ DEPENDENCIES
parslet! parslet!
poltergeist (~> 1.5.0) poltergeist (~> 1.5.0)
rspec (~> 3.2.0) rspec (~> 3.2.0)
salama!
salama-object-file! salama-object-file!
salama-reader! salama-reader!
selenium-webdriver (~> 2.43.0) selenium-webdriver (~> 2.43.0)

View File

@ -4,6 +4,8 @@
# bootstrap css framework # bootstrap css framework
component 'bootstrap' component 'bootstrap'
Opal.use_gem("salama") Opal.use_gem("salama-reader")
Opal.use_gem("salama-object-file")
Opal.append_path "app/main/lib"
css_file "hint.css" css_file "hint.css"

View File

@ -1,5 +1,8 @@
require "opal/parser" # to get eval to work require "opal/parser" # to get eval to work
$LOAD_PATH.unshift("/Users/raisa/salama/salama-debugger/app/main/lib")
require "salama" require "salama"
Virtual::Machine.boot Virtual::Machine.boot
@ -11,6 +14,7 @@ module Main
page._registers!.clear page._registers!.clear
page._classes!.clear page._classes!.clear
page._objects!.clear page._objects!.clear
page._source = InstructionModel.new nil
page._block = BlockModel.new nil page._block = BlockModel.new nil
fill_regs fill_regs
parse_and_fill parse_and_fill

View File

@ -0,0 +1,13 @@
# represent an instruction and hold the actual instance (as transient)
class InstructionModel < Volt::Model
field :name
attr_accessor :instruction
def initialize(i)
super()
@instruction = i
self.name = i.class.name
end
end

View File

@ -10,13 +10,18 @@
{{ end }} {{ end }}
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-3">
Messages Messages
</div> </div>
<div class="col-md-4"> <div class="col-md-3">
Source Code Source Code
</div> </div>
<div class="col-md-4"> <div class="col-md-3">
<div class="row">
Virtual Machine Instruction : {{ page._source._name}}
</div>
</div>
<div class="col-md-3">
<div class="row"> <div class="row">
Current block: {{ page._block._name}} Current block: {{ page._block._name}}
</div> </div>