aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
Commit message (Collapse)AuthorAgeFilesLines
* fix common misspelling [ci skip]nobu2015-12-241-3/+3
| | | | | | | * compile.c, cont.c, doc, man: fix common misspelling. [ruby-core:72466] [Bug #11870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: fix a double word typo.hsbt2015-12-101-1/+1
| | | | | | [Bug #11313][ruby-core:69749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * *.c (*_memsize): do not check ptr.ko12015-12-091-21/+19
| | | | | | | | | | NULL checking is finished Before call of memsize functions. See r52979. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: append to continuations doc [ci skip]nobu2015-09-201-0/+18
| | | | | | | * cont.c (rb_callcc): [DOC] append continuations example accros methods. [Fix GH-1026] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, cont.c, vm_trace.c: add a new eventko12015-08-211-1/+4
| | | | | | | | | | | fiber_switch. We need more discussion about this feature so that I don't write it on NEWS. [Feature #11348] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: CreateFiberEx fallbacknobu2015-07-211-0/+4
| | | | | | | * cont.c (fiber_initialize_machine_stack_context): fallback definition of CreateFiberEx for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove needless volatilenobu2015-07-131-1/+1
| | | | | | | | | * array.c (rb_ary_each): remove needless volatile for outdated clang 3.0. revert r32201. * cont.c (cont_capture): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (cont_free): remove mysterious fflush()ko12015-07-071-1/+1
| | | | | | | | introduced at r19890, maybe accidentaly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (fiber_init): initialize control frame correctly.ko12015-07-061-4/+5
| | | | | | | | | This fix does not affect any ordinal execution, but affects debug prints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h: introduce rb_callable_method_entry_t to removeko12015-07-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_control_frame_t::klass. [Bug #11278], [Bug #11279] rb_method_entry_t data belong to modules/classes. rb_method_entry_t::owner points defined module or class. module M def foo; end end In this case, owner is M. rb_callable_method_entry_t data belong to only classes. For modules, MRI creates corresponding T_ICLASS internally. rb_callable_method_entry_t can also belong to T_ICLASS. rb_callable_method_entry_t::defined_class points T_CLASS or T_ICLASS. rb_method_entry_t data for classes (not for modules) are also rb_callable_method_entry_t data because it is completely same data. In this case, rb_method_entry_t::owner == rb_method_entry_t::defined_class. For example, there are classes C and D, and incldues M, class C; include M; end class D; include M; end then, two T_ICLASS objects for C's super class and D's super class will be created. When C.new.foo is called, then M#foo is searcheed and rb_callable_method_t data is used by VM to invoke M#foo. rb_method_entry_t data is only one for M#foo. However, rb_callable_method_entry_t data are two (and can be more). It is proportional to the number of including (and prepending) classes (the number of T_ICLASS which point to the module). Now, created rb_callable_method_entry_t are collected when the original module M was modified. We can think it is a cache. We need to select what kind of method entry data is needed. To operate definition, then you need to use rb_method_entry_t. You can access them by the following functions. * rb_method_entry(VALUE klass, ID id); * rb_method_entry_with_refinements(VALUE klass, ID id); * rb_method_entry_without_refinements(VALUE klass, ID id); * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me); To invoke methods, then you need to use rb_callable_method_entry_t which you can get by the following APIs corresponding to the above listed functions. * rb_callable_method_entry(VALUE klass, ID id); * rb_callable_method_entry_with_refinements(VALUE klass, ID id); * rb_callable_method_entry_without_refinements(VALUE klass, ID id); * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me); VM pushes rb_callable_method_entry_t, so that rb_vm_frame_method_entry() returns rb_callable_method_entry_t. You can check a super class of current method by rb_callable_method_entry_t::defined_class. * method.h: renamed from rb_method_entry_t::klass to rb_method_entry_t::owner. * internal.h: add rb_classext_struct::callable_m_tbl to cache rb_callable_method_entry_t data. We need to consider abotu this field again because it is only active for T_ICLASS. * class.c (method_entry_i): ditto. * class.c (rb_define_attr): rb_method_entry() does not takes defiend_class_ptr. * gc.c (mark_method_entry): mark RCLASS_CALLABLE_M_TBL() for T_ICLASS. * cont.c (fiber_init): rb_control_frame_t::klass is removed. * proc.c: fix `struct METHOD' data structure because rb_callable_method_t has all information. * vm_core.h: remove several fields. * rb_control_frame_t::klass. * rb_block_t::klass. And catch up changes. * eval.c: catch up changes. * gc.c: ditto. * insns.def: ditto. * vm.c: ditto. * vm_args.c: ditto. * vm_backtrace.c: ditto. * vm_dump.c: ditto. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * method.h: make rb_method_entry_t a VALUE.ko12015-06-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation and new data structure are described in [Bug #11203]. This patch also solve the following issues. * [Bug #11200] Memory leak of method entries * [Bug #11046] __callee__ returns incorrect method name in orphan proc * test/ruby/test_method.rb: add a test for [Bug #11046]. * vm_core.h: remvoe rb_control_frame_t::me. me is located at value stack. * vm_core.h, gc.c, vm_method.c: remove unlinked_method... codes because method entries are simple VALUEs. * method.h: Now, all method entries has own independent method definititons. Strictly speaking, this change is not essential, but for future changes. * rb_method_entry_t::flag is move to rb_method_definition_t::flag. * rb_method_definition_t::alias_count is now rb_method_definition_t::alias_count_ptr, a pointer to the counter. * vm_core.h, vm_insnhelper.c (rb_vm_frame_method_entry) added to search the current method entry from value stack. * vm_insnhelper.c (VM_CHECK_MODE): introduced to enable/disable assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Check ruby_current_threadnobu2015-05-301-4/+3
| | | | | | | * cont.c (cont_free): check if ruby_current_thread is still valid. [Fix GH-914] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_args.c: protect value stack from calling other methodsko12015-04-061-1/+1
| | | | | | | | | | | | | | during complex parameter setting process (splat, kw, and so on). [Bug #11027] * vm_core.h: remove rb_thead_t::mark_stack_len. With this modification, we don't need to use th->mark_stack_len. * test/ruby/test_keyword.rb: add a test. * cont.c (cont_capture): catch up this fix. * vm.c (rb_thread_mark): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: introduce new fieldko12014-12-101-0/+3
| | | | | | | | | | | | | | rb_thread_t::local_storage_recursive_hash_for_trace to store recursive hash to avoid creating new recursive (nested) hashes for each trace events. [Bug #10511] * vm_trace.c (rb_threadptr_exec_event_hooks_orig): use it. * cont.c: catch up this fix. * vm.c (rb_thread_mark): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use 0 for reservednobu2014-12-011-2/+2
| | | | | | | use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: add rb_thread_t::local_storage_recursive_hashko12014-11-271-0/+3
| | | | | | | | | | | | | | | | | to speed up Thread#[:__recursive_key__] access. [Bug #10511] * thread.c (threadptr_local_aref): add fast path for :__recursive_data__. * thread.c (threadptr_recursive_hash, threadptr_recursive_hash_set): add special accessor for recursive hash. * cont.c: store/restore local_storage_recursive_hash. * vm.c: init and mark local_storage_recursive_hash. * vm_trace.c (rb_threadptr_exec_event_hooks_orig): clear and restore local_storage_recursive_hash directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: Include ruby.h and ruby/encoding.h to beakr2014-11-151-1/+0
| | | | | | | | includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (fiber_store): fix WIN32 fibersnormal2014-10-161-1/+1
| | | | | | [ruby-core:65745] [ruby-core:65758] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix typedefnobu2014-10-161-1/+1
| | | | | | | * cont.c (rb_fiber_struct): remove useless typedef. [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix compile errornobu2014-10-161-1/+1
| | | | | | | * cont.c (rb_fiber_t): fix compile error caused by move to vm_core.h at r47964. [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix when FIBER_USE_NATIVE is 0normal2014-10-151-1/+5
| | | | | | * cont.c (fiber_store): restore references to next_fib (fix typo) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix build when FIBER_USE_NATIVE is 0normal2014-10-151-5/+1
| | | | | | * cont.c (fiber_store): remove references to nextfib git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Optimize fiber_switch calleesnormal2014-10-151-99/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some unnecessary VALUE/struct conversions and aggressively inline functions used during fiber_switch. Either of these changes alone does not yield significant performance increase, but in combination they improve performance by ~6%. Arguably, removal of separate VALUE/rb_fiber_t* variables also makes the code more readable in a few places. * vm_core.h: declare rb_fiber_t typedef (rb_thread_t): fiber and root_fiber become rb_fiber_t * (from VALUE) * vm.c (rb_thread_mark): use rb_fiber_mark_self * cont.c (rb_fiber_t): prev becomes rb_fiber_t * (from VALUE) (cont_mark, cont_free): simplify conditions (rb_fiber_mark_self): new function (fiber_mark): use rb_fiber_mark_self (cont_save_thread, cont_restore_thread): inline (cont_restore_thread): simplify (fiber_setcontext): simplify conditions (rb_cont_call): remove dereference (fiber_t_alloc): update for rb_fiber_t->prev type change (rb_fiber_start): ditto (fiber_current): extract from rb_fiber_current (return_fiber): move, simplify type checks (rb_fiber_current): use fiber_current (fiber_store): simplify type checks (fiber_switch): ditto, simplify call to fiber_setcontext, use fiber_current (rb_fiber_transfer): update for type changes (rb_fiber_terminate): move, use fiber_switch (rb_fiber_resume): update for type changes (rb_fiber_reset_root_local_storage): ditto (rb_fiber_yield): use rb_fiber_switch instead of rb_fiber_transfer (rb_fiber_m_transfer): ditto [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (cont_save_thread): Sparse copying of thread datanormal2014-10-151-8/+31
| | | | | | | | | | | | | Instead of copying the complete rb_thread_t struct (almost a kB), selectively copy only those fields that will be needed later on. * cont.c (rb_context_t): comment on saved_thread (cont_save_thread): sparse copy (cont_init): copy extra fields (fiber_init): use current thread VM stack size [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Small code cleanupnormal2014-10-151-3/+2
| | | | | | | | | | | | Remove variable that is used only once, several lines after initialization. * cont.c (cont_capture): remove unnecessary variable [ruby-core:65518] [Feature #10341] Author: Knut Franke <Knut.Franke@gmx.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Code cleanup in fiber_switch/fiber_storenormal2014-10-151-42/+41
| | | | | | | | | | | | | | | | | | | | Defragment code blocks depending on FIBER_USE_NATIVE in order to make the control flow (which is already non-trivial due to nonlocal jumps) in each case more comprehensible. Remove some unreachable code from fiber_switch (we've already excluded the case (th->fiber == fibval) at the start of the function). Remove call to rb_fiber_current which happened a few lines after accessing GET_THREAD()->fiber directly (so if that's ever 0 we're already screwed). Author: Knut Franke <Knut.Franke@gmx.de> * cont.c (fiber_store, fiber_switch): simplify [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Remove unused prev_fiber/next_fiber fieldsnormal2014-10-151-27/+0
| | | | | | | | | | | | | | | | They were added in r19890 (8a0d53a), with the explanation that it's a double linked list of fibers in the same thread, but without any code using them. * cont.c (rb_fiber_t): remove prev_fiber/next_fiber (fiber_link_join, fiber_link_remove): remove functions (fiber_free, fiber_init, root_fiber_alloc): remove references to removed fields and functions [ruby-core:65518] [Feature #10341] Author: Knut Franke <Knut.Franke@gmx.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_{thread,context,fiber}_struct: trivial packingnormal2014-08-151-3/+3
| | | | | | | | | | | * vm_core.h (rb_thread_struct): reorder to pack * cont.c (rb_context_struct, rb_fiber_struct): ditto On x86-64, these changes reduces: rb_thread_struct to 1000 bytes (from 1016) rb_context_struct to 1288 bytes (from 1312) rb_fiber_struct to 2272 bytes (from 2304) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (cont_mark): fix typo in unused path [ci skip]normal2014-08-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce ZALLOC{,_N} to replace ALLOC{,_N}+MEMZERO usenormal2014-07-251-2/+1
| | | | | | | | | | | | | | | | | | | | Using calloc where possible reduces code and binary sizes. * include/ruby/ruby.h (ZALLOC, ZALLOC_N): implement (Data_Make_Struct, TypedData_Make_Struct): ZALLOC replaces ALLOC+memset * compile.c (iseq_seq_sequence): ZALLOC_N replaces ALLOC_N+MEMZERO * cont.c (fiber_t_alloc): ZALLOC replaces ALLOC+MEMZERO * io.c (rb_io_reopen): ditto * iseq.c (prepare_iseq_build): ditto * parse.y (new_args_tail_gen, parser_new, ripper_s_allocate): ditto * re.c (match_alloc): ditto * variable.c (rb_const_set): ditto * ext/socket/raddrinfo.c (get_addrinfo): ditto * ext/strscan/strscan.c (strscan_s_allocate): ditto * gc.c (rb_objspace_alloc): calloc replaces malloc+MEMZERO git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* constify parametersnobu2014-06-181-6/+6
| | | | | | | | * include/ruby/intern.h: constify `argv` parameters. * include/ruby/ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c : keep context.uc_stack.ss_sp and context.uc_stack.ss_size for later use.kanemoto2014-06-071-4/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: [DOC] Fix rdoc in example for Fiber#transfer by @majjohazzak2014-05-251-1/+1
| | | | | | | Patch submitted via documenting-ruby/ruby#33 [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_intern.h: VAR_INITIALIZEDnobu2014-04-041-2/+2
| | | | | | | * eval_intern.h (VAR_INITIALIZED): macro to suppress maybe-uninitialized warnings by gcc 4.7 and 4.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: rb_thread_struct::machinenobu2014-01-281-74/+76
| | | | | | | * vm_core.h (rb_thread_struct): aggregate cpu stuff into a struct, so that a debugger can show its content at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (rb_thread_create_timer_thread): Show errorakr2013-11-161-1/+1
| | | | | | | | | | message instead of error number. * cont.c (fiber_machine_stack_alloc): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c : Introdule ensure rollback mechanism. Please see below.tarui2013-11-151-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * internal.h (ruby_register_rollback_func_for_ensure): catch up above change. Add rollback mechanism API. * vm_core.h (typedef struct rb_vm_struct): catch up above change. Introdule ensure-rollback relation table. * vm_core.h (typedef struct rb_thread_struct): catch up above change. Introdule ensure stack. * eval.c (rb_ensure): catch up above change. Introdule ensure stack. * hash.c : New function for rollback ensure, and register it to ensure-rollback relation table. [ruby-dev:47803] [Bug #9105] Ensure Rollback Mechanism: A rollback's function is a function to rollback a state before ensure's function execution. When the jump of callcc is across the scope of rb_ensure, ensure's functions and rollback's functions are executed appropriately for keeping consistency. Current API is unstable, and only internal use. ruby_register_rollback_func_for_ensure(ensure_func,rollback_func) This API create relation ensure's function to rollback's function. By registered rollback's function, it is executed When jumpping into corresponding rb_ensure scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add support to estimate increase of oldspace memory usage.ko12013-11-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another approach to solve an issue discussed at r43530. This feature is diabled as default. This feature measures an increment of memory consuption by oldgen objects. It measures memory consumption for each objects when the object is promoted. However, measurement of memory consumption is not accurate now. So that this measurement is `estimation'. To implement this feature, move memsize_of() function from ext/objspace/objspace.c and expose rb_obj_memsize_of(). Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to measure memory size, so that we ignores T_DATA objects now. For example, some functions skip NULL check for pointer. The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature, and turned off as default. We need to compare 3gen GC and this feature carefully. (it is possible to enable both feature) We need a help to compare them. * internal.h: expose rb_obj_memsize_of(). * ext/objspace/objspace.c: use rb_obj_memsize_of() function. * cont.c (fiber_memsize): fix to check NULL. * variable.c (autoload_memsize): ditto. * vm.c (vm_memsize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko12013-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn'tkosaki2013-10-081-0/+7
| | | | | | | support a combination getcontext() and threads. Patch by Gabriele Giacone (1o5g4r8o@gmail.com). [Bug #8990][ruby-core:57685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: supplement comments of FIBER_USE_NATIVEnobu2013-10-081-14/+25
| | | | | | | * cont.c (FIBER_USE_NATIVE): supplement comments the reason why it is disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: split conditionsnobu2013-10-071-0/+15
| | | | | | * cont.c (FIBER_USE_NATIVE): split long conditions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: move FIBER_USE_NATIVE conditionsnobu2013-10-071-4/+1
| | | | | | | * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions from cont.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().ko12013-09-251-1/+1
| | | | | | | | | | | | | | | RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead ofko12013-08-071-3/+2
| | | | | | | | | | RARRAY_PTR() because there is no new reference. * proc.c (curry): ditto. * proc.c (rb_proc_call): remove line break. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* show errno on FiberError ref #8711naruse2013-07-311-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'zzak2013-05-171-3/+3
| | | | | | | patch by @schmurfy [Fixes GH-307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}nobu2013-04-051-6/+2
| | | | | | | * include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility control macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fiber local svarnobu2013-01-301-0/+2
| | | | | | | * cont.c (cont_restore_thread): svar should be separate per fibers. [ruby-core:51331] [Bug #7678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c: define FIBER_USE_NATIVE as 0 in ia64.takano322013-01-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e