ruby/bootstraptest
ko1 c4bc9b5758 * iseq.c, vm_eval.c: set th->base_block properly.
th->base_block is information for (a) parsing, (b) compiling
  and (c) setting up the frame to execute the program passed by
  `eval' method.  For example, (1) parser need to know up-level
  variables to detect it is variable or method without paren.
  Befor (a), (b) and (c), VM set th->base_block by passed bindng
  (or previous frame information).  After execute (a), (b) and (c),
  VM should clear th->base_block.  However, if (a), (b) or (c)
  raises an exception, then th->base_block is not cleared.
  Problem is that the uncleared value th->balo_block is used for
  irrelevant iseq compilation.  It causes SEGV or critical error.
  I tried to solve this problem: to clear them before exception,
  but finally I found out that it is difficult to do it (Ruby
  program can be run in many places).
  Because of this background, I set th->base_block before
  compiling iseq and restore it after compiling.
  Basically, th->base_block is dirty hack (similar to global
  variable) and this patch is also dirty.
* bootstraptest/test_eval.rb: add a test for above.
* internal.h: remove unused decl.
* iseq.c (rb_iseq_compile_with_option): add base_block parameter.
  set th->base_block before compation and restore it after
  compilation.
* ruby.c (require_libraries): pass 0 as base_block instead of
  setting th->base_block
* tool/compile_prelude.rb (prelude_eval): apply above changes.
* vm.c, vm_eval.c: ditto.
* vm_core.h: add comments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22 09:32:56 +00:00
..
pending.rb * KNOWNBUGS.rb, bootstraptest/pending.rb: move a bug (?) to pending. 2008-06-19 16:08:16 +00:00
runner.rb bootstraptest: ignore -j 2012-06-15 22:12:30 +00:00
test_attr.rb * bootstraptest/test_attr.rb: moved test for [ruby-core:14641]. 2008-01-17 16:59:23 +00:00
test_autoload.rb * load.c (rb_f_autoload): prevent to autoload for singleton 2011-07-10 06:32:06 +00:00
test_block.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
test_class.rb * bootstraptest/test_class.rb: add a test for [ruby-core:30843]. 2010-06-27 18:13:06 +00:00
test_eval.rb * iseq.c, vm_eval.c: set th->base_block properly. 2012-06-22 09:32:56 +00:00
test_exception.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
test_finalizer.rb * gc.c (rb_gc_call_finalizer_at_exit): self-referencing finalizers 2008-08-06 11:48:30 +00:00
test_flip.rb * bootstraptest/test_flip.rb: new test for flip-flop operator. 2007-07-10 06:57:56 +00:00
test_flow.rb * test/ruby/test_object.rb (test_send_with_block): moved from 2012-01-02 06:25:01 +00:00
test_fork.rb * thread.c (rb_threadptr_check_signal): only wake up main thread. 2011-06-30 22:29:34 +00:00
test_gc.rb * bootstraptest/test_gc.rb: added tests based on [ruby-dev:39484] 2009-10-16 09:42:20 +00:00
test_io.rb * bootstraptest/test_io.rb (megacontent-copy_stream): get rid of 2010-05-05 02:43:15 +00:00
test_jump.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
test_literal.rb * compile.c (compile_array, compile_array_): 2012-04-12 01:33:34 +00:00
test_load.rb * file.c (file_load_ok): checks if regular file. [ruby-dev:38097] 2009-02-27 06:49:43 +00:00
test_marshal.rb bootstraptest/test_marshal.rb: test updated 2008-03-01 04:07:26 +00:00
test_massign.rb * insns.def (expandarray): fix stack inc. 2008-01-23 17:17:23 +00:00
test_method.rb * compile.c (iseq_compile_each): fix return value of obj[a,*b]=c. 2011-06-17 10:18:39 +00:00
test_objectspace.rb * vm_core.h (typedef struct rb_vm_struct): create a new 2011-07-10 07:46:00 +00:00
test_proc.rb * vm_insnhelper.c (vm_throw): check a class frame. 2011-07-10 09:04:44 +00:00
test_struct.rb * bootstraptest/test_struct.rb: some test moved from test to shut 2008-03-13 16:40:33 +00:00
test_syntax.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
test_thread.rb * insns.def (onceinlinecache): add exclusion control for a region 2010-04-27 14:06:16 +00:00