akr
2a4c4f7b0c
* include/ruby/intern.h: declare rb_hash_tbl.
...
* include/ruby/ruby.h (RHash): delay st_table allocation.
rename tbl field to ntbl to detect direct reference to the st_table
as a compile error.
(RHASH_TBL): abstract accessor defined.
(RHASH_ITER_LEV): ditto.
(RHASH_IFNONE): ditto.
(RHASH_SIZE): ditto.
(RHASH_EMPTY_P): ditto.
* hash.c: delay st_table allocation.
* gc.c: replace tbl by ntbl.
* array.c: replace direct field accessor by abstract field accessor
such as RHASH(hash)->tbl to RHASH_TBL(hash).
* marshal.c: ditto.
* insns.def: ditto.
* ext/iconv/iconv.c: ditto.
* ext/json/ext/generator/generator.c: ditto.
* ext/json/ext/parser/parser.c: ditto.
* ext/syck/rubyext.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:12:21 +00:00
ko1
5ba27573a0
* string.c, include/ruby/intern.h: export rb_str_length().
...
* insns.def: use rb_str_lengt() in opt_length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 08:54:29 +00:00
matz
a25fbe3b3e
* encoding.c: provide basic features for M17N.
...
* parse.y: encoding aware parsing.
* parse.y (pragma_encoding): encoding specification pragma.
* parse.y (rb_intern3): encoding specified symbols.
* string.c (rb_str_length): length based on characters.
for older behavior, bytesize method added.
* string.c (rb_str_index_m): index based on characters. rindex as
well.
* string.c (succ_char): encoding aware succeeding string.
* string.c (rb_str_reverse): reverse based on characters.
* string.c (rb_str_inspect): encoding aware string description.
* string.c (rb_str_upcase_bang): encoding aware case conversion.
downcase, capitalize, swapcase as well.
* string.c (rb_str_tr_bang): tr based on characters. delete,
squeeze, tr_s, count as well.
* string.c (rb_str_split_m): split based on characters.
* string.c (rb_str_each_line): encoding aware each_line.
* string.c (rb_str_each_char): added. iteration based on
characters.
* string.c (rb_str_strip_bang): encoding aware whitespace
stripping. lstrip, rstrip as well.
* string.c (rb_str_justify): encoding aware justifying (ljust,
rjust, center).
* string.c (str_encoding): get encoding attribute from a string.
* re.c (rb_reg_initialize): encoding aware regular expression
* sprintf.c (rb_str_format): formatting (i.e. length count) based
on characters.
* io.c (rb_io_getc): getc to return one-character string.
for older behavior, getbyte method added.
* ext/stringio/stringio.c (strio_getc): ditto.
* io.c (rb_io_ungetc): allow pushing arbitrary string at the
current reading point.
* ext/stringio/stringio.c (strio_ungetc): ditto.
* ext/strscan/strscan.c: encoding support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 03:29:39 +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
e7c3478261
* insns.def (throw): insert a RUBY_VM_CHECK_INTS(). [ruby-dev:31361]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16 16:24:18 +00:00
ko1
b1c5d848f8
* vm_dump.c (debug_print_pre): fix to show control frame count.
...
* insns.def (opt_call_c_function): fix operand type.
* lib/vm/instruction.rb: ditto.
* insnhelper.ci (vm_push_frame, vm_pop_frame): fix to show
control stack status on if VMDEBUG == 2.
* vm.h: add a comment about VMDEBUG.
* iseq.c (find_prev_line_no): fix to skip bug report if
line is not found.
* lib/vm/instruction.rb: fix to use build_string() on
source code generators.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-12 19:09:15 +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
nobu
c2b34e34cb
* insns.def (getspecial): lfp_svar_get() requires int for special
...
global variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15 22:17:31 +00:00
matz
716ad250e9
* insns.def (opt_div): FIX2NUM may not work for corner cases.
...
[ruby-dev:31210]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 17:08:12 +00:00
matz
0b0b62e9a4
* insns.def (opt_succ): use cast to shut a warning up.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13 08:42:27 +00:00
usa
d504f64a3b
* insns.def (opt_succ): use LONG_MAX as maximum Fixnum VALUE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 12:40:49 +00:00
akr
c13cd729bf
* range.c (range_max): use FIX2LONG instead of FIX2INT to avoid
...
RangeError by ((-0x80000001)...(-0x80000001)).max on LP64.
* insns.def (opt_plus): use FIX2LONG instead of FIX2INT to avoid
RangeError by 0x3fffffffffffffff+1 on LP64.
* insns.def (opt_succ): don't use 0x80000000 which assumes 32bit VALUE.
use FIX2LONG instead of FIX2INT.
[ruby-dev:31190]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 09:52:48 +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
nobu
2e601474e7
* insns.def (opt_succ): fixed typo. [ruby-dev:31189]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 03:24:31 +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
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
976bfae03b
* insns.def: remove unused code.
...
* compile.c (compile_massign): fix to invoke to_splat on
splat rhs (example: *a = *nil). [ruby-dev:31136]
* bootstraptest/test_massign.rb: add tests for above.
* compile.c (iseq_compile_each): disable excess optimization.
[ruby-dev:31126]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 18:16:54 +00:00
ko1
b9171a73c4
* insns.def: fix to invoke nil.to_splat on NODE_ARGSCAT.
...
[ruby-dev:31138].
* bootstraptest/test_literal.rb: add tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 17:11:45 +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
0bb4c2b3db
* compile.c (iseq_compile_each): add break catch point.
...
* insns.def (throw): support correct "break" and "return".
this commit achieve that "make test" passes all tests.
* vm.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05 10:04:56 +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
nobu
0a75feb94a
* insns.def (defineclass): suppress a warning.
...
* insns.def (opt_call_c_function): should raise the thrown exception
instead of returning it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-02 02:59:37 +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
eb9aaa4c4f
* vm.h: rename insn_func_type to rb_insn_func_type.
...
* vm_evalbody.ci: ditt.
* insns.def: add opt_call_native_compiled instruction
instead of opt_call_native_compiled.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-30 18:02:24 +00:00
ko1
c44e2cdd58
* vm_evalbody.ci: support OPT_CALL_THREADED_CODE.
...
* insns.def, vm.c, vm.h: ditto.
* vm.h: add VM_CFP_CNT() and VM_SP_CNT().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27 08:21:21 +00:00
ko1
30ab3f75f9
* compile.c (compile_massign), insns.def (expandarray): support
...
postarg with massign (a, *b, c = ...).
* bootstraptest/test_massign.rb: add tests for above.
* compile.h: fix debug macro names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26 18:56:15 +00:00
usa
c179584ba4
* include/ruby/ruby.h: IL32LLP64 support.
...
* bignum.c (bigfixize, rb_cstr_to_inum): ditto.
* insns.def (opt_plus, opt_minus, opt_mult): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26 06:23:34 +00:00
ko1
9315740101
* cont.c (rb_fiber_s_new): revert initializing VM stack.
...
* yarvcore.c (th_init2): ditto.
* vm.c, vm.h: fix to stop using Qundef on VM stack. According to
this change, VM stack should not include Qundef value.
* insns.def (putundef): removed.
* compile.c (iseq_compile_each): ditto.
* eval.c (eval): fix spacing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26 06:14:44 +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
61fa357622
* insns.def (invokesuper): fix error message.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 15:46:22 +00:00
ko1
97ba019c94
* vm.c: some refactoring.
...
* rename th_* to vm_*.
* remove unused variables functions.
* add prototypes.
* blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h,
eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y,
proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c,
vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 15:42:41 +00:00
ko1
62deb7dbbd
* insn_send.ci: removed.
...
* common.mk: ditto.
* vm.c (vm_call_bmethod), isnsn.def: added. fix to use this
function instead of using goto.
* vm.c (vm_call_bmethod): renamed from th_invoke_bmethod().
* vm.c (vm_method_missing): renamed from eval_methdo_missing().
* vm_evalbody.ci: remove tmp_* variables.
* insnhelper.h: add some macros.
* insns.def: forbid zsuper from method defined by define_method().
* test/ruby/test_super.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 13:05:51 +00:00
ko1
904b9e5d54
* vm_macro.def: removed.
...
* insn_send.ci: added. this file includes send instruction body.
* common.mk: ditto.
* insns.def: ditto.
* tool/insns2vm.rb: ditto.
* vm.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 11:02:40 +00:00
ko1
f2074245b4
* insns.def, vm.c: add/fix stack overflow check.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 08:55:17 +00:00
ko1
adc677eb5c
* insnhelper.h: change CHECK_STACK_OVERFLOW() to throw exception.
...
* vm.c (caller_setup_arg), vm_macro.def: remove
macro_eval_setup_send_arguments and add caller_setup_arg().
* insns.def: ditto.
* bootstraptest/test_method.rb: add splat arg tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 08:40:45 +00:00
ko1
5cbefb96b9
* insns.def(setconstant, toregexp): fix to mark object correctly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15 06:55:36 +00:00
ko1
6c5a50ff33
* insns.def (invokeblock): fix of splat argument.
...
(splat same as normal method dispatch)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 11:24:42 +00:00
usa
7e5b2304c5
* insns.def: fixed indentation.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 07:26:27 +00:00
usa
5f05c269e9
* insnhelper.h, insns.def (DEC_SP): shoudn't use unary minus operator
...
in pointer operation. some compilers (such as VC++8 x64) cannot deal
it with expected way.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 17:39:52 +00:00
ko1
203286673d
* insns.def (invokeblock): check block is created by lambda
...
or Proc.new.
* vm.c (block_proc_is_lambda): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 07:13:52 +00:00
usa
62872956b6
* insnhelper.h (INC_SP): shouldn't cast ``x'' to unsigned type because
...
it might be a negative value.
* insnhelper.h, insns.def: shoudn't use unary minus operator in index
operator. some compilers (such as VC++8 x64) cannot deal it with
expected way.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-01 04:05:46 +00:00
ko1
affa7430b7
* compile.c, vm_macro.def: support tail call optimization
...
(on default, this feature is not enabled).
* iseq.c, compile.c, vm_opts.h: add "tailcall_optimization"
option.
* sample/test.rb (test_ok): fix to adjust tailcall stack layout.
* insns.def, vm.c, compile.c, yarvcore.c, yarvcore.h:
add opt_gt, opt_le instructions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-21 04:46:51 +00:00
nobu
d942a9a1ee
* vm_evalbody.ci, insns.def, vm.c, tool/insns2vm.rb (rb_num_t):
...
renamed to get rid of name clash. [ruby-dev:30504]
* yarvcore.c (ruby_thread_init): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-03 09:09:14 +00:00
ko1
fba2420be4
* vm.c, yarvcore.h, yarvcore.c, insns.def: fix to mark VM stack
...
in correct range.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-02 09:59:38 +00:00
ko1
f53a94c831
* compile.c: use Qtrue instead of 2.
...
* vm.c, insns.def: support "lambda" calling convention.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-02 02:26:03 +00:00
ko1
75d28f8870
* yarvcore.h, compile.c (set_arguments): support post arguments.
...
* test/ruby/test_method.rb: add tests for above.
* test/ruby/test_proc.rb: ditto.
* proc.c: fix an arity bug ([ruby-core:11029]).
* vm.c, vm.h, insns.def, vm_dump.h: fix bmethod process.
* vm.c: support block argument on block parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-01 04:35:58 +00:00
ko1
a73894337a
* eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h:
...
support set_trace_func (incomplete. id and klass
don't be passed). And support Thread#set_trace_func
which hook only specified thread and Thread#add_trace_func
which add new trace func instead of replace old one.
C level API was modified. See thread.c (logic) and
yarvcore.h (data structures).
* vm.c, vm_macro.def: add hook points.
* compile.c, insns.def: fix "trace" instruction.
* iseq.c, vm_macro.h: add compile option "trace_instruction".
* test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19 10:37:08 +00:00
nobu
790999028d
* insns.def (throw), thread.c, yarvcore.h (throwed_errinfo): fixed
...
typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02 12:54:42 +00:00
ko1
8a1b1c2b41
* yarvcore.h, vm.h: rename th_invoke_yield() to th_yield().
...
* blockinlining.c: ditto.
* eval.c: ditto.
* vm.c, insns.def: rename th_invoke_yield_cfunc()
to th_yield_with_cfunc().
* yarvcore.h, yarvcore.c: rename theYarvVM to ruby_current_vm and
yarvCurrentThread to ruby_current_thread. remove yarvVMArray.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-26 22:51:33 +00:00
ko1
9987d53e51
* yarvcore.h: add rb_thread_t#top_wrapper, top_self.
...
* eval_load.c (rb_load): support eval in wrapper module
(load(file, true)).
* eval.c: ditto.
* eval_jump.h: ditto.
* iseq.c: ditto.
* vm.c: ditto.
* yarvcore.c: ditto.
* insns.def: add a empty line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25 16:29:26 +00:00
matz
b83ed6d1bd
* parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,
...
object.c, string.c, variable.c, vm_macro.def: revert private
instance variable feature, which is postponed until next major
release.
* marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to
8th version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 02:49:41 +00:00
ko1
8ee7d0767f
* blockinlining.c, compile.c, compile.h, error.c, eval.c,
...
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h,
eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c,
process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci,
vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def,
yarv.h, yarvcore.h, yarvcore.c: change type and macro names:
* yarv_*_t -> rb_*_t
* yarv_*_struct -> rb_*_struct
* yarv_tag -> rb_vm_tag
* YARV_* -> RUBY_VM_*
* proc.c, vm.c: move functions about env object creation
from proc.c to vm.c.
* proc.c, yarvcore.c: fix rb_cVM initialization place.
* inits.c: change Init_ISeq() order (after Init_VM).
* ruby.h, proc.c: change declaration place of rb_cEnv
from proc.c to ruby.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 19:00:03 +00:00
ko1
42ce75cdff
* compile.c, insns.def: remove (get|set)instancevariable2 and add a
...
operand is_local to (get|set)instancevariable.
* yarvtest/test_class.rb: add a test for class local instance variable.
* parse.y (rb_decompose_ivar2): remove unused variable oid.
* tool/insns2vm.rb: remove needless require.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 05:22:17 +00:00
matz
72f2d2a00d
* parse.y (rb_compose_ivar2): function to create a new ivar2
...
symbol from a symbol and a class. back-ported from matzruby.
* parse.y (rb_decompose_ivar2): reverse function of
rb_compose_ivar2().
* marshal.c (w_symbol): support class local instance variables.
* marshal.c (r_object0): ditto.
* compile.c (defined_expr): ditto.
* compile.c (iseq_compile_each): ditto.
* insns.def: add two new instructions: getinstancevariable2 and
setinstancevariable2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-04 19:17:33 +00:00
matz
71364da03f
* insns.def (setclassvariable): remove unnecessary operand.
...
* compile.c (iseq_compile_each): ditto.
* common.mk (insns_info.inc): add dependency for insns_info.inc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-04 19:15:38 +00:00
nobu
205f310c29
* call_cfunc.ci, compile.c, compile.h, debug.h, eval.c,
...
eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c,
insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y,
range.c, regenc.h, ruby.h, signal.c, thread.c, thread_win32.ci,
vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h:
fixed indents and non-C90 comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02 16:26:04 +00:00
matz
e137ee9ac4
* insns.def (setclassvariable): remove warn argument.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02 09:45:19 +00:00
ko1
ca46eab090
* vm.c (eval_search_super_klass): rename to search_super_klass() and
...
use it by th_call_super().
* insns.def: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-16 08:52:22 +00:00
ko1
ad4213d6fe
* insns.def (send) : fix to optimize send() with Symbol.
...
* yarvtest/test_method.rb : add another test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-06 04:48:11 +00:00
ko1
ce55b4c0e0
* insns.def : support direct method dispatch with "send" or "funcall".
...
This means that "obj.send :m" skips "BasicObject#send" invocation
(method frame creation, etc) and "obj.m" invokes directly.
If you make backtrace, there are no enties of "send" method.
* compile.c (iseq_specialized_instruction) : fix to support above
* eval.c : ditto (remove "static" from rb_f_send and rb_f_funcall
* yarvcore.c : ditto (add a external IDs for compiler)
* yarvcore.h : ditto (add a VM_CALL_SEND_BIT macro)
* yarvtest/test_method.rb : add tests for above changes
* eval.c : remove unused "Kernel#send" declaration
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-06 00:24:59 +00:00
ko1
ed9d4087f6
* compile.c, compile.h : add ADD_CALL_RECEIVER() macro.
...
* insns.def (send) : use GET_SELF() direct if FCALL.
* eval.c (rb_f_send) : check method dispatch type to permit
nvoking private method when dispatch type is FCALL/VCALL
* insns.def (opt_ltlt) : remove useless statement.
* vm.h : remove unused macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-05 12:00:08 +00:00
ko1
a3e1b1ce7e
* Merge YARV
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 15:02:22 +00:00