summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
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
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gc.c (run_final): backout unnecessary modifies.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* eval.c (thgroup_add): no warning for terminated threads.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (rb_clear_cache_by_class): check both klass and origin.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17* eval.c (ruby_init): set ruby_running to true aftermatz
initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-07* eval.c (rb_call_super): k->super maybe NULL if klass is Kernel.matz
[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
2003-06-28* configure.in (rb_cv_stack_grow_dir): check stack growing direction.nobu
* 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
2003-06-16* eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz
class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07* parse.y (value_expr0): class and module statements should not bematz
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
2003-06-06* gc.c (define_final): eliminate rb_f_lambda() call.matz
* 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
2003-05-22* gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.matz
[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
2003-05-21* error.c (syserr_initialize): prohibit specifying errno formatz
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
2003-05-08* gc.c (rb_gc): check odd alignment stack on m68k machines.matz
* 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
2003-04-25* gc.c: STACK_LEVEL_MAX=65535 on mswince.uema2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-21* gc.c (rb_gc): use rb_gc_mark_maybe() to mark registered Cmatz
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
2003-04-09* gc.c (rb_gc_mark_children): introduce this function again; thismatz
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
2003-04-09* bignum.c (BIGZEROP): macro to determine if x is a bignum zero.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-26* eval.c (avalue_splat): new function to do unary * (splat)matz
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
2003-03-23* gc.c (rb_gc_call_finalizer_at_exit): use free() if dfree is -1.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-27* string.c (str_new): need no MEMZERO().matz
* 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
2003-02-21* gc.c (rb_gc_mark): inline rb_gc_mark_children().matz
* 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
2003-02-20* parse.y (clhs): allow "Foo::Bar = x".matz
* 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
2003-02-19* node.h (nd_cpath): nested class/module declaration.nobu
[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
2003-01-31* variable.c (rb_obj_classname): new function.matz
* 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
2003-01-16-Wall cleanups (removed unused vars, no 'code has no effect' warnings)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06* st.h, st.c: Introduce new conventional typedef's, st_data_t,knu
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
2003-01-04* defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call anknu
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
2002-12-31* gc.c (rb_gc_mark_frame): should mark frame->node.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29* gc.c (gc_sweep): adjust GC trigger.nobu
* 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
2002-12-04* object.c (copy_object): copy finalizers as well if any.matz
* 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
2002-10-29* eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,knu
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
2002-10-25* eval.c, gc.c: adopt a common set of alloca() #ifdef's. Thisknu
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
2002-10-17* object.c (rb_str_to_dbl): RString ptr might be NULL.matz
* 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
2002-10-10rename malloc_memories to malloc_increase. [ruby-cvs:05237]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10use BUITIN_TYPE() rather than TYPE().nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-10* gc.c (ruby_xmalloc, ruby_xrealloc): restrict total allocationnobu
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
2002-10-09* gc.c (gc_sweep): also adjust heaps_limits when free unused heapnobu
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
2002-10-03* gc.c (Init_stack): prefer address of argument rather than localnobu
variable to initialize rb_gc_stack_start. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02* commit miss; and tcltklib fix too.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-06* gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequentmatz
garabage collection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05* gc.c (gc_sweep): should mark parser.aamine
* parse.y (rb_gc_mark_parser): new function. * intern.h (rb_gc_mark_parser): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04Opt for Array in rb_gc_mark_children() (ruby-core:410)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-02* gc.c (gc_sweep): does reclaim nodes in also compile time, if we can.aamine
* ruby.c (load_file): omit GC if we can. * parse.y (ruby_parser_stack_on_heap): new function. * intern.h (ruby_parser_stack_on_heap): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29* array.c (rb_ary_become): should not free ptr if it's shared.matz
* eval.c (rb_alias): prohibit making an alias named "allocate" if klass is a metaclass. * string.c (rb_string_value_ptr): StringValuePtr() should never return NULL pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28Int vs Long cleanup #3 (ruby-core:352)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-12* bignum.c (rb_big_cmp): use dbl2big() for Floats, instead ofmatz
big2dbl(). * bignum.c (Init_Bignum): rb_big_zero_p() removed. There may be Bignum zero. * eval.c (rb_call0): new argument added for original method name. preserve original method name in frame->orig_func. * eval.c (is_defined): use frame->orig_func, not last_func. * eval.c (rb_eval): ditto. * eval.c (method_call): supply data->oid also to rb_call0(). * object.c (rb_class_allocate_instance): call rb_obj_alloc() when called from alias, thus invoke original "allocate". * eval.c (remove_method): removing allocate from classes should cause NameError. * hash.c (rb_hash_equal): should check default values. * ext/socket/socket.c (s_recvfrom): update RSTRING len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26* random.c: replace with Mersenne Twister RNG.matz
* eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e