Граф коммитов

41265 Коммитов

Автор SHA1 Сообщение Дата
normal a666e9b5f2 variable.c (rb_st_insert_id_and_value): reduce args
Minor simplification; this will hopefully make future patches
for switching to id_table easier-to-review.

* internal.h (rb_st_insert_id_and_value): update prototype
* variable.c (rb_st_insert_id_and_value): reduce args
  (find_class_path): adjust call for less args
  (rb_ivar_set): ditto
  (rb_cvar_set): ditto
* class.c (rb_singleton_class_attached): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30 01:40:28 +00:00
hsbt 57880d7e35 * gems/bundled_gems: update latest gems.
test-unit-3.1.5 and minitest-5.8.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30 00:57:28 +00:00
hsbt e00d5437d1 * lib/rubygems: Update to RubyGems HEAD(60d7972).
this version contains pull requests number of #1343, #1356, #1357, #1363
  at https://github.com/rubygems/rubygems/pulls
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30 00:54:12 +00:00
ko1 f363bbdf10 * insns.def (getinlinecache/setinlinecache): compare ic->ic_cref and
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
2015-10-29 22:43:45 +00:00
ko1 15d735de15 * vm_insnhelper.c (vm_env_cref): make it inline for performance.
* 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
2015-10-29 21:47:05 +00:00
ko1 8da9e6d549 use NULL instead of 0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:45:07 +00:00
ko1 648aa500d6 * insns.def: nobody set ic->ic_value.value to Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:21:13 +00:00
ko1 b08d139cc5 * vm.c: add ifndef guard for VM_CHECK_MODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:16:19 +00:00
ko1 4b852f64da * vm_insnhelper.c (vm_check_frame_detail): should require me for
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-29 21:14:29 +00:00
svn 4c42213c8e * 2015-10-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:08:52 +00:00
naruse 9033ed1030 show signal mask on solaris
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:08:33 +00:00
naruse 87622a118b revert experimental changes related to Solaris CI
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 21:08:30 +00:00
nobu d8a27d374a ENC_ASSERT
* 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
2015-10-29 14:31:48 +00:00
usa 78e436671a * test/ruby/test_io.rb (ruby): check the existence of the constant instead of
checking platform.  see also r52277.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 14:21:05 +00:00
nobu 4e1ea795aa indent
* encoding.c (enc_compatible_latter): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 14:01:13 +00:00
kazu 7b9b1e0e7e fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 13:01:19 +00:00
ko1 bce116617a * gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return
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
2015-10-29 09:48:38 +00:00
ko1 05b9b42918 * encoding.c (rb_enc_check_str): add for performance.
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
2015-10-29 09:10:32 +00:00
ko1 f9ca636ae7 * internal.h: export rb_wb_(un)protected_newobj_of()
because some extensions include internal.h.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 08:17:32 +00:00
nobu 7f7dcb6178 gc.c: separate event hook call from newobj_init
* 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
2015-10-29 08:00:01 +00:00
ko1 5869f9a3ba * gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.
* 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
2015-10-29 07:43:48 +00:00
ko1 ffa87b4057 * gc.c: introduce rb_wb_unprotected_newobj_of() and
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
2015-10-29 07:26:44 +00:00
nobu 017ac002c5 gc.c: fix UNLIKELY usage
* 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
2015-10-29 07:21:24 +00:00
ko1 a3e88485b1 * gc.c: add rb_objspace:🎏:has_hook to represent hook availability.
* 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
2015-10-29 06:17:07 +00:00
nobu 438f36dd2d vm_insnhelper.c: use enum and fix typo
* 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
2015-10-29 06:03:17 +00:00
nobu fd69901b26 vm_core.h: move forward declarations
* 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
2015-10-29 05:45:18 +00:00
nobu 86bbdf1d91 Makefile.in: prefix RUBY in probes.h
* 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
2015-10-29 05:33:16 +00:00
nobu 645116ff25 RUBY_DTRACE_CREATE_HOOK
* 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
2015-10-29 05:32:57 +00:00
ko1 1be5cb6371 * gc.c (gc_mark_ptr): remove debug code for #11244.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 05:32:42 +00:00
nobu 38094dd7f4 vm.c: ruby_th_dtrace_setup
* 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
2015-10-29 05:32:19 +00:00
ko1 56eee285be revert r52336 (commit miss)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 05:30:50 +00:00
ko1 106f033b89 * gc.c (gc_mark_ptr): remove debug code for #11244.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 05:10:06 +00:00
normal fc87b3b7e0 variable.c: reduce heap usage for autoload_data_i
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
2015-10-29 01:14:45 +00:00
naruse d90f9b1481 wait until it escape handle_interrupt block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29 00:44:13 +00:00
normal c621f4712f ChangeLog: fix commit message for r52332 [ci skip]
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
2015-10-29 00:24:48 +00:00
normal cdc251c695 variable.c: additional locking around autoload
[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
2015-10-28 23:59:45 +00:00
naruse 39715ad236 increase timeout (with full GC)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 19:03:31 +00:00
naruse 875b7d9e66 thread may leak if assert fails before join is finished
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 18:58:34 +00:00
ngoto 1dcd94df24 * test/rubygems/test_gem_commands_server_command.rb
(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
2015-10-28 15:43:27 +00:00
ngoto 2819e3b841 revert r52312 because the failure does not always occur on Solaris
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-28 15:36:49 +00:00
svn c8a7e854eb * 2015-10-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 15:11:29 +00:00
naruse aed1456a3b experimentally add GC.start before spawn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 15:11:16 +00:00
ngoto 061b504169 * probes_helper.h (RUBY_DTRACE_HOOK): add RB_GC_GUARD, though paranoic.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 14:54:53 +00:00
nobu 9da6727884 test_file.rb: fix name clash
* 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
2015-10-28 08:01:48 +00:00
nobu a2369fc2fe encoding for inspect
* 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
2015-10-28 07:56:13 +00:00
nobu a4f838c742 error.c: receiver in NameError
* 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
2015-10-28 06:36:13 +00:00
nobu 72ff61f4a8 NameError#receiver of uninitialized constant
* 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
2015-10-28 06:24:12 +00:00
nobu 7a929727f6 error.c: rb_name_err_new
* 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
2015-10-28 06:23:16 +00:00
naruse 30b72f98f7 write in shroter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 05:40:04 +00:00
nobu 107b0dc8cd parse.y: fix op_assign type
* 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
2015-10-28 04:29:41 +00:00