aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * insns.def (getinlinecache/setinlinecache): compare ic->ic_cref andko12015-10-294-3/+36
| | | | | | | | | | | | | | | | | | | | current cref only when cached CREF list includes singleton class. Singleton classes have own namespaces, so that we need to check cref as a key (#10943). However, if current CREF list does not include singleton class, no need to check CREF beacuse it should be same name space. * vm_insnhelper.c (vm_get_const_key_cref): add a function returns CREF only when it includes singleton class. * vm_core.h: constify iseq_inline_cache_entry::ic_cref. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_env_cref): make it inline for performance.ko12015-10-292-4/+11
| | | | | | | | | * vm_insnhelper.c (rb_vm_get_cref): use NULL instead of 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use NULL instead of 0ko12015-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def: nobody set ic->ic_value.value to Qundef.ko12015-10-292-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c: add ifndef guard for VM_CHECK_MODE.ko12015-10-292-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_check_frame_detail): should require me forko12015-10-292-2/+11
| | | | | | | | | VM_FRAME_FLAG_BMETHOD type frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-10-30svn2015-10-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* show signal mask on solarisnaruse2015-10-291-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert experimental changes related to Solaris CInaruse2015-10-292-6/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ENC_ASSERTnobu2015-10-291-4/+3
| | | | | | | | | * encoding.c (ENC_ASSERT): make an expression, and prevent the argument from further expansions. * encoding.c (rb_enc_check_str): assert before using. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (ruby): check the existence of the constant instead ofusa2015-10-291-1/+1
| | | | | | | checking platform. see also r52277. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* indentnobu2015-10-292-6/+6
| | | | | | * encoding.c (enc_compatible_latter): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2015-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can returnko12015-10-292-0/+7
| | | | | | | | | immediately when obj is not a markable object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_check_str): add for performance.ko12015-10-294-30/+97
| | | | | | | | | | | | | | | | | | | | | This function only accept T_STRING (and T_REGEXP). This patch improves performance of a tiny_segmenter benchmark (num=2) 2.54sec -> 2.42sec on my machine. https://github.com/chezou/TinySegmenter.jl/blob/master/benchmark/benchmark.rb * encoding.c: add ENC_DEBUG and ENC_ASSERT() macros. * internal.h: add a decl. of rb_enc_check_str(). * string.c (rb_str_plus): use rb_enc_check_str(). * string.c (rb_str_subpat_set): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: export rb_wb_(un)protected_newobj_of()ko12015-10-292-3/+8
| | | | | | | | | because some extensions include internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: separate event hook call from newobj_initnobu2015-10-291-6/+5
| | | | | | | | | | * gc.c (newobj_init): separate event hook call and remove the argument for it. * gc.c (newobj_slowpath): call event hook after initialized the new object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.ko12015-10-292-1/+11
| | | | | | | | | | | * gc.c (rb_wb_protected_newobj_of): add more assertions. * gc.c (rb_wb_unprotected_newobj_of): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: introduce rb_wb_unprotected_newobj_of() andko12015-10-294-19/+57
| | | | | | | | | | | | | | | | rb_wb_protected_newobj_of(), pass the WB_PROTECTED information explicitly. * internal.h: use introduced functions by NEWOBJ_OF(). `flag' is immediate value, so that C compilers can solve them at compile time. * include/ruby/ruby.h: add a commnent about that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: fix UNLIKELY usagenobu2015-10-291-3/+3
| | | | | | | | | * gc.c (gc_event_hook_needed_p): UNLIKELY makes no sense for boolean flag value. * gc.c (gc_event_hook, newobj_init): use in conditions instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add rb_objspace::flags::has_hook to represent hook availability.ko12015-10-292-7/+25
| | | | | | | | | | | | | | | | | * gc.c: add gc_event_hook_available_p(objspace) to check that flag. * gc.c (newobj_of): use gc_event_hook_available_p() instead of checking gc_event_hook_needed_p(objspace, RUBY_INTERNAL_EVENT_NEWOBJ). for performance. * gc.c (newobj_init): add UNLIKELY() for FL_WB_PROTECTED flag. * gc.c (newobj_init): change parameters order (trivial change). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: use enum and fix typonobu2015-10-292-13/+20
| | | | | | | | | * vm_insnhelper.c (VM_PROFILE_UP): use enum. * vm_insnhelper.c (vm_profile_show_result): fix typo, "r->c" at the last should be "c->c". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: move forward declarationsnobu2015-10-292-6/+9
| | | | | | | * vm_core.h (rb_thread_struct): move forward declarations before used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in: prefix RUBY in probes.hnobu2015-10-291-1/+1
| | | | | | * Makefile.in (probes.h): prefix RUBY to include guard. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RUBY_DTRACE_CREATE_HOOKnobu2015-10-298-45/+48
| | | | | | | | | | * internal.h (RUBY_DTRACE_CREATE_HOOK): macro to call hook at object creation. * vm.c (rb_source_location, rb_source_loc): retrieve source path and line number at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_ptr): remove debug code for #11244.ko12015-10-292-11/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: ruby_th_dtrace_setupnobu2015-10-292-49/+63
| | | | | | | * vm.c (ruby_th_dtrace_setup): extract setup for calling dtrace hook from RUBY_DTRACE_HOOK macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r52336 (commit miss)ko12015-10-296-33/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_ptr): remove debug code for #11244.ko12015-10-296-26/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: reduce heap usage for autoload_data_inormal2015-10-292-30/+42
| | | | | | | | | | | | | | | | | | | | For the loader (first thread which hits autoload, it is wasteful to have extra elements on the stack. For the lifetime of the process, it is wasteful to waste 2 words for every autoload entry. So this makes full use of existing stack overhead while reducing heap overhead for long-lived autoload_data_i structs. * variable.c (struct autoload_state): usable as wait-queue head (struct autoload_data_i): remove 2 words of overhead (autoload_i_mark): remove marking for thread (autoload_reset): adjust for struct changes (rb_autoload): ditto (rb_autoloading_value): ditto (rb_autoload_load): ditto (const_update): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* wait until it escape handle_interrupt blocknaruse2015-10-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix commit message for r52332 [ci skip]normal2015-10-291-1/+8
| | | | | | Oops, been away from ruby too long :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: additional locking around autoloadnormal2015-10-282-20/+88
| | | | | | | | | | | | [ruby-core:70075] [ruby-core:71239] [Bug #11384] Note: this open-coding locking method may go into rb_mutex/rb_thread_shield types. It is smaller and simpler and based on the wait queue implementation of the Linux kernel. When/if we get rid of GVL, native mutexes may be used as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* increase timeout (with full GC)naruse2015-10-282-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread may leak if assert fails before join is finishednaruse2015-10-281-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/rubygems/test_gem_commands_server_command.rbngoto2015-10-282-2/+11
| | | | | | | | | | | (test_handle_options_port): change port from http to discard. Solaris does not include "http 80/tcp" in its default /etc/inet/services. AFAIK, discard (9/tcp) is older than http and it is expected that all OS can resolve the service name. [Bug #10004] [ruby-core:63518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r52312 because the failure does not always occur on Solarisngoto2015-10-281-5/+2
| | | | | | | | | depending on the content of /etc/inet/services, and skipping the assertion by using RUBY_PLATFORM is generally a bad idea. In addition, no ChangeLog is given with the commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-10-29svn2015-10-281-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* experimentally add GC.start before spawnnaruse2015-10-281-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * probes_helper.h (RUBY_DTRACE_HOOK): add RB_GC_GUARD, though paranoic.ngoto2015-10-282-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file.rb: fix name clashnobu2015-10-281-1/+1
| | | | | | | * test/ruby/test_file.rb (test_realpath_encoding): get rid of name clash on case-insensitive filesystem in ascii only environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding for inspectnobu2015-10-283-8/+14
| | | | | | | * test/ruby/test_{exception,module,object}.rb: inspect result depend on the default external encoding. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: receiver in NameErrornobu2015-10-284-3/+16
| | | | | | | | * error.c (rb_name_err_new): store the receiver directly. * error.c (name_err_receiver): return directly stored receiver. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NameError#receiver of uninitialized constantnobu2015-10-2811-237/+206
| | | | | | | | | * error.c (name_err_mesg_to_str): quote the name if unprintable. * object.c (check_setter_id): use rb_check_id to convert names. * variable.c (uninitialized_constant): use NameError::message to keep the receiver of uninitialized constant. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: rb_name_err_newnobu2015-10-283-0/+20
| | | | | | | * error.c (rb_name_err_new): new function to create NameError exception instance. [Feature #10881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* write in shroternaruse2015-10-282-7/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix op_assign typenobu2015-10-283-1/+16
| | | | | | | * parse.y (new_attr_op_assign): fix op_assign type, which is already an ID since r52284. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: event tokennobu2015-10-281-13/+26
| | | | | | | * test/ripper/test_parser_events.rb (test_opassign): test parsed event tokens too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "* lib/rinda/ring.rb: Linux's SO_REUSEPORT is not for multicast."naruse2015-10-282-5/+1
| | | | | | This reverts commit r52314. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warningsnaruse2015-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e