summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2014-07-23UNALIGNED_WORD_ACCESS on ppc64nobu
* include/ruby/defines.h, siphash.c, st.c (UNALIGNED_WORD_ACCESS): add PowerPC64 too, which is capable to access unaligned words. patched by Gustavo Frederico Temple Pedrosa in [ruby-core:63937]. [Feature #10081] * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23defines.h: PACKED_STRUCT_UNALIGNEDnobu
* include/ruby/defines.h (PACKED_STRUCT_UNALIGNED): move from configure.in for universal binary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-21rb_io_buffer_t: fix packing on gccnormal
* include/ruby/io.h (rb_io_buffer_t): fix packing on gcc r46892 caused packing to be a no-op on gcc (4.7.2-5, Debian) [Bug #10079][ruby-core:63912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-21ruby/io.h: fix rb_io_buffer_tnobu
* include/ruby/io.h (rb_io_buffer_t): fix usage of PACKED_STRUCT(). it must surround the whole declaration on VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20rb_io_buffer_t: pack structurenormal
* include/ruby/io.h (rb_io_buffer_t): pack structure Reduces rb_io_t from 200 to 192 bytes, allowing rb_io_t to occupy one less cache line. [Feature #10050] n.b. this leaves a 4-byte hole after the `cbuf' field which may be used for future expansion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20rb_io_t: shrink from 216 to 200 bytes on 64-bitnormal
* include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit This puts us within 8 bytes of being three cache lines instead of four lines on x86-64. This breaks the ABI. [Feature #10050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-20re_pattern_buffer: shrink from 464 to 448 bytes on 64-bitnormal
* include/ruby/oniguruma.h (struct re_pattern_buffer): shrink to 448 bytes from 464 bytes on 64-bit. This breaks the ABI. [Feature #10034] Reducing struct re_pattern_buffer from 464 to 448 bytes allows it to fit into neatly into seven 64-byte cache lines on x86-64 systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16* regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.naruse
this includes Support for Unicode 7.0 [Bug #9092]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06st.c: remove equality checksnobu
* st.c (st_update): remove equality checks, callers should ensure the equality, otherwise the behavior is undefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 * include/ruby/ruby.h (struct RHash): no longer. [Feature #9889]shyouhei
* include/ruby/ruby.h (RHASH): ditto. * include/ruby/ruby.h (RHASH_ITER_LEV): deprecated. Will be deleted later. * include/ruby/ruby.h (RHASH_IFNONE): ditto. * internal.h (struct RHash): moved here. * internal.h (RHASH): ditto. * hash.c (rb_hash_iter_lev): do not use this. * hash.c (rb_hash_ifnone): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 * include/ruby/ruby.h (struct RComplex): no longer. [Feature #9888]shyouhei
* include/ruby/ruby.h (RCOMPLEX): ditto. * include/ruby/ruby.h (RCOMPLEX_SET_REAL): deprecated. Will be deleted later. * include/ruby/ruby.h (RCOMPLEX_SET_IMAG): ditto. * internal.h (struct RFloat): moved here. * internal.h (RCOMPLEX): ditto. * complex.c (rb_complex_set_real): do not use this. * complex.c (rb_complex_set_imag): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 * include/ruby/ruby.h (struct RFloat): no longer. [Feature #9863]shyouhei
* include/ruby/ruby.h (RFLOAT): ditto. * internal.h (struct RFloat): moved here. * internal.h (RFLOAT): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-18constify parametersnobu
* include/ruby/intern.h: constify `argv` parameters. * include/ruby/ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-05configure.in, missing.h: jemalloc manglingnobu
* configure.in (with-jemalloc): also check for header, for ABIs which JEMALLOC_MANGLE is needed, i.e., Mach-O and PE-COFF platforms. [ruby-core:62939] [Feature #9113] * include/ruby/missing.h: include alternative malloc header to replace memory management functions. * dln.c, io.c, parse.y, st.c: undef malloc family before re-definition to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-02encoding.c: move ruby_encoding_index stuffnobu
* encoding.c: move `ruby_encoding_index` stuff from include/ruby/encoding.h to hide the extra field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-02encoding.h: constify rb_encodingnobu
* include/ruby/encoding.h: constify `rb_encoding` itself, not only arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-01constify rb_encoding and OnigEncodingnobu
* include/ruby/encoding.h: constify `rb_encoding` arguments. * include/ruby/oniguruma.h: constify `OnigEncoding` arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-28include/ruby/ruby.h: hide Symbol internalsnormal
This is too new to be a compatibility problem. * include/ruby/ruby.h: Hide Symbol internals. (struct RSymbol): moved to internal.h (RSYMBOL): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22revert File::Statfs [Feature #9772]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18* configure.in: Check nextafter() availability.akr
* include/ruby/missing.h (nextafter): New optional declaration. * missing/nextafter.c: New file. * numeric.c: Float#next_float and Float#prev_float implemented. [ruby-core:62562] [Feature #9834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17* include/ruby/ruby.h: Hide Rational internal.akr
(RRational): Moved to internal.h (RRATIONAL): Ditto. (RRATIONAL_SET_NUM): Moved to rational.c. (RRATIONAL_SET_DEN): Ditto. * rational.c (rb_rational_num): New function. (rb_rational_den): Ditto. * include/ruby/intern.h (rb_rational_num): Declared. (rb_rational_den): Ditto. * ext/bigdecimal/bigdecimal.c: Follow the above change. * ext/date/date_core.c: Ditto. [ruby-core:60665] [Feature #9513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-14* ext/openssl/depend: remove dependency from internal headers.ko1
[Feature #9612] * ext/openssl/ossl.c (ossl_fips_mode_set): ditto. * ext/coverage/depend: ditto. * include/ruby/thread_native.h: added. This header file only provides wrapper functions to control native threads. These wrapper functions are used by MRI implementation. * vm_core.h: use include/ruby/thread_native.h. * thread.c: ditto. * thread_pthread.h: ditto. * thread_win32.h: ditto. * thread_native.h: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22* win32/win32.c, include/ruby/win32.h (ustatfs): implementation ofusa
statfs(2) clone. [EXPERIMENTAL] * file.c (rb_io_statfs): use above function. * configure.in, win32/Makefile.sub (struct statfs): available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-19* internal.h (struct RBignum): Use size_t for len.akr
* include/ruby/intern.h (rb_big_new): Use size_t instead of long to specify the size of bignum. (rb_big_resize): Ditto. * bignum.c: Follow above changes. * rational.c: Follow above changes. * marshal.c: Follow above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18* numeric.c (rb_num2long): Returns a long.akr
(rb_num2ulong): Returns a unsigned long. * bignum.c (rb_big2long): Returns a long. (rb_big2ulong): Returns a unsigned long. * include/ruby/intern.h: Follow above changes. * include/ruby/ruby.h: Follow above changes. (rb_num2long_inline): No need to cast. (rb_num2ulong_inline): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17string.c: rb_str_cat_cstrnobu
* string.c (rb_str_cat): make non-buf version main. * string.c (rb_str_cat_cstr): rename from rb_str_cat2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17configure.in: FUNC_MINIMIZEDnobu
* configure.in (RUBY_FUNC_ATTRIBUTE): escape double quotes in attribute. * configure.in (FUNC_MINIMIZED): attribute to minimize function body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15* include/ruby/win32.h (rb_w32_cmdvector): removed.usa
* win32/win32.c (rb_w32_sysinit): use WCHAR version of GetCommandLine() internally. * win32/win32.c (w32_cmdvector): renamed from rb_w32_cmdvector. use WCHAR* instead of char* internally. these changes are expected to not changing the behavior yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05win32.c: wchar conversionnobu
* win32/win32.c (rb_w32_wstr_to_mbstr, rb_w32_mbstr_to_wstr): make WCHAR/mb conversion functions public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26* parse.y: support Symbol GC. [ruby-trunk Feature #9634]nari
See this ticket about Symbol GC. * include/ruby/ruby.h: Declare few functions. * rb_sym2id: almost same as old SYM2ID but support dynamic symbols. * rb_id2sym: almost same as old ID2SYM but support dynamic symbols. * rb_sym2str: almost same as `rb_id2str(SYM2ID(sym))` but not pin down a dynamic symbol. Declare a new struct. * struct RSymbol: represents a dynamic symbol as object in Ruby's heaps. Add few macros. * STATIC_SYM_P: check a static symbol. * DYNAMIC_SYM_P: check a dynamic symbol. * RSYMBOL: cast to RSymbol * gc.c: declare RSymbol. support T_SYMBOL. * internal.h: Declare few functions. * rb_gc_free_dsymbol: free up a dynamic symbol. GC call this function at a sweep phase. * rb_str_dynamic_intern: convert a string to a dynamic symbol. * rb_check_id_without_pindown: not pinning function. * rb_sym2id_without_pindown: ditto. * rb_check_id_cstr_without_pindown: ditto. * string.c (Init_String): String#intern and String#to_sym use rb_str_dynamic_intern. * template/id.h.tmpl: use LSB of ID as a flag for determining a static symbol, so we shift left other ruby_id_types. * string.c: use rb_sym2str instead `rb_id2str(SYM2ID(sym))` to avoid pinning. * load.c: use xx_without_pindown function at creating temporary ID to avoid pinning. * object.c: ditto. * sprintf.c: ditto. * struct.c: ditto. * thread.c: ditto. * variable.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-20* include/ruby/intern.h (rb_obj_call_init, rb_class_new_instance):ko1
constify a parameter (VALUE *). I believe this incompatibility doesn't break any code. However, if you have trouble, please tell us. * eval.c, object.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-23win32/win32.c: add rb_w32_inet_ptonnobu
* include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a wrapper function for inet_pton minimum supported client is Vista, as well as inet_ntop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20gc.c: RB_GC_GUARD should be robust enough for any compilernormal
* include/ruby/ruby.h (RB_GC_GUARD): use rb_gc_guarded_ptr_val on non-GCC/MSC * gc.c (rb_gc_guarded_ptr_val): rename and adjust argument. RB_GC_GUARD should be robust enough for any compiler. [ruby-core:60816] [Bug #7805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* internal.h: Move BDIGIT and related definitions fromakr
include/ruby/defines.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16ruby.h: use FIX2LONGnobu
* include/ruby/ruby.h (RBIGNUM_SIGN): use FIX2LONG() instead of FIX2INT() for optimization, since rb_big_cmp() returns only Fixnum -1..+1 for Finxum 0. (RBIGNUM_POSITIVE_P, RBIGNUM_NEGATIVE_P): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16* include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.akr
(RBIGNUM_POSITIVE_P): Ditto. (RBIGNUM_NEGATIVE_P): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* include/ruby/ruby.h,akr
internal.h, ext/-test-/bignum/bigzero.c: Hide a Bignum definition. [ruby-core:42891] [Feature #6083] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* include/ruby/intern.h,akr
include/ruby/io.h, include/ruby/ruby.h, include/ruby/win32.h, include/ruby/backward/rubysig.h, bignum.c, gc.c, io.c, process.c, safe.c, struct.c, thread.c, ext/socket/rubysocket.h, ext/-test-/old_thread_select: Remove deprecated definitions [ruby-core:60581] [Feature #9502] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08marshal.c: Numerics are not taintednobu
* include/ruby/ruby.h (OBJ_TAINTABLE, OBJ_TAINT, OBJ_INFECT), marshal.c (r_entry0): all Numerics never be tainted now. [ruby-core:57346] [Bug #8945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-08* configure.in: check qsort_r(3) and whether it is GNU version.glass
BSD version has different prototype. * util.h: use qsort_r() as ruby_qsort() if it is GNU version. * util.c: define ruby_qsort() if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07win32.h: define strtoll and strtoull for earlier VCnobu
* include/ruby/win32.h (strtoll, strtoull): VC8 and later until VC12 have LONG_LONG but it is _int64, and provide i64 version functions only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04pack.c: use ivar for associated objectsnobu
* 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
2014-01-12ruby/util.h: DECIMAL_SIZE_OF_BITSnobu
* 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
2014-01-09* vm.c (rb_vm_pop_cfunc_frame): added. It cares c_return event.ko1
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
2013-12-26ruby/version.h: bump API versionnobu
* 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
2013-12-24* include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.ko1
[Bug #9287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN intoko1
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
2013-12-20* include/ruby/ruby.h: add a comment for WB interfaces.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20ruby.h: swap iv_index_tbl and super for struct RClasstmm1
* 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