Age | Commit message (Collapse) | Author |
|
(Init_intpack): Renamed from Init_pack.
Reported by Naohisa Goto. [ruby-dev:47526] [Bug #8655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* string.c (rb_string_value_cstr): fill minimum length of the encoding
as the terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_big_mul_toom3): Ditto.
* internal.h (rb_big_sq_fast): Declared.
(rb_big_mul_toom3): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_big_mul_balance): Ditto.
(rb_big_mul_karatsuba): Ditto.
* bignum.c (rb_big_mul_normal): New function for tests.
(rb_big_mul_balance): Ditto.
(rb_big_mul_karatsuba): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(RBIGNUM_SET_POSITIVE_SIGN): Ditto.
(rb_big_neg): Inline get2comp to avoid double negation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag.
Fix byte order and word order handling in code specialized for
wordsize % SIZEOF_BDIGITS == 0.
* internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(integer_unpack_num_bdigits): Extracted from
rb_integer_unpack_internal.
(bary_unpack_internal): Renamed from bary_unpack and support
INTEGER_PACK_2COMP.
(bary_unpack): New function to validate arguments and invoke
bary_unpack_internal.
(rb_integer_unpack_internal): Removed.
(rb_integer_unpack): Invoke bary_unpack_internal.
(rb_integer_unpack_2comp): Removed.
* internal.h (rb_integer_unpack_2comp): Removed.
* pack.c: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_integer_pack_2comp): Removed.
* bignum.c (bary_pack): Support INTEGER_PACK_2COMP.
(rb_integer_pack): Invoke bary_pack directly.
(rb_integer_pack_2comp): Removed.
(rb_integer_pack_internal): Ditto.
(absint_numwords_generic): Follow the above change.
* pack.c (pack_pack): Ditto.
* sprintf.c (rb_str_format): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_integer_unpack_internal): Extracted from rb_integer_unpack and
nlp_bits_ret argument added.
(integer_unpack_num_bdigits_small): nlp_bits_ret argument added to
return number of leading padding bits.
(integer_unpack_num_bdigits_generic): Ditto.
* internal.h (rb_integer_unpack_2comp): Declared.
* pack.c (pack_unpack): Use rb_integer_unpack_2comp and
rb_integer_unpack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_integer_unpack): sign argument removed.
* bignum.c (rb_integer_unpack): sign argument removed.
Non-negative integers generated by default.
INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers.
* pack.c (pack_unpack): Follow the above change.
* random.c (int_pair_to_real_inclusive): Ditto.
(make_seed_value): Ditto.
(mt_state): Ditto.
(limited_big_rand): Ditto.
* marshal.c (r_object0): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
and overflow_2comp argument added.
(rb_integer_pack): Just call rb_integer_pack_internal.
(rb_integer_pack_2comp): New function.
* internal.h (rb_integer_pack_2comp): Declared.
* sprintf.c (rb_str_format): Use rb_integer_pack and
rb_integer_pack_2comp to format binary/octal/hexadecimal integers.
(ruby_digitmap): Declared.
(remove_sign_bits): Removed.
(BITSPERDIG): Ditto.
(EXTENDSIGN): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(absint_numwords_generic): Follow the above change.
(big2str_base_powerof2): Follow the above change.
* internal.h: Ditto.
* hash.c (rb_hash): Ditto.
* pack.c (pack_pack): Ditto.
* random.c (int_pair_to_real_inclusive): Ditto.
(rand_init): Ditto.
(random_load): Ditto.
(limited_big_rand): Ditto.
* time.c (v2w_bignum): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* internal.h (rb_integer_pack): Follow the above change.
* hash.c (rb_hash): Ditto.
* time.c (v2w_bignum): Ditto.
* pack.c (pack_pack): Ditto.
* random.c (int_pair_to_real_inclusive): Ditto.
(rand_init): Ditto.
(random_load): Ditto.
(limited_big_rand): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
specify word order and byte order.
(rb_integer_unpack): Ditto.
(validate_integer_format): Follow the above change.
(integer_format_loop_setup): Ditto.
* pack.c: Ditto.
* internal.h: Ditto.
(INTEGER_PACK_MSWORD_FIRST): Defined.
(INTEGER_PACK_LSWORD_FIRST): Ditto.
(INTEGER_PACK_MSBYTE_FIRST): Ditto.
(INTEGER_PACK_LSBYTE_FIRST): Ditto.
(INTEGER_PACK_NATIVE_BYTE_ORDER): Ditto.
(INTEGER_PACK_LITTLE_ENDIAN): Ditto.
(INTEGER_PACK_BIG_ENDIAN): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(rb_integer_unpack): Renamed from rb_int_import.
* internal.h, pack.c: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* configure.in: revert r41106. size_t may not be unsigned
* bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.
* ext/-test-/bignum/export.c (rb_int_export_m): ditto.
* ext/-test-/bignum/import.c (rb_int_import_m): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
wordcount_allocated and wordcount.
* bignum.c (rb_int_export): Follow the above change.
* pack.c (pack_pack): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(int_import_push_bits): Ditto.
* internal.h (rb_int_import): Declared.
* pack.c (pack_unpack): Use rb_int_import for BER compressed integer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict
with RUBY_REPLACE_TYPE.
* internal.h (rb_absint_size): Declared.
(rb_absint_size_in_word): Ditto.
(rb_int_export): Ditto.
* bignum.c (rb_absint_size): New function.
(rb_absint_size_in_word): Ditto.
(int_export_fill_dd): Ditto.
(int_export_take_lowbits): Ditto.
(rb_int_export): Ditto.
* pack.c (pack_pack): Use rb_int_export for BER compressed integer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/postponed_job/postponed_job.c,
test/-ext-/postponed_job/test_postponed_job.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/postponed_job/postponed_job.c (pjob_register),
(pjob_call_direct): none void function.
* ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events):
adjust type to get rid of implicit cast.
* ext/objspace/object_tracing.c (newobj_i): ditto.
* ext/tk/tkutil/tkutil.c (tk_conv_args): adjust type against
RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
RUBY_INTERNAL_EVENT_GC_END. This event invokes at the end of
after_sweep().
Time chart with lazy sweep is here:
(1) Kick RUBY_INTERNAL_EVENT_GC_START
(2) [gc_marks()]
(3) [lazy_sweep()]
(4) [... run Ruby program (mutator) with lazy_sweep() ...]
(5) [after_sweep()]
(6) Kick RUBY_INTERNAL_EVENT_GC_END
(7) [... run Ruby program (mutator), and go to (1) ...]
* ext/-test-/tracepoint/tracepoint.c,
test/-ext-/tracepoint/test_tracepoint.rb: modify a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
RUBY_INTERNAL_EVENT_FREEOBJ.
* ext/-test-/tracepoint/tracepoint.c,
ext/objspace/object_tracing.c,
gc.c, vm_trace.c: catch up this change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* RUBY_INTERNAL_EVENT_NEWOBJ: object created.
* RUBY_INTERNAL_EVENT_FREE: object freeed.
* RUBY_INTERNAL_EVENT_GC_START: GC started.
And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'.
Internal events can not invoke any Ruby program because the tracing
timing may be critical (under huge restriction).
These events can be hooked only by C-extensions.
We recommend to use rb_potponed_job_register() API to call Ruby
program safely.
This change is mostly written by Aman Gupta (tmm1).
https://bugs.ruby-lang.org/issues/8107#note-12
[Feature #8107]
* include/ruby/debug.h, vm_trace.c: added two new APIs.
* rb_tracearg_event_flag() returns rb_event_flag_t of this event.
* rb_tracearg_object() returns created/freeed object.
* ext/-test-/tracepoint/extconf.rb,
ext/-test-/tracepoint/tracepoint.c,
test/-ext-/tracepoint/test_tracepoint.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Postponed jobs are registered with this API. Registered jobs
are invoked at `ruby-running-safe-point' as soon as possible.
This timing is completely same as finalizer timing.
There are two APIs:
* rb_postponed_job_register(flags, func, data): register a
postponed job with data. flags are reserved.
* rb_postponed_job_register_one(flags, func, data): same as
`rb_postponed_job_register', but only one `func' job is
registered (skip if `func' is already registered).
This change is mostly written by Aman Gupta (tmm1).
https://bugs.ruby-lang.org/issues/8107#note-15
[Feature #8107]
* gc.c: use postponed job API for finalizer.
* common.mk: add dependency from vm_trace.c to debug.h.
* ext/-test-/postponed_job/extconf.rb, postponed_job.c,
test/-ext-/postponed_job/test_postponed_job.rb: add a test.
* thread.c: implement postponed API.
* vm_core.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/exception/depend: Ditto.
* ext/-test-/printf/depend: Ditto.
* ext/-test-/string/depend: Ditto.
* ext/coverage/depend: Ditto.
* ext/io/console/depend: Ditto.
* ext/io/nonblock/depend: Ditto.
* ext/io/wait/depend: Ditto.
* ext/openssl/depend: Ditto.
* ext/pathname/depend: Ditto.
* ext/psych/depend: Ditto.
* ext/zlib/depend: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.
* ext/-test-/old_thread_select/depend: Update dependencies.
* ext/-test-/wait_for_single_fd/depend: Ditto.
* ext/bigdecimal/depend: Ditto.
* ext/curses/depend: Ditto.
* ext/digest/bubblebabble/depend: Ditto.
* ext/digest/depend: Ditto.
* ext/digest/md5/depend: Ditto.
* ext/digest/rmd160/depend: Ditto.
* ext/digest/sha1/depend: Ditto.
* ext/digest/sha2/depend: Ditto.
* ext/dl/callback/depend: Ditto.
* ext/dl/depend: Ditto.
* ext/etc/depend: Ditto.
* ext/nkf/depend: Ditto.
* ext/objspace/depend: Ditto.
* ext/pty/depend: Ditto.
* ext/readline/depend: Ditto.
* ext/ripper/depend: Ditto.
* ext/sdbm/depend: Ditto.
* ext/socket/depend: Ditto.
* ext/stringio/depend: Ditto.
* ext/strscan/depend: Ditto.
* ext/syslog/depend: Ditto.
* ext/-test-/num2int/depend: Removed.
* ext/dbm/depend: Ditto.
* ext/fcntl/depend: Ditto.
* ext/gdbm/depend: Ditto.
* ext/racc/cparse/depend: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/win32/dln/extconf.rb: remove static library too at clean.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero
length Bignum. [ruby-core:53893] [Bug #8204]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
as module methods of Num2int.
* test/-ext-/num2int/test_num2int.rb: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
to global functions to ease manual experiments.
* test/-ext-/num2int/test_num2int.rb: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
printing.
* test/-ext-/num2int/test_num2int.rb: updated to follow above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
* test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* eval.c (rb_ensure): preserve errinfo accross ensure proc before
JUMP_TAG(). [ruby-core:52022] [Bug #7802]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/debug/init.c (Init_debug): use normal module.
* ext/-test-/debug/inspector.c (callback): debug_inspector interfaces
now use long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
The order of making binding should be stack (frame) top to bottom.
[Bug #7635]
And also fix issue of collecting klass. Collecting klass is same
as TracePoint#defined_class.
(previous version, it returns T_ICLASS (internal objects).
* test/-ext-/debug/test_debug.rb: add a test.
* ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto.
* vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*.
* vm_backtrace.c, include/ruby/debug.h: add new C api (experimental)
rb_debug_inspector_frame_self_get().
* vm.c, vm_core.h, vm_trace.c: move decl. of
rb_vm_control_frame_id_and_class() and constify first parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* proc.c (rb_mod_method_arity): return original arity of the method if
aliased because of visibility change, like as Method#arity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
TAG_JUMP() with TAG_FATAL (ex. rb_fatal()).
* test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above.
* ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[ruby-dev:45071] [Bug #5832]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/-test-/exception/enc_raise.c (enc_raise): unreachable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using
compatible loader.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
conflict with msvcrt. fixed build error of mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
To avoid buffer overflow when smaller FD_SETSISE is used in ext
libraries.
* win32/win32.c (rb_w32_fdset): this function is not used anymore.
But we leave this for compatibility.
* win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
FD_SETSISE is used in ext libraries. Dereference of fd_set pointer
causes SEGV.
* test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
above.
* ext/-test-/win32/fd_setsize/depend: ditto.
* ext/-test-/win32/fd_setsize/extconf.rb: ditto.
* ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
[ruby-core:44588] [Bug #6352]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|