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

31362 Коммитов

Автор SHA1 Сообщение Дата
ko1 9b47ec04a8 * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add
rb_data_type_struct::flags. Now, this flags is passed
  at T_DATA object creation. You can specify FL_WB_PROTECTED
  on this flag.
* iseq.c: making non-shady iseq objects.
* class.c, compile.c, proc.c, vm.c: add WB for iseq objects.
* vm_core.h, iseq.h: constify fields to detect WB insertion.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:26:01 +00:00
nobu 063d4e4141 test_signal.rb: extra quotes
* test/ruby/test_signal.rb (TestSignal#test_signal_process_group):
  remove extra quotes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:14:15 +00:00
nobu 541bdd29ba gc.c: more info
* gc.c (gc_mark_children): show more info for broken object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 06:11:15 +00:00
kazu 0d736fb729 * test/ruby/envutil.rb (EnvUtil#rubybin): remove unnecessary unless expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 05:07:28 +00:00
kazu 267691bc90 fix indent and style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 01:44:10 +00:00
ko1 97dd259df5 * gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:49:19 +00:00
ko1 bfac961bed * gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:45:41 +00:00
ko1 d879849b6e * gc.c (make_deferred): clear flags to T_ZOMBIE.
* gc.c (slot_sweep_body): fix indent.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:26:57 +00:00
akr 0393a91926 * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
BDIGIT is 16bit.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:20:22 +00:00
ko1 54d04073d7 * gc.c (rgengc_remember): fix output level.
* gc.c (rgengc_rememberset_mark): fix to output clear count.
  (shady_object_count + clear_count = count of remembered objects)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:12:39 +00:00
ko1 65791846a6 * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
if RGENGC_CHECK_MODE > 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:07:09 +00:00
ko1 5455b7e72e * gc.c (RGENGC_CHECK_MODE): add new check mode `3'.
In this mode, show all references if there is
  a miss-corrected object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 22:04:30 +00:00
ko1 81ed2d3c4a * gc.c (gc_stress_set): add special option of GC.stress.
`GC.stress=(flag)' accepts integer to control behavior of GC.
  See code for details. Of course, this feature is only for MRI.
  You can debug RGenGC (WB) using `GC.stress = 1'.
  Using this option, do minor marking at all possible places.
  GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2
  seem good to add.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:35:40 +00:00
ko1 5a70af1d59 * vm.c (kwmerge_i): add WB.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:30:42 +00:00
ko1 0f1df31bdf * hash.c: `st_update()' also has same issue of last fix.
write barriers at callback function are too early.
  All write barriers are executed after `st_update()'



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 21:29:30 +00:00
svn 059f5df217 * 2013-06-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 19:50:49 +00:00
ko1 67d6aaca35 * variable.c (rb_const_set): fix WB miss.
WBs had located before creating reference between a klass
  and constant value. It causes GC bug.

    # pseudo code:
    WB(klass, value); # WB and remember klass
    st_insert(klass->const_table, const_id, value);

  `st_insert()' can cause GC before inserting `value' and
  forget `klass' from the remember set. After that, relationship
  between `klass' and `value' are created with constant table.
  Now, `value' can be young (shady) object and `klass' can be old
  object, without remembering `klass' object.
  At the next GC, old `klass' object will be skipped and
  young (shady) `value' will be miss-collected. -> GC bug

  Lesson: The place of a WB is important.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 19:50:44 +00:00
tarui 81568a297b * gc.c (gc_profile_record_flag): There may be two or more reasons. so, it was typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 14:02:58 +00:00
charliesome 65dc35a582 * vm_insnhelper.c (vm_call_method): ensure methods of type
VM_METHOD_TYPE_ATTR_SET are called with 1 argument

* test/ruby/test_module.rb (class TestModule): add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 14:01:32 +00:00
tarui 0a3f79310f * gc.c (gc_profile_record_flag): reason seems like one-hot encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 13:37:09 +00:00
zzak 31e1c32676 * ext/objspace/object_tracing.c: Return for ::allocation_generation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 13:10:25 +00:00
nobu 258fc46c96 test_symbol.rb: fix test
* test/ruby/test_symbol.rb (test_block_persist_between_calls): needs
  receiver object.  [Bug #8531]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 13:08:00 +00:00
zzak b8df950282 * ext/objspace/object_tracing.c: Document object_tracing methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 13:05:32 +00:00
zzak 62de1e66f7 * gc.c: Rename rb_mObSpace -> rb_mObjSpace
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 12:59:02 +00:00
zzak a8ba051341 * ext/objspace/objspace.c: Document ObjectSpace::InternalObjectWrapper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 11:56:03 +00:00
zzak b46df185b2 * ext/objspace/object_tracing.c: Teach rdoc object_tracing.c [Bug #8537]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 11:41:28 +00:00
zzak 0ec216e803 * ext/.document: add object_tracing.c to document file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 11:38:10 +00:00
zzak 765b9e962f * ext/objspace/objspace.c: rdoc on require to overview from r41355
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 11:21:38 +00:00
akr 1a6a65f16b * configure.in: Check __int128.
* include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available.
  (BDIGIT): Use uint64_t if uint128_t is available.
  (SIZEOF_BDIGITS): Defined for above case.
  (BDIGIT_DBL_SIGNED): Ditto.
  (PRI_BDIGIT_PREFIX): Ditto.

* include/ruby/ruby.h (PRI_64_PREFIX): Defined.

* bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
  rb_big_pow returns Float or Bignum.

[ruby-dev:47413] [Feature #8509]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 09:46:01 +00:00
nobu ca7bdc882b parse.y: clear lex_strterm
* parse.y (parser_heredoc_restore): clear lex_strterm always to get
  rid of marking recycled node.  this bug is revealed by r41372 with
  GC.stress=true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 07:43:47 +00:00
naruse ed82d1388f Remove useless sleep
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 07:10:56 +00:00
naruse e4ef5b282b Add timeout to avoid stick
http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130618T030202Z.diff.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 04:43:21 +00:00
akr e3b98ca301 * bignum.c (nlz): Cast the result explicitly.
(big2dbl): Don't assign BDIGIT values to int variable.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 03:56:49 +00:00
akr b5c81904e6 * bignum.c (rb_big_xor): Non-effective code removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 03:37:53 +00:00
ko1 1d7966f5b4 * gc.c (gc_stat): add `generated_normal_object_count_types' for
RGENGC_PROFILE >= 2.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 02:27:37 +00:00
ko1 17cd5ac4af * gc.c (gc_mark_maybe): check to skip T_NONE.
* gc.c (markable_object_p): do not need to check (flags == 0) here.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 02:17:59 +00:00
ko1 84608b1362 * variable.c (rb_autoload): fix WB miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 01:18:32 +00:00
naruse f43f9f33ac Message is 3rd argument, not 2nd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18 00:53:20 +00:00
svn 94f017c9a9 * 2013-06-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 19:21:41 +00:00
ko1 7a460d2d1d * gc.c (gc_mark_children): don't need to care about T_ZOMBIE here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 19:21:36 +00:00
ktsj cc9a7adeac * test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
run test for r41359.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 13:18:54 +00:00
ktsj 62bd8db198 * include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
new function to invoke a method with a block passed
  as an argument.

* string.c (sym_call): use the above function to avoid
  a block sharing. [ruby-dev:47438] [Bug #8531]

* vm_insnhelper.c (vm_yield_with_cfunc): don't set block
  in the frame.

* test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
  run related tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 12:47:26 +00:00
ktsj 1720a5bac4 * include/ruby/intern.h, proc.c (rb_method_call_with_block):
new function to invoke a Method object with a block passed
  as an argument.

* proc.c (bmcall): use the above function to avoid a block sharing.
  [ruby-core:54626] [Bug #8341]

* test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
  run related tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 12:38:52 +00:00
akr b7cec43c8b Fix a indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 11:56:53 +00:00
akr 947ebd0ac5 * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
inclusion actually.  r41352 removes the dependency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 11:56:21 +00:00
naruse 809013566e Write stdin_data only if it exists
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 10:24:48 +00:00
eregon ba49a1e025 * ext/objspace/objspace.c: let rdoc know about objspace methods.
Specify 'objspace' should be required. See #8537.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 09:16:32 +00:00
eregon 089dd1a1ca * gc.c (ObjectSpace): is a module not a class.
* ext/objspace/objspace.c: try to include overview in rdoc,
  see #8537.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 08:44:56 +00:00
eregon abfcded30c * gc.c: fix example of ObjectSpace.define_finalizer in overview
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 08:39:39 +00:00
nobu 3f3a618d3a common.mk: loadpath dependencies
* common.mk (loadpath.o): $LOAD_PATH should not be affected by
  the revision number.

* common.mk (dmyloadpath.o): depends on nothing except for the source
  file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17 08:08:25 +00:00