summaryrefslogtreecommitdiff
path: root/compile.c
AgeCommit message (Collapse)Author
2007-09-13* compile.c (iseq_compile_each): inline cache entries are overwrittennobu
in iseq_build_body(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* id.h, id.c: remove idFuncall.ko1
* compile.c (iseq_specialized_instruction): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24* compile.c (compile_massign_opt): fix to skip massign optimizationko1
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
2007-08-23* compile.c: optimize simple massign.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c (compile_massign), insnhelper.ci (vm_throw): not use C99nobu
comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23* compile.c, insns.def, parse.y: fix massign order. This changeko1
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
2007-08-23* compile.c (make_masgn_lhs, iseq_compile_each): fixed indent.nobu
* 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
2007-08-19* compile.c (iseq_compile_each/NODE_RESBODY): fix to addko1
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
2007-08-18* compile.c (iseq_compile_each): fix to allow self.x=ko1
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
2007-08-18* compile.c (iseq_set_arguments), insnhelper.ciko1
(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
2007-08-17* compile.c (iseq_compile_each): massign should return rvalue(s).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* compile.c (iseq_compile_each): fix thorw insn option of next.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* compile.c (iseq_set_arguments), insnhelper.ciko1
(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
2007-08-16* compile.c (iseq_compile_each): fix next/redo stack consistency.ko1
[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
2007-08-12* compile.c (iseq_peephole_optimize): fix peephole optimizationko1
bug. [ruby-dev:31360] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-20* compile.c (iseq_set_sequence): raise SyntaxError instead of rb_bugnobu
since this function can be called from VM::InstructionSequence.load. * compile.c (insn_set_sc_state, iseq_set_sequence_stackcaching): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-20* compile.c, compile.h (DECL_ANCHOR, INIT_ANCHOR): split not tonobu
initialize aggregations with dynamic values. [ruby-talk:259306] * eval.c (rb_protect): not to initialize aggregations with dynamic values. [ruby-talk:259306] * gc.c (mark_current_machine_context): ditto. * thread.c (thgroup_list, call_trace_func): ditto. * vm.c (vm_init_redefined_flag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12* blockinlining.c: remove "yarv" prefix.ko1
* array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10* vm.c, insnhelper.ci: fix svar interface.ko1
* compile.c (iseq_compile_each), yarvcore.h: fix to use new svar interface for flip flop. * eval.c: ditto. * insns.def: ditto. * include/ruby/intern.h: remove "rb_svar()" declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10* compile.c (rb_iseq_compile): formatted if/else to switch statement.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-07* compile.c: use rb_bug() instead of rb_compile_error().ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* insns.def: remove unused code.ko1
* compile.c (compile_massign): fix to invoke to_splat on splat rhs (example: *a = *nil). [ruby-dev:31136] * bootstraptest/test_massign.rb: add tests for above. * compile.c (iseq_compile_each): disable excess optimization. [ruby-dev:31126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* compile.c (iseq_compile_each): add break catch point.ko1
* insns.def (throw): support correct "break" and "return". this commit achieve that "make test" passes all tests. * vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/{intern,ruby}.h, compile.[ch], error.c, eval.c,nobu
eval_load.c, gc.c, iseq.c, main.c, parse.y, re.c, ruby.c, yarvcore.[ch] (ruby_eval_tree, ruby_sourcefile, ruby_sourceline, ruby_nerrs): purge global variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (compile_array, iseq_compile_each): fix about arrayko1
generation in void context. [ruby-dev:31102] * bootstraptest/test_literal.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (compile_array): ignore NODE_ZARRAY.ko1
[ruby-dev:31110] * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (iseq_compile_each): support v[&b]= type method call.ko1
[ruby-dev:31094] * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03* compile.c (compile_massign): fix massign compilationko1
(example: a, *v, (*x) = ...). [ruby-dev:31107] * bootstraptest/test_massign.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-02* compile.c: rename iseq_translate_direct_threaded_code()ko1
to iseq_translate_threaded_code(). * eval_intern.h, yarvcore.h: mv EXEC_EVENT_HOOK() and exec_event_hooks() to yarvcore.h. * insnhelper.ci, vm.c: mv yarv_finish_insn_seq to vm.c. * insns.def (opt_call_c_function): fix to use RESTORE_REGS(). * iseq.c (rb_iseq_build_for_ruby2cext): fix to allocate iseq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-01* compile.c, iseq.c: fix iseq some of load/store process.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-01* yarvcore.h, compile.c, insnhelper.ci, iseq.c, vm.c:ko1
rename structure names and field names. * insnhelper.h, insns.def: add GET_CONST_INLINE_CACHE(). * iseq.c: add rb_iseq_build_for_ruby2cext(). * yarvcore.h, vm.h: move declaration of rb_insn_func_t to yarvcore.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-30* yarvcore.h: some refactoring on rb_iseq_t.ko1
rename some variable names, add comments, etc. * compile.c, iseq.c, proc.c, vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-28* compile.c: fix to remove -Wall warnings on gcc.ko1
* compile.c (make_name_with_str): removed. use rb_sprintf() instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27* compile.c (setup_args): change parameter type.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27* compile.c (iseq_compile_each): fix popped backref and others.ko1
([ruby-dev:31068]). * compile.c (iseq_compile_each): remove needless statements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27* compile.c (iseq_translate_direct_threaded_code): fix prototypeko1
function name. * vm.h: add correct cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26* compile.c (iseq_compile_each): fix type error.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26* compile.c (compile_massign), insns.def (expandarray): supportko1
postarg with massign (a, *b, c = ...). * bootstraptest/test_massign.rb: add tests for above. * compile.h: fix debug macro names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26* cont.c (rb_fiber_s_new): revert initializing VM stack.ko1
* yarvcore.c (th_init2): ditto. * vm.c, vm.h: fix to stop using Qundef on VM stack. According to this change, VM stack should not include Qundef value. * insns.def (putundef): removed. * compile.c (iseq_compile_each): ditto. * eval.c (eval): fix spacing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* compile.c: rename setup_arg() to setup_args().ko1
fix to use setup_args() at processing NODE_YIELD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* compile.c (setup_arg): support kind of "m(*ary, x)" method call.ko1
([ruby-dev:31048]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25* insnhelper.ci, vm.c: complete block parameter support.ko1
post arguments, optional arguments, block argument. * compile.c, parse.y: fix {|a|} parameter. * insnshelper.ci, insns.def: revert caller_setup_args() option (need_block_check) parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* call_cfunc.ci: removed.ko1
* insnhelper.ci: added. this function includes all functions that vm insns need. * common.mk: ditto. * insnhelper.h, vm.h, vm.c: move some declaration. * gc.h: remove GC_CHECK() macro because GC.stress is more useful. * compile.c, iseq.c, vm_dump: ditto. * gc.h, thread.c: move a prototype decalaration. * debug.c, debug.h: rename some functions. * compile.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c: some refactoring.ko1
* rename th_* to vm_*. * remove unused variables functions. * add prototypes. * blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h, eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y, proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24* vm.c (callee_setup_arg): added. support correct post arg.ko1
* vm_macro.def (macro_eval_invoke_func): fix to use callee_setup_arg. * compile.c (set_arguments): adjust for above changes. * compile.c (iseq_compile_each): ditto. * iseq.c (ruby_iseq_disasm): ditto. * yarvcore.h: add rb_iseq_t#post_arg_start and arg_size. * bootstraptest/test_method.rb: add post arg tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15* vm.c (th_yield_setup_args): |v| should work as |v,|.ko1
ex) def m;yield 1, 2; end; m{|v| p v} #=> 1 * parse.y: apply above change for "for" statement. * test/ruby/test_assignment.rb: ditto * test/ruby/test_basicinstructions.rb: ditto. * test/ruby/test_iterator.rb: ditto. * test/ruby/test_yield.rb: ditto. * compile.c (iseq_compile_each): fix debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06* compile.c (iseq_compile_each): fix around yield argumentsko1
(with NODE_ARGSCAT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* parse.y (new_yield), compile.c (iseq_compile_each): fixko1
passing parameter. * eval.c, eval_jump.h: simplify rb_yield*. * proc.c (proc_mark): fix to mark proc->block.proc. * proc.c (Init_Proc): add Proc#lambda? * test/ruby/test_lambda.rb: add some tests. * vm.c (invoke_block): fix to check lambda block or not. * vm.c (th_yield_setup_args): fix to check arguments size when lambda block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05* compile.c: fixed indentation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e