aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* pack.c: use ivar for associated objectsnobu2014-02-041-2/+2
| | | | | | | | * pack.c (str_associate, str_associated): keep associated objects in an instance variables, instead of in the internal structure. * string.c (rb_str_associate, rb_str_associated): deprecate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/util.h: DECIMAL_SIZE_OF_BITSnobu2014-01-121-0/+3
| | | | | | | | | | | | | * include/ruby/util.h (DECIMAL_SIZE_OF_BITS): a preprocessor constant macro to approximate decimal representation size of n-bits integer. * iseq.c (register_label): use DECIMAL_SIZE_OF_BITS for better approximation. * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto. * common.mk (iseq.o), ext/bigdecimal/depend (bigdecimal.o): add dependency to ruby/util.h for DECIMAL_SIZE_OF_BITS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_vm_pop_cfunc_frame): added. It cares c_return event.ko12014-01-091-1/+4
| | | | | | | | | | | | | | | | | | | The patch base by drkaes (Stefan Kaes). [Bug #9321] * variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame() instead of rb_frame_pop(). * vm_eval.c (raise_method_missing): ditto. * vm_eval.c (rb_iterate): ditto. * internal.h (rb_vm_pop_cfunc_frame): add decl. * test/ruby/test_settracefunc.rb: add tests. provided by drkaes (Stefan Kaes). * vm.c, eval.c, include/ruby/intern.h (rb_frame_pop): move definition of rb_frame_pop() and deprecate it. It doesn't care about `return' events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/version.h: bump API versionnobu2013-12-261-1/+1
| | | | | | * include/ruby/version.h: bump API version too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.ko12013-12-241-2/+4
| | | | | | | | [Bug #9287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-12-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN intoko12013-12-201-10/+10
| | | | | | | | | | | | RB_OBJ_WRITE and RB_OBJ_WRITTEN. * array.c, class.c, compile.c, hash.c, internal.h, iseq.c, proc.c, process.c, re.c, string.c, variable.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add a comment for WB interfaces.ko12013-12-201-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: swap iv_index_tbl and super for struct RClasstmm12013-12-202-2/+2
| | | | | | | | | | | | | | | | * include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl. since RCLASS_SUPER() is commonly used inside while loops, we move it back inside struct RClass to improve cache hits. this provides a small improvement (1%) in hotspots like rb_obj_is_kind_of() * internal.h (struct rb_classext_struct): remove super, add iv_index_table * internal.h (RCLASS_SUPER): update for new location * internal.h (RCLASS_SET_SUPER): ditto * internal.h (RCLASS_IV_INDEX_TBL): ditto * object.c (rb_class_get_superclass): ditto * include/ruby/backward/classext.h (RCLASS_SUPER): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: rb_class_path_cachednobu2013-12-091-0/+1
| | | | | | | * variable.c (rb_class_path_cached): returns cached class path only, without searching and allocating new class path string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: promote long-lived NODE_CREF objects to oldgentmm12013-12-081-0/+3
| | | | | | | | | | | | | | | * include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting In a large app, this reduces the size of remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947] * gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF * class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF * iseq.c (set_relation): ditto * iseq.c (rb_iseq_clone): ditto * vm_eval.c (rb_yield_refine_block): ditto * vm_insnhelper.c (vm_cref_push): ditto * vm_insnhelper.h (COPY_CREF): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: add GC.latest_gc_info()tmm12013-12-051-0/+1
| | | | | | | | | | | | | | | | | | * gc.c (struct rb_objspace): rename internal last_collection_flags to latest_gc_info * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar behavior to GC.stat() * gc.c (rb_gc_latest_gc_info): new c-api for above * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about new api * gc.c (gc_stat_internal): raise TypeError on wrong type * gc.c (gc_stat): fix error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: expose GC.stat() to C-api via rb_gc_stat()tmm12013-12-051-0/+1
| | | | | | | | | | | | | | | * include/ruby/intern.h: add rb_gc_stat() for access to GC.stat variables from c-api * gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like GC.stat, or VALUE symbol key and returns size_t directly. the second form is useful to avoid allocations, i.e. for usage inside INTERNAL_EVENT_GC tracepoints. * gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash * gc.c (gc_stat_internal): helper method to retrieve single or all stat values * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about this new api git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEPtmm12013-12-051-9/+10
| | | | | | | | | | | | | | | | * include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with two new events: GC_END_MARK and GC_END_SWEEP * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests for new events. * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj): ditto. * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample, and will be removed before ruby 2.1. * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook= git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (struct RClass): Add wrapper struct aroundtmm12013-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | RClass->m_tbl with serial. This prevents double marking method tables, since many classes/modules can share the same method table. This improves minor mark time in a large application by 30%. * internal.h (struct method_table_wrapper): Define new wrapper struct with additional serial. * internal.h (RCLASS_M_TBL_INIT): New macro for initializing method table wrapper and st_table. * method.h (void rb_sweep_method_entry): Rename rb_free_m_table to rb_free_m_tbl for consistentcy * .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper for new method table structure. * class.c: Use RCLASS_M_TBL_WRAPPER and RCLASS_M_TBL_INIT macros. * class.c (rb_include_class_new): Share WRAPPER between module and iclass, so serial can prevent double marking. * eval.c (rb_prepend_module): ditto. * eval.c (rb_using_refinement): ditto. * gc.c: Mark and free new wrapper struct. * gc.c (obj_memsize_of): Count size of additional wrapper struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: rb_yield_blocknobu2013-11-291-0/+1
| | | | | | | | * vm_eval.c (rb_yield_block): yield block with rb_block_call_func arguments. * range.c (range_each): use rb_yield_block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h, enum.c, vm_eval.c: constify argvnobu2013-11-292-3/+3
| | | | | | | | * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): constify argv. * enum.c (rb_enum_values_pack): ditto. * vm_eval.c (rb_block_call, rb_check_block_call): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLISTnobu2013-11-291-1/+3
| | | | | | | * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration argument list of rb_block_call_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h: rb_block_call_func_tnobu2013-11-291-1/+7
| | | | | | | * include/ruby/ruby.h (rb_block_call_func_t): strict check for rb_block_call_func* if RB_BLOCK_CALL_FUNC_STRICT is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby/ruby.h: add blockarg to rb_block_call_funcnobu2013-11-291-1/+2
| | | | | | | * include/ruby/ruby.h (rb_block_call_func): add blockarg. block function can take block argument, e.g., proc {|&blockarg| ...}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c: add st_values() and st_values_check().glass2013-11-281-0/+2
| | | | | | | | | * include/ruby/st.h: add prototypes for above. * hash.c (rb_hash_values): use st_values_check() for performance improvement if VALUE and st_data_t are compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_keys): fix not to use Qundef in st.c.glass2013-11-281-0/+1
| | | | | | | | * include/ruby/st.h: define modified prototype. * hash.c (rb_hash_keys): use modified st_keys(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: rb_w32_dup2nobu2013-11-281-0/+4
| | | | | | | * win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and redirect_dup2(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_keys): define st_keys(). it writes each key to buffer.glass2013-11-271-0/+8
| | | | | | | | | | | | | * hash.c (rb_hash_keys): use st_keys() for performance improvement if st_data_t and VALUE are compatible. * st.h: define macro ST_DATA_COMPATIBLE_P() to predicate whether st_data_t and passed type are compatible. * configure.in: check existence of builtin function to use in ST_DATA_COMPATIBLE_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.akr2013-11-242-2/+6
| | | | | | | | | | * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Use SIZEOF_ACTUAL_BDIGIT instead of SIZEOF_BDIGITS. SIZEOF_BDIGITS can be different to sizeof(BDIGIT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h: Don't use int128_t for Bignum.akr2013-11-241-7/+1
| | | | | | | | | | It's not always faster. * bignum.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: define RBIGNUM_EMBED_LEN_MAX by macrosnobu2013-11-231-3/+5
| | | | | | | * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): define by macros defined in defines.h, instead of complex and repeated expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Limit the value toakr2013-11-231-2/+5
| | | | | | | | less than 8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h, internal.h: Expose rb_gc_count().nari2013-11-221-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_gc_set_params): Deprecatenari2013-11-221-1/+1
| | | | | | | | | | | | | rb_gc_set_params because it's only used in ruby internal. * internal.h (ruby_gc_set_params): Declare rb_gc_set_params's alias function. * gc.c: ditto. * ruby.c: use ruby_gc_set_params. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: finalizer functionsnobu2013-11-091-0/+2
| | | | | | | * gc.c (rb_define_finalizer, rb_undefine_finalizer): rename and export finalizer functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add 3gen GC patch, but disabled as default.ko12013-11-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RGenGC is designed as 2 generational GC, young and old generation. Young objects will be promoted to old objects after one GC. Old objects are not collect until major (full) GC. The issue of this approach is some objects can promoted as old objects accidentally and not freed until major GC. Major GC is not frequently so short-lived but accidentally becoming old objects are not freed. For example, the program "loop{Array.new(1_000_000)}" consumes huge memories because short lived objects (an array which has 1M elements) are promoted while GC and they are not freed before major GC. To solve this problem, generational GC with more generations technique is known. This patch implements three generations gen GC. At first, newly created objects are "Infant" objects. After surviving one GC, "Infant" objects are promoted to "Young" objects. "Young" objects are promoted to "Old" objects after surviving next GC. "Infant" and "Young" objects are collected if it is not marked while minor GC. So that this technique solves this problem. Representation of generations: * Infant: !FL_PROMOTED and !oldgen_bitmap [00] * Young : FL_PROMOTED and !oldgen_bitmap [10] * Old : FL_PROMOTED and oldgen_bitmap [11] The macro "RGENGC_THREEGEN" enables/disables this feature, and turned off as default because there are several problems. (1) Failed sometimes (Heisenbugs). (2) Performance down. Especially on write barriers. We need to detect Young or Old object by oldgen_bitmap. It is slower than checking flags. To evaluate this feature on more applications, I commit this patch. Reports are very welcome. This patch includes some refactoring (renaming names, etc). * include/ruby/ruby.h: catch up 3gen GC. * .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.ko12013-11-041-5/+5
| | | | | | | | | This flag represents that "this object is promoted at least once." * gc.c, debug.c, object.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: export rb_str_scrubnobu2013-11-011-0/+1
| | | | | | | * string.c (rb_str_scrub): export with fixed length arguments, and allow nil as replacement string instead of omitting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).ko12013-10-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: introduce new flags for T_TYPEDDATA.ko12013-10-291-0/+4
| | | | | | | | | | | | | * RUBY_TYPED_FREE_IMMEDIATELY: free the data given by DATA_PTR() with dfree function immediately. Otherwise (default), the data freed at finalizaton point. * RUBY_TYPED_WB_PROTECTED: make this object with FL_WB_PROTECT (not shady). * gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: splitcharliesome2013-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | ruby_vm_global_state_version into two separate counters - one for the global method state and one for the global constant state. This means changes to constants do not affect method caches, and changes to methods do not affect constant caches. In particular, this means inclusions of modules containing constants no longer globally invalidate the method cache. * class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c: rename rb_clear_cache_by_class to rb_clear_method_cache_by_class * class.c, include/ruby/intern.h, variable.c, vm_method.c: add rb_clear_constant_cache * compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in rb_call_info_struct to method_state * vm_method.c: rename vmstat field in struct cache_entry to method_state git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.h: suppress INFINITY warningsnobu2013-10-231-0/+14
| | | | | | | * include/ruby/win32.h (rb_infinity_float): suppress overflow in constant arithmetic warnings. [ruby-core:57981] [Bug #9044] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: suppress warningsnobu2013-10-201-3/+3
| | | | | | | * include/ruby/ruby.h (rb_obj_wb_unprotect, rb_obj_written), (rb_obj_write): suppress unused-parameter warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.h: declare fstati64 to suppress warningsnobu2013-10-141-0/+2
| | | | | | | * include/ruby/win32.h (fstati64): declare for ext/-test-/file/stat.c on w64-mingw, to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vsnprintf.c: Fix spelling from compliment to complement.charliesome2013-10-131-1/+1
| | | | | | | | Patch by @agrimm. Closes GH-422. * include/ruby/ruby.h: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.h: define or declare finite alwaysnobu2013-10-101-0/+2
| | | | | | | * include/ruby/win32.h (finite): always define or declare. some mingw (maybe w64 only?) lack the declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: revert st_keysnobu2013-10-101-1/+0
| | | | | | * st.c: revert st_keys() at r43238. VALUE cannot be in st.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_keys): define st_keys() for performance improvement ofglass2013-10-101-0/+1
| | | | | | | | | | Hash#keys and Array#uniq. * st.h: ditto. * hash.c (rb_hash_keys): use st_keys(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compar.c: fail if recursionnobu2013-10-091-0/+1
| | | | | | | | * compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003] * thread.c (rb_exec_recursive_paired_outer): new function which is combinnation of paired and outer variants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/debug.h,ko12013-10-091-0/+1
| | | | | | | | | | | | | | vm_backtrace.c (rb_profile_frame_full_label): add new C API rb_profile_frame_full_label() which returns label with qualified method name. Note that in future version of Ruby label() may return same return value of full_label(). * ext/-test-/debug/profile_frames.c, test/-ext-/debug/test_profile_frames.rb: fix a test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c, include/ruby/debug.h: add new APIsko12013-10-081-0/+2
| | | | | | | | | | | | | * VALUE rb_profile_frame_method_name(VALUE frame) * VALUE rb_profile_frame_qualified_method_name(VALUE frame) * iseq.c (rb_iseq_klass), internal.h: add new internal function rb_iseq_method_name(). * ext/-test-/debug/profile_frames.c (profile_frames), test/-ext-/debug/test_profile_frames.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/debug.h: add backtrace collecting APIs for profiler.ko12013-10-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | * int rb_profile_frames(int start, int limit, VALUE *buff, int *lines); Collect information of frame information. * VALUE rb_profile_frame_path(VALUE frame); * VALUE rb_profile_frame_absolute_path(VALUE frame); * VALUE rb_profile_frame_label(VALUE frame); * VALUE rb_profile_frame_base_label(VALUE frame); * VALUE rb_profile_frame_first_lineno(VALUE frame); * VALUE rb_profile_frame_classpath(VALUE frame); * VALUE rb_profile_frame_singleton_method_p(VALUE frame); Get information about each frame. These APIs are designed for profilers, for example, no objectallocation, and enough information for profilers. In this version, this API collects only collect Ruby level frames. This issue will be fixed after Ruby 2.1. * vm_backtrace.c: implement above APIs. * iseq.c (rb_iseq_klass): return local_iseq's class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: export rb_stat_newnobu2013-10-011-0/+5
| | | | | | | | * file.c (stat_new_0): constify. * file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: export ruby_safe_level_4_warningnobu2013-10-011-2/+1
| | | | | | | * include/ruby/ruby.h (ruby_safe_level_4_warning): needed by extension libraries which check safe level 4. [ruby-dev:47517] [Bug #8652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e