aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ruby.c: --help optionnobu2012-10-232-32/+78
| | | | | | | | * ruby.c (usage, process_options): show more info in --help. [EXPREIMENTAL] [ruby-core:48072] [Bug #7184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-electric.el: fix #198nobu2012-10-232-2/+8
| | | | | | | | | * misc/ruby-electric.el using variable `last-command-event' instead of obsolete `last-command-char', so that work with Emacs trunk. a patch by Victor Deryagin <vderyagin AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: no visibility option for older GCCnobu2012-10-232-1/+15
| | | | | | | | | * configure.in (visibility_option): visibility attribute is not available before GCC 4, so do not use -fvisibility option in that case. [ruby-core:48147] [Bug #7205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert the last commit because some tests (in btest) failko12012-10-232-10/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_raise): check interrupts afterko12012-10-232-0/+10
| | | | | | | | | Thread#raise because the behavior of Thread.current.raise is expected to perform same as Kernel.raise (by rubyspec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):ko12012-10-237-84/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add a new otpimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'. This optimization makes all cfunc method calls `frameless', which is fster than ordinal cfunc method call. If `frame' is needed (for example, it calls another method with `rb_funcall()'), then build a frame. In other words, this optimization delays frame building. However, to delay the frame building, we need additional overheads: (1) Store the last call information. (2) Check the delayed frame buidling before the frame is needed. (3) Overhead to build a delayed frame. rb_thread_t::passed_ci is storage of delayed cfunc call information. (1) is lightweight because it is only 1 assignment to `passed_ci'. To achieve (2), we modify GET_THREAD() to check `passed_ci' every time. It causes 10% overhead on my envrionment. This optimization only works for cfunc methods which do not need their `frame'. After evaluation on my environment, this optimization does not effective every time. Because of this evaluation results, this optimization is disabled at default. * vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour of VM internals. I will extend this feature. * vm_method.c, method.h: change parameters of the `invoker' function. Receive `func' pointer as the first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/parser.c: just get the constant defined in Ruby.tenderlove2012-10-224-2/+35
| | | | | | | | | * ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits from StandardError rather than SyntaxError. Thanks Eric Hodel! * test/psych/test_exception.rb: tests for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Cache symbols whiletenderlove2012-10-222-2/+9
| | | | | | tokenizing. Thanks Kevin Menard! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catchtenderlove2012-10-222-1/+8
| | | | | | Strings earlier in the tokenization process. Thanks Kevin Menard! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags speciallytenderlove2012-10-222-3/+14
| | | | | | to avoid slow method_missing calls. Thanks Kevin Menard! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. Iftenderlove2012-10-223-1/+25
| | | | | | | | | | something looks like a timestamp but has an invalid component, treat it as a string instead of throwing an ArgumentError. Thanks Rhett Sutphin! * test/psych/test_scalar_scanner.rb: appropriate tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner totenderlove2012-10-223-1/+13
| | | | | | | | | understand strings starting with an underscore and containing only digits. Thanks Kelley Reynolds. * test/psych/test_scalar_scanner.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-23svn2012-10-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: Changed comment in psych.rb to update newtenderlove2012-10-222-4/+11
| | | | | | home page for libyaml. Thanks to Carolyn Ann. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-22svn2012-10-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Supress warnings: unused variablesnaruse2012-10-222-7/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb: remove trailing spaces.ktsj2012-10-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c (rb_threadptr_exec_event_hooks, rb_suppress_tracing):ktsj2012-10-211-3/+3
| | | | | | constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_vm_t::trace_running): add a new fieldktsj2012-10-213-4/+20
| | | | | | | | | | `trace_running' to store vm global tracing status. * vm_trace.c: fix SEGV bug. event_hook was free'd even when the hook is still used in another thread. [ruby-dev:46141] [Bug #7032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (rb_vm_t::trace_flag): remove `trace_flag'ktsj2012-10-212-1/+5
| | | | | | which is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-10-21svn2012-10-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_parse.c (date__parse): uses more tight parser iftadf2012-10-212-24/+479
| | | | | | | | defined TIGHT_PARSER. now inactivated; because it introduces incompatibilities and it is a bit slow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: fix typos in documentation.eregon2012-10-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add C APIs.nari2012-10-2020-42/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VALUE rb_newobj_of(VALUE klass, VALUE flags) #define NEWOBJ_OF(obj,type,klass,flags) These allow to change a allocation strategy depending on klass or flags. * gc.c: ditto * array.c: use new C API. * bignum.c: ditto * class.c: ditto * complex.c: ditto * ext/socket/ancdata.c: ditto * ext/socket/option.c: ditto * hash.c: ditto * io.c: ditto * marshal.c: ditto * numeric.c: ditto * object.c: ditto * random.c: ditto * range.c: ditto * rational.c: ditto * re.c: ditto * string.c: ditto * struct.c: ditto [Feature #7177][Feature #7047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: Documentation for Socketzzak2012-10-202-36/+51
| | | | | | | | | Based on a patch by David Albert [Bug #7105] [ruby-core:47828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open-uri.rb: Documentation for OpenURIzzak2012-10-202-8/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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