aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
Commit message (Collapse)AuthorAgeFilesLines
* * enum.c (inject_i): use rb_yield_values.matz2003-08-221-2/+2
| | | | | | | | | | | * enum.c (each_with_index_i): ditto. * eval.c (rb_yield_splat): new function to call "yield *values". * string.c (rb_str_scan): use rb_yield_splat(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (id2ref): recycle check should be done by klass == 0.matz2003-08-141-1/+1
| | | | | | | | | | | | | | | | | | | [ruby-core:01408] * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. * parse.y (lhs): ditto. * parse.y (yylex): should return tCOLON3 right after kCLASS. [ruby-talk:78918] * error.c (exc_initialize): was converting argument to string too eagerly. Only check was needed. [ruby-talk:78958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_data_object_alloc): check type of 1st argument.usa2003-08-141-0/+1
| | | | | | | [ruby-dev:21192] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call0): update ruby_class as well as ruby_cref.matz2003-08-061-2/+0
| | | | | | | | | | | | (ruby-bugs-ja PR#540) * eval.c (rb_yield_0): remove ruby_frame->cbase and unify to ruby_cref. [ruby-talk:78141] * eval.c: initialize /* OK */ variables by Qnil to stop warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: FreeBSD/ia64's mcontext_t is a bit different from that ofknu2003-08-061-0/+4
| | | | | | | | Linux/ia64. This makes gc.c compile but miniruby coredumps for the moment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add "#pragma weak" for __libc_ia64_register_backing_store_base.matz2003-08-021-0/+1
| | | | | | | [ruby-dev:21072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_mark_locations): no need to swap arguments.nobu2003-08-011-11/+6
| | | | | | | | | | * gc.c (STACK_LENGTH): insufficient for growing up stack architectures. * gc.c (rb_gc, Init_stack) ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc): typo.matz2003-08-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/syck/rubyext.c (syck_emitter_write_m): forgot to declarematz2003-08-011-3/+22
| | | | | | | | | | | "self", making it default to "int". * ext/syck/rubyext.c (syck_emitter_simple_write): ditto. * gc.c (rb_gc): should mark backing store region on IA64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (Init_stack): wrong magic number.matz2003-07-311-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (Init_stack): IA64 requires STACK_LEVEL_MAX to be less thanmatz2003-07-311-0/+8
| | | | | | | | magic number when optimizer turned on, regardless of rlimit values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz2003-07-251-2/+2
| | | | | | | | | uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gcc -Wall clean-up.matz2003-07-241-9/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (run_final): backout unnecessary modifies.matz2003-07-241-10/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (thgroup_add): no warning for terminated threads.matz2003-07-241-3/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_by_class): check both klass and origin.matz2003-07-171-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_init): set ruby_running to true aftermatz2003-07-171-0/+1
| | | | | | | initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): k->super maybe NULL if klass is Kernel.matz2003-07-071-0/+1
| | | | | | | | | | | | [ruby-dev:20519] * gc.c (obj_free): clear method cache when freeing class/module. * eval.c (rb_mod_remove_method): allow "remove_method" to accept multiple arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (rb_cv_stack_grow_dir): check stack growing direction.nobu2003-06-281-24/+37
| | | | | | | | | | | | | | | * eval.c (rb_thread_restore_context): prior configuration macro. * gc.c (ruby_stack_length): always return the address of lower edge. * gc.c (rb_gc_mark_locations): remove margin. [ruby-dev:20462] * gc.c (rb_gc, Init_stack): prior configuration macro. * gc.c (Init_stack): add safety margin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz2003-06-161-1/+1
| | | | | | | class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (value_expr0): class and module statements should not bematz2003-06-071-4/+4
| | | | | | | | | | | | | | | | | warned for "void value expression". [ruby-talk:72989] * gc.c (add_final): should determine type by respond_to? * gc.c (define_final): ditto. * io.c (rb_io_ctl): should not depend on respond_to? * range.c (range_step): rb_check_string_type(). * process.c (proc_setgroups): new functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (define_final): eliminate rb_f_lambda() call.matz2003-06-061-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * class.c (rb_scan_args): ditto. * signal.c (sig_trap): ditto. * hash.c (rb_hash_initialize): ditto. * variable.c (rb_f_trace_var): ditto. * ext/dl/dl.c (rb_dl_callback): ditto. * ext/win32ole/win32ole.c (ev_on_event): ditto. * eval.c (ruby_cleanup): $SAFE is turned off in the finalization. Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.matz2003-05-221-3/+4
| | | | | | | | | | [ruby-dev:20272] * marshal.c: try to make ArgumentError and TypeError consistent. [ruby-core:01068] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (syserr_initialize): prohibit specifying errno formatz2003-05-211-0/+2
| | | | | | | | | | | | subclasses of SystemCallError. in addition, if initialize is called for SystenCallError instance, its class be changed. [ruby-dev:20257] * gc.c (run_final): to protect thread context switch, finalizers are wrapped in DEFER_INTS/ENABLE_INTS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc): check odd alignment stack on m68k machines.matz2003-05-081-1/+1
| | | | | | | * numeric.c (num_step): better error treatment of float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: STACK_LEVEL_MAX=65535 on mswince.uema22003-04-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc): use rb_gc_mark_maybe() to mark registered Cmatz2003-04-211-1/+1
| | | | | | | | addresses. C variables may not hold valid reference to Ruby objects. [ruby-core:00975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_mark_children): introduce this function again; thismatz2003-04-091-25/+35
| | | | | | | is required when stack was very tight. [ruby-talk:68916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (BIGZEROP): macro to determine if x is a bignum zero.matz2003-04-091-17/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (avalue_splat): new function to do unary * (splat)matz2003-03-261-0/+3
| | | | | | | | | | | | | | | | | | | operator. * eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do not use implicit "to_ary" conversion. * ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check. * ext/curses/curses.c (curses_init_screen): ditto. * ext/curses/curses.c (window_initialize): ditto. * gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe mode ($SAFE >= 4). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_call_finalizer_at_exit): use free() if dfree is -1.nobu2003-03-231-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_new): need no MEMZERO().matz2003-02-271-2/+25
| | | | | | | | | | | | * numeric.c (fix_gt): use rb_num_coerce_cmp() instead of rb_num_coerce_bin. * numeric.c (fix_ge, fix_lt, fix_le): ditto. * numeric.c (flo_gt, flo_ge, flo_lt, flo_le): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_mark): inline rb_gc_mark_children().matz2003-02-211-50/+41
| | | | | | | * gc.c (gc_sweep): new tactics to increase malloc_limit mildly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (clhs): allow "Foo::Bar = x".matz2003-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | * parse.y (primary): "self[n]=x" can be legal even when "[]=" is private. changes submitted in [ruby-talk:63982] * parse.y (aryset): ditto. * parse.y (attrset): "self.foo=x" can be legal even when "foo=" is private. * eval.c (is_defined): private "[]=" and "foo=" support. * eval.c (rb_eval): ditto. * eval.c (assign): ditto. * eval.c (rb_eval): "foo=" should not always be public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (nd_cpath): nested class/module declaration.nobu2003-02-191-2/+2
| | | | | | | | | | | | | [EXPREIMENTAL] * eval.c (rb_eval): ditto. * gc.c (rb_gc_mark_children): ditto. * parse.y (cpath): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_obj_classname): new function.matz2003-01-311-2/+2
| | | | | | | | | | | | * string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -Wall cleanups (removed unused vars, no 'code has no effect' warnings)michal2003-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Updated Copyrights of Matz to 2003.michal2003-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.h, st.c: Introduce new conventional typedef's, st_data_t,knu2003-01-061-3/+3
| | | | | | | | | | | | | | | | | st_compare_func_t, st_hash_func_t and st_each_func_t. * st.h, st.c: Do explicit function declarations and do not rely on implicit declarations. On such platforms as IA64, int argument values are NOT automatically promoted to long (64bit) values, so explicit declarations are mandatory for those functions that take long values or pointers. This fixes miniruby's coredump on FreeBSD/IA64. * class.c, eval.c, gc.c, hash.c, marshal.c, parse.y, variable.c: Add proper casts to avoid warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call anknu2003-01-041-1/+1
| | | | | | | | | | | | inline function instead so it can be used as an expression. * eval.c (EXEC_TAG, THREAD_SAVE_CONTEXT): Consistently call FLUSH_REGISTER_WINDOWS before calling setjmp(). (I suspect that every setjmp() implementation should take care of register windows, though) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_mark_frame): should mark frame->node.matz2002-12-311-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_sweep): adjust GC trigger.nobu2002-12-291-28/+5
| | | | | | | | | | | | | | * dln.c (init_funcname_len): get rid of gcc-3 -O3 warning. * eval.c (copy_node_scope): ditto. * hash.c (rb_hash_foreach, delete_if_i, select_i, each_value_i, each_key_i, each_pair_i, envix): ditto. * range.c (range_each_func): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (copy_object): copy finalizers as well if any.matz2002-12-041-0/+16
| | | | | | | * gc.c (rb_gc_copy_finalizer): new function to copy finalizers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,knu2002-10-291-4/+4
| | | | | | | | ext/socket/socket.c: differentiate long and int; use proper printf type specifiers and do casts where appropriate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, gc.c: adopt a common set of alloca() #ifdef's. Thisknu2002-10-251-6/+12
| | | | | | | | | | fixes the build with Intel C Compiler for Linux. * eval.c (rb_f_require): declare old_func with a real type, not just type modifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_str_to_dbl): RString ptr might be NULL.matz2002-10-171-1/+1
| | | | | | | | | | | * object.c (rb_cstr_to_dbl): p pointer might be NULL. * bignum.c (rb_str_to_inum): RString ptr might be NULL. * bignum.c (rb_cstr_to_inum): str pointer might be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rename malloc_memories to malloc_increase. [ruby-cvs:05237]nobu2002-10-101-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use BUITIN_TYPE() rather than TYPE().nobu2002-10-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (ruby_xmalloc, ruby_xrealloc): restrict total allocationnobu2002-10-101-0/+53
| | | | | | | | | | size according to memories consumed by live objects. [ruby-dev:18482] * gc.c (gc_sweep): estimate how live objects consume memories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_sweep): also adjust heaps_limits when free unused heapnobu2002-10-091-0/+1
| | | | | | | | | | | page. [ruby-core:00526] * io.c (io_fflush): condition to retry can occur. * io.c (io_write): returned 0 wrongly if no error occurred. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e