aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/node.h (NODE_FL_NEWLINE): renamed from NODE_NEWLINEmatz2008-02-181-1/+1
| | | | | | to denote its a flag. [ruby-core:15529] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (toregexp): generate a regexp from strings instead of oneakr2008-01-291-5/+21
| | | | | | | | | | | | | | | | | string. * re.c (rb_reg_new_ary): defined for toregexp. it concatenates strings after each string is preprocessed. * compile.c (compile_dstr_fragments): split from compile_dstr. (compile_dstr): call compile_dstr_fragments. (compile_dregx): defined for dynamic regexp. (iseq_compile_each): use compile_dregx for dynamic regexp. [ruby-dev:33400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): validate argument expr of "next"ko12008-01-261-0/+1
| | | | | | | | | statement. * bootstraptest/test_syntax.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, compile.h: fix to calculate correct stack depthko12008-01-261-56/+95
| | | | | | | | at each instruction. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, compile.h: fix stack pointer issues.ko12008-01-251-55/+92
| | | | | | | | | | | calculate correct stack depth at compile time. * insns.def (emptstack): remove it and add a new insn "adjuststack". * bootstraptest/test_knownbug.rb: move/remove fixed test. * bootstraptest/test_syntax.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_build_from_ary), iseq.c (iseq_load): fix for format change.nobu2008-01-081-4/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-061-1/+0
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix stack consistency errorko12007-12-251-1/+19
| | | | | | | | | | (break is compiled to throw instead of jump insn). these problems are reported by Yusuke ENDOH <mame AT tsg.ne.jp> * bootstraptest/test_knownbug.rb, test_syntax.rb: move fixed test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix stack consistency error.ko12007-12-251-1/+2
| | | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp> [ruby-dev:32720] * bootstraptest/test_syntax.rb: add 2 tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile): clear local table if node == 0.ko12007-12-241-0/+1
| | | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp> * vm.c: clear VM stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix stack consistency bug.ko12007-12-241-1/+1
| | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): add a "pop" insn after breakko12007-12-241-0/+1
| | | | | | | | | | to fix stack consistency error. [ruby-core:14385] * bootstraptest/test_syntax.rb: add tests for above. * bootstraptest/test_knownbug.rb: remove fixed bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * id.c (Init_id): remove several unused symbols. [ruby-core:14362]matz2007-12-241-6/+1
| | | | | | | * compile.c (iseq_specialized_instruction): do not use VM_CALL_SEND_BANG flag any longer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (method_name): preserve Symbol's encoding.matz2007-12-241-2/+2
| | | | | | * numeric.c (fix_id2name): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c: remove "illegal".ko12007-12-211-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,akr2007-12-211-1/+1
| | | | | | | | | | | compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c, ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb, ext/openssl/ossl_bn.c, numeric.c, vm.c, benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal" for non law violation context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each/NODE_RETURN): fix stack consistency.ko12007-12-201-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): add pop after throw as return.ko12007-12-191-2/+3
| | | | | | | | | * bootstraptest/test_knownbug.rb, test_syntax.rb: move resolved test. * vm_core.h, iseq.c, compile.h: add debug output code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): remove unused retry entry.ko12007-12-191-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): should handle upper level eval iseqnobu2007-12-191-2/+11
| | | | | | | | from break/next, and COMPILE_ERROR() breaks only one block. [ruby-dev:31372] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): remove "retry" in block.ko12007-12-191-2/+1
| | | | | | | | | | | | | | | | | ("iter{retry}" cause syntax error) Currently, "begin; ...; rescue; iter{retry}; end" cause syntax error too. * bootstraptest/test_jump.rb: ditto. * lib/drb/invokemethod.rb: ditto. * sample/drb/darrayc.rb: ditto. * sample/test.rb: ditto. * test/drb/drbtest.rb: ditto. * test/ruby/test_iterator.rb: ditto. * sample/test.rb: add a 'test' directory on the SYSTEM test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix for segfault. [ruby-dev:31372]nobu2007-12-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insnhelper.ci, insns.def, object.c, vm.c, vm.h:ko12007-12-181-1/+22
| | | | | | | | | | optimize !@, != method invocation. * id.c, id.h: ditto. * bootstraptest/test_syntax.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (expr): redefinable not (!) operator.matz2007-12-091-13/+0
| | | | | | | | | | | | * parse.y (arg): ditto. * object.c (rb_obj_not): new method "!". * object.c (rb_obj_not_equal): new method "!=". * object.c (rb_obj_not_match): new method "!~". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unused variables removed.akr2007-12-081-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix typo.ko12007-12-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): "when *[],1" dumps core.ko12007-11-271-6/+12
| | | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32350] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): "a[*b] += 1" dumps core.ko12007-11-271-79/+98
| | | | | | | | | a patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32354] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insns.def: change return value of "defined?"ko12007-11-271-1/+3
| | | | | | | | | | | for $&, $1, ... . If such variables are defined, return "global-variable". * test/ruby/test_defined.rb: add tests. * bootstraptest/test_syntax.rb: fix a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def, compile.c: fix to allow dsym for alias/undef.ko12007-11-271-30/+25
| | | | | | | | | [ruby-dev:32355] * bootstraptest/test_method.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (defined_expr): defined(method(x)) dumped core. amatz2007-11-231-5/+2
| | | | | | patch from Yusuke ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32335] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): alias and undef accept dsyms as wellnobu2007-11-181-5/+7
| | | | | | | as literals. [ruby-dev:32308] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * blockinlining.c, compile.c, compile.h, debug.c, debug.h,ko12007-11-131-9/+5
| | | | | | | | | | | id.c, insnhelper.h, insns.def, thread.c, thread_pthread.ci, thread_pthread.h, thread_win32.ci, thread_win32.h, vm.h, vm_dump.c, vm_evalbody.ci, vm_opts.h: fix comments and copyright year. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_specialized_instruction): check argc.ko12007-11-131-7/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_send): allow send/__send__ to call methods of allmatz2007-11-041-2/+2
| | | | | | | | | | visibility again. we no longer provide __send, __send!. * eval.c (rb_invoke_method): new method to honor private visibility. if it's invoked in a function call style, it calls private methods as well (previous 1.9 send behavior). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insnhelper.ci (vm_call_method): allow send! to call protectedmatz2007-09-281-0/+3
| | | | | | methods as well. [ruby-core:12280] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): inline cache entries are overwrittennobu2007-09-131-8/+4
| | | | | | | in iseq_build_body(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * id.h, id.c: remove idFuncall.ko12007-08-241-2/+3
| | | | | | | | * compile.c (iseq_specialized_instruction): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_massign_opt): fix to skip massign optimizationko12007-08-241-3/+0
| | | | | | | | | with global variables. * bootstraptest/test_massign.rb: add some tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c: optimize simple massign.ko12007-08-231-10/+80
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_massign), insnhelper.ci (vm_throw): not use C99nobu2007-08-231-1/+1
| | | | | | | comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insns.def, parse.y: fix massign order. This changeko12007-08-231-116/+45
| | | | | | | | | | | | | causes performance problem. Try vm1_swap benchmark. [ruby-dev:31522] * insns.def, insnhelper.ci: move process body of expandarray insn to vm_expandarray(). * bootstraptest/test_knownbug.rb, bootstraptest/test_massign.rb: move a solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (make_masgn_lhs, iseq_compile_each): fixed indent.nobu2007-08-231-50/+51
| | | | | | | | | | | | | * compile.c (iseq_translate_threaded_code), vm_evalbody.ci (get_insns_address_table), template/vmtc.inc.tmpl (insns_address_table): constified. * vm_evalbody.ci (vm_eval), template/insns_info.inc.tmpl (insn_stack_increase, insn_ret_num): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each/NODE_RESBODY): fix to addko12007-08-191-0/+3
| | | | | | | | | additional nop to prevent tailcall optimization. * vm_opts.h: clean up comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix to allow self.x=ko12007-08-181-0/+1
| | | | | | | | | if x= is private. * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_set_arguments), insnhelper.ciko12007-08-181-1/+1
| | | | | | | | | (vm_callee_setup_arg, vm_yield_setup_args): * bootstraptest/test_block.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): massign should return rvalue(s).ko12007-08-171-9/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix thorw insn option of next.ko12007-08-161-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_set_arguments), insnhelper.ciko12007-08-161-5/+7
| | | | | | | | | | (vm_callee_setup_arg, vm_yield_setup_args): fix block parameter problems. [ruby-dev:31437], [ruby-dev:31440] * bootstraptest/test_block.rb: add a test of [ruby-dev:31440]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix next/redo stack consistency.ko12007-08-161-14/+43
| | | | | | | | | | [ruby-dev:31373] * bootstraptest/test_syntax.rb: add tests for above. * sample/test.rb: fix to use __FILE__ instead of $0 to know basedir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e