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

27743 Коммитов

Автор SHA1 Сообщение Дата
ko1 7ea3edc409 * vm_core.h (rb_call_info_t): add new type `rb_call_inf_t'.
This data structure contains information including inline method
  cache. After that, `struct iseq_inline_cache_entry' does not
  need to contain inline cache for method invocation.
  Other information will be added to this data structure.
* vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
  members to `rb_iseq_t'.
* insns.def, compile.c: Use CALL_INFO instead of IC.
* tool/instruction.rb: support CALL_INFO as operand type.
* vm_insnhelper.c, vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-09 05:33:54 +00:00
svn 4be0c562a4 * 2012-10-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 16:40:23 +00:00
nagachika f21ac99ef9 * ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
z->stream.avail_in == 0. it return Z_BUF_ERROR.
  but deflate() could be called with z->stream->avail_in == 0 because
  it has hidden buffer in z->stream->state (opaque structure).
  fix for gem install error. [ruby-dev:46149] [Bug #7040]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 16:40:19 +00:00
shugo 1bb89a6dea * eval.c (rb_mod_refinements): new method Module#refinements.
* test/ruby/test_refinement.rb: add new tests for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 14:56:08 +00:00
shugo e028d3d905 * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
vm_method.c: rename omod and overlaid modules to refinements.

* eval.c (hidden_identity_hash_new): renamed from identity_hash_new.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 14:02:46 +00:00
kazu 7b6e6ede60 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-07 17:14:39 +00:00
svn aaa8880ded * 2012-10-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-07 17:10:08 +00:00
kazu 98f14a9100 fix ML ref
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-07 17:10:03 +00:00
zzak 511703c770 * lib/abbrev.rb: Documentation examples for Abbrev.
[ruby-dev:47442] [Bug #6985]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 20:03:26 +00:00
zzak 61d460e5e1 * thread.c (rb_thread_aref):
Grammar in Thread documentation.
  Patch by Steve Klabnik [ruby-dev:47799] [Bug #7099]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 19:51:40 +00:00
zzak 5683d8b48e * string.c (rb_str_match):
Clarify behavior for captured strings and local variable assignment
  Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 19:48:51 +00:00
svn bdbd1f847a * 2012-10-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 19:38:22 +00:00
zzak 1b5ce61327 * string.c (rb_str_match):
Clarify behavior for captured strings and local variable assignment
  Patch by Marcus Stollsteimer [ruby-dev:47668] [Bug #7062]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 19:38:18 +00:00
nobu 974e3c9c5d * test/openssl/test_config.rb (OpenSSL#test_constants): skip only when
DEFAULT_CONFIG_FILE does not exist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 14:26:29 +00:00
nobu 0751c5d16d reapply r37098
UTF-16 and UTF-32 are also treated as unicode since r37101.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 14:22:52 +00:00
shugo 960e8a419f * vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
enable/disable global method caching. [ruby-dev:46203] [Bug #7111]

* vm_method.c (rb_method_entry_get_with_omod): don't use global
  method cache if OPT_GLOBAL_METHOD_CACHE is 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 09:36:35 +00:00
shugo c29c44c454 * vm_method.c (search_method): check omod only once for performance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 07:32:45 +00:00
naruse a9497d5a84 Revert r37098
This reverts
* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
because UTF-16 and UTF-32 is also treated as unicode in this context.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 03:04:55 +00:00
nobu b1058ef46c gc.c: use markable_object_p
* gc.c (gc_mark_children): use markable_object_p() and reduce
  duplicated code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 00:50:12 +00:00
nobu 122de73a19 test_objspace.rb: refine
* test/objspace/test_objspace.rb (test_reachable_objects_from): use
  proper assertions, and show messages than comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 00:48:28 +00:00
nobu 928d1a5261 encoding.c: unicode_p
* enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
  UTF encodings are dummy but Unicode.
* encoding.c (rb_encdb_set_unicode): set Unicode flag.
* template/encdb.h.tmpl: allow ENC_DUMMY variants.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-06 00:42:14 +00:00
tenderlove 5d316e7786 Adding a test for initialize_clone and initialize_dup. From Github:
https://github.com/ruby/ruby/pull/190

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 16:22:03 +00:00
svn f6848bf1c6 * 2012-10-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 15:14:19 +00:00
nobu d5ac3f71aa encoding.c: unicode_p
* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 15:14:15 +00:00
nari 3376ea81f9 fix comments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 09:21:41 +00:00
nari 4c0f022f45 revert r37091
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 09:19:49 +00:00
takano32 ae114a8ee6 * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
HTML_ALIGN_MEMBERS lines. They have been obsolete in
  Doxygen version 1.8.2.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 08:20:34 +00:00
ko1 e03d6d9eb8 * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
This method returns an array of objects referenced by given object.
  If given object is special objects such as true/false/nil/Fixnum etc
  then it returns nil. See rdoc for details.
  [ruby-core:39772]
* test/objspace/test_objspace.rb: add a test for this method.
* gc.c: add rb_objspace_reachable_objects_from().
  To make this function, add several member `mark_func_data'
  to rb_objspace_t.  If mark_func_data is not null, then
  gc_mark() calls mark_func_data::mark_func.
* gc.h: export rb_objspace_reachable_objects_from().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 08:14:09 +00:00
nobu 7cc6bfa329 common.mk: gdb-ruby
* Makefile.in (RUNRUBY_COMMAND): split from RUNRUBY.

* common.mk (gdb-ruby): use runruby.rb to set up library path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:28:32 +00:00
nari c38ee00226 ChangeLog: fix a miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:25:39 +00:00
nari 271f069c7f * gc.c (chain_finalized_object): remove to check a mark flag and
marking since all objects are certainly unmarked with rest_sweep.

* gc.c (rb_objspace_call_finalizer): remove to mark finalizable
  objects. The sweeping doesn't push T_ZOMBIE objects to the
  freelist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:20:49 +00:00
svn 42fcb804f4 * 2012-10-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 00:26:46 +00:00
nobu e2220d19e1 depend: missing dependency
* ext/date/depend: all source files need ruby.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 00:26:43 +00:00
nari ec62e30196 * gc.c (init_heap): call init_mark_stack before to allocate
altstack. This change avoid the stack overflow at the signal
  handler on 32bit, but I don't understand reason... [Feature #7095]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 14:48:02 +00:00
ko1 08c8605de9 * insns.def (getlocal, setlocal): remove old getlocal/setlocal
instructions and rename getdaynmic/setdynamic instructions
  to getlocal/setlocal.
* compile.c: ditto.
* iseq.c: remove TS_DINDEX.
* vm_exec.h (dindex_t): remove type definition of `dindex_t'.
* tool/instruction.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 13:52:20 +00:00
ko1 326e22e14a * vm.c (vm_analysis_insn|operand|register): use st_insert
instead of using rb_hash_aset() because rb_hash_aset()
  check $SAFE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 12:48:35 +00:00
ko1 23dc0dbc4a * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
hooks (old macro name is COLLECT_USAGE_ANALYSIS).
  This feature is only for VM developers.  (I'm not sure I can use
  `VM developers' (the plural form) in this sentence).
  If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
  usage collection features:
  (1) insntruction: collect intruction usages.
  (2) operand: collect operand usages.
  (3) register: collect register usages.
  The results are stored in
  RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
  RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
  RubyVM::USAGE_ANALYSIS_REGS for (3).
  You can stop collecting usages with
  RubyVM::USAGE_ANALYSIS_INSN_STOP(),
  RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
  RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
  for (1), (2), (3) respectively.
  You can also change the hook functions by setting
  C level global variables
  `ruby_vm_collect_usage_func_(insn|operand|register)'
  for (1), (2), (3) respectively.
  See codes for more details.
* tool/instruction.rb: fix macro names.
* iseq.c (insn_operand_intern): make it export (used in vm.c).
  fix to skip several processes if not needed (pointer is 0).
* vm_dump.c: move codes for collection features to vm.c.
* vm_exec.h: rename macro and function names.
* vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 12:31:05 +00:00
ko1 b1ad79774d * test/ruby/test_settracefunc.rb (test_tracepoint):
remove unused test case.
  (this test case is redefined by newer tests)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 10:00:56 +00:00
nari 2f9f17ac98 * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
at suitable point.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 08:34:20 +00:00
nobu 6aa2aabd8b gc.c: self-referencing finalizers
* gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
  before run finalizers, to fix SEGV from btest on 32bit.
* gc.c (gc_mark_stacked_objects): extract from gc_marks().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 07:31:31 +00:00
nobu 6fa2980e53 * gc.c: use enum for debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 07:23:41 +00:00
nobu fab7e66131 thread_pthread.c: precise stack size
* thread_pthread.c (ruby_init_stack): round stack limit to page size
  boundary to calculate stack size more precisely.  [ruby-dev:46174]
  [Bug #7084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:43:30 +00:00
nobu cbe3646e68 * thread_pthread.c (RUBY_STACK_MIN_LIMIT): name magic number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:39:34 +00:00
svn 6ed36284db * 2012-10-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:21:00 +00:00
xibbar aeca965681 * lib/cgi/html5.rb: Add html5 tag maker.
* lib/cgi/core.rb: ditto.
      [Feature #6637]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:20:55 +00:00
nobu 4336caf204 gc.c: unused function
* gc.c (free_stack_chunks): it is used only when per-VM object space
  is enabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 13:23:30 +00:00
nari 8d53a08ed8 * gc.c: Use the non-recursive marking instead of recursion. The
recursion marking of CRuby needs checking stack overflow and the
  fail-safe system, but these systems not good at partial points,
  for example, marking deep tree structures. [ruby-dev:46184]
  [Feature #7095]

* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
  checking stack overflow of marking.

* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 12:30:21 +00:00
nobu f6d0cb46f6 ChangeLog: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 07:58:00 +00:00
nobu 396903d384 depend: dependency
* ext/json/generator/depend: fix missing dependency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 07:33:24 +00:00
nobu 54c17dc8a9 thread_pthread.c: init stack with ulimit
* thread_pthread.c (ruby_init_stack): use getrlimit() for the main
  thread on Mac OS X, since pthread_get_stack{addr,size}_np() and
  return the default value always, but not the ulimit value.
  [ruby-dev:46174] [Bug #7084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 06:33:08 +00:00