Граф коммитов

134 Коммитов

Автор SHA1 Сообщение Дата
normal 2c80c9495e rb_parser_compile_*: remove volatile arg
RB_GC_GUARD is sufficient to prevent tail call optimization from
making the object invisible from GC., and we don't need to
encourage more volatile usage.

* parse.y (rb_parser_compile_cstr): remove volatile arg
  (rb_parser_compile_string): ditto
  (rb_parser_compile_file): ditto
  (rb_parser_compile_string_path): ditto
  (rb_parser_compile_file_path): ditto
  [ruby-core:70323] [Misc #11431]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-11 20:35:12 +00:00
ko1 724012a23d * internal.h, node.h: move a definition of `struct rb_global_entry'
and related functions from node.h to internal.h.
* variable.c: remove unused include pragma.
* common.mk: remove unused dependency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12 01:55:58 +00:00
ko1 08f3cfb585 * internal.h: use T_IMEMO to represent `struct MEMO' value.
memo->v1 and memo->v2 is WB protected values.
  So use MEMO_V1/V2_SET() macros to set these values.
  memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer
  value), so use gc_mark_maybe() in gc.c to mark it.
  Rename NEW_MEMO() to MEMO_NEW().
  Move MEMO_FOR and NEW_MEMO_FOF macros from node.h.
  Export a rb_imemo_new() function for ext/ripper.
* node.h: remove NODE_MEMO.
* enum.c: catch up these change.
* enumerator.c: ditto.
* load.c: ditto.
* ext/objspace/objspace.c (count_nodes): ditto.
* gc.c (gc_mark_children): mark imemo_memo type.
* parse.y (new_args_gen): use T_IMEMO.
  (I'm not sure it is working correctly...)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 23:13:01 +00:00
ko1 7790f37efd * node.h: remove NODE_IFUNC, NEW_IFUNC.
* internal.h: use T_IMEMO for IFUNC.
  rename `struct IFUNC' to `struct vm_ifunc' and move the definition
  from vm_insnhelper.h. Add imemo_ifunc.
* gc.c (gc_mark_children): mark imemo_ifunc type T_IMEMO object.
* compile.c: catch up these changes.
* proc.c: ditto.
* vm_core.h (RUBY_VM_IFUNC_P): ditto.
* vm_eval.c (rb_iterate): ditto.
* vm_insnhelper.c: ditto.
* ext/objspace/objspace.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 13:31:11 +00:00
ko1 0952b43b9b * include/ruby/ruby.h: introduce new type T_IMEMO.
T_IMEMO is Internal Memo type, internal use only.
  T_IMEMO has same purpose of NODE_MEMO.
  To insert T_IMEMO, type numbers are modified a little.
* internal.h: define struct RIMemo. Each RIMemo objects
  has imemo_type. We can observe it by the imemo_type() function.
* gc.c (rb_imemo_new): added.
* node.h: remove NODE_CREF and NEW_CREF().
* node.c (rb_gc_mark_node): ditto.
* vm.c (vm_cref_new): use rb_imem_new().
* vm_eval.c: ditto.
* vm_eval.c (eval_string_with_cref):
* vm_eval.c (rb_type_str):
* vm_insnhelper.c: use RIMemo objects for CREF.
* ext/objspace/objspace.c: support T_IMEMO.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 10:36:17 +00:00
ko1 97e21517a3 * internal.h: define struct MEMO.
* enum.c: use MEMO.
* enumerator.c: ditto.
* load.c: ditto.
* node.h: return (struct MEMO *) pointer.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 00:20:45 +00:00
ko1 8dced4d2c0 * internal.h: define rb_cref_t and change to use it.
rb_cref_t is data type of CREF. Now, the body is still NODE.
  It is easy to understand what is CREF and what is pure NODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 21:22:43 +00:00
ko1 ae166317a4 * internal.h: define CREF accessor macros.
* CREF_CLASS(cref)
  * CREF_NEXT(cref)
  * CREF_VISI(cref)
  * CREF_VISI_SET(cref, v)
  * CREF_REFINEMENTS(cref)
  * CREF_PUSHED_BY_EVAL(cref)
  * CREF_PUSHED_BY_EVAL_SET(cref)
  * CREF_OMOD_SHARED(cref)
  * CREF_OMOD_SHARED_SET(cref)
  * CREF_OMOD_SHARED_UNSET(cref)
  This is process to change CREF data type from NODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08 19:50:37 +00:00
akr 1efb3c31b7 * Avoid undefined behaviors found by gcc -fsanitize=undefined.
gcc (Debian 4.9.1-16) 4.9.1

* include/ruby/ruby.h (INT2FIX): Avoid undefined behavior.

* node.h (nd_set_line): Ditto.

* pack.c (encodes): Ditto.
  (pack_unpack): Ditto.

* regint.h (BIT_STATUS_AT): Ditto.
  (BS_BIT): Ditto.

* time.c (time_mdump): Ditto.
  (time_mload): Ditto.

* vm_core.h (VM_FRAME_MAGIC_MASK): Ditto.

* vm_trace.c (recalc_add_ruby_vm_event_flags): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-17 08:50:01 +00:00
nobu a669514e63 node.h: extract NODE functions from gc.c
* node.h (rb_gc_free_node, rb_node_memsize, rb_gc_mark_node):
  extract functions for NODE from obj_free(), obj_memsize_of(),
  gc_mark_children() in gc.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-16 01:53:10 +00:00
ko1 b5e89e44f1 * array.c (rb_ary_tmp_new): added.
This function creates internal use only array (which is completely
  hided by ObjectSpace.each_object) with filling nil.
  Otherwise, it can be incldues strange VALUEs.
* internal.h: added.
* node.h: use rb_ary_tmp_new_fill() for MEMO.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-15 10:32:58 +00:00
nobu fd8b254705 node.h: remove NODE_PRIVATE_RECV
* compile.c (private_recv_p): check by node type, instead of a
  magic number.
* node.h (NODE_PRIVATE_RECV), parse.y (attrset_gen): remove

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-06 13:19:31 +00:00
nobu bb3f036336 node.h: NODE_PRIVATE_RECV
* node.h (NODE_PRIVATE_RECV): name a magic number, `self` as the
  receiver of a setter method call.

* compile.c (private_recv_p), parse.y (attr_receiver): use the
  named macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-06 06:05:19 +00:00
ko1 30456e9607 * node.h: catch up comments for last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 15:06:14 +00:00
nobu aa2a845168 parse.y, vm_eval.c: file encoding in eval
* parse.y (yycompile): store file name as String to keep the encoding.

* parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
  new functions to pass file name as a String.

* parse.y (gettable_gen): return a copy of the original file name, not
  a copy in filesystem encoding.

* vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29 08:00:34 +00:00
ko1 4f401816ff * gc.c: support RGENGC. [ruby-trunk - Feature #8339]
See this ticet about RGENGC.
* gc.c: Add several flags:
* RGENGC_DEBUG: if >0, then prints debug information.
* RGENGC_CHECK_MODE: if >0, add assertions.
* RGENGC_PROFILE: if >0, add profiling features.
  check GC.stat and GC::Profiler.
* include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0).
* array.c: add write barriers for T_ARRAY and generate sunny objects.
* include/ruby/ruby.h (RARRAY_PTR_USE): added. Use this macro if
  you want to access raw pointers. If you modify the contents which
  pointer pointed, then you need to care write barrier.
* bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects.
* complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX
  and generate sunny objects.
* rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write
  barriers for T_RATIONAL and generate sunny objects.
* internal.h: add write barriers for RBasic::klass.
* numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects.
* object.c (rb_class_allocate_instance), range.c:
  generate sunny T_OBJECT objects.
* string.c: add write barriers for T_STRING and generate sunny objects.
* variable.c: add write barriers for ivars.
* vm_insnhelper.c (vm_setivar): ditto.
* include/ruby/ruby.h, debug.c: use two flags
  FL_WB_PROTECTED and FL_OLDGEN.
* node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED):
  move flag bits.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13 18:07:47 +00:00
nobu bff997e02b defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}
* 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
2013-04-05 10:29:38 +00:00
nobu 7ea675732a scoped constant op-assignment
* node.h (NODE_OP_CDECL), compile.c (iseq_compile_each),
  parse.y (stmt, arg): allow scoped constant op-assignment.
  [ruby-core:40154] [Bug #5449]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24 15:59:31 +00:00
shugo e028d3d905 * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
vm_method.c: rename omod and overlaid modules to refinements.

* eval.c (hidden_identity_hash_new): renamed from identity_hash_new.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 14:02:46 +00:00
ko1 e3990633cb * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
* compile.c (iseq_compile_each): ditto.
* node.h: remove unused node `NODE_OPTBLOCK'.
* ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 06:44:24 +00:00
shugo 19ddfc2483 * eval.c (rb_mod_using): new method Module#using. [experimental]
* eval.c (rb_mod_refine): new method Module#refine. [experimental]

* eval.c (f_using): new method Kernel#using. [experimental]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-02 11:34:19 +00:00
shugo 0b35e9e5dd * enumerator.c (lazy_take): add Enumerable::Lazy#take.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-14 10:29:25 +00:00
nobu c5feeb9ac1 * node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
has been already obsolete.  patch by Thomas Enebo.
  [ruby-core:41929][Bug #5847]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-12 05:56:57 +00:00
nari 50675fdba1 * gc.c: use Bitmap Marking algorithm to avoid copy-on-write of
memory pages. See [ruby-dev:45085] [Feature #5839]
  [ruby-core:41916].

* include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1.

* node.h : ditto.

* debug.c : ditto.

* object.c (rb_obj_clone): FL_MARK move to a bitmap.

* class.c (rb_singleton_class_clone): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-07 14:02:23 +00:00
nobu 731e45216a * node.h (rb_args_info): change pre_args_num and post_args_num as
int, to match with rb_iseq_t.
* parse.y (new_args_gen): check overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-27 12:17:36 +00:00
mame 1ab3974b0e * node.h, node.c, parse.y: implement a parser part for keyword arguments. This is a preparation for keyword argument (see [ruby-core:40290]).
* gc.c (gc_mark_children): bookkeeping.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-26 14:20:03 +00:00
mame afb10c62c2 * node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use struct rb_args_info instead of NODEs. This is a preparation for keyword argument (see [ruby-core:40290]).
* node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-26 14:19:58 +00:00
mame 90b1afa310 * node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack. This is a preparation for keyword argument (see [ruby-core:40290]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-26 14:19:52 +00:00
akr e7996eb3cc * internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.

* iseq.h: declare rb_iseq_t dependent internal functions here.

* vm_core.h: declare rb_thread_t dependent internal functions here.

* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
  iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
  proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
  thread.c, time.c, transcode.c, variable.c, vm.c,
  tool/compile_prelude.rb: don't declare internal functions declared
  in above headers.  include above headers if required.

  Note that rb_thread_mark() was declared as
  void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
  void rb_thread_mark(void *ptr) in vm.c.  Now it is declared as
  the later in internal.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 22:43:38 +00:00
akr 6bc1937653 * node.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20 14:59:59 +00:00
nobu 698fe540b9 * node.h (RNode): match the type of flags to RBasic, and renamed
nd_file as nd_reserved.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-15 23:04:50 +00:00
nobu 3bf1afbdd8 * include/ruby/intern.h (rb_make_backtrace, rb_make_exception):
used in ripper.

* node.h (rb_parser_{malloc,realloc,calloc,free}): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 04:20:59 +00:00
nobu 2b1f8574c7 * include/ruby/encoding.h (rb_char_to_option_kcode): used in
ripper.

* node.h (rb_reserved_word): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 20:58:11 +00:00
shyouhei 988b2ae95e reverted revision r28961; which breaks test-all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 07:04:46 +00:00
nobu 676d0641d8 * node.h (rb_parser_{get,set}_yydebug): used in ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 03:18:03 +00:00
muraken e4d8dc5c46 * bignum.c, node.h, strftime.c, enc/trans/utf8_mac.trans: added explicit casts for supplessing warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-25 03:08:28 +00:00
shugo 7dbfe89630 * compile.c (compile_cpath, iseq_compile_each): reverted
constant/class variable lookup in instance_eval etc. to the
  behavior of 1.8.
* eval.c (rb_mod_nesting): ditto.
* insns.def (putspecialobject, defineclass): ditto.
* node.h (NODE_FL_CREF_PUSHED_BY_EVAL): ditto.
* vm_core.h (VM_SPECIAL_OBJECT_CONST_BASE): ditto.
* vm_eval.c (yield_under, eval_under): ditto.
* vm_insnhelper.c (vm_cref_push, vm_get_const_base,
  vm_get_ev_const, vm_get_cvar_base): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-03 18:25:57 +00:00
nobu 4f041dafbe * debug.c, parse.y: fixed types.
* node.h (nd_line): limit to int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-14 07:39:16 +00:00
nari de5f15bbe4 * gc.c: reject unused longlife gc.
* debug.c: ditto.

* include/ruby/intern.h: ditto.

* include/ruby/ruby.h: ditto.

* iseq.c: ditto.

* node.h: ditto.

* vm_insnhelper.c: ditto.

* vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10 02:40:34 +00:00
ko1 94664d6d0c * node.h, vm_core.h, variable.c: rename global_entry to rb_global_entry.
* compile.c, insns.def, iseq.c, vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16 00:01:06 +00:00
ko1 c330876d7c * method.h, vm_core.h: add rb_method_entry_t. Remove nodes around
method management.  This change affect some VM control stack structure.
* vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto.  and make some
  refactoring.
* insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto.
* vm_core.h, compile.c (iseq_specialized_instruction): remove
  VM_CALL_SEND_BIT.  use another optimization tech for Kernel#send.
* node.h: remove unused node types.
* ext/objspace/objspace.c (count_nodes): ditto.
* gc.c: add mark/free functions for method entry.
* include/ruby/intern.h: remove decl of
  rb_define_notimplement_method_id().  nobody can use it
  because noex is not opend.
* iseq.c (iseq_mark): fix to check ic_method is available.
* iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15 14:59:41 +00:00
nobu cf125a912a * node.h (nd_line): NODE_LMASK is not needed.
* node.h (NOEX_SAFE): made int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-17 09:59:48 +00:00
nari 57b83a5191 * gc.c: add longlife garbage collection. [ruby-dev:38423]
(NORMAL_HEAPS_USED): new macro.
  (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto.
  (add_longlife_heaps_slot): new function.
  (rb_newobj_from_longlife_heap): ditto.
  (rb_newobj_longlife): ditto.
  (rb_node_newnode_longlife): ditto.
  (rb_gc_write_barrier): ditto.
  (remembered_set_recycle): ditto.
  (rb_gc_mark_remembered_set): ditto.
  (clear_mark_longlife_heaps): ditto.
  (gc_sweep_for_longlife): ditto.
  (assign_heap_slot): new argumnent to longlife heaps slot.
  (add_freelist): ditto.
  (gc_sweep): avoid lonlife heap slot. set longlife_collection
   flag at add heap.
  (rb_gc_force_recycle): avoid mark object and remembered_set
   object.
  (garbage_collect): add longlife collection.
  (rb_gc_start): invoke longlife collection.
  (gc_profile_record_get): for longlife collction profile.
  (gc_profile_result): ditto.

* include/ruby/intern.h (rb_gc_write_barrier): declared.

* include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED.

* debug.c (FL_REMEMBERED_SET): ditto.

* insns.def (setinlinecache): insert write barrier.

* vm_insnhelper.c (vm_method_search): ditto.

* set_relation (set_relation): use longlife object.

* vm.c (vm_define_method): ditto.

* vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto.

* vm_method.c (rb_add_method): ditto.

* class.c (rb_add_method): ditto.

* node.h (NEW_NODE_LONGLIFE): new macro.
  (rb_node_newnode_longlife): declared.
					    


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13 14:08:26 +00:00
akr 8e8ae2a9c5 * node.h (rb_notimplement_body_p): declared.
* vm_method.c (Init_eval_method): suppress a warning.

* io.c (rb_io_fsync): use rb_f_notimplement if not implemented.
  (rb_io_close_on_exec_p): ditto.
  (rb_io_set_close_on_exec): ditto.
  (rb_io_fcntl): ditto.
  (rb_f_syscall): ditto.

* dir.c (dir_tell): ditto.
  (dir_seek): ditto.
  (dir_s_chroot): ditto.

* process.c (proc_getpgrp): ditto.
  (proc_setpgrp): ditto.
  (proc_getpgid): ditto.
  (proc_setpgid): ditto.
  (proc_setsid): ditto.
  (proc_getpriority): ditto.
  (proc_setpriority): ditto.
  (proc_getrlimit): ditto.
  (proc_setrlimit): ditto.
  (p_sys_setuid): ditto.
  (p_sys_setruid): ditto.
  (p_sys_seteuid): ditto.
  (p_sys_setreuid): ditto.
  (p_sys_setresuid): ditto.
  (p_sys_setgid): ditto.
  (p_sys_setrgid): ditto.
  (p_sys_setegid): ditto.
  (p_sys_setregid): ditto.
  (p_sys_setreuid): ditto.
  (p_sys_setresgid): ditto.
  (p_sys_issetugid): ditto.
  (proc_getgroups): ditto.
  (proc_setgroups): ditto.
  (proc_initgroups): ditto.
  (proc_daemon): ditto.
  (rb_proc_times): ditto.

* file.c (rb_file_s_lchown): ditto.
  (rb_file_s_link): ditto.
  (rb_file_s_symlink): ditto.
  (rb_file_s_readlink): ditto.
  (rb_file_s_truncate): ditto.
  (rb_file_truncate): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16 16:58:06 +00:00
matz b44d5711e8 * node.h (NOEX_MODFUNC): should be include NOEX_PRIVATE.
[ruby-dev:37124]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-19 05:15:44 +00:00
ko1 2e311f6bd5 * include/ruby/node.h, node.h: move node.h from include path.
This change stop to install node.h beacuase of saving ABI
  (node.h will be changed. Extensions should not depends on
  this file).
* blockinlining.c, class.c, compile.c, debug.h, enum.c,
  gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c,
  vm.c, vm_core.h, vm_dump.c: ditto.
* ext/ripper/depend: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 19:52:31 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +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
ko1 bb7a2d40ff * compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,
proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h,
  debug.c, debug.h: merge half-baked-1.9 changes.  The biggest change
  is to change node structure around NODE_SCOPE, NODE_ARGS.  Every
  scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS
  represents more details of arguments information.  I'll write a
  document about detail of node structure.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21 11:15:15 +00:00
ko1 0fe72040e4 * parse.y, node.h, compile.c: change node tree structure. a purpose
of this change is to unify argument structure of method and block.
  this change prohibits duplicate block parameter name.
  new argument infromation:
  NODE_ARGS     [m: int, o: NODE_OPT_ARG, ->]
  NODE_ARGS_AUX [r: ID, b: ID, ->]
  NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*]
  optarg information:
  NODE_OPT_ARGS [idx, expr, ->]
* vm_macro.def: ditto.
* gc.c: ditto.
* iseq.c: ditto.
* compile.h: fix debug function name.
* test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo|
* test/ruby/test_lambda.rb: disalbe test temporarily.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 02:07:05 +00:00