summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
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 * 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-06-27* parse.y (primary): empty not should call '!' on nil.matz
cf [ruby-dev:35227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25* parse.y (primary): not operand might be empty. [ruby-dev:35227]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25* parse.y (primary): make functional-style not operator to actmatz
like function. see <http://d.hatena.ne.jp/ku-ma-me/20080624/p1>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-21* parse.y (call_args2, open_args): removed.nobu
* parse.y (parser_yylex): unified warnings at space between method name and argument parenthese. [ruby-dev:33943] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17499 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-19* parse.y (assignable_gen): when "self = 1" was evalueted, unnecessarymame
error message was output, which might cause null pointer access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17* parse.y (ripper_warnS): now unused.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15 * parse.y (ripper_warningS): now used.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15* object.c (rb_cstr_to_dbl): no need for forceful warning whenmatz
converting to float. overflow is a nature of float values. * parse.y (parser_yylex): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08* parse.y (arg): operator assignment "a += b rescue c" should bematz
parsed as "a += (b rescue c)" just like normal assignment. [ruby-talk:301000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08test/ruby/test_continuation.rb: remove duplicated test.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16329 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-03-24* parse.y (debug_lines): Always prepare a new array for eachknu
file's SCRIPT_LINES__ storage, instead of appending source lines every time a file is re-loaded; submitted by Rocky Bernstein in #18517. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-18* parse.y (literal_concat_gen): bail out at different encoding.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04* parse.y (parser_yylex): disallow non digits '0o' expression.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29* time.c (time_strftime): format should be ascii compatible.matz
* parse.y (rb_intern3): non ASCII compatible symbols. * re.c (rb_reg_regsub): add encoding check. * string.c (rb_str_chomp_bang): ditto. * test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29* parse.y (opt_block_param): command can start just after block paramnobu
definition. [ruby-list:44479] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* parse.y (value_expr_gen): removed inappropriate warning.nobu
[ruby-core:15660] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-26* parse.y (tokadd_escape): refactored. [ruby-core:15657]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15608 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-02-17* encoding.c (ENC_CODERANGE_AND): added.naruse
* string.c (rb_str_plus, srb_str_times): keep coderange. * parse.y (STR_NEW0) use rb_usascii_str_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15* parse.y (reg_compile_gen): reg_fragment_setenc might not raise annobu
exception before rb_reg_compile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-14* parse.y (reg_compile_gen): appends error message fromnobu
rb_reg_compile() to one from reg_fragment_setenc(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (stmt, arg): reverted r15450. [ruby-core:15526]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (arg_append_gen): optimize only for array push.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (stmt, arg): concat opt_call_args only if non-null.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (arg_concat_gen, arg_append_gen): optimize for array concat.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (arg_add_gen): removed since identical to arg_append_gen.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (exc_list): should use mrhs if non array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (exc_list): splat literal array.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* parse.y (args, mrhs): flattens literal array splats.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12* string.c (rb_str_hash_cmp): lighter version of rb_str_cmp() formatz
hash comparison function. * hash.c (rb_any_cmp): use rb_str_hash_cmp(). * string.c (rb_str_casecmp): should return nil for incompatible comparison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11* range.c (range_include): specialize single character stringmatz
case (e.g. (?a ..?z).include(?x)) for performance. [ruby-core:15481] * string.c (rb_str_upto): specialize single character case. * string.c (rb_str_hash): omit coderange scan for performance. * object.c (rb_check_to_integer): check Fixnum first. * object.c (rb_to_integer): ditto. * string.c (rb_str_equal): inline memcmp to avoid unnecessary rb_str_comparable(). * parse.y (rb_intern2): use US-ASCII encoding. * parse.y (rb_intern_str): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04* trunk/parse.y (rb_enc_symname2_p): support "!", "!=" and "!~".nobu
[ruby-dev:33592] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-30* parse.y (dsym): allow empty symbols. [ruby-core:15248]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 * parse.y (reg_fragment_setenc_gen): US-ASCII script special code.usa
* parse.y (reg_fragment_check_len, reg_compile_gen): no need such trick. [ruby-dev:33399] * test/ruby/test_m17n.rb (test_regexp_usacii_literal): add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28* parse.y (rb_id2str, ripper_initialize, Init_ripper): use rb_usascii_str_new2.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28* string.c, parse.y, re.c: use rb_ascii8bit_encoding.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 * parse.y (parser_str_new): encoding of UTF-8 literal string inusa
US-ASCII script is UTF-8. [ruby-dev:33406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27* parse.y (parser_set_encode): check if encoding is ASCII compatible.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27* include/ruby/oniguruma.h: precise mbclen API redesigned to avoidakr
inline functions. (onigenc_mbclen_charfound): removed. (onigenc_mbclen_needmore): removed. (onigenc_mbclen_recover): removed. (ONIGENC_MBCLEN_CHARFOUND): removed. (ONIGENC_MBCLEN_CHARFOUND_P): defined. (ONIGENC_MBCLEN_CHARFOUND_LEN): defined. (ONIGENC_MBCLEN_INVALID): removed. (ONIGENC_MBCLEN_INVALID_P): defined. (ONIGENC_MBCLEN_NEEDMORE): removed. (ONIGENC_MBCLEN_NEEDMORE_P): defined. (ONIGENC_MBCLEN_NEEDMORE_LEN): defined. (ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate. * regenc.c (onigenc_mbclen_approximate): defined. * include/ruby/encoding.h (MBCLEN_CHARFOUND): removed. (MBCLEN_INVALID): removed. (MBCLEN_NEEDMORE): removed. (MBCLEN_CHARFOUND_P): defined. (MBCLEN_INVALID_P): defined. (MBCLEN_NEEDMORE_P): defined. (MBCLEN_CHARFOUND_LEN): defined. (MBCLEN_NEEDMORE_LEN): defined. * encoding.c: use new API. * re.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27* parse.y (value_expr_gen): reverted r12880. [ruby-dev:33388]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26* parse.y (assignable_gen, keyword_to_name): __ENCODING__ was missing.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 * parse.y (parser_initialize): set default script encoding as US-ASCII.usa
* ruby.c (load_file): ditto. * ruby.c (process_options): set script encoding of -e from locale except when -K is specified. * ruby.c (load_file): set script encoding of stdin from locale except when -K is specified. [ruby-dev:33375] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e