summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-10-15* method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.ko1
This method is similar to VM_METHOD_TYPE_CFUNC methods, but called cfunc without building new frame (does not push new control frame). If error is occured in cfunc, the backtrace only shows caller frame and upper. This kind of methods can be added by rb_define_method_fast(). This feature is similar to specialized instructions (opt_plus, etc), but more flexible (but a bit slower). * class.c (rb_define_method_fast): added. Maybe it will be renamed soon. * vm_insnhelper.c (vm_call_method): support method type VM_METHOD_TYPE_CFUNC_FAST. * proc.c (rb_method_entry_arity): catch up new method type. * vm_method.c (rb_add_method_cfunc_fast): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.ko1
If `enable' is 0 then CI_SET_FASTPATH() doesn't work. And add new configuration option OPT_CALL_FASTPATH. If this macro was defined by 0, then CI_SET_FASTPATH() doesn't work any more. * vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter of CI_SET_FASTPATH if this method is protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* vm_core.h (VM_CALL_*): rename VM_CALL_*_BITko1
to VM_CALL_* (remove `_BIT' suffix). Add comments on each macros. Remove unused macro VM_CALL_TAILRECURSION_BIT. * compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* 2012-10-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15ChangeLog: fix a typo of r37185.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15envutil.rb: file_assertionnobu
* test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion): rewrite file assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* benchmark/: add missing spaces around assignment operators (= and +=) forkou
consistency. Approved by ko1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* vm_eval.c: fix a typo.kou
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* properties.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15vm_insnhelper.c: suppress warningsnobu
* vm_insnhelper.c (vm_callee_setup_arg_complex): suppress shorten-64-to-32 warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() ifko1
it was called from vm_yield_setup_args(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* vm_insnhelper.h CI_SET_FASTPATH: introduce new macroko1
`CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'. `func' (ci->call) is called at the last of `send' (and `invokesuper') instruction. `CI_SET_FASTPATH' does not set `ci->call' when the method (stored in `ci->me') is `protected'. * vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'. After several checking (visibility, argc checking), the result of checking can be reused until re-definition of this method with inline method cache. Note that this optimization is now experimental. If you find any problem about it, please tell us. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* vm_insnhelper.c: refactoring.ko1
- move all `call' related functions to the last of file. - make functions for respective method types in vm_call_method(). (all functions have same function parameters) * vm_core.h: add `opt_pc' filed in `rb_call_info_t' as temporal variable. * vm_eval.c (vm_call0_body): catch up above cahnges. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).ko1
* benchmark/bm_vm1_float_simple.rb: added (for flonum/float). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* vm_eval.c (vm_call0_body): add new function.ko1
`vm_call0()' makes call_info struct and calls `vm_call0_body()' with this struct. In near future, `vm_call0()' will be removed because all of `vm_call0()' users setup call_info struct by itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14remove garbage linenobu
* compile.c (new_insn_send): remove garbage line. * tool/instruction.rb (sp_increase_c_expr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* 2012-10-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:ko1
use only a `ci' (rb_call_info_t) parameter instead of using parameters such as `op_id', 'op_argc', `blockiseq' and flag. These information are stored in rb_call_info_t at the compile time. This technique simplifies parameter passings at related function calls (~10% speedups for simple mehtod invocation at my machine). `rb_call_info_t' also has new function pointer variable `call'. This `call' variable enables to customize method (block) invocation process for each place. However, it always call `vm_call_general()' at this changes. `rb_call_info_t' also has temporary variables for method (block) invocation. * vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP VM_CALL macro. This flag indicates that this call can skip caller_setup (block arg and splat arg). * compile.c: catch up above changes. * iseq.c: catch up above changes (especially for TS_CALLINFO). * tool/instruction.rb: catch up above chagnes. * vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions parameters are changed. * vm_eval.c (vm_call0): ditto (it will be rewriten soon). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14fix a typokazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14* 2012-10-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-14ruby.c: passing blocknobu
* ruby.c (rb_f_sub, rb_f_gsub): pass the given block. [ruby-core:47967] [Bug #7157] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-13* regparse.c (parse_char_class): should match with a hyphen after ausa
range in a character class. * test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong test. * test/ruby/test_regexp.rb (TestRegexp#check): now can accept the error message. * test/ruby/test_regexp.rb (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed because the previous name was wrong. * test/ruby/test_regexp.rb (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added more test pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12file.c: GC guardnobu
* file.c (realpath_rec): prevent link from GC while link_names refers the content. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12* test/ruby/test_regexp.rbusa
(TestRegexp#test_raw_hyphen_and_type_char_after_range): added new test. ref [ruby-core:47115] [Backport #6853] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12* 2012-10-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12use tty(1) to check if /dev/tty is usable or notnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12win32.h: set floating point precision for pow()shirosaki
* include/ruby/win32.h (rb_w32_pow): set floating point precision for mingw-w64 x86 pow(). This improves the precision of pow() on Windows XP for TestFloat#test_round_with_precision failure. [ruby-core:47911] [Bug #7142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12test_cgi.rb: skip a test on Windowsshirosaki
* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test depending on locale on Windows. ENV[] doesn't work properly if console code page is not equal to file system encoding. [ruby-core:47910] [Bug #7140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12* process.c (posix_sh_cmds): the command name of colon is ":".akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12file.c: poisoned NULnobu
* file.c (rb_get_path_check): path name must not contain NUL bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12Fix wrong condition of skipping test_ioctl_linuxnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12* tool/merger.rb: now can merge revision(s) without --ticket again.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-12mkmf.rb: use configured libdir valuenobu
* lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as default library path. [ruby-core:43726] [Bug #6207] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11* 2012-10-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11* lib/timeout.rb (timeout):zzak
Remove paragraph on wrong implementation detail. [ruby-core:47739] [Bug #7088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11string.c: GC guardnobu
* string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}): prevent String copies from GC. [ruby-core:47881] [Bug #7135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11test_string.rb: missing testnobu
* test/ruby/test_string.rb (test_each_codepoint): missing test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11test_string.rb: suppress warningsnobu
* test/ruby/test_string.rb (test_match_method): use unique objects in TestString and TestString2. * test/ruby/test_string.rb (test_ascii_incomat_inspect): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11test_string.rb: highlightingnobu
* test/ruby/test_string.rb (test_LSHIFT, test_succ): get rid of ruby-mode.el confusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-11Suppress warning: 'iseqval' may be used uninitialized in this functionnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* iseq.c (insn_operand_intern): cast op to rb_call_info_t* beforenaruse
compare with iseq->callinfo_entries whose type is rb_call_info_t*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* bootstraptest/test_block.rb: add tests for block with super.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* vm_dump.c: fix debug prints to catch up recent changesko1
such as VM data structures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* 2012-10-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* iseq.c (insn_operand_intern): add support disasm TS_CALLINFOko1
operands. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10Rename variablsnaruse
* uid always stores uid * user stores username or nil git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10Test both username and uidnaruse
* system(, uid: ) takes username or uid * ENV["USER"] may be nil (sudo or jail) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* 2012-10-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-10* test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip onusa
windows because the platform does not have Process.group method. patched by Jon Forums in [ruby-core:47878] [Bug #7133]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e