Age | Commit message (Collapse) | Author |
|
to rb_execution_context_t.
* vm_core.h (rb_thread_t): move
`rb_thread_t::interrupt_flag` and
`rb_thread_t::interrupt_mask` to rb_execution_context_t.
RUBY_VM_CHECK_INTS() accepts `ec` instead of `th`.
* cont.c (rb_fiber_terminate): to propagate interrupt information,
add new parameter `need_interrupt`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (rb_call0): accepts `ec`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (vm_call_super): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* gc.c (rb_ec_stack_check): renamed from rb_threadptr_stack_check()
and it accepts `ec`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (EXEC_EVENT_HOOK): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_backtrace.c: accept `ec` and rename `threadptr` to `ec`.
* rb_threadptr_backtrace_object -> rb_ec_backtrace_object
* rb_threadptr_backtrace_str_ary -> rb_ec_backtrace_str_ar
* rb_threadptr_backtrace_location_ary -> rb_ec_backtrace_location_ary
* threadptr_backtrace_to_ary -> ec_backtrace_to_ary
* vm_eval.c (adjust_backtrace_in_eval): accepts `ec`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c: `th` -> `ec` for the following functions:
* check_funcall_respond_to
* check_funcall_callable
* check_funcall_missing
* rb_method_call_status
* vm_method.c: ditto.
* call_method_entry
* basic_obj_respond_to_missing
* basic_obj_respond_to
* vm_respond_to
* vm_eval.c (stack_check): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (rb_vm_call): accepts `ec` instead of `th`.
* proc.c: catch up this fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c (rb_vm_rewind_cfp): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c (vm_exec): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c: `th` -> `ec` for the following functions:
* vm_set_top_stack
* vm_set_eval_stack
* vm_set_main_stack
* vm_cref_new_toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h: move rb_thread_t::passed_block_handler to
rb_execution_context_t::passed_block_handler.
Also move rb_thread_t::passed_bmethod_me to
rb_execution_context_t::passed_bmethod_me.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c: the following functions accept `ec` instead of `th`.
* invoke_block
* invoke_bmethod
* invoke_iseq_block_from_c
* invoke_block_from_c_bh
* check_block_handler
* vm_yield_with_cref
* vm_yield
* vm_yield_with_block
* vm_yield_force_blockarg
* invoke_block_from_c_proc
* vm_invoke_proc
* vm_invoke_bmethod
* rb_vm_invoke_proc
* vm_insnhelper.c: ditto.
* vm_yield_with_cfunc
* vm_yield_with_symbol
* vm_callee_setup_block_arg
* vm_yield_setup_args
* vm_invoke_iseq_block
* vm_invoke_symbol_block
* vm_invoke_ifunc_block
* vm_invoke_block
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (vm_call_handler): fix to accept `ec` instead of `th`.
* vm_args.c: the following functions accept `ec` instead of `th`.
* raise_argument_error
* argument_arity_error
* argument_kw_error
* setup_parameters_complex
* vm_eval.c: ditto.
* vm_call0
* vm_call0_cfunc_with_frame
* vm_call0_cfunc
* vm_call0_body
* vm_insnhelper.c: ditto
* vm_call_iseq_setup_tailcall_0start
* vm_call_iseq_setup_normal_0start
* vm_callee_setup_arg
* vm_call_iseq_setup
* vm_call_iseq_setup_2
* vm_call_iseq_setup_normal
* vm_call_iseq_setup_tailcall
* vm_cfp_consistent_p
* vm_call_cfunc_with_frame
* vm_call_cfunc
* vm_call_ivar
* vm_call_attrset
* vm_call_bmethod_body
* vm_call_bmethod
* vm_call_opt_send
* vm_call_opt_call
* vm_call_method_missing
* vm_call_zsuper
* current_method_entry
* vm_call_method_each_type
* vm_call_method_nome
* vm_call_method
* vm_call_general
* vm_call_super_method
* tool/mk_call_iseq_optimized.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_insnhelper.c (vm_cref_push): accepts `ec` instead of `th`.
* vm_insnhelper.c: consitfy the first parameter (ec):
* lep_svar
* lep_svar_write
* lep_svar_get
* lep_svar_set
* vm_getspecial
and added vm_cref_push.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_insnhelper.c (ec_stack_overflow): renamed from threadptr_stack_overflow
and also rb_ec_stack_overflow is from rb_threadptr_stack_overflow
because they accept `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c (vm_get_ruby_level_caller_cfp): accepts `ec` instead of `th`.
* vm.c (vm_collect_local_variables_in_heap): don't need `th` anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* eval_intern.h:
introduce EC_*_TAG() macros instead of TH_*_TAG() macros.
* TH_PUSH_TAG() -> EC_PUSH_TAG()
* TH_POP_TAG() -> EC_POP_TAG()
* TH_TMPPOP_TAG() -> EC_TMPPOP_TAG()
* TH_REPUSH_TAG() -> EC_REPUSH_TAG()
* TH_EXEC_TAG() -> EC_EXEC_TAG()
* TH_JUMP_TAG() -> EC_JUMP_TAG()
rb_threadptr_tag_state() , rb_ec_tag_jump() also accept `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_insnhelper.c (vm_pop_frame): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_insnhelper.c (vm_push_frame): accepts `ec` instead of `th`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c (vm_make_env_object): accepts `ec`.
* vm.c (rb_vm_get_ruby_level_next_cfp): ditto.
* vm.c (rb_vm_make_proc): ditto.
* vm.c (rb_vm_make_proc_lambda): ditto.
* vm_core.h: some macros accept ec instead of th
(and make them inline functions):
* RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW
* RUBY_VM_END_CONTROL_FRAME
* RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P
* eval.c (frame_func_id): constify for the first parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
to represent execution context [Feature #14038]
* vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer.
There are many code using `th` to represent execution context
(such as cfp, VM stack and so on). To access `ec`, they need to
use `th->ec->...` (adding one indirection) so that we need to
replace them by passing `ec` instead of `th`.
* vm_core.h (GET_EC()): introduced to access current ec. Also
remove `ruby_current_thread` global variable.
* cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of
rb_context_t::thread_value.
* cont.c (ec_set_vm_stack): added to update vm_stack explicitly.
* cont.c (ec_switch): added to switch ec explicitly.
* cont.c (rb_fiber_close): added to terminate fibers explicitly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (rb_type_str): ensure all value types are covered.
missed types would be warned by -Wswitch option of gcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (uncallable_object): extract error case as a no-return
function. split successive ?-marks not to get confused with a
trigraph.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
This reverts commit r60095 to prevent performance degradation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
The new function rb_yield_assoc_or_values() will reduce branching.
* vm_eval.c: add rb_yield_assoc_or_values()
* internal.h: ditto
* hash.c: use rb_yield_assoc_or_values()
* struct.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* Improve spec rather than constrain implementation.
* Coercion ignores visibility in Ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* signal.c (check_stack_overflow): raise fatal when the last tag
is in danger zone.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* gc.c: enable PREVENT_STACK_OVERFLOW.
* vm.c (invoke_iseq_block_from_c): prevent stack overflow.
* vm_eval.c (stack_check): raise preallocated exception instance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
revert unexpected changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_collect): make the block arity same as the given
block. [Bug #13391]
* internal.h (vm_ifunc): store arity instead of unused id.
* proc.c (rb_vm_block_min_max_arity): return ifunc arity.
* vm_eval.c (rb_lambda_call): call method with lambda block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (rb_thread.h): move errinfo and trace_arg to
rb_execution_context_t.
* cont.c (fiber_switch, rb_cont_call): do not restore "trace_arg" here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (rb_thread_t): move several fields which are copied at cont.c
to rb_execution_context_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state".
Lifetime of "state" should be same as current tag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (rb_thread_t): rename rb_thread_t::state to tag_state
to make it clear.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Return value of EXEC_TAG() is saved by "int state".
Instead of "int", use "enum ruby_tag_type". First EXEC_TAG()
value should be 0, so that define TAG_NONE (= 0) and use it.
Some code used "status" instead of "state". To make them clear,
rename them to state.
We can change variable name from "state" to "tag_state", but this
ticket doesn't contain it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_core.h (OPT_CALL_CFUNC_WITHOUT_FRAME): removed because nobody use it.
This optimization tries to call C-methods without pushing VM frames,
however no big improvements compare with this complexity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_eval.c (yield_under): do not inform Proc is lambda or not.
After that invoke_block_from_c_bh() checks it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* internal.h (rb_yield_lambda): rename to rb_yield_force_blockarg()
because this function prohibt lambda arg setup (strict setup).
* vm.c (invoke_iseq_block_from_c): remove splattable argument because
it is not used.
* vm.c (invoke_block_from_c_splattable): rename to invoke_block_from_c_bh()
because `splattable` doesn't make sense on current this function.
Also accept `force_blockarg' parameter instead of `splattable` parameter.
It is more clear.
* vm.c (invoke_block_from_c_unsplattable): rename to
invoke_block_from_c_proc() and accept `proc` instead of `block'.
This function is used only by proc block invocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* proc.c (ruby_binding_data_type): set RUBY_TYPED_WB_PROTECTED.
Insert write barriers (WBs) to all of writes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|