copied salama in for reload
but have to rethink approach
This commit is contained in:
parent
b5b0630060
commit
4305ddaf1d
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
||||
# database
|
||||
db
|
||||
|
||||
#salama copied lib (for reloads)
|
||||
app/main/lib
|
||||
|
||||
# rdoc generated
|
||||
rdoc
|
||||
|
||||
|
2
Gemfile
2
Gemfile
@ -14,7 +14,7 @@ gem 'csso-rails', '~> 0.3.4', require: false
|
||||
gem 'uglifier', '>= 2.4.0', require: false
|
||||
|
||||
gem "parslet" , path: "../parslet"
|
||||
gem "salama" , path: "../salama"
|
||||
#gem "salama" , path: "../salama"
|
||||
gem "salama-reader" , path: "../salama-reader"
|
||||
gem "salama-object-file" , path: "../salama-object-file"
|
||||
|
||||
|
@ -3,13 +3,6 @@ PATH
|
||||
specs:
|
||||
parslet (1.7.0)
|
||||
|
||||
PATH
|
||||
remote: ../salama
|
||||
specs:
|
||||
salama (0.2.0)
|
||||
salama-object-file (~> 0.2)
|
||||
salama-reader (~> 0.2)
|
||||
|
||||
PATH
|
||||
remote: ../salama-object-file
|
||||
specs:
|
||||
@ -170,7 +163,6 @@ DEPENDENCIES
|
||||
parslet!
|
||||
poltergeist (~> 1.5.0)
|
||||
rspec (~> 3.2.0)
|
||||
salama!
|
||||
salama-object-file!
|
||||
salama-reader!
|
||||
selenium-webdriver (~> 2.43.0)
|
||||
|
@ -4,6 +4,8 @@
|
||||
# bootstrap css framework
|
||||
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"
|
||||
|
@ -1,5 +1,8 @@
|
||||
|
||||
require "opal/parser" # to get eval to work
|
||||
|
||||
$LOAD_PATH.unshift("/Users/raisa/salama/salama-debugger/app/main/lib")
|
||||
|
||||
require "salama"
|
||||
|
||||
Virtual::Machine.boot
|
||||
@ -11,6 +14,7 @@ module Main
|
||||
page._registers!.clear
|
||||
page._classes!.clear
|
||||
page._objects!.clear
|
||||
page._source = InstructionModel.new nil
|
||||
page._block = BlockModel.new nil
|
||||
fill_regs
|
||||
parse_and_fill
|
||||
|
13
app/main/models/instruction_model.rb
Normal file
13
app/main/models/instruction_model.rb
Normal 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
|
@ -10,13 +10,18 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
Messages
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
Source Code
|
||||
</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">
|
||||
Current block: {{ page._block._name}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user