update salaam and fix
This commit is contained in:
parent
5aebc464e2
commit
daa75719cc
4
Gemfile
4
Gemfile
@ -5,8 +5,8 @@ gem 'opal-browser'
|
||||
#gem "ast" , :path => "../ast"
|
||||
gem "ast" , :github => "whitequark/ast"
|
||||
|
||||
#gem "salama" , "0.3" , :path => "../salama"
|
||||
gem "salama" , github: "salama/salama"
|
||||
gem "salama" , "0.3" , :path => "../salama"
|
||||
#gem "salama" , github: "salama/salama"
|
||||
|
||||
gem "parslet"
|
||||
gem "salama-reader" , github: "salama/salama-reader"
|
||||
|
17
Gemfile.lock
17
Gemfile.lock
@ -28,20 +28,19 @@ GIT
|
||||
ast (~> 2.1.0)
|
||||
parslet (~> 1.7.1)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/salama/salama.git
|
||||
revision: 93ff44bb6f96bf13bcae52e9d322e4a3b35c0709
|
||||
specs:
|
||||
salama (0.3.0)
|
||||
salama-object-file (~> 0.3)
|
||||
salama-reader (~> 0.3)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/whitequark/ast.git
|
||||
revision: 63db4686b33228e8f703cb7328e5e5c62aa3cd92
|
||||
specs:
|
||||
ast (2.1.0)
|
||||
|
||||
PATH
|
||||
remote: ../salama
|
||||
specs:
|
||||
salama (0.3.0)
|
||||
salama-object-file (~> 0.3)
|
||||
salama-reader (~> 0.3)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -129,7 +128,7 @@ DEPENDENCIES
|
||||
parslet
|
||||
poltergeist (~> 1.5.0)
|
||||
rspec (~> 3.2.0)
|
||||
salama!
|
||||
salama (= 0.3)!
|
||||
salama-arm!
|
||||
salama-object-file!
|
||||
salama-reader!
|
||||
|
@ -1,7 +1,7 @@
|
||||
class Layout < Object
|
||||
|
||||
Class object_class()
|
||||
return get_internal(2)
|
||||
return get_internal_word(2)
|
||||
end
|
||||
|
||||
end
|
||||
@ -9,7 +9,7 @@ end
|
||||
class Object
|
||||
|
||||
Layout get_layout()
|
||||
return get_internal(1)
|
||||
return get_internal_word(1)
|
||||
end
|
||||
|
||||
Class get_class()
|
||||
|
@ -9,7 +9,7 @@ require 'native'
|
||||
require "salama"
|
||||
require "salama-reader"
|
||||
require "ast"
|
||||
require "interpreter/interpreter"
|
||||
require "register/interpreter"
|
||||
# the base, our own litle framework, allows for child and parent views and handles updates
|
||||
require "base/list_view"
|
||||
# each seperate view is in it's own class.
|
||||
@ -44,7 +44,7 @@ class MainView < ListView
|
||||
s(:statements, s(:class_field, :Integer, :x))))
|
||||
Soml.compile( code )
|
||||
machine.collect
|
||||
@interpreter = Interpreter::Interpreter.new
|
||||
@interpreter = Register::Interpreter.new
|
||||
super( [SwitchView.new(@interpreter) ,
|
||||
SourceView.new(@interpreter) ,
|
||||
InstructionView.new(@interpreter) ,
|
||||
|
@ -28,7 +28,7 @@ class ObjectView < ListView
|
||||
f = @object.get_instance_variable(variable)
|
||||
else
|
||||
variable = (at - @object.class.get_length_index).to_s
|
||||
f = @object.get_internal(at)
|
||||
f = @object.get_internal_word(at)
|
||||
end
|
||||
#puts "got var name #{variable}#{variable.class} for #{at}, #{f}"
|
||||
view = RefView.new( variable , f , @z )
|
||||
|
@ -39,7 +39,7 @@ class SourceView < ElementView
|
||||
if i.is_a?(Register::FunctionReturn)
|
||||
object = @interpreter.get_register( i.register )
|
||||
#puts "Object #{object}"
|
||||
link = object.get_internal( i.index )
|
||||
link = object.get_internal_word( i.index )
|
||||
#puts "Link #{link}"
|
||||
raise "No link method" unless link
|
||||
i = link
|
||||
@ -47,7 +47,8 @@ class SourceView < ElementView
|
||||
return unless (i.is_a? Register::Label)
|
||||
if i.is_method
|
||||
cl_name , method_name = *i.name.split(".")
|
||||
clazz = Register.machine.space.get_class_by_name cl_name
|
||||
clazz = Register.machine.space.get_class_by_name cl_name.split(" ").last
|
||||
raise "No class for #{cl_name} , #{i.name}" unless clazz
|
||||
method = clazz.get_instance_method( method_name)
|
||||
else
|
||||
return
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 375 KiB |
Loading…
Reference in New Issue
Block a user