aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * 2012-10-20svn2012-10-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (initialize_copy): unset the default proc if there isn't onetenderlove2012-10-192-0/+11
| | | | | | for the target hash, call to_hash, check frozen status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: pass through thrown objectsnobu2012-10-194-2/+19
| | | | | | | | | | * vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects. [ruby-dev:46234] [Bug #7185] * vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and rb_vm_jump_tag_but_local_jump() just jump tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* set encoding to ASCII for appropriate String#unpack modifierseregon2012-10-194-4/+25
| | | | | | | | | | | * pack.c (pack_unpack): set encoding of the 'H','h','B' and 'B' modifiers to US-ASCII. * test/ruby/test_pack.rb: tests for the above. [ruby-core:47653][Bug #7050] * test/test_securerandom.rb: tests for SecureRandom.hex from tenderlove. [ruby-core:46792][Bug #6799] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h (rb_method_cfunc_t::invoker): add new field (func ptr)ko12012-10-196-87/+197
| | | | | | | | | | | | | | | | | | | | | | | `invoker'. `invoker' function invoke cfunc body (rb_method_cfunc_t::func). `invoker' is set at method definition timing. With this change, the big `switch' (branch) in `call_cfunc()' is no longer needed. However, the performance benefit is only a bit. * vm_core.h (rb_call_info_t::aux::func): add a new field to store cfunc body function pointer. * vm_method.c (call_cfunc_invoker_func): add a new function which returns a suitable invoke function. * vm_method.c (setup_method_cfunc_struct): added. * vm_method.c (rb_add_method): fix to set `invoker'. * vm_eval.c (vm_call0_body): catch up above changes. * vm_insnhelper.c (call_cfunc): removed. * vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body with `invoker' function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().ko12012-10-193-9/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/driver.rb: remove unexpected `output'.ko12012-10-192-1/+5
| | | | | | | | (commit miss) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_search_method): remove needless local variable.ko12012-10-192-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/bmx_temp.rb: removed.ko12012-10-192-5/+5
| | | | | | | | This file should not be in repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-19svn2012-10-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * benchmark/driver.rb: add new option `--ruby-arg [ARG]'ko12012-10-192-1/+13
| | | | | | | | | which is passed as a launch parameter for each ruby's execution. ($ ruby [ARG] [File]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (opt_send_simple): move the location ofko12012-10-182-15/+21
| | | | | | | | | `opt_send_simple' to the place near `send' definition. (to take care about icache locality). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (send): remove unused condition.ko12012-10-183-5/+10
| | | | | | | | | | This condition will be true after r37258. * vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on checking blockiseq (it seems `LIKELY'). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (opt_send_simple): introduce new instruction usedko12012-10-183-20/+47
| | | | | | | | | when no need to care about block and splat. * compile.c: use the `opt_send_simple' instruction. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: check arity earliernobu2012-10-182-0/+7
| | | | | | | | * vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless): check arity earlier at definition time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: adjust spaces.nobu2012-10-181-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c: add `inline' keyword to several functions.ko12012-10-182-5/+10
| | | | | | | | Compilers (gcc) are conservative than I expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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