summaryrefslogtreecommitdiff
path: root/iseq.c
AgeCommit message (Collapse)Author
2009-03-11* iseq.c (rb_iseq_disasm): RSTRING_LEN() returns long.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10* iseq.c (prepare_iseq_build): too few arguments to functionnobu
rb_ary_tmp_new(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10* iseq.c (rb_iseq_compile_with_option): argument may be converted.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26* iseq.c (cdhash_each): resurrects internal literals.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18* array.c (rb_ary_resurrect), string.c (rb_str_resurrect): newnobu
functions based on [ruby-dev:37983] * insns.def (putstring, duparray): use rb_{ary,str}_resurrect(). * iseq.c (iseq_data_to_ary): needs to result TS_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* iseq.c: remove nil parameter from Proc#parameterstakano32
after rest appeared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13* iseq.c (simple_default_value): removed. default values of optionalnobu
parameters are not available still now. [ruby-dev:37980] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* compile.c (compile_array_, defined_expr, iseq_compile_each): hidenobu
and freeze internal literal objects, to prevent from modifying. [ruby-dev:37959] * iseq.c (insn_operand_intern): copy internal literal objects. * insns.def (putstring, duparray): ditto. * string.c (rb_str_replace): exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* iseq.c (simple_default_value): allow plain strings as defaultmatz
values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* iseq.c:ko1
rename ruby_iseq_disasm_insn() -> rb_iseq_disasm_insn(). rename ruby_iseq_disasm() -> rb_iseq_disasm(). * compile.c: rename ruby_iseq_compile() -> rb_iseq_compile_node(). rename ruby_iseq_translate_threaded_code() -> rb_iseq_translate_threaded_code(). rename ruby_insns_name_array() -> rb_insns_name_array(). rename ruby_iseq_build_from_ary() -> rb_iseq_build_from_ary(). * iseq.c, compile.c: remove ruby_insn_make_insn_table() and make static function insn_make_insn_table(). * iseq.h, ruby.c, vm.c, vm_core.h, vm_eval.c, vm_dump.c, blockinlining.c: ditto. Rename strange "ruby_" prefix to "rb_" prefix. This changes may affect only core because renamed functions require a pointer of rb_iseq_t which is not exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18* iseq.c (rb_iseq_load): renamed from ruby_iseq_load, since it isnobu
for C extensions or the ruby core. [ruby-core:21407] Index: compile.c =================================================================== --- compile.c (revision 21649) +++ compile.c (working copy) @@ -5078,5 +5078,5 @@ iseq_build_exception(rb_iseq_t *iseq, st } else { - eiseqval = ruby_iseq_load(ptr[1], iseq->self, Qnil); + eiseqval = rb_iseq_load(ptr[1], iseq->self, Qnil); } @@ -5162,5 +5162,5 @@ iseq_build_body(rb_iseq_t *iseq, LINK_AN if (op != Qnil) { if (TYPE(op) == T_ARRAY) { - argv[j] = ruby_iseq_load(op, iseq->self, Qnil); + argv[j] = rb_iseq_load(op, iseq->self, Qnil); } else if (CLASS_OF(op) == rb_cISeq) { Index: iseq.c =================================================================== --- iseq.c (revision 21649) +++ iseq.c (working copy) @@ -448,5 +448,5 @@ iseq_s_load(int argc, VALUE *argv, VALUE VALUE -ruby_iseq_load(VALUE data, VALUE parent, VALUE opt) +rb_iseq_load(VALUE data, VALUE parent, VALUE opt) { return iseq_load(rb_cISeq, data, parent, opt); Index: iseq.h =================================================================== --- iseq.h (revision 21649) +++ iseq.h (working copy) @@ -21,5 +21,5 @@ VALUE ruby_iseq_build_from_ary(rb_iseq_t /* iseq.c */ -VALUE ruby_iseq_load(VALUE data, VALUE parent, VALUE opt); +VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt); struct st_table *ruby_insn_make_insn_table(void); git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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-05* iseq.c (rb_iseq_parameters): proc arguments are always optional.nobu
* proc.c (get_proc_iseq, rb_proc_parameters): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20538 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-12-03* iseq.c (simple_default_value): returns simplest assignment only.nobu
[ruby-core:20237] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28* iseq.c (simple_default_value): extracts simplest defaultnobu
argument value. * iseq.c (rb_iseq_parameters): returns parameter list. * proc.c (get_proc_iseq, get_method_iseq): handles ifunc and bmethod. * proc.c (rb_proc_parameters, rb_method_parameters): added Proc#parameters and Method#parameters. [ruby-core:19759] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20384 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-09-12* iseq.c (iseq_s_compile_file): use rb_file_open_str.akr
* io.c (rb_file_open_generic): call validate_enc_binmode. (rb_file_open_str): call FilePathValue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* iseq.c (iseq_data_to_ary): make it static.ko1
* thread.c (thgroup_enclose): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21* iseq.c (iseq_inspect): don't raise on uninitialized object.akr
show real class name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11* iseq.c (rb_iseq_clone): should preserve cref_stack link.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11* class.c (clone_method): should copy cbase in cref as well.matz
[ruby-dev:35116] * iseq.c (iseq_mark): mark original iseq object. * iseq.c (iseq_free): do not free internal data if they have original iseq to belong. * iseq.c (rb_iseq_clone): a new function to clone iseq value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31* iseq.c (ruby_iseq_disasm_insn): suppress warnings on platforms whichnobu
int size differs from pointer size. * ext/openssl/ossl_asn1.c (ossl_asn1_get_asn1type): ditto * ext/syck/rubyext.c (rb_syck_err_handler), (syck_default_error_handler): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18283 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-08* thread.c (rb_set_coverages, rb_reset_coverages): enable and disablemame
coverage measurement. * thread.c (rb_get_coverages): rename and move from vm.c. * vm.c (rb_vm_get_coverages): ditto. * iseq.c (prepare_iseq_build): ditto. * thread.c (clear_coverage): ditto. * parse.y (coverage): ditto. * ext/coverage/coverage.c: use above functions, add new method Coverage.start and fix rdoc . git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-08* thread.c (rb_enable_coverages): hide coverage array by setting 0 tomame
klass during measurement. * parse.y (coverage, yycompile0): ditto. * iseq.c (prepare_iseq_build): use rb_hash_lookup instead of rb_hash_aref. * thread.c (rb_coverage_result): restore klass of coverage array and return it. * theaad.c (update_coverage): chcek whether its klass is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* include/ruby/intern.h: remove prototypes about coverage.mame
* iseq.c (prepare_iseq_build): add prototype. * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * thread.c (update_coverage): use rb_sourceline. * thread.c (rb_get_coverages): rename and move to vm.c. * vm.c (rb_vm_get_coverages): ditto. * ext/coverage/coverage.c: add rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-03* ext/coverage/coverage.c, ext/coverage/extconf.rb: eliminatemame
COVERAGE__ and introduce coverage.so instead. How to measure coverage: (1) require "coverage.so", (2) require or load Ruby source file, and (3) Coverage.result will return the same hash as COVERAGE__. [ruby-dev:35324] * thread.c (rb_enable_coverages): start coverage measurement by using rb_add_event_hook. * thread.c (rb_get_coverages): returns current results of coverage measurement. * include/ruby/intern.h: add prototype for above two functions. * vm_core.h, vm.c: add field of coverages to rb_vm_t. * insns.def (trace): remove special handling for COVERAGE__. * iseq.c (prepare_iseq_build): switch COVERAGE__ to rb_get_coverages(). * parse.y (coverage): ditto. * thread.c (clear_coverage): ditto. * lib/coverage.rb: use coverage.so instead of COVERAGE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* Add coverage measurement constant COVERAGE__. This constant is notmame
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will return an array whose elements represent number of executions per line of source code. * vm_core.h: add field of coverage array to iseq. * iseq.c (prepare_iseq_build): ditto. * insns.def (trace): update coverage array. * parse.y (coverage): create and initialize coverage array. * compile.h (ADD_TRACE): add trace instruction to update covearge array. * thread.c (clear_coverage): delete coverage array when forking. Otherwise, double count of coverage may occur. * lib/coverage.rb: sample coverage measurement tool. * error.c: distinguish explicitly between parse_in_eval and mild_compile_error. * load.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),nobu
thread.c (eKillSignal, eTerminateSignal), missing/vsnprintf.c (BSD_vfprintf): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29* vm.c, vm_core.h,vm_core.h, vm_dump.c, iseq.c: rename class nameko1
VM -> RubyVM, and rename rb_cVM -> rb_cRubyVM. "VM" is too short name for class. * test/ruby/test_method.rb, test/ruby/test_settracefunc.rb: ditto. * include/ruby/ruby.h: rb_cRubyVM, rb_cEnv, rb_cISeq should not be exposed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17723 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-06-01* suppress warnings on cygwin, mingw and mswin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 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-22* iseq.c (rb_iseq_compile_with_option): get rid of segv.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22* iseq.c (iseq_load, iseq_data_to_ary): supportmame
ISEQ_TYPE_DEFINED_GUARD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14* iseq.c (insn_operand_intern): remove Qundef related code.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05* iseq.c (insn_operand_intern): should handle Qundef embedded inmatz
operand. [ruby-core:16656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21* iseq.c (rb_iseq_compile_with_option): check if src is a strring.nobu
[ruby-core:16453] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16122 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-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-01-08* compile.c (iseq_build_from_ary), iseq.c (iseq_load): fix for format change.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* iseq.c: all methods need $SAFE < 1.ko1
vm.c: comment out debug functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25* iseq.c, vm_core.h: comment out unused fields.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* proc.c (method_name): preserve Symbol's encoding.matz
* numeric.c (fix_id2name): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24* iseq.c (Init_ISeq): disable ISeq.load() because there is no verifier.ko1
* iseq.c, proc.c: add ISeq.disasm(method). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e