aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest
Commit message (Collapse)AuthorAgeFilesLines
...
* vm.c: rewrite all catch pointsnobu2012-11-021-0/+40
| | | | | | | | | * vm.c (rb_vm_rewrite_ep_in_errinfo): rewrite all catch points in errinfo, not only the topmost frame. based on the patch by ktsj (Kazuki Tsujimoto) in [ruby-dev:45656]. [Bug #6460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r37326 "remove string literal concatenation"nobu2012-10-252-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove string literal concatenationnobu2012-10-252-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() ifko12012-10-151-0/+20
| | | | | | | | | | | this method call needs splat argument because cahced functions (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary)) do not check an arity. * bootstraptest/test_method.rb: add a test to check an above issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_block.rb: add tests for block with super.ko12012-10-101-0/+32
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: token namenobu2012-08-201-1/+1
| | | | | | * parse.y: more descriptive token names in syntax error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: token namenobu2012-08-201-1/+1
| | | | | | * parse.y: more descriptive token names in syntax error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstrap/test_exception.rb: fix a last committed test.ko12012-08-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c, insns.def (checkmatch):ko12012-08-081-0/+15
| | | | | | | | | | | | | | | | | | remove checkincludearray instruction and add new instruction checkmatch. This change is to solve [Bug #4438] "rescue args type check omitted". * iseq.c: increment ISEQ_MAJOR_VERSION because removal of checkincludearray instruction. * vm_core.h: add several definitions for the checkmatch instruction. * vm_insnhelper.c (check_match): added. * bootstraptest/test_exception.rb: add a test. * test/ruby/test_exception.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* method in instance_evalnobu2012-08-061-16/+10
| | | | | | | | | | | | * class.c (rb_special_singleton_class_of): utility function. * vm_eval.c (eval_under): special deal for class variable scope with instance_eval. * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method definition in instance_eval of special constants. [ruby-core:28324] [Bug #2788] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest: fix missing bsnobu2012-07-051-1/+1
| | | | | | | * bootstraptest/runner.rb (show_progress): fix missing bs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest: refine error outputnobu2012-07-051-13/+25
| | | | | | | | * bootstraptest/runner.rb (show_progress): refine error output. do not count non-empty error message, but just warn. * bootstraptest/runner.rb (error): show errors immediately if tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstrap/runner.rb must be run with Ruby 1.8.naruse2012-07-041-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest: no stderr outputnobu2012-07-031-1/+19
| | | | | | | * bootstraptest/runner.rb (assert_check): capture stderr and ensure nothing is output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: reduce output if succedednobu2012-06-261-2/+5
| | | | | | | * bootstraptest/runner.rb (exec_test): reduce output if succeded. * sample/test.rb (PROGRESS.finish): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c, vm_eval.c: set th->base_block properly.ko12012-06-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | th->base_block is information for (a) parsing, (b) compiling and (c) setting up the frame to execute the program passed by `eval' method. For example, (1) parser need to know up-level variables to detect it is variable or method without paren. Befor (a), (b) and (c), VM set th->base_block by passed bindng (or previous frame information). After execute (a), (b) and (c), VM should clear th->base_block. However, if (a), (b) or (c) raises an exception, then th->base_block is not cleared. Problem is that the uncleared value th->balo_block is used for irrelevant iseq compilation. It causes SEGV or critical error. I tried to solve this problem: to clear them before exception, but finally I found out that it is difficult to do it (Ruby program can be run in many places). Because of this background, I set th->base_block before compiling iseq and restore it after compiling. Basically, th->base_block is dirty hack (similar to global variable) and this patch is also dirty. * bootstraptest/test_eval.rb: add a test for above. * internal.h: remove unused decl. * iseq.c (rb_iseq_compile_with_option): add base_block parameter. set th->base_block before compation and restore it after compilation. * ruby.c (require_libraries): pass 0 as base_block instead of setting th->base_block * tool/compile_prelude.rb (prelude_eval): apply above changes. * vm.c, vm_eval.c: ditto. * vm_core.h: add comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest: ignore -jnobu2012-06-151-0/+2
| | | | | | | | * bootstraptest/runner.rb (main): ignore -j option for compatibility with test/unit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: TEST_COLORSnobu2012-06-151-1/+1
| | | | | | | | * bootstraptest/runner.rb (main): fixed typo. * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): ditto. * sample/test.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: TEST_COLORSnobu2012-06-151-2/+4
| | | | | | | | | | | * bootstraptest/runner.rb (main): customize colors by dircolors-like style environment variable TEST_COLORS. * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): ditto. * sample/test.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: unknown --color argumentnobu2012-06-151-2/+3
| | | | | | | | * bootstraptest/runner.rb (main): warn unknown --color argument. * sample/test.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: help messagenobu2012-06-151-0/+2
| | | | | | | * bootstraptest/runner.rb (main): add --color option to the help message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32: VT100 escapenobu2012-06-041-1/+0
| | | | | | | | * win32/win32.c (constat_apply): apply VT100 functions. [ruby-core:44958] [Feature #6418] * win32/win32.c (constat_parse): parse some VT100 escape sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* color optionnobu2012-05-301-1/+12
| | | | | | * bootstraptest/runner.rb, sample/test.rb: add --color option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tests: customizable colorsnobu2012-05-081-2/+2
| | | | | | | * bootstraptest/runner.rb, lib/test/unit.rb, sample/test.rb: customizable colors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest/runner.rb: refine outputnobu2012-05-071-1/+25
| | | | | | | | * bootstraptest/runner.rb (exec_test, show_progress): show rotators and pass/fail counts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_array, compile_array_):ko12012-04-122-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | Divide big array (or hash) literals into several blocks and concatetene them. There was a problem that a big array (hash) literal causes SystemStackError exception (stack overflow) because VM push all contents of the literal onto VM stack to make an array (or hash). To solve this issue, we make several arrays (hashes) and concatenate them to make a big array (hash) object. ?? * compile.c (iseq_compile_each, setup_args): use modified compile_array. * vm.c (m_core_hash_from_ary, m_core_hash_merge_ary, m_core_hash_merge_ptr): added for above change. * id.c (Init_id), parse.y: add core method ids. * bootstraptest/test_literal.rb: add simple tests. * bootstraptest/test_eval.rb: remove rescue clause to catch SystemStackError exception. * test/ruby/test_literal.rb: add tests to check no stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_object.rb (test_send_with_block): moved fromktsj2012-01-021-13/+0
| | | | | | bootstraptest/test_flow.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_flow.rb: remove an unused parameter.ktsj2011-12-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placedktsj2011-12-231-0/+13
| | | | | | | | just before calling rb_call0. * bootstraptest/test_flow.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/runner.rb: don't suppress SIGINT.kosaki2011-11-121-0/+3
| | | | | | | | [Feature #5612] [ruby-dev:44856] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.ktsj2011-08-271-0/+13
| | | | | | | | | | | | | | | [Bug #5234] [ruby-core:39125] This code will be removed after changing throw mechanism (see r33064). * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function. * vm.c (vm_make_env_each): changed accordingly. * vm_core.h: ditto. * bootstraptest/test_flow.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (vm_make_env_each): work around to solve Bug #2729.ko12011-08-241-0/+13
| | | | | | | | | | | | | | | | fixes: Bug #2729 a patch from Kazuki Tsujimoto <kazuki@callcc.net> This problem is caused by changing dfp (dynamic env pointer) from saved dfp. Saved dfp is pointed env in VM stack. However, the dfp can be moved because VM copies env from VM stack to the heap. At this copying, dfp was also changed. To solve this problem, I'll try to change throw mechanism (not save target dfp, but save target cfp). * bootstraptest/test_flow.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_throw): check a class frame.ko12011-07-101-0/+27
| | | | | | | | | | Fixes Bug #4648. The patch is contributed by Kazuki Tsujimoto. * bootstraptest/test_proc.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (typedef struct rb_vm_struct): create a newkosaki2011-07-101-0/+6
| | | | | | | | | | | | | | 'inhibit_thread_createion' field. * thread.c (rb_thread_terminate_all): set inhibit_thread_creation. * thread.c (thread_s_new): don't permit to create new thread if the VM is under destruction. Otherwise evil finalizer code can make SEGV. [Bug #4992][ruby-core:37858] * bootstraptest/test_objectspace.rb: new test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (rb_f_autoload): prevent to autoload for singletonmrkn2011-07-101-0/+32
| | | | | | | classes. fixes [Bug #4886] [ruby-dev:43816] * bootstraptest/test_autoload.rb: add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for [ruby-dev:44049].kosaki2011-07-081-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_check_signal): only wake up main thread.ko12011-06-301-0/+20
| | | | | | | | | | | | | | | | | * thread.c (rb_threadptr_execute_interrupts_common): check signal deliverly if it is main thread. fixes [ruby-dev:44005] [Ruby 1.9 - Bug #4950] * bootstraptest/test_fork.rb: add a test for above. * signal.c (rb_get_next_signal): skip if signal_buff is empty. (check signal_buff.size first) * vm_core.h: remove unused variable rb_thread_t::exec_signal. * thread.c (rb_thread_check_trap_pending): check rb_signal_buff_size() because rb_thread_t::exec_signal is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): fix return value of obj[a,*b]=c.naruse2011-06-171-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/runner.rb (show_progress): refine verbose mode.akr2011-06-141-1/+7
| | | | | | | (exec_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/runner.rb (show_progress): extracted from assert_check.akr2011-06-141-88/+76
| | | | | | | | | | | (assert_check): use show_progress. (assert_normal_exit): ditto. (assert_finish): ditto. (flunk): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/runner.rb: should initilize $stress to avoid warnings.eban2011-06-111-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2011-05-157-52/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_get_ev_const): search root cref properly.shugo2011-03-311-1/+1
| | | | | | [ruby-dev:43365] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_method.rb: fix last commit.ko12010-09-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bootstraptest/test_method.rb: add a test for [ruby-core:30534].ko12010-09-211-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_class.rb: add a test for [ruby-core:30843].mame2010-06-271-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq_compile_each (NODE_DEFINED): put nil first to fix stackmame2010-05-191-0/+10
| | | | | | | | consistency. [ruby-core:30293] Now, lfinish[0] of defined_expr seems not to be used. Refactoring may be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (eval_string_with_cref): propagative filename and line_nomame2010-05-091-1/+1
| | | | | | | | | of binding. [ruby-dev:38767] [ruby-core:28307] * vm_core.h (rb_binding_t), proc.c: add filename and line_no fields to preserve them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each), vm_insnhelper.c (vm_invoke_block,mame2010-05-091-0/+24
| | | | | | | | | | | | | | | | | vm_throw): allow "return" and "yield" even in singleton class definition. based on a patch from wanabe <s.wanabe AT gmail.com> for "return". [ruby-core:21379] [ruby-dev:40975] * insns.def (defineclass): ditto (straightforwardly push block ptr, instead of dfp ptr with special flag). * vm_core.h (RUBY_VM_CLASS_SPECIAL_P): ditto (no longer needed). * proc.c (proc_new): ditto (remove handling for special flag). * bootstraptest/test_jump.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (rb_unlink_method_entry, rb_sweep_method_entry):ko12010-05-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | added. Unlinked method entries are collected to vm->unlinked_method_entry_list. On the GC timing, mark all method entries which are on all living threads. Only non-marked method entries are collected. This hack prevents releasing living method entry. [Performance Consideration] Since this Method Entry GC (MEGC) doesn't occuer frequently, MEGC will not be a performance bottleneck. However, to traverse living method entries, every control frame push needs to clear cfp->me field. This will be a performance issue (because pushing control frame is occurred frequently). Bug #2777 [ruby-dev:40457] * cont.c (fiber_init): init cfp->me. * gc.c (garbage_collect): kick rb_sweep_method_entry(). * method.h (rb_method_entry_t): add a mark field. * vm.c (invoke_block_from_c): set passed me. * vm.c (rb_thread_mark): mark cfp->me. * vm_core.h (rb_thread_t): add a field passed_me. * vm_core.h (rb_vm_t): add a field unlinked_method_entry_list. * vm_insnhelper.c (vm_push_frame): clear cfp->me at all times. * vm_insnhelper.c (vm_call_bmethod): pass me. * bootstraptest/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e