shugo
577eaa60a7
* insnhelper.ci (vm_call_method): pass mn->nd_clss to
...
vm_call_cfunc() instead of klass.
* vm.c (rb_thread_method_id_and_klass): traverse parent_iseq.
* thread.c (call_trace_proc): use rb_thread_method_id_and_klass().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-11 08:42:13 +00:00
nobu
6e572060eb
* vm.h (FRAME_MAGIC_MASK_BITS): bits of FRAME_MAGIC_MASK.
...
* insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): use shift operations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09 13:04:22 +00:00
nobu
4155206ebd
* eval.c (send_internal): use self in the previous frame to check for
...
protected methods. [ruby-core:13254]
* insnhelper.ci (vm_call_method): send! method has gone.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09 01:43:57 +00:00
nobu
4c040861c8
* eval.c (rb_invoke_method): check if invoked in function style.
...
[ruby-core:13245]
* insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): stores and returns VM
calling flags.
* vm.c (rb_vm_cfunc_funcall_p): returns if the current method is
invoked in function style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-09 01:29:24 +00:00
matz
1eee78b876
* eval.c (rb_f_send): allow send/__send__ to call methods of all
...
visibility again. we no longer provide __send, __send!.
* eval.c (rb_invoke_method): new method to honor private
visibility. if it's invoked in a function call style, it calls
private methods as well (previous 1.9 send behavior).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 20:36:20 +00:00
matz
ac835db6c8
* insnhelper.ci (vm_call_method): allow send! to call protected
...
methods as well. [ruby-core:12280]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28 14:17:28 +00:00
akr
5c0e68c39c
* include/ruby/intern.h: export rb_ivar_foreach.
...
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing
T_OBJECT space. [ruby-dev:31853]
(ROBJECT_LEN, ROBJECT_PTR)
(RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL)
(RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor
defined.
* variable.c: support the modified RObject and RClass.
* object.c: ditto.
* class.c: ditto.
* gc.c: ditto.
* marshal.c: ditto.
* eval_method.ci: use the abstract accessor.
* insns.def: ditto.
* proc.c: ditto.
* struct.c: ditto.
* eval.c: ditto.
* error.c: ditto.
* vm.c: ditto.
* insnhelper.ci: ditto.
* ext/digest/digest.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28 06:21:46 +00:00
ko1
94331261e9
* insnhelper.ci (vm_throw): fix to move increment point.
...
[ruby-dev:31840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26 10:29:00 +00:00
ko1
3e3953cd66
* insnhelper.ci (vm_expandarray): assignment should be placed
...
after creating new array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-14 07:26:07 +00:00
ko1
8b92f5df32
* insnhelper.ci (vm_expandarray): should be volatile value for GC.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-14 07:14:13 +00:00
ko1
2ca7ad139f
* insnhelper.ci (vm_setup_method): reorder code for branch prediction.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 21:05:20 +00:00
ko1
343c363d5b
* insnhelper.ci (vm_call_method): fix to relaxant safe level check
...
($SAFE > 2). [ruby-core:11998]
* bootstraptest/test_method.rb: add tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 20:56:51 +00:00
matz
99ab1fed49
* eval.c (rb_f_send_bang): abandon the name funcall for private
...
aware method call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24 08:15:37 +00:00
nobu
7912fdf599
* compile.c (compile_massign), insnhelper.ci (vm_throw): not use C99
...
comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23 07:59:42 +00:00
ko1
e39eb9dab5
* compile.c, insns.def, parse.y: fix massign order. This change
...
causes performance problem. Try vm1_swap benchmark.
[ruby-dev:31522]
* insns.def, insnhelper.ci: move process body of expandarray insn to
vm_expandarray().
* bootstraptest/test_knownbug.rb, bootstraptest/test_massign.rb:
move a solved test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23 07:10:56 +00:00
ko1
cd30220aff
* insnhelper.ci (vm_call_bmethod): fix to propagate information
...
that this proc is "from Method". [ruby-dev:31490]
* proc.c (method_proc, rb_mod_define_method): ditto.
* vm.c (vm_invoke_proc_core): removed.
* vm_core.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-19 04:02:21 +00:00
ko1
98e7aa679a
* insnhelper.ci (vm_callee_setup_arg): fix to mark enough VM stack.
...
[ruby-dev:31492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-19 03:35:39 +00:00
ko1
2c5ae0eeba
* insnhelper.ci (vm_call_bmethod),
...
vm.c (vm_invoke_proc_core): fix to do not restore
$SAFE when proc invoked by bmethod.
* vm_core.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 07:48:28 +00:00
nobu
bade43f9d1
* insnhelper.ci (vm_send_optimize): use MEMMOVE to shift values inside
...
an array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 06:52:51 +00:00
nobu
d23abfc546
* insnhelper.ci (vm_yield_setup_args): rsize and psize should not be
...
negative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 06:45:37 +00:00
nobu
2d9512edd9
* insnhelper.ci (vm_callee_setup_arg, vm_send_optimize,
...
vm_yield_setup_args): bulk copy for arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 05:35:03 +00:00
nobu
c2a41b3a71
* insnhelper.ci, string.c: fixed indent.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 05:11:49 +00:00
ko1
2e83c555d8
* insnhelper.ci (vm_callee_setup_arg): fix to check arguments
...
correctly. [ruby-dev:31472]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 04:17:39 +00:00
ko1
4d3a58bc69
* compile.c (iseq_set_arguments), insnhelper.ci
...
(vm_callee_setup_arg, vm_yield_setup_args):
* bootstraptest/test_block.rb: add tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 02:48:13 +00:00
ko1
b982cff67c
* eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias),
...
insnhelper.ci (vm_call_method): fix to save safelevel for
method node.
* include/ruby/node.h: ditto.
* bootstraptest/test_method.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-17 12:25:47 +00:00
ko1
fc466622fd
* compile.c (iseq_set_arguments), insnhelper.ci
...
(vm_callee_setup_arg, vm_yield_setup_args): fix
block parameter problems. [ruby-dev:31437], [ruby-dev:31440]
* bootstraptest/test_block.rb: add a test of [ruby-dev:31440].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16 16:29:11 +00:00
ko1
fc234a916a
insnhelper.ci: missed at last commit.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-12 19:12:55 +00:00
ko1
ae421c43df
* insnhelper.ci, insns.def: move some statements to functions.
...
* vm.c, vm.h, vm_evalbody.ci: fix include/typedef places.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-06 11:36:30 +00:00
ko1
6b6bf4dd48
* blockinlining.c: remove "yarv" prefix.
...
* array.c, numeric.c: ditto.
* insnhelper.ci, insns.def, vm_evalbody.ci: ditto.
* yarvcore.c: removed.
* yarvcore.h: renamed to core.h.
* cont.c, debug.c, error.c, process.c, signal.c : ditto.
* ext/probeprofiler/probeprofiler.c: ditto.
* id.c, id.h: added.
* inits.c: ditto.
* compile.c: rename internal functions.
* compile.h: fix debug flag.
* eval.c, object.c, vm.c: remove ruby_top_self.
use rb_vm_top_self() instead.
* eval_intern.h, eval_load: ditto.
* gc.c: rename yarv_machine_stack_mark() to
rb_gc_mark_machine_stack().
* insnhelper.h: remove unused macros.
* iseq.c: add iseq_compile() to create iseq object
from source string.
* proc.c: rename a internal function.
* template/insns.inc.tmpl: remove YARV prefix.
* thread.c:
* vm.c (rb_iseq_eval): added.
* vm.c: move some functions from yarvcore.c.
* vm_dump.c: fix to remove compiler warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 04:25:46 +00:00
ko1
302c311199
* hash.c (rb_hash_lookup): added. this function is similar to
...
rb_hash_aref(), but doesn't call Hash#default when no entry
exists.
* include/ruby/intern.h: ditto.
* insnhelper.ci (lfp_svar_get): use rb_hash_lookup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10 10:39:39 +00:00
ko1
bc1e2ab306
* eval.c, insnhelper.ci, vm.c: change cref index (-1 -> 2).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10 10:22:30 +00:00
ko1
a6e3d19f3a
* vm.c, insnhelper.ci: fix svar interface.
...
* compile.c (iseq_compile_each), yarvcore.h: fix to use new
svar interface for flip flop.
* eval.c: ditto.
* insns.def: ditto.
* include/ruby/intern.h: remove "rb_svar()" declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-10 08:04:52 +00:00
ko1
0ec2b20d2f
* parse.y: fix node construction (around f_margs).
...
[ruby-dev:31143]
* bootstraptest/test_block.rb: add a test for above.
* insnhelper.ci: fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-07 07:16:05 +00:00
ko1
0afe6cb08f
* insnhelper.ci (vm_yield_setup_args), vm.c, insns.def:
...
fix to pass nil as block parameter to yielded block.
[ruby-dev:31147]
* bootstraptest/test_block.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-07 06:34:40 +00:00
ko1
0d0ef6eccc
* yarvcore.h: rename rb_control_frame_t#magic to flag.
...
* vm.h: add VM_FRAME_TYPE() and VM_FRAME_FLAG().
* cont.c, insnhelper.ci, insns.def, vm.c, vm_dump.c,
vm_evalbody.ci, yarvcore.c: apply above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 10:49:45 +00:00
ko1
21b644e812
* insnhelper.ci (caller_setup_args): fix to show correct class
...
on an error message (ex: m(&1)). [ruby-dev:31101]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-03 19:59:59 +00:00
ko1
ee457d92c2
* compile.c: rename iseq_translate_direct_threaded_code()
...
to iseq_translate_threaded_code().
* eval_intern.h, yarvcore.h: mv EXEC_EVENT_HOOK() and
exec_event_hooks() to yarvcore.h.
* insnhelper.ci, vm.c: mv yarv_finish_insn_seq to vm.c.
* insns.def (opt_call_c_function): fix to use RESTORE_REGS().
* iseq.c (rb_iseq_build_for_ruby2cext): fix to allocate iseq.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-02 12:49:35 +00:00
ko1
27013e71e4
* yarvcore.h, compile.c, insnhelper.ci, iseq.c, vm.c:
...
rename structure names and field names.
* insnhelper.h, insns.def: add GET_CONST_INLINE_CACHE().
* iseq.c: add rb_iseq_build_for_ruby2cext().
* yarvcore.h, vm.h: move declaration of rb_insn_func_t
to yarvcore.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-01 18:16:02 +00:00
ko1
8bfcdf323f
* insnhelper.ci (vm_yield_with_cfunc), proc.c: fix Method#to_proc
...
to return lamba Proc ([ruby-dev:31021], [ruby-dev:31037]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 19:06:00 +00:00
ko1
ed4e57690c
* insnhelper.ci, vm.c: complete block parameter support.
...
post arguments, optional arguments, block argument.
* compile.c, parse.y: fix {|a|} parameter.
* insnshelper.ci, insns.def: revert caller_setup_args() option
(need_block_check) parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 16:05:17 +00:00
ko1
4bdb5ced9a
* gc.h: add RUBY_ prefix to debug macros.
...
* cont.c, proc.c, yarvcore.c,
* gc.c: define ruby_gc_debug_indent variable to debug mark/free.
* vm.c, insnhelper.ci: rename some functions to vm_* or rb_vm_*.
move some functions, definitions, declarations to suitable files.
* eval.c, yarvcore.h, eval_error.ci, insnhelper.ci: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 02:44:20 +00:00
ko1
144ff322c7
* insnhelper.ci (caller_setup_args): add need_block_check option.
...
* insns.def: ditto.
* yarvcore.h: add GetCoreDataFromValue().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 18:40:13 +00:00
ko1
7980e653e5
* call_cfunc.ci: removed.
...
* insnhelper.ci: added. this function includes all functions that
vm insns need.
* common.mk: ditto.
* insnhelper.h, vm.h, vm.c: move some declaration.
* gc.h: remove GC_CHECK() macro because GC.stress is more useful.
* compile.c, iseq.c, vm_dump: ditto.
* gc.h, thread.c: move a prototype decalaration.
* debug.c, debug.h: rename some functions.
* compile.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 17:19:22 +00:00