MacRuby on Rails #2011-05-29

ここ最近MacRubyに対して行った定数探索の修正が原因で次の不具合が発生している。

  • 修正前と比べてメソッド呼び出しが3倍遅い。
  • Objective-CからRubyのコードを呼び出すときに定数が探索できない。
  • Objective-CからRubyのコードを呼び出すときによく落ちる。

どれも致命的で早急に直したい。が、そう簡単に直せる問題ではない。そこで
一旦修正をリバートしたいのだが、リバートすると次の不具合やデグレーショ
ンが発生する。そのためリバートすることもできない。(英語ですみません)

(1) fixed memory leak below.
1.instance_eval { 42 }

But did not below.
1.instance_eval "42"

I think currently MacRuby occurs memory leak in eval().

(2) occurs TypeError exception below. This is CRuby spec.
1.instance_eval "A = 10"

(3) occurs TypeError exception below. This is CRuby spec. (like above)
1.instance_eval "class A; end"

(4) passed failed test in test_vm/block.rb below.
assert ':ok', %{
  proc do
    def proc_caller(&b) b.call end
    def enclosing_method
      proc_caller { return :ok }
      :nok
    end
    p enclosing_method
  end.call
}

(5) removed outer_mask in RoxorCompiler
Because It is not used now.

(6) supported alias eval, instance_eval, module_eval and class_eval.

(7) set, push and pop outer_stack in runtime.

(8) removed rb_vm_set_outer() and rb_vm_get_outer().
because does not use original outer now.

(9) implemented Binding#dup and Binding#clone.

だから、撃ちながら前進するしかありません。手元ではリバートしたものを用
意して、上記を修正した版をコミットするのです。さぁ、やるぞー。