ruby/tool
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
..
test * enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution. 2010-03-09 09:15:42 +00:00
asm_parse.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
build-transcode * enc/trans/iso2022.trans: renamed from iso2022.erb.c. 2008-08-11 07:39:52 +00:00
change_maker.rb * tool/change_maker.rb: narrow diffs to see function names. 2010-05-28 23:59:55 +00:00
compile_prelude.rb * iseq.c, vm_eval.c: set th->base_block properly. 2012-06-22 09:32:56 +00:00
config.guess Updated these files to detect AIX 7. 2012-01-29 13:50:18 +00:00
config.sub Updated these files to detect AIX 7. 2012-01-29 13:50:18 +00:00
enc-emoji-citrus-gen.rb * enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution. 2010-03-09 09:15:42 +00:00
enc-emoji4unicode.rb * enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution. 2010-03-09 09:15:42 +00:00
enc-unicode.rb * Makefile.in: don't remove macros. now name2ctype uses macros. 2012-06-13 17:54:14 +00:00
eval.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
file2lastrev.rb * tool/file2lastrev.rb (VCS::detect): Add support for Subversion 2012-01-02 13:14:24 +00:00
generic_erb.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
ifchange Fix: raised error on tool/ifchange. 2009-05-05 02:33:02 +00:00
insns2vm.rb * tool/insns2vm.rb: remove -Kn option in shebang line because it's 2008-10-17 01:30:13 +00:00
install-sh * README.ja: Update redmine.ruby-lang.org to bugs.ruby-lang.org 2011-12-19 21:07:09 +00:00
instruction.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
jisx0208.rb * enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution. 2010-03-09 09:15:42 +00:00
make-snapshot tool/make-snapshot MKDIR_P 2012-06-14 15:14:05 +00:00
mdoc2man.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
merger.rb * tool/merger.rb (interactive): allow editing commit message. 2012-03-26 03:57:07 +00:00
mkconfig.rb * tool/mkconfig.rb: do not make the entries related to sitedir and 2011-08-13 13:17:30 +00:00
node_name.rb * common.mk (node_name.inc): remove command option -n and give 2010-08-29 07:09:40 +00:00
parse.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
rbinstall.rb * tool/rbinstall.rb (capi): install to capi directory. 2012-05-03 14:56:39 +00:00
rmdirs * Makefile.in ({,dist-,real-}clean-ext): should also omit 2010-07-11 08:01:59 +00:00
rubytest.rb common test options 2012-05-30 01:24:05 +00:00
runruby.rb [Bug #6598] 2012-06-15 22:12:58 +00:00
strip-rdoc.rb * remove trailing spaces. 2011-05-15 11:55:52 +00:00
transcode-tblgen.rb * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213. 2012-04-24 11:14:18 +00:00
update-deps * common.mk: dependencies updated. 2011-06-17 23:15:47 +00:00
vtlh.rb * tool/*: executable. 2009-06-30 07:40:05 +00:00
ytab.sed * tool/ytab.sed: replaces backslashes with slash for nmake. 2009-03-11 16:08:24 +00:00