summaryrefslogtreecommitdiffstats
path: root/parse.y
Commit message (Collapse)AuthorAgeFilesLines
* * vm.c: some refactoring.ko12007-06-241-28/+0
| | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): ID_JUNK test based on len, not by NUL.matz2007-06-211-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): name may not be NUL-terminated.nobu2007-06-211-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_intern2): use rb_intern2 to intern without trailingnobu2007-06-191-11/+7
| | | | | | | | | equal sign. * parse.y (rb_intern2, ripper_id2sym): fixed indent. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yycompile): disable trace while creating ruby_debug_lines.nobu2007-06-181-14/+23
| | | | | | | | | | | | [ruby-talk:253586] * thread.c (ruby_suppress_tracing): new function to call a function with suppressing trace. * lib/debug.rb, lib/tracer.rb: for YARV. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (th_yield_setup_args): |v| should work as |v,|.ko12007-06-151-4/+38
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@12544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (call_args): no allow splat after assocs. takesmatz2007-06-131-60/+0
| | | | | | | | consistency over compatibility. * parse.y (call_args2): ditto git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (do_block, brace_block): fix line numbers. [ruby-dev:30831]nobu2007-06-101-7/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby: moved public headers.nobu2007-06-101-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (call_args): allow splat argument after unpackedmatz2007-06-081-1/+65
| | | | | | | | assocs like 1.8 does. * parse.y (call_args): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (new_yield), compile.c (iseq_compile_each): fixko12007-06-051-7/+3
| | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@12441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c: fixed indentation.nobu2007-06-051-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,nobu2007-06-051-16/+16
| | | | | | | | pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci, thread_pthread.ci, thread_win32.ci: fixed indentation. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (open_args, arg_ambiguous, parser_warning): should not usenobu2007-05-291-4/+4
| | | | | | | rb_warning in the parser. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_arg): remove typo from ripper description.matz2007-05-171-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y, compile.c (set_arguments): fix to support in-parenko12007-05-171-10/+12
| | | | | | | | parameter (ex: def foo((a, b))). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_data_to_ary): internal IDs must not be exposed.nobu2007-05-111-3/+5
| | | | | | | | | | [ruby-core:11073] * parse.y (internal_id_gen): now returns scope local ID instead of global one. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (POINTER_P): pointer may be larger than long.nobu2007-05-101-5/+5
| | | | | | | | * parse.y (vtable_size, vtable_included, vtable_tblcpy, vtable_to_tbl): constified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: removed garbage spaces.nobu2007-05-021-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c, parse.y, ruby.h (rb_compile_warn, rb_compile_warning): warnnobu2007-05-011-10/+10
| | | | | | | | for compilation. the parser should no longer use rb_warn() and rb_warning(). [ruby-dev:30121] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assoc): result of assoc_new needs to be an assoc.nobu2007-05-011-222/+231
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: fixes for ripper.nobu2007-04-261-12/+12
| | | | | | | | | | | | | | | | * parse.y (primary): reduced duplcated code. * parse.y (f_arg_item): should not override by meaningless value. * parse.y (f_arg, assocs): should not use $$ before assigned. * parse.y (assoc_list): dispatch assoclist_from_args for assocs as well as args. * parse.y (assoc): return assoc if dispatched result is $1. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (symbol): symbols should be followed by EXPR_ENDARG.matz2007-04-201-13/+16
| | | | | | | | | | | | | * parse.y (dsym): ditto. * parse.y (parser_yylex): strings should be followed by EXPR_ENDARG. * parse.y (parser_yylex): ditto for numbers. * parse.y (parser_yylex): EXPR_ENDARG after ']' and '}'. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): should set command_start after blockmatz2007-04-161-0/+2
| | | | | | starting "do"s and braces. [ruby-core:10916] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,ko12007-03-211-368/+312
| | | | | | | | | | | | | proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h, debug.c, debug.h: merge half-baked-1.9 changes. The biggest change is to change node structure around NODE_SCOPE, NODE_ARGS. Every scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS represents more details of arguments information. I'll write a document about detail of node structure. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex), win32/win32.c (rb_w32_utime): fixednobu2007-03-041-2/+2
| | | | | | | indentation broken at YARV merger. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (stmt, arg): should not omit lhs of OP_ASGN1 even ifnobu2007-03-011-0/+2
| | | | | | | empty. [ruby-dev:30452] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (f_arg, opt_f_block_arg): ripper should export VALUE.aamine2007-02-241-1/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (struct local_vars): remove unused nofree member frommatz2007-02-241-4/+1
| | | | | | | | struct. * parse.y (parser_free): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (program): remove useless assignment to reduce warning.aamine2007-02-241-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): remove unused clause from the rule to stopmatz2007-02-241-8/+2
| | | | | | warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y, node.h, compile.c: change node tree structure. a purposeko12007-02-241-92/+49
| | | | | | | | | | | | | | | | | | | | | of this change is to unify argument structure of method and block. this change prohibits duplicate block parameter name. new argument infromation: NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] NODE_ARGS_AUX [r: ID, b: ID, ->] NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] optarg information: NODE_OPT_ARGS [idx, expr, ->] * vm_macro.def: ditto. * gc.c: ditto. * iseq.c: ditto. * compile.h: fix debug function name. * test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo| * test/ruby/test_lambda.rb: disalbe test temporarily. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lambda): add ripper event. This fixes bus error on "make test-all".aamine2007-02-231-10/+11
| | | | | | | * ext/ripper/extconf.rb: do not stop build. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: remove dyna_check_gen() prototype.matz2007-02-231-2/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,matz2007-02-231-50/+0
| | | | | | | | | | | object.c, string.c, variable.c, vm_macro.def: revert private instance variable feature, which is postponed until next major release. * marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to 8th version. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (mrhs): need to append by arg_append().matz2007-02-161-1/+1
| | | | | | [ruby-talk:239385] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (struct local_vars): no need to warn out-of-scopematz2007-02-131-25/+0
| | | | | | variables; remove dnames member from struct. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: RVarmap no longer used as yytype; removed.matz2007-02-131-20/+20
| | | | | | | | | | * parse.y (dyna_push_gen): no longer need return value. * parse.y (dyna_pop_gen): no longer need argument. * parse.y (local_push_gen): initialize nofree. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * this commit is a result of refactoring. only renaming functions,ko12007-02-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moving definitions place, add/remove prototypes, deleting unused variables and removing yarv.h. This commit doesn't change any behavior of ruby/vm. * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). * error.c, eval_intern.h: include yarvcore.h instead yarv.h * rename some functions: * debug.[ch]: debug_*() -> ruby_debug_*() * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() * iseq.c: node_name() -> ruby_node_name() * vm.c: yarv_check_redefinition_opt_method() -> rb_vm_check_redefinition_opt_method() * some refactoring with checking -Wall. * array.c: remove rb_ary_ptr() (unused) and remove unused local variables. * object.c: add a prototype of rb_mod_module_exec(). * eval_intern.h (ruby_cref): set it inline. * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). * thread.c: remove raw_gets() function (unused) and fix some format mismatch (format mismatchs have remained yet. this is todo). * thread.c (rb_thread_wait_fd_rw): fix typo on label name. * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. * vm.c (rb_svar, rb_backref_get, rb_backref_get, rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. * vm.c (yarv_init_redefined_flag): add a prototype and rename yarv_opt_method_table to vm_opt_method_table. * vm.c (rb_thread_eval): moved from yarvcore.c. * yarvcore.c: remove unused global variables and fix to use nsdr(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insns.def: remove (get|set)instancevariable2 and add ako12007-02-061-1/+0
| | | | | | | | | | | operand is_local to (get|set)instancevariable. * yarvtest/test_class.rb: add a test for class local instance variable. * parse.y (rb_decompose_ivar2): remove unused variable oid. * tool/insns2vm.rb: remove needless require. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_compose_ivar2): function to create a new ivar2matz2007-02-041-8/+89
| | | | | | | | | | | | | | | | | | | | symbol from a symbol and a class. back-ported from matzruby. * parse.y (rb_decompose_ivar2): reverse function of rb_compose_ivar2(). * marshal.c (w_symbol): support class local instance variables. * marshal.c (r_object0): ditto. * compile.c (defined_expr): ditto. * compile.c (iseq_compile_each): ditto. * insns.def: add two new instructions: getinstancevariable2 and setinstancevariable2. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * call_cfunc.ci, compile.c, compile.h, debug.h, eval.c,nobu2007-02-021-3/+3
| | | | | | | | | | | eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c, insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y, range.c, regenc.h, ruby.h, signal.c, thread.c, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fixed indents and non-C90 comments. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (SYMBOL_P): make Symbol immediate again for performance. matz2007-02-021-54/+34
| | | | | | | | | * string.c: redesign symbol methods. * parse.y (rb_id2str): store Strings for operator symbols. [ruby-dev:30235] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (assignable_gen): no need to generate NODE_CVDECL.matz2007-02-021-3/+1
| | | | | | * compile.c (iseq_compile_each): no NODE_CVDECL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Merge YARVko12006-12-311-582/+592
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (svalue_to_avalue): need to splat but no error.matz2006-11-061-1/+1
| | | | | | | | | | | | | | | | * eval.c: new macros - YIELD_CALL, YIELD_VALUES. * eval.c (rb_yield_values): specify YIELD_VALUES. * eval.c (rb_yield_0): use new macros. * eval.c (proc_invoke): slightly modified to separate YIELD_CALL and YIELD_VALUES from YIELD_ARY_ARGS. * object.c (Init_Object): add nil.to_splat => []. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (arg_dup_check): vid may be nameless internal id.matz2006-11-061-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): use particular enums. [ruby-core:09221]nobu2006-10-171-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (singleton): no need to re-create NODE_SELF() again.matz2006-10-141-7/+2
| | | | | | | [ruby-core:09177] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_warning, parser_warn): some error message maymatz2006-10-141-3/+3
| | | | | | | | | | | | | | | | contain format specifiers. a patch from Akinori MUSHA <knu at iDaemons.org>. [ruby-dev:29657] * regparse.c (onig_rb_warning, onig_rb_warn): ditto. * ext/bigdecimal/bigdecimal.c (VpException): ditto. * ext/dl/handle.c (rb_dlhandle_initialize): ditto. * ext/gdbm/gdbm.c (rb_gdbm_fatal): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e