Skip to content

Commit

Permalink
r181@vatu: evan | 2006-12-07 17:53:32 -0800
Browse files Browse the repository at this point in the history
 Big ol' commit!
 
 Lots of fun stuff in here:
 
 1. Added the THANKS file. Everyone who donates money/time to rubinius goes in it.
 2. Fixed up the runtime even more so that the compiler works! It's crashing
    on some things, but getting close!
 3. Added ivar_as_index, which lets the compiler know how to map ivar access
    to fields in self. Makes the code A TON more readable.
  • Loading branch information
evanphx committed Dec 8, 2006
1 parent 35e5b79 commit f549f7a
Show file tree
Hide file tree
Showing 38 changed files with 6,349 additions and 6,687 deletions.
248 changes: 124 additions & 124 deletions .gdb_history
@@ -1,29 +1,55 @@
p _inspect(other)
bt
up
up
p _inspect(obj)
q
run
bt
b string_append
q
run
c
up
up
p _inspect(obj)
q
run
q
b cpu.c:331
run
n
c
n
c
n
c
n
c
c
n
c
p _inspect(other)
n
p oth_sz
p cur_sz
p obs
p bytearray_byte_address(obs)
p bytearray_byte_address(state, obs)
p (char*)bytearray_byte_address(state, obs)
d
b cpu.c:332
c
c
d
c
b cpu.c:332
c
p _inspect(c->method_module)
c
p _inspect(c->method_module)
bt
q
run
bt
p sz
b cpu.c:332
c
c
p _inspect(c->self)
q
run
bt
q
run
b cpu.c:332
c
c
q
run
q
Expand All @@ -32,54 +58,55 @@ q
run
q
run
bt
q
run
bt
q
b object_copy_fields_shifted
run
up
p string_byte_address(state, self)
up
down
p bytearray_byte_address(state, self)
p (char*)bytearray_byte_address(state, self)
p (char*)bytearray_byte_address(state, dest)
up
p _inspect(other)
p _inspect(self)
p _inspect(dest)
n
p count
n
p _inspect(dest)
n
p _inspect(t2)
c
q
run
up
p c->sp
p rbs_get_field_raw(c->stack, c->sp)
p rbs_get_field_raw(c->stack, c->sp-1)
p rbs_get_field_raw(c->stack, c->sp-2)
p rbs_get_field_raw(c->stack, 0)
ptype $9
p _inspect($9)
q
run
up
up
p k
p j
q
run
bt
p _inspect(obj)
q
run
up
p j
p k
p _inspect(iobj)
q
run
up
p count
bt
q
run
up
p count
up
bt
q
run
q
run
run
run
a = 1
run
b cpu_primitives.c:52
run
p _orig_sp
c
run
p _inspect(c->self)
run
q
run
q
Expand All @@ -94,163 +121,136 @@ q
run
q
run
run
run
q
run
bt
q
run
up
p size
p obj
p _inspect(obj)
p rbs_num_fields(obj)
up
up
p _inspect(iobj)
q
run
bt
q
run
bt
up
down
p _inspect(self)
q
run
bt
q
run
q
run
bt
up
p i
p region->num_regs
q
run
up
p i
p rbs_symbol_to_cstring(state, sym)
p _inspect(c->method_module)
down
q
run
bt
q
run
q
run
q
run
q
run
q
run
q
run
q
run
q
run
run
q
run
b system_primitives.gen:239
run
c
n
p j
n
p buf
c
n
p buf
q
b system_primitives.gen:244
run
display buff
display buf
c
q
run
q
run
b system_primitives.gen:244
run
p buf
c
p buf
c
q
run
run
run
run
q
run
run
run
bt
run
q
run
up
up
p _inspect(obj)
run
run
run
run
run
run
run
run
run
run
run
run
q
run
run
q
run
run
run
bt
up
up
p _inspect(obj)
q
p vt
p size_of(var_table)
p sizeof(var_table)
b var_table.c:5
run
c
q
b cpu.c:331
run
n
c
n
c
n
c
n
c
c
n
c
n
d
b cpu.c:332
c
c
d
c
b cpu.c:332
c
p _inspect(c->method_module)
c
p _inspect(c->method_module)
bt
q
run
b cpu.c:332
c
c
p _inspect(c->self)
q
run
q
run
b cpu.c:332
c
c
bt
q
run
q
run
run
run
bt
q
run
run
run
run
q
run
bt
q
run
bt
q
b object_copy_fields_shifted
run
p _inspect(self)
p _inspect(dest)
n
p count
n
p _inspect(dest)
n
p _inspect(t2)
c
q
run
run
q
run
q
run
10 changes: 8 additions & 2 deletions Rakefile
Expand Up @@ -35,17 +35,23 @@ end
task :fields do
$:.unshift "lib"
require 'types'
fd = File.open("kernel/auto_fields.rb", "w")
fd = File.open("kernel/00auto_fields.rb", "w")
Rubinius::Types.each do |name, mod|
next if mod::TotalFields.size == 0
sname = mod.name.split("::").last
fd.puts "class #{sname}"
idx = 0
str = []
mod::TotalFields.each do |fel|
if fel == :instance_variables
fel = :__ivars__
end
str << [":#{fel} => #{idx}"]
# fd.puts "index_accessor :#{fel}, #{idx}"
fd.puts "def #{fel}; Ruby.asm \"push self\\npush #{idx}\\nfetch_field\"; end"
fd.puts " def #{fel}; Ruby.asm \"push self\\npush #{idx}\\nfetch_field\"; end"
idx += 1
end
fd.puts " ivar_as_index #{str.join(", ")}"
fd.puts "end"
end
fd.close
Expand Down

0 comments on commit f549f7a

Please sign in to comment.