summaryrefslogtreecommitdiff
path: root/compile.c
AgeCommit message (Collapse)Author
2008-12-27* iseq.h, iseq.c (rb_iseq_new_main): add a type ISEQ_TYPE_MAIN.ko1
[ruby-dev:37619] * compile.c (rb_dvar_defined, ruby_iseq_compile): ditto. * iseq.c (iseq_data_to_ary, iseq_load): ditto. * compile.c (iseq_compile_each): fix to check ip->compile_data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.ko1
* vm.c (vm_set_main_stack, rb_iseq_eval_main): added. * parse.y (rb_parser_compile_file): fix to check parse_in_eval flag. * eval.c (ruby_exec_node): use rb_iseq_eval_main() instead of rb_iseq_eval(). * iseq.c (rb_iseq_new_main), vm_core.h: added. main script (specified by -e or script name) should be run under TOPLEVEL_BINDING using Kernel#eval. Above changes simulate Kernel#eval behaviour. [ruby-dev:37240] * compile.c (make_name_for_block): skip iseq except block type. this fix is needed for [ruby-dev:37240], and also fixes [ruby-dev:35392]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24* compile.c (iseq_peephole_optimize): fix typo.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09* compile.c (iseq_compile_each), gc.c (assign_heap_slot),nobu
(gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add), proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all), (thread_start_func_2, blocking_region_begin, blocking_region_end), (rb_thread_kill), thread_pthread.c (native_thread_create), (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state), (vm_call0): use void pointer for %p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05* compile.c (iseq_set_sequence): uses rb_compile_warning() fornobu
warning at compilation time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05* compile.c (ruby_iseq_compile, ruby_iseq_translate_threaded_code),nobu
(ruby_insns_name_array, ruby_iseq_build_from_ary): prefixed with ruby_. * iseq.c (ruby_iseq_load, ruby_insn_make_insn_table): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16* compile.c (iseq_set_sequence): fix memory leak.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12* compile.c (iseq_compile_each): fixed indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28* compile.c (iseq_set_sequence): check duplicated when clauses.mame
[ruby-dev:36616] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* include/ruby/node.h, node.h: move node.h from include path.ko1
This change stop to install node.h beacuase of saving ABI (node.h will be changed. Extensions should not depends on this file). * blockinlining.c, class.c, compile.c, debug.h, enum.c, gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c, vm.c, vm_core.h, vm_dump.c: ditto. * ext/ripper/depend: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* include/ruby/node.h, vm_core.h: move definition ofko1
RUBY_VM_METHOD_NODE to node.h. * class.c, common.mk: remove useless inclusion. * compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h. move some definitions from vm_core.h to iseq.h. * compile.c, iseq.c, vm.c: ditto. * eval.c, compile.c: move some functions for parser from eval.c to compile.c. * eval_intern.h, vm_core.h: move va_init_list() macro to vm_core.h. * iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added. * load.c, ruby.c: use rb_iseq_new_top() instead of rb_iseq_new() with ISEQ_TYPE_TOP constant directly. * proc.c: use rb_iseq_first_lineno() instead of accessing iseq structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* compile.c (defined_expr): default defined? should returnmatz
"expression" without evaluating the expression. [ruby-dev:35967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* compile.c (defined_expr): should handle NODE_{AND,OR} asmatz
"expression". [ruby-dev:35951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23* compile.c (iseq_build_body): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22* compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect),nobu
iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm), process.c (pst_message), re.c (match_inspect): use rb_str_catf. * dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use rb_sprintf. * error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use rb_vsprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-20* compile.c (iseq_compile_each): NODE_POSTEXE should set each endnobu
procs only once. [ruby-dev:35596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* compile.c, vm.c, insns.def: call FrozenCore.set_postexe methodko1
instead to use "postexe" insn. * id.c, id.h: add a prepared id for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbidsshyouhei
comma at end of enumerator list * include/ruby/ruby.h (enum ruby_value_type): ditto. * eval_intern.h (enum): ditto. * vm_core.h (enum rb_thread_status): ditto. * parse.y (enum lex_state_e): ditto. * parse.y (enum string_type): ditto. * process.c (enum): ditto. * ruby.c (enum dump_flag_bits): ditto. * ruby.c (enum disable_flag_bits): ditto. * compile.c (iseq_link_element): ditto * debug.c (union): ditto. * cont.c (enum context_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* compile.c, insns.def, vm.c, vm_core.h: remove some insnsko1
(undef, alias, definemethod). Call RubyVM::FrozenCore's singleton method instead. Add "putiseq" and "putspecialobject" instructions. * id.c, id.h: add ids for above. * tool/parse.rb: "VM" no longer exists. Use RubyVM instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-23* compile.c (iseq_build_from_ary): initialize arg_opts, a patch frommame
Adam Strzelecki <ono@java.pl> in [ruby-core:17220]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-23* compile.c (iseq_build_from_ary): fix expression to obtain wanabe
iseq->local_size and iseq->local_table_size. [ruby-dev:35205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* compile.c : treat []&&= in virtually the same way as []||=.wanabe
[ruby-dev:34679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31* suppress warnings with -Wwrite-string.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-30* compile.c (defined_expr): fix SEGV by defined?([1]).mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-25* compile.c (iseq_compile): set local_table formame
ISEQ_TYPE_DEFINED_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-25* compile.c (iseq_build_body): remove side effect frommame
VM::InstructionSequence.load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24* eval_method.c: renamed from vm_method.c. "vm_method.c" is includedko1
by "vm.c". * vm_eval.c: added. Some codes are moved from "eval.c" * common.mk: fix for above changes. * compile.c: make a vm_eval(0) * eval.c, eval_error.c, eval_intern.h, eval_jump.c, proc.c, vm.c, id.c, id.h, vm_core.h, vm_dump.c, vm_evalbody.c, vm_insnhelper.c, blockinlining.c: fix for above changes. and do some refactoring. this changes improve rb_yield() performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24* compile.c (iseq_set_exception_table, NODE_WHILE, NODE_NEXT): removemame
special handling that decrements sp in CATCH_TYPE_NEXT for NODE_WHILE. * vm.c (vm_eval_body), vm_insnhelper.c (vm_throw): remove unused code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* compile.c (get_destination_insn, get_next_insn, get_prev_insn):mame
peephole optimization should not ignore ISEQ_ELEMENT_ADJUST. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.ko1
VM value stack frame of block contains cref information. (dfp[-1] points CREF) * compile.c, eval_intern.h, eval_method.c, load.c, proc.c, vm_dump.h, vm_core.h: ditto. * include/ruby/ruby.h, gc.c: remove T_VALUES because of above changes. * bootstraptest/test_eval.rb, test_knownbug.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14* insns.def: add a "putcbase" instruction.ko1
* compile.c, insns.def: fix to use putcbase instruction for class search. Qundef should not be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}. "defined?(a||=1)"matz
should not operate assignment. [ruby-dev:34645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* compile.c (iseq_compile_each): should call compile_cpath() formatz
modules as well. [ruby-dev:34585] * insns.def (defineclass): add undef handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* compile.c (defined_expr): protect some expression frommatz
segmentation fault. a patch from wanabe <s.wanabe at gmail.com> in [ruby-dev:34593]. * compile.c (defined_expr): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* compile.c (compile_cpath): use Qundef to denote cbase lookup.matz
* insns.def (defineclass): Qudef is passed for cbase. * insns.def (setconstant): ditto. * vm_insnhelper.c (vm_check_if_namespace): use rb_inspect() instead of rb_obj_as_string() for better description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21* compile.c (defined_expr): capture exception during defined?matz
evaluation. a patch from wanabe <s.wanabe at gmail.com> in [ruby-dev:34461]. [ruby-core:16010] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* vm_core.h (struct iseq_compile_data): moved label_no fromnobu
new_label_body(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* compile.c (iseq_set_exception_table): allocates catch_table onlynobu
when entries exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* compile.c (struct iseq_link_element, struct iseq_insn_data): madenobu
enum for debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* compile.c (iseq_compile_each): fix for splat in when and rescue.nobu
a patch from wanabe <s.wanabe AT gmail.com> in [ruby-dev:34429]. [ruby-core:14537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17* enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): addmame
parentheses to remove warnings of gcc. * io.c (rb_io_getc): remove unused variables. * compile.c (NODE_NEXT, NODE_REDO): remove unused labels. * ext/nkf/nkf.c (rb_nkf_convert): remove unused variables. * ext/syck/rubyext.c (syck_resolver_initialize, syck_resolver_detect_implicit, syck_emitter_emit): remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* compile.c, compile.h (compile_debug): made runtime option.nobu
* debug.c (ruby_debug_print_indent): returns if debug_level exceeds the threashold. * debug.c (ruby_debug_printf): printf to stderr. * iseq.c (make_compile_option, make_compile_option_value): added debug_level option. * vm_core.h (rb_compile_option_t): added debug_level. * vm_core.h (struct iseq_compile_data): added node_level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu
use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03* compile.c (iseq_set_sequence, iseq_insns_unification,nobu
insn_data_to_s_detail): constified. * iseq.c (insn_operand_intern, ruby_iseq_disasm_insn): ditto. * template/{insns_info,opt_sc,optunifs}.inc.tmpl: ditto. * tool/instruction.rb (OptUnifsIncGenerator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25* compile.c (defined_expr): false short-circuit destination label maynobu
be needed. [ruby-talk:295296] * compile.c (iseq_compile_each): put nil if false short-circuit is created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25* compile.c (compile_massign_opt): no need to use alloca.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-18* include/ruby/node.h (NODE_FL_NEWLINE): renamed from NODE_NEWLINEmatz
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
2008-01-29* insns.def (toregexp): generate a regexp from strings instead of oneakr
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