aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * include/ruby/ruby.h: add a decl. ofko12012-10-182-0/+6
| | | | | | | | `rb_define_frameless_method()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (new_callinfo): set a temporary index of callinfoko12012-10-182-3/+11
| | | | | | | | | | (used in `iseq_set_sequence()') to rb_call_info_t::aux::index. rb_call_info_t::argc is initialiesed by same value of rb_call_info_t::orig_argc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_define_frameless_method): rename fromko12012-10-186-15/+29
| | | | | | | | | | | | | | rb_define_method_fast(). Defined method with this C API does not make a method frame. It is bit lightweight than ordinal C functions. Now only 0 or 1 argc are permitted. * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name from VM_METHOD_TYPE_CFUNC_FAST. * vm_insnhelper.c, vm_method.c: rename related functions. * proc.c (rb_method_entry_arity): catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fail if yyerrornobu2012-10-183-7/+15
| | | | | | | | * parse.y (assignable_gen): fail if yyerror occurred. fix a bug in r36973. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_syntax.rb: test_unassignablenobu2012-10-181-0/+6
| | | | | | | | * test/ruby/test_syntax.rb (TestSyntax#test_unassignable): assert keywords are unassignable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-18svn2012-10-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (initialize_copy): duping should rehash the hash.tenderlove2012-10-183-1/+19
| | | | | | * test/ruby/test_hash.rb: added a test to ensure rehash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix a typo of r37243.nagachika2012-10-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: fix mingw make failure with make -jNshirosaki2012-10-174-6/+23
| | | | | | | | | | | | | | | * common.mk (WPROGRAM): need same dependencies as PROGRAM. * cygwin/GNUmakefile.in (uncommon.mk): move include position below WPROGRAM definition to be defined in uncommon.mk. * ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN. If make of ruby.exe and rubyw.exe run in parallel, link dll and link exe run in parallel, which causes link failure on mingw. To fix this, we make ruby.exe and rubyw.exe in one make process. [ruby-core:48007] [Bug #7165] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm2_method_missing.rb: add a benchmark to measureko12012-10-172-0/+17
| | | | | | | | performance of invoking `method_missing'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead ofko12012-10-172-2/+7
| | | | | | | | `aux.opt_pc'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_method_missing): make a refactoringko12012-10-173-23/+44
| | | | | | | | | | | | | | about method_missing process. Use `vm_call_method()' to invoke `method_missing' method instead of `rb_funcall2()'. In `vm_call_method()', set fastpath to `vm_call_method_missing()' if it can be cached. * vm_core.h (rb_call_info_t): add new field `rb_call_info_t::aux::missing_reasion' to pass the reason to `vm_call_method_missing()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: multiple opt-dirnobu2012-10-172-6/+18
| | | | | | | | | * configure.in (opt-dir): allow multiple directories separated by $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868] [Bug #7120] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: add credit.shugo2012-10-171-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb: fix Net::IMAP::ResponseParser to acceptshugo2012-10-173-0/+73
| | | | | | | | | | message/delivery-status ([ruby-core:47920] [Bug #7146]), message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]). * test/net/imap/test_imap_response_parser.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: use tab for indentation.shugo2012-10-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new testusa2012-10-172-0/+14
| | | | | | | to show the problem of r37232. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_search_method): fix a build error that occursshugo2012-10-172-1/+6
| | | | | | when OPT_INLINE_METHOD_CACHE is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm2_dstr.rb: add a benchmark to measureko12012-10-162-0/+11
| | | | | | | | performance of dynamic generated string ("foo#{bar}baz"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_dstr_fragments): use `putobject' instead ofko12012-10-162-4/+19
| | | | | | | | | | | | | `putstring' for all of strings used by NODE_DSTR because ruby users can not grab this string. For example, the string object of "baz" in "foo#{bar}baz" is located by `putobject' (users can not touch "baz" object directly). This change reduces GC pressure. This improvement is suggested by Aaron Patterson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_interrupt_mask): fix to check interruptko12012-10-162-0/+7
| | | | | | | | after interrupt_mask changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_method): fix to return value immediately.ko12012-10-162-24/+18
| | | | | | | | Remove CHECK_INTS() after that method dispatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (initialize_copy): copy the underlying st_table on dup,tenderlove2012-10-163-1/+32
| | | | | | | | rather than copying the hash key by key. [ruby-core:48009] * test/ruby/test_hash.rb: relevant tests for initialize_copy git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normalko12012-10-162-34/+59
| | | | | | | | | method frame setup functions. Add checking interrupts at the tailcall setup function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'ko12012-10-163-0/+27
| | | | | | | | | | (invoke empty block) performance. * benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure method invocation with empty block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skipko12012-10-162-1/+8
| | | | | | | | when splat flag is not set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cacheko12012-10-164-28/+71
| | | | | | | | | | | | | | | with rb_call_info_t to speedup `attr' getter and setter. Cached index is stored in rb_call_info_t::aux::index. `index' == 0 means not cached. `index' > 0 means cached and cached index is `index - 1'. * insns.def ((get|set)instancevariable): use new wrapper functions vm_(get|set)instancevariable() defined in vm_insnhelper.c. * vm_core.h (rb_call_info_t::aux): introduce new union data because opt_pc can share with index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-17svn2012-10-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h(rb_method_definition_struct): remove a comma after the last elementnagachika2012-10-161-1/+1
| | | | | | of enum. fix for r37198. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/driver.rb (show_results): Show speedup ratioko12012-10-162-18/+51
| | | | | | | | | with first executables score at last of results if two or more executrables are given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/driver.rb: some refactoring.ko12012-10-162-14/+18
| | | | | | | | | | | | | | | | (1) Remove `average differential'. In this benchmark driver, We should not care about `average'. We use fastest score because this score should not include any disturbances (affections of background process, etc). If you care about timing affect, I recommend `median' score with more than 5 examinations rather than simple `average' score (`average' score was affected by error scores). (2) Show log file name. (3) Change default directory from './' to driver's directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: ASCII-compatiblenobu2012-10-162-0/+8
| | | | | | | | * file.c (rb_file_join): need to check again after any conversion run. [ruby-core:48012] [Bug #7168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (Test::Unit::Assertions#assert_file): rename from ↵kazu2012-10-168-22/+27
| | | | | | file_assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2012-10-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: hide resultnobu2012-10-162-1/+6
| | | | | | | | * file.c (rb_file_join): hide the result under construction until return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: ASCII-compatiblenobu2012-10-163-3/+18
| | | | | | | | * file.c (rb_file_join): check nul-byte only for strings, since FilePathStringValue() does it. [ruby-core:48012] [Bug #7168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: ASCII-compatiblenobu2012-10-163-1/+15
| | | | | | | | * file.c (rb_file_join): path names must be ASCII-compatible. [ruby-core:48012] [Bug #7168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: check_path_encodingnobu2012-10-162-12/+18
| | | | | | | | * file.c (check_path_encoding): new function to ensure path name encoding to be ASCII-compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_regexp.rbusa2012-10-162-1/+8
| | | | | | | | (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use Regexp.new instead of literal to ignore a parser warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_regexp.rbusa2012-10-162-6/+7
| | | | | | | | (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring warnings are already set in setup method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.ko12012-10-152-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() ifko12012-10-153-4/+33
| | | | | | | | | | | 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
* * method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.ko12012-10-156-8/+82
| | | | | | | | | | | | | | | | | | | | 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
* * vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.ko12012-10-153-11/+32
| | | | | | | | | | | | 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
* * vm_core.h (VM_CALL_*): rename VM_CALL_*_BITko12012-10-156-50/+58
| | | | | | | | | | | 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-16svn2012-10-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix a typo of r37185.nagachika2012-10-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* envutil.rb: file_assertionnobu2012-10-159-23/+42
| | | | | | | | * 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
* * benchmark/: add missing spaces around assignment operators (= and +=) forkou2012-10-1552-56/+56
| | | | | | | | consistency. Approved by ko1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c: fix a typo.kou2012-10-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e