summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2022-11-13[ruby/bigdecimal] Add specific value allocatorsKenta Murata
* Add NewZero* and NewOne* function families * Use them instead of VpAlloc for allocating 0 and 1 https://github.com/ruby/bigdecimal/commit/9276a94ac7
2022-11-13[ruby/bigdecimal] Add and use specific value allocatorsKenta Murata
* Add rbd_allocate_struct_zero for making 0.0 * Add rbd_allocate_struct_one for making 1.0 * Use them to replace VpAlloc calls * Renmae VpPt5 to VpConstPt5 https://github.com/ruby/bigdecimal/commit/40c826f5e6
2022-11-13[ruby/bigdecimal] Make VPrint function always availableKenta Murata
https://github.com/ruby/bigdecimal/commit/5391f7e92c
2022-11-13[ruby/bigdecimal] Tweak VpAllocKenta Murata
* Stop reusing mx and mf * Check szVal == NULL first * Treat special values before checking the leading `#` https://github.com/ruby/bigdecimal/commit/14f3d965f8
2022-11-13[ruby/bigdecimal] Rewrite allocation functionsKenta Murata
* Rename them * Make allocation count operations atomic https://github.com/ruby/bigdecimal/commit/a5ab34a115
2022-11-13[ruby/bigdecimal] Twak GetPrecisionInt and rename it to check_int_precisionKenta Murata
https://github.com/ruby/bigdecimal/commit/69d0588a3b
2022-11-13[ruby/bigdecimal] Tweak check_rounding_mode_optionKenta Murata
https://github.com/ruby/bigdecimal/commit/e1c6c9be25
2022-11-13[ruby/bigdecimal] Rewrite check_rounding_mode functionKenta Murata
Use table-lookup algorithm instead of consecutive if-statements. https://github.com/ruby/bigdecimal/commit/23eaff3ae5
2022-11-13[ruby/bigdecimal] [Doc] Fix the document of n_significant_digitsKenta Murata
https://github.com/ruby/bigdecimal/commit/91b72a9341
2022-11-13[ruby/bigdecimal] Make GetVpValue inlineKenta Murata
https://github.com/ruby/bigdecimal/commit/1b642e2e59
2022-11-13[ruby/bigdecimal] Make BigDecimal_double_fig inlineKenta Murata
https://github.com/ruby/bigdecimal/commit/4ecf04da7a
2022-11-10Remove numiv from RObjectJemma Issroff
Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Fix compiler issues in test on C99Peter Zhu
Fixes the following issue when compiling using C99: ext/-test-/rb_call_super_kw/rb_call_super_kw.c ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi] RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
2022-11-10[Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada
Distinguish initialization by single word from initialization by array.
2022-11-10Add version to the interface of Random extensionsNobuyoshi Nakada
2022-11-10Preprocess for older bison is no longer neededNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6701
2022-11-09Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-08Set default %printer for NODE ntermsyui-knk
Before: ``` Reducing stack by rule 639 (line 5062): $1 = token "integer literal" (1.0-1.1: 1) -> $$ = nterm simple_numeric (1.0-1.1: ) ``` After: ``` Reducing stack by rule 641 (line 5078): $1 = token "integer literal" (1.0-1.1: 1) -> $$ = nterm simple_numeric (1.0-1.1: NODE_LIT) ``` `"<*>"` is supported by Bison 2.3b (2008-05-27) or later. https://git.savannah.gnu.org/cgit/bison.git/commit/?id=12e3584054c16ab255672c07af0ffc7bb220e8bc Therefore developers need to install Bison 2.3b+ to build ruby from source codes if their Bison is older. Minimum version requirement for Bison is changed to 3.0. See: https://bugs.ruby-lang.org/issues/19068 [Feature #19068] Notes: Merged: https://github.com/ruby/ruby/pull/6579
2022-11-05[ruby/erb] Revert the strpbrk optimizationTakashi Kokubun
because it's much slower on M1 https://github.com/ruby/erb/pull/29. It'd be too complicated to switch the implementation based on known optimized platforms / versions. Besides, short strings are the most common usages of this method and SIMD doesn't really help that case. All in all, I can't justify the existence of this code. https://github.com/ruby/erb/commit/30691c8995
2022-11-05[ruby/erb] Optimize away the rb_convert_type call using RB_TYPE_PTakashi Kokubun
https://github.com/ruby/erb/commit/12058c3784
2022-11-05[ruby/erb] Use strpbrk only when str is long enough for SIMDTakashi Kokubun
This is the same trick used by https://github.com/k0kubun/hescape to choose the best strategy for different scenarios. https://github.com/ruby/erb/commit/af26da2858
2022-11-05[ruby/erb] Optimize the no-escape case with strpbrkTakashi Kokubun
(https://github.com/ruby/erb/pull/29) Typically, strpbrk(3) is optimized pretty well with SIMD instructions. Just using it makes this as fast as a SIMD-based implementation for the no-escape case. Not utilizing this for escaped cases because memory allocation would be a more significant bottleneck for many strings anyway. Also, there'll be some overhead in calling a C function (strpbrk) many times because we're not using SIMD instructions directly. So using strpbrk all the time might not necessarily be faster.
2022-11-04[ruby/erb] Avoid using prepend + super for fallbackTakashi Kokubun
(https://github.com/ruby/erb/pull/28) `prepend` is prioritized more than ActiveSupport's monkey-patch, but the monkey-patch needs to work. https://github.com/ruby/erb/commit/611de5a865
2022-11-05Update dependencies for bc28acc347eace4d02bbb4b672655216f7dd3a81Nobuyoshi Nakada
2022-11-04Substitute from the actual netinet6/in6.hNobuyoshi Nakada
Xcode no longer links the system include files directory to `/usr`. Extract the actual header file path from cpp output.
2022-11-04[ruby/erb] Do not allocate a new String if not neededTakashi Kokubun
[Feature #19102]https://github.com/ruby/erb/commit/ecebf8075c
2022-11-04[ruby/erb] Optimize away to_s if it's already T_STRINGTakashi Kokubun
[Feature #19102]https://github.com/ruby/erb/commit/38c6e182fb
2022-11-04[ruby/erb] Copy CGI.escapeHTML to ERB::Util.html_escapeTakashi Kokubun
https://github.com/ruby/erb/commit/ac9b219fa9
2022-11-02Use shared flags of the typePeter Zhu
The ELTS_SHARED flag is generic, so we should prefer to use the flags specific of the type (STR_SHARED for strings and RARRAY_SHARED_FLAG for arrays).
2022-10-30[ruby/bigdecimal] Suppress macro redefinition warningsNobuyoshi Nakada
`HAVE_` macros by autoconf are defined as 1. https://github.com/ruby/bigdecimal/commit/cd35868aa6
2022-10-29[ruby/digest] Use CommonDigest by default if availableNobuyoshi Nakada
https://github.com/ruby/digest/commit/cce9ada85e
2022-10-27[ruby/date] Check month range as civilNobuyoshi Nakada
2022-10-24Make the timestamp path correspond to the bundled target pathNobuyoshi Nakada
So different timestamps for different paths will be used. Extentions paths in bundled gems contain `ruby_version`, which includes the ABI version, and the same timestamp file for different paths resulted in build failures when it changed.
2022-10-21[ruby/stringio] [DOC] Enhanced RDoc for StringIOBurdette Lamar
(https://github.com/ruby/stringio/pull/36) Treats: - #each_codepoint - #gets - #readline (shows up in doc for module IO::generic_readable, not class StringIO) - #each_line https://github.com/ruby/stringio/commit/659aca7fe5
2022-10-20Unmark Internal IV test as pendingJemma Issroff
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6595
2022-10-19[ruby/stringio] [DOC] Enhanced RDoc for StringIOBurdette Lamar
(https://github.com/ruby/stringio/pull/35) Treated: - #getc - #getbyte - #ungetc - #ungetbyte - #readchar - #readbyte - #each_char https://github.com/ruby/stringio/commit/6400af8d9f
2022-10-19[ruby/stringio] [DOC] StringIO doc enhancementsBurdette Lamar
(https://github.com/ruby/stringio/pull/33) Treated: - ::new - ::open - #string - #string= - #close - #close_read - #close_write - #closed? - #closed_read? - #closed_write? - #eof? https://github.com/ruby/stringio/commit/be9b64d739
2022-10-19[DOC] Fix rdoc-refNobuyoshi Nakada
2022-10-18[DOC] Enhanced RDoc for StringIO (#34)Burdette Lamar
Treated: - #lineno - #lineno= - #binmode - #reopen - #pos - #pos= - #rewind - #seek - #sync - #each_byte
2022-10-18[ruby/fiddle] Free closures immediatelyAaron Patterson
(https://github.com/ruby/fiddle/pull/109) These structs don't need to be freed as part of finalization, so lets free them immediately. https://github.com/ruby/fiddle/commit/8a10ec1152 Notes: Merged: https://github.com/ruby/ruby/pull/6576
2022-10-18[ruby/fiddle] Add support for linker script on LinuxSutou Kouhei
GitHub: fix https://github.com/ruby/fiddle/pull/107 Reported by nicholas a. evans. Thanks!!! https://github.com/ruby/fiddle/commit/49ea1490df Notes: Merged: https://github.com/ruby/ruby/pull/6576
2022-10-18[ruby/fiddle] Bump versionSutou Kouhei
Notes: Merged: https://github.com/ruby/ruby/pull/6576
2022-10-18fiddle: use the old rb_ary_tmp_new() aliasNobuyoshi Nakada
Fiddle is a gem and has the external upstream which supports older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/6576
2022-10-17[ruby/openssl] add document-method for BN#mod_inverseBen Toews
https://github.com/ruby/openssl/commit/5befde7519
2022-10-17[ruby/openssl] add BN#mod_sqrtBen Toews
https://github.com/ruby/openssl/commit/4619ab3e76
2022-10-17[ruby/openssl] define BIGNUM_2cr macro for BN function that takes context andBen Toews
returns a BN https://github.com/ruby/openssl/commit/4d0971c51c
2022-10-17[ruby/openssl] Call out insecure PKCS #1 v1.5 default padding for RSABart de Water
https://github.com/ruby/openssl/commit/fd5eaa6dfc
2022-10-17[ruby/openssl] Use default `IO#timeout` if possible.Samuel Williams
https://github.com/ruby/openssl/commit/471340f612
2022-10-17[ruby/openssl] Add support to SSL_CTX_set_keylog_callbackChristophe De La Fuente
- This callback is invoked when TLS key material is generated or received, in order to allow applications to store this keying material for debugging purposes. - It is invoked with an `SSLSocket` and a string containing the key material in the format used by NSS for its SSLKEYLOGFILE debugging output. - This commit adds the Ruby binding `keylog_cb` and the related tests - It is only compatible with OpenSSL >= 1.1.1. Even if LibreSSL implements `SSL_CTX_set_keylog_callback()` from v3.4.2, it does nothing (see https://github.com/libressl-portable/openbsd/commit/648d39f0f035835d0653342d139883b9661e9cb6) https://github.com/ruby/openssl/commit/3b63232cf1