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

622 Коммитов

Автор SHA1 Сообщение Дата
nobu 3f3c86faaa common.mk: fix dependencies
* common.mk, defs/gmake.mk: fix install and uninstall dependencies
  with parallel make.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-19 14:11:52 +00:00
nobu f1b49b7bb9 constify character property tables
* enc/jis/props.kwd: constify character property tables of JIS
  based encodings by perfect hash.
* enc/euc_jp.c, enc/shift_jis.c: use character property functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 05:02:15 +00:00
normal f11db2a605 vm*: doubly-linked list from ccan to manage vm->living_threads
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table.  I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:

1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
   (0002 patch in Feature 9632 will introduce a secondary list
   for waiting FDs)

This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.

	vm_thread_close 1.762

* vm_core.h (rb_vm_t): list_head and counter for living_threads
  (rb_thread_t): vmlt_node for living_threads linkage
  (rb_vm_living_threads_init): new function wrapper
  (rb_vm_living_threads_insert): ditto
  (rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
  thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
  vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
  [ruby-core:61871][Feature 9632 (part 1)]

Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-10 23:48:51 +00:00
akr db9d8759ee * common.mk: Unused target, $(MKMAIN_CMD), removed.
* Makefile.in (MKMAIN_CMD): Unused macro removed.

* win32/Makefile.sub (MKMAIN_CMD): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13 01:21:39 +00:00
hsbt 1f20820054 * common.mk: Use redmine-2.x url for DeveloperHowto wiki.
[ruby-core:60657] [Bug #9511]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-02 06:15:19 +00:00
nobu 10cf7c5b2a hash.c: use ID_SCOPE_SHIFT
* hash.c (rb_any_hash): use ID_SCOPE_SHIFT instead of magic number.
  [Feature #9425]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-23 01:10:12 +00:00
ko1 1ccaa4756a * internal.h, vm_core.h: move LIKELY/UNLIKELY/UNINITIALIZED_VAR()
macros from vm_core.h to internal.h.
* string.c: remove dependency to "vm_core.h".
* common.mk: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 04:58:00 +00:00
nobu 9a9f5f0f93 common.mk: fix command error
* common.mk (capi): flags cannot be separated by escaped newlines.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-16 05:54:32 +00:00
nobu 9707b23d71 common.mk: ignore capi failure
* common.mk (capi): ignore doxygen failure (temporarily).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 23:23:17 +00:00
nobu 5e9b7bacc3 ruby/util.h: DECIMAL_SIZE_OF_BITS
* include/ruby/util.h (DECIMAL_SIZE_OF_BITS): a preprocessor
  constant macro to approximate decimal representation size of n-bits
  integer.
* iseq.c (register_label): use DECIMAL_SIZE_OF_BITS for better
  approximation.
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
* common.mk (iseq.o), ext/bigdecimal/depend (bigdecimal.o): add
  dependency to ruby/util.h for DECIMAL_SIZE_OF_BITS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 00:21:37 +00:00
nobu fe5554af85 verconf.h.tmpl: rename
* template/verconf.h.tmpl: rename from .in since this is an erb
  template file, but not for config.status.

* common.mk (verconf.h): rename the dependent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 05:46:01 +00:00
kanemoto 9109292789 avoid circular dependency on AIX
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 11:33:59 +00:00
nobu 72807178f3 common.mk: use BASERUBY
* common.mk (Doxyfile): tool/file2lastrev.rb needs running with
  BASERUBY since r43617.  [ruby-dev:47823] [Bug #9169]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 04:56:08 +00:00
ko1 be26a374e9 * common.mk: add useful config "set breakpoint pending on"
for run.gdb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 10:30:42 +00:00
nobu 28849ce257 ext/rbconfig/sizeof: move to an extension library
* common.mk, ext/rbconfig/sizeof: move RbConfig::SIZEOF to an
  extension library to get rid of annoying nmake VPATH rule.

* inits.c (rb_call_inits), miniinit.c (Init_sizes): RbConfig::SIZEOF
  is no loger built-in.

* template/sizes.c.tmpl (Init_sizeof): rename initialization function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-18 14:19:16 +00:00
tarui a50ce9498c * common.mk (help): add texts about gcbench.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 10:32:40 +00:00
akr 674f14a0bc * common.mk, ext/objspace/depend, ext/coverage/depend,
ext/-test-/debug/depend, ext/date/depend: Update dependencies.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 03:43:17 +00:00
nobu 02d28d01cf ruby.c: gem_prelude to load rubygems
* ruby.c (process_options): use gem_prelude instead of requiring
  rubygems directly when --enable=gems is given.
* Makefile.in (DEFAULT_PRELUDES): always use gem_prelude regardless of
  --disable-rubygems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 03:22:24 +00:00
nobu a10c9a0e76 common.mk: revert r43137 and r43145
* common.mk (sizes.c): revert r43137 and r43145, because the former
  commit made sizes.c rebuild always each build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-05 01:02:15 +00:00
nobu 156eb84808 common.mk: sizes.c depends on PREP now
* common.mk (sizes.c): now depends on PREP, which is miniruby if
  native compile or fake.rb otherwise, to run MINIRUBY [Bug #8968]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-05 00:18:54 +00:00
nobu 0f8032ba2b common.mk: make sizes.c with MINIRUBY
* common.mk (sizes.c): use MINIRUBY because Init_sizes() for miniruby
  is defined in miniinit.c and miniruby does not depend on this file.
  [Bug #8968]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04 07:36:22 +00:00
nobu 870dc20922 common.mk: use RUNRUBY for test-sample
* common.mk (yes-test-sample): use RUNRUBY instead of MINIRUBY to set
  runtime library path and run the built ruby.  [Bug #8971]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-03 04:42:55 +00:00
nobu 8be7ad2b6d common.mk: RUN_OPTS to tests
* common.mk (btest, btest-ruby, test-knownbug): add $(RUN_OPTS) to
  ruby to be run, so that tests are runnable before making exts.
* common.mk (test-sample): ditto, and use $(MINIRUBY) as rubytest.rb
  does not need extension libraries.
* tool/rubytest.rb: pass $(RUN_OPTS) to testing ruby using --run-opt.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 14:24:10 +00:00
nobu c95d5b250d common.mk, win32/Makefile.sub: refix sizez.c for nmake
* common.mk (sizes.c): revert r42854 and r42883.

* win32/Makefile.sub (sizes.c): rule for outplace build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 03:54:41 +00:00
nobu 2b44bbf697 common.mk: in-place build
* common.mk (sizes.c): try to fix for in-place build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 22:03:17 +00:00
glass e334bb2ce5 * common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
require extension libraries. The patch is from nobu
  (Nobuyoshi Nakada).

* ext/thread/extconf.rb: for build ext/thread/thread.c.

* include/ruby/intern.h: ditto.

* thread.c: ditto.

* lib/thread.rb: removed and replaced by ext/thread/thread.c.

* ext/thread/thread.c: Queue, SizedQueue and ConditionVariable
  implementations in C. This patch is based on patches from panaggio
  (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and  ko1
  (Koichi Sasada). [ruby-core:31513] [Feature #3620]

* test/thread/test_queue.rb (test_queue_thread_raise): add a test for
  ensuring that killed thread should be removed from waiting threads.
  It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 15:15:07 +00:00
nobu 64455007e6 common.mk: sizes.c for nmake
* common.mk (sizes.c): needs VPATH to outplace build with nmake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:23:25 +00:00
nobu 21d7cd3988 sizes.c.tmpl: autogenerate
* template/sizes.c.tmpl: generate automatically by extracting
  RUBY_CHECK_SIZEOF from configure.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 03:37:15 +00:00
nobu 8fba9bbc4b common.mk: install arch
* common.mk (do-install-arch): install architecture dependent files
  all, including libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08 15:15:44 +00:00
naruse a9a4da925c * common.mk (mini): portable target to build miniruby
* common.mk (bisect): run git-bisect with miniruby

* common.mk (bisect-ruby): run git-bisect with ruby

* tool/bisect.sh: script for git-bisect

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08 05:54:08 +00:00
nobu 8d564597fa win32.c: conversion to WCHAR
* win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
  the last step of conversion to WCHAR, to get rid of warnings from
  rb_enc_find() in miniruby.  [ruby-dev:47584] [Bug #8733]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-05 08:38:39 +00:00
nobu 9f06167a26 sizes.c: RbConfig::SIZEOF
* sizes.c (Init_sizes): define RbConfig::SIZEOF.  [Feature #8568]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29 13:55:29 +00:00
naruse 2998934ccb Change repository of rubyspec from original to nurse's
Because RubySpec often include tests which fails on CRuby even if
RubySpec is a test suite which verifies whether an implementation is
compatible with CRuby or not. Moreover recent mspec can't ignore specs
guarded with ruby_bug. It breaks running RubySpec with Ruby 1.8 because
those guards is used to avoid specs which cause stuck or crash.
Therefore we gave up tracking original and dicided to fork.

https://github.com/nurse/rubyspec

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25 07:31:10 +00:00
ko1 bd058912da * thread_native.h: added.
Move native thread related lines from vm_core.h.
  And declare several functions "rb_nativethread_lock_*",
  manipulate locking.
* common.mk: add thread_native.h.
* thread.c: add functions "rb_nativethread_lock_*".
* thraed.c, thread_[pthread,win32].[ch]: rename rb_thread_lock_t
  to rb_nativethread_lock_t to make it clear that this lock is for
  native thraeds, not for ruby threads.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 09:53:14 +00:00
eregon f293fa8d63 * common.mk (help): Fix environment variable name and argument.
Actually it can also be a directory or any argument for
  test/unit runner. [Fixes GH-363]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 16:08:49 +00:00
zzak d0fd9aa246 * common.mk: Document running a single test [Fixes GH-363]
Patch by Avdi Grimm https://github.com/ruby/ruby/pull/363


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20 13:46:34 +00:00
nobu 5f2080048e localeinit.c: split
* localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
  move from encoding.c.
* miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
  define miniruby specific functions only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 17:47:25 +00:00
nobu b64f79c838 win32.c: rb_w32_udln_find_exe_r,
rb_w32_udln_find_file_r
* win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
  codepage independent versions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:12 +00:00
ko1 99b10ff471 * benchmark/gc: create a directory to store GC related benchmark.
* benchmark/gc/gcbench.rb: moved from tool/gcbench.rb.
* benchmark/gc/hash(1|2).rb: ditto.
* benchmark/gc/rdoc.rb: ditto.
* benchmark/gc/null.rb: added.
* common.mk: fix rule.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 06:18:09 +00:00
ko1 36bc412513 * common.mk: remove dependency from ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20 05:01:36 +00:00
ko1 fcd5d8fd33 * tool/gcbench.rb: Summary in one line.
* common.mk: separete gcbench-hash to gcbench-hash1 and gcbench-hash2.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 23:15:56 +00:00
ko1 57bb153456 * common.mk: add new rules `gcbench-rdoc', `gcbench-hash'.
* tool/gcbench.rb: separate GC bench framework and process.
* tool/hashbench1.rb, tool/hashbench2.rb: add two types GC bench.
  hashbench1: many temporal objects (GC by newobj)
  hashbench2: hash size becomes bigger and bigger (GC by malloc)
  Two benchs are executed by `gcbench-hash' rule.
* tool/rdocbench.rb: separated.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 22:33:02 +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
nobu 9f60d8421c * Makefile.in (after-update): non-configure platforms don't need
config files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14 05:10:15 +00:00
nobu a53cb1a05d update config files
* .travis.yml (before_script): update config files.
* common.mk ($(srcdir)/tool/config.{guess,sub}): use get-config_files.
* tool/config_files.rb: split get-config_files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14 04:40:32 +00:00
nobu bbe047d4c7 download config files
* common.mk (update-config_files): rule to download config files.
* tool/config.guess, tool/config.sub: remove and download from the
  upstream.
* tool/get-config_files: download config files from GNU.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14 04:01:54 +00:00
akr 8bc16423cc * random.c: include internal.h.
(mt_state): Use rb_integer_unpack.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07 21:01:42 +00:00
ko1 e2793a908e * include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.
Postponed jobs are registered with this API. Registered jobs
  are invoked at `ruby-running-safe-point' as soon as possible.
  This timing is completely same as finalizer timing.
  There are two APIs:
* rb_postponed_job_register(flags, func, data): register a
  postponed job with data. flags are reserved.
* rb_postponed_job_register_one(flags, func, data): same as
  `rb_postponed_job_register', but only one `func' job is
  registered (skip if `func' is already registered).
  This change is mostly written by Aman Gupta (tmm1).
  https://bugs.ruby-lang.org/issues/8107#note-15
  [Feature #8107]
* gc.c: use postponed job API for finalizer.
* common.mk: add dependency from vm_trace.c to debug.h.
* ext/-test-/postponed_job/extconf.rb, postponed_job.c,
  test/-ext-/postponed_job/test_postponed_job.rb: add a test.
* thread.c: implement postponed API.
* vm_core.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26 21:30:44 +00:00
ko1 6f7c9e2ecb * common.mk (rdoc-bench): add a benchmark rule
using RDoc. Generate all rdoc related files
  (same as `make rdoc') in temporary directory
  and remove them. Excecution time, GC::Profiler
  and results of GC.stat are printed.
* tool/rdocbench.rb: added for `rdoc-bench'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21 07:36:34 +00:00
nobu 67f562a417 Makefile.in: loadpath from loadpath.c
* Makefile.in (loadpath): $LOAD_PATH in miniruby is empty by default
  now.

* win32/Makefile.sub (loadpath): separate for quirky cmd.exe syntax.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 07:54:04 +00:00