mame
f53d825447
* cont.c, vm_core.h, eval.c: because rb_protect must not be jumped by
...
callcc, revert r26407. And rename trap_tag to protect_tag and
change exception message (across trap -> across stack rewinding
barrier).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 18:22:58 +00:00
mame
24f5161c39
* cont.c (rb_cont_call, cont_restore_1): remove trap_tag check because
...
it seems not to make sense. [ruby-dev:40121]
* vm_core.h, eval.c (rb_protect): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 13:22:16 +00:00
nobu
fec2ed5f4d
* cont.c (rb_fiber_start): fixed unconditional test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 23:19:33 +00:00
akr
b9e0294eda
fix typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 17:46:28 +00:00
wanabe
2c2fb9c5ec
* cont.c (fiber_free): don't free unallocated local_storage. see #1325 .
...
* cont.c (cont_init): clear local_storage not to use current thread's.
* cont.c (fiber_t_alloc, root_fiber_alloc): link itself always for
a case that fiber_link_remove() is called before fiber_link_join().
* cont.c (fiber_init): clear cont->vm_stack and th->stack before
root_fiber_alloc() in rb_fiber_current().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-02 09:35:43 +00:00
wanabe
71f0685fe3
revert r25623
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-02 01:04:31 +00:00
wanabe
b23461b5dc
* cont.c (fiber_free): don't free unallocated local_storage. see #1325 .
...
* cont.c (cont_init): clear local_storage not to use current thread's.
* cont.c (fiber_t_alloc, root_fiber_alloc): link itself always for
a case that fiber_link_remove() is called before fiber_link_join().
* cont.c (fiber_init): don't join half-baked fiber.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01 23:27:12 +00:00
nobu
fe1ce93f52
* compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,
...
thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c,
vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl,
tool/instruction.rb: fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 20:58:26 +00:00
nobu
2d8a79fa47
* cont.c, proc.c: added rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 11:06:32 +00:00
nobu
3a7c1e25c4
* cont.c (cont_new, cont_capture, fiber_t_alloc): needs already
...
running thread. cf. [ruby-core:25681]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 01:13:24 +00:00
nobu
af4a989a98
* cont.c (cont_memsize, fiber_memsize): constified.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:26:06 +00:00
nobu
cd4fc5be39
* include/ruby/ruby.h (rb_data_type_struct): constified dsize.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:22:08 +00:00
nobu
85cc4ff62a
* cont.c (cont_memsize): fixed wrong expression on IA64.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 02:07:50 +00:00
nobu
f7f3f9bf76
* cont.c (cont_restore_1, rb_cont_call): should be Fiber.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 01:51:49 +00:00
nobu
055fb06700
* cont.c (cont_data_type, fiber_data_type): typed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 15:27:31 +00:00
nobu
6c743b0e5a
* cont.c (cont_capture, fiber_store): reraise transferred error.
...
* cont.c (fiber_switch): transfers dead fiber error to the previouse
or root fiber if the current fiber is dead. [ruby-core:23651]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-01 02:21:31 +00:00
nobu
99945ed664
* cont.c: fixed types.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-01 01:11:04 +00:00
nobu
12d2c8ba41
stripped trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:23:33 +00:00
ko1
c5d7d78dae
* cont.c (rb_fiber_alive_p): fix to return true instead of 1.
...
[ruby-dev:37991]
* test/ruby/test_fiber.rb: add a test for Fiber#alive?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 06:04:25 +00:00
mame
495293a136
* cont.c (cont_mark, cont_capture, cont_restore_1): use #else instead
...
of #elif. a patch from NISHIMATSU Takeshi <t_nissie at yahoo.co.jp>
in [ruby-list:45856].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 16:13:54 +00:00
nobu
845103b751
* cont.c (rb_fiber_current), dln.c (dln_print_undef, dln_undefined),
...
eval.c (rb_iterator_p, rb_need_block), load.c: (Init_load), ruby.c
(uscore_get, rb_f_chop), st.c (stat_col), signal.c
(rb_signal_buff_size, ruby_sig_finalize), thread.c
(rb_thread_sleep_forever, rb_thread_sleep_deadly, rb_thread_alone):
protoized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:51:44 +00:00
nobu
11c00acf8e
* cont.c (ruby_Init_{Continuation_body,Fiber_as_Coroutine}): prefixed
...
with ruby_ to export.
* ext/continuation/continuation.c, ext/fiber/fiber.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-20 07:17:28 +00:00
ko1
cf23d0f0f0
* vm.c: add a prefix "rb_" to exposed functions
...
vm_get_ruby_level_next_cfp(), rb_vm_make_env_object(),
vm_stack_to_heap(), vm_make_proc(), vm_invoke_proc(),
vm_get_sourceline(), vm_cref(), vm_localjump_error(),
vm_make_jump_tag_but_local_jump(), vm_jump_tag_but_local_jump().
This changes may affect only core because most of renamed functions
require a pointer of not-exposed struct such as rb_thread_t or NODE.
In short, they are core functions.
* cont.c, eval.c, eval_intern.h, load.c, proc.c, thread.c,
vm_core.h, vm_dump.c, vm_eval.c, vm_exec.c, vm_insnhelper.c:
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 02:38:11 +00:00
nobu
8ae8afa649
* cont.c (cont_restore_0): padding size doesn't need to be large
...
if alloca is used. suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 02:11:38 +00:00
takano32
aa87e280ea
* cont.c: fix prototype declare of register_stack_extend
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 05:43:49 +00:00
ko1
d46fcaf485
* cont.c (cont_restore_1): should not be inlined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-10 10:07:21 +00:00
nobu
53716bfce7
* cont.c (cont_restore_0): streamlined to ensure O(1) time. based on
...
a patch by Brent Roman <brent AT mbari.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 10:09:54 +00:00
matz
1487d9743b
* cont.c: small RDoc fix mentioned from <radek.bulat at gmail.com>
...
in [ruby-core:20921].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28 22:16:19 +00:00
yugui
5736312715
* cont.c: rdoc for Fiber. patch by Muhammad Ali.
...
[ruby-core:20894]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 00:25:47 +00:00
nobu
fe867f47ac
* cont.c (fiber_status), template/insns.inc.tmpl (ruby_vminsn_type),
...
vm_insnhelper.h (BOP): ISO C forbids comma at end of enumerator
list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 04:25:54 +00:00
nobu
a918afe05e
* cont.c (rb_fiber_start): calls with exact argument number.
...
[ruby-core:20088]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-01 03:00:48 +00:00
matz
776af67b28
* cont.c (fiber_alloc): separate allocation and initialization.
...
allow subclass to override #initialize. [ruby-core:20086]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 15:23:09 +00:00
mame
5ecc2ee022
* cont.c (cont_mark, cont_capture, cont_restore_1): speed up
...
continuation by copying only valid YARV stack. [ruby-dev:37106]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 16:19:37 +00:00
ko1
8a0d53ac2b
* cont.c: separate data structure between rb_fiber_t and
...
rb_context_t (rb_fiber_t includes rb_context_t).
rb_fiber_t has double linked list of fibers in same threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 15:12:07 +00:00
shyouhei
3e69e83a62
* include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids
...
comma at end of enumerator list
* include/ruby/ruby.h (enum ruby_value_type): ditto.
* eval_intern.h (enum): ditto.
* vm_core.h (enum rb_thread_status): ditto.
* parse.y (enum lex_state_e): ditto.
* parse.y (enum string_type): ditto.
* process.c (enum): ditto.
* ruby.c (enum dump_flag_bits): ditto.
* ruby.c (enum disable_flag_bits): ditto.
* compile.c (iseq_link_element): ditto
* debug.c (union): ditto.
* cont.c (enum context_type): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:27:58 +00:00
ko1
72ba13aa8e
* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
...
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
vm.c, gc.c:
allocated memory objects by xmalloc (ruby_xmalloc) should be
freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 10:01:40 +00:00
matz
1165304a5d
* cont.c (cont_restore_0): dynamic stack direction code should be
...
consistent with static one. [ruby-talk:301152]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-08 22:48:38 +00:00
nobu
2bbf4707f7
* cont.c (cont_restore_0): fixed typo. [ruby-core:15821]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 11:30:07 +00:00
akr
6cdef2dc7e
* $Date$ keyword removed to avoid inclusion of locale dependent
...
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
ko1
5f0b8afb97
* vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(),
...
RUBY_VM_SET_TIMER_INTERRUPT(), RUBY_VM_INTERRUPTED().
* thread.c, thread_pthread.c, thread_win32.c: fix to ignore time slice
event until sleep.
* bootstraptest/test_thread.rb: add a test for time limited join test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25 04:16:06 +00:00
ko1
9f34b73009
* cont.c, vm.h: fix to support sparc machine.
...
a patch from Yusuke ENDOH <mame AT tsg.ne.jp>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23 19:03:23 +00:00
ko1
314bef7ef1
* insnhelper.ci, vm.c, vm_core.h: change interface of
...
vm_invoke_block() to specify block ptr. [ruby-talk:266422]
* cont.c, eval_jump.ci, insns.def, proc.c, signal.c, thread.c:
apply above change.
* bootstraptest/test_knownbug.rb: move fixed bug.
* bootstraptest/test_block.rb: ditto. and add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 07:07:35 +00:00
ko1
9f6de20f58
* cont.c: add rb_context_t#type.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09 01:11:49 +00:00
ko1
68bcdf4c7e
* cont.c (cont_free): check Fiber or Continuation.
...
* bootstraptest/test_knownbug.rb: remove a fixed test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-06 07:30:02 +00:00
ko1
534d057e58
* cont.c: Thread local storage should be fiber local.
...
* bootstraptest/test_knownbug.rb, test/ruby/test_fiber.rb:
move a fixed test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28 19:04:45 +00:00
ko1
e826eec433
* cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146]
...
* ext/fiber/fiber.c: enable Fiber#transfer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26 10:26:35 +00:00
ko1
d55c0f5382
* cont.c: fix to remove Fiber.new until fiber.so is not loaded.
...
* test/ruby/test_continuation.rb: fix to use resume.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-26 03:31:20 +00:00
ko1
c2a734ea99
* cont.c: rename FIBER_STACK_SIZE to FIBER_VM_STACK_SIZE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 08:51:59 +00:00
ko1
977d66ec99
* cont.c: separate Continuation and Fiber from core.
...
* ext/continuation/*, ext/fiber/*: ditto.
* include/ruby/ruby.h: remove rb_cFiber.
* include/ruby/intern.h: add the rb_fiber_new() declaration.
* enumerator.c (next_init): fix to use rb_fiber_new().
* test/ruby/test_enumerator.rb: remove next? tests.
* test/ruby/test_continuation.rb: add a require 'continuation'.
* test/ruby/test_fiber.rb: add a require 'fiber'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 02:03:44 +00:00
nobu
4af553f1e7
* cont.c (rb_cont_call, fiber_switch, rb_fiber_resume, rb_fiber_yield):
...
suppress warnings.
* cont.c (rb_fiber_start): change on non-volatile variable between
setjmp and longjmp may not has an effect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23 07:55:37 +00:00