Age | Commit message (Collapse) | Author |
|
Using calloc where possible reduces code and binary sizes.
* include/ruby/ruby.h (ZALLOC, ZALLOC_N): implement
(Data_Make_Struct, TypedData_Make_Struct):
ZALLOC replaces ALLOC+memset
* compile.c (iseq_seq_sequence): ZALLOC_N replaces ALLOC_N+MEMZERO
* cont.c (fiber_t_alloc): ZALLOC replaces ALLOC+MEMZERO
* io.c (rb_io_reopen): ditto
* iseq.c (prepare_iseq_build): ditto
* parse.y (new_args_tail_gen, parser_new, ripper_s_allocate): ditto
* re.c (match_alloc): ditto
* variable.c (rb_const_set): ditto
* ext/socket/raddrinfo.c (get_addrinfo): ditto
* ext/strscan/strscan.c (strscan_s_allocate): ditto
* gc.c (rb_objspace_alloc): calloc replaces malloc+MEMZERO
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
be used for platform-specific optimization. PACKED_STRUCT_UNALIGNED
should be used. [ruby-core:63988] [Bug #10088]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
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
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* 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
|
|
(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
|
|
[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
|
|
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
|
|
* 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
|
|
(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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
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
|
|
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
|
|
* 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
|
|
* 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
|
|
include/ruby/defines.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* 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
|
|
(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
|
|
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
|
|
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
|
|
* 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
|
|
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
|
|
* 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
|
|
* 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
|
|
* 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
|
|
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
|
|
* 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
|
|
[Bug #9287]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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
|