aboutsummaryrefslogtreecommitdiffstats
path: root/regint.h
Commit message (Collapse)AuthorAgeFilesLines
* Optimize regexp matching for look-around and atomic groups (#7931)Hiroya Fujinami2023-10-301-0/+8
|
* Delay start of the match cache optimization (#7738)TSUYUSATO Kitsune2023-05-041-2/+7
|
* Refactor `Regexp#match` cache implementation (#7724)TSUYUSATO Kitsune2023-04-191-18/+18
| | | | | | | | | | * Refactor Regexp#match cache implementation Improved variable and function names Fixed [Bug 19537] (Maybe fixed in https://github.com/ruby/ruby/pull/7694) * Add a comment of the glossary for "match cache" * Skip to reset match cache when no cache point on null check
* Fix `PLATFORM_GET_INC`Nobuyoshi Nakada2023-04-161-1/+8
| | | | | | | | On platforms where unaligned word access is not allowed, and if `sizeof(val)` and `sizeof(type)` differ: - `val` > `type`, `val` will be a garbage. - `val` < `type`, outside `val` will be clobbered.
* Use long instead of intTSUYUSATO Kitsune2022-11-091-7/+8
|
* Revert "Refactor field names"TSUYUSATO Kitsune2022-11-091-12/+11
| | | | This reverts commit 1e6673d6bbd2adbf555d82c7c0906ceb148ed6ee.
* Refactor field namesTSUYUSATO Kitsune2022-11-091-11/+12
|
* Support OP_REPEAT and OP_REPEAT_INCTSUYUSATO Kitsune2022-11-091-5/+14
|
* Add index to the latest NULL_CHECK_STACK for fast matchingTSUYUSATO Kitsune2022-11-091-0/+1
|
* Keep cache optimization info to MatchArg for global matchingTSUYUSATO Kitsune2022-11-091-0/+7
|
* Implement cache optimization for regexp matchingTSUYUSATO Kitsune2022-11-091-0/+8
|
* Fix and improve coroutines for Darwin (macOS) ppc/ppc64. (#5975)Sergey Fedorov2022-10-191-1/+2
|
* re.c: Add Regexp.timeout= and Regexp.timeoutYusuke Endoh2022-03-301-0/+8
| | | | [Feature #17837]
* regint.h: Reduce the frequency of rb_thread_check_intsYusuke Endoh2022-03-241-1/+8
| | | | | | | edc8576a65b7082597d45a694434261ec3ac0d9e checks interrupt at every backtrack, which brought significant overhead. This change makes the check only once every 128 backtracks.
* Add printf-style format attribute to oniguruma functionsNobuyoshi Nakada2021-09-271-2/+6
| | | | Also make the format string compatible with literal strings which are const arrays of "plain" chars.
* Enable arm64 optimizations that exist for power/x86 (#3393)AGSaidi2020-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable unaligned accesses on arm64 64-bit Arm platforms support unaligned accesses. Running the string benchmarks this change improves performance by an average of 1.04x, min .96x, max 1.21x, median 1.01x * arm64 enable gc optimizations Similar to x86 and powerpc optimizations. | |compare-ruby|built-ruby| |:------|-----------:|---------:| |hash1 | 0.225| 0.237| | | -| 1.05x| |hash2 | 0.110| 0.110| | | 1.00x| -| * vm_exec.c: improve performance for arm64 | |compare-ruby|built-ruby| |:------------------------------|-----------:|---------:| |vm_array | 26.501M| 27.959M| | | -| 1.06x| |vm_attr_ivar | 21.606M| 31.429M| | | -| 1.45x| |vm_attr_ivar_set | 21.178M| 26.113M| | | -| 1.23x| |vm_backtrace | 6.621| 6.668| | | -| 1.01x| |vm_bigarray | 26.205M| 29.958M| | | -| 1.14x| |vm_bighash | 504.155k| 479.306k| | | 1.05x| -| |vm_block | 16.692M| 21.315M| | | -| 1.28x| |block_handler_type_iseq | 5.083| 7.004| | | -| 1.38x|
* Merge Onigmo 6.1.1naruse2017-02-111-2/+13
| | | | | | | * Support absent operator https://github.com/k-takata/Onigmo/issues/82 * https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* regint.h: version for secure functionsnobu2016-12-241-1/+1
| | | | | | | * regint.h (xvsnprintf): secure version functions are not supported on old VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge Onigmo 6.0.0naruse2016-12-101-242/+174
| | | | | | | | | | | * https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY * fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78 * suppress warning: https://github.com/k-takata/Onigmo/pull/79 * include/ruby/oniguruma.h: include onigmo.h. * template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert UNALIGNED_WORD_ACCESS for GCC6naruse2016-04-301-4/+0
| | | | | | | | Released GCC 6.0 fixed the issue. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291 [ruby-core:72211] [Bug #11831] [Bug #11979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable unaligned word accessnobu2016-01-151-0/+4
| | | | | | | * regint.h: disable unaligned word access with gcc 6 or later. [Bug #11831] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): The value ofngoto2016-01-151-0/+8
| | | | | | | | | | UNALIGNED_WORD_ACCESS should be used to determine whether unaligned word access is allowed or not. After this commit, ./configure CPPFLAGS="-DUNALIGNED_WORD_ACCESS=0" disables unaligned word access even on platforms that support the feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r52995nobu2015-12-091-6/+0
| | | | | | revert slow atomic operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use atomic operationsnobu2015-12-091-0/+6
| | | | | | | | | * regcomp.c (onig_chain_link_add): use atomic operation instead of mutex. * regint.h (ONIG_STATE_{INC,DEC}_THREAD): ditto. * regparse.c (PopFreeNode, node_recycle): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:naruse2015-11-261-10/+25
| | | | | | | Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692 + https://github.com/k-takata/Onigmo/pull/52 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Avoid undefined behaviors found by gcc -fsanitize=undefined.akr2014-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | gcc (Debian 4.9.1-16) 4.9.1 * include/ruby/ruby.h (INT2FIX): Avoid undefined behavior. * node.h (nd_set_line): Ditto. * pack.c (encodes): Ditto. (pack_unpack): Ditto. * regint.h (BIT_STATUS_AT): Ditto. (BS_BIT): Ditto. * time.c (time_mdump): Ditto. (time_mload): Ditto. * vm_core.h (VM_FRAME_MAGIC_MASK): Ditto. * vm_trace.c (recalc_add_ruby_vm_event_flags): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544naruse2014-09-151-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* UNALIGNED_WORD_ACCESS on ppc64nobu2014-07-231-0/+1
| | | | | | | | | | * 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
* * regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.naruse2014-07-161-7/+69
| | | | | | 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
* * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.naruse2013-04-131-1/+2
| | | | | | [bug] fix problem with optimization of \z (Issue #16) [Bug #8210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h: fix typo: _M_AMD86 -> _M_AMD64.naruse2013-04-101-1/+1
| | | | | | | | * siphash.c: ditto. * st.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}nobu2013-04-051-6/+2
| | | | | | | * include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility control macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757fnaruse2013-03-011-5/+5
| | | | | | v5.13.3 [Bug#7972] [Bug#7974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h (BITS_IN_ROOM, BS_ROOM, BS_BIT): suppress warnings.nobu2012-03-221-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse2012-02-171-19/+82
| | | | | | | | | | https://github.com/k-takata/Onigmo cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h cp oniguruma.h cp tool/enc-unicode.rb cp -r enc/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c (onig_region_memsize): implemented for memsize_of().nobu2011-12-151-0/+1
| | | | | | | * ext/objspace/objspace.c (memsize_of): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does notnobu2011-07-141-1/+0
| | | | | | | | allow unaligned word access. * st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word access as well as i386. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * addr2line.c: suppressed shorten-64-to-32 warnings.naruse2011-01-311-2/+2
| | | | | | | | | | | | * regcomp.c: ditto. * regexec.c: ditto. * regint.h: ditto. * regparse.c: ditto. * regparse.h: ditto. * time.c: ditto. * variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h (OnigOpInfoType): constify name.naruse2010-11-171-1/+1
| | | | | | | | | | | | | * regcomp.c (op2name): constify return value. * regcomp.c (onig_print_compiled_byte_code): use PRIuPTR and uintptr_t to clean warnings. * regcomp.c (print_indent_tree): use PRIxPTR and intptr_t. * regexec.c (match_at): use PRIdPTR and intptr_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h (OnigStackIndex): the type should be intptr_t.naruse2010-08-261-1/+1
| | | | | | | | Original Oniguruma assumes the size of long and that of void * are equal, but it's not true on LLP64 platform: mswin64. originally patched by shintaro kuwamoto [ruby-dev:42133] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c (onig_memsize): constified.nobu2010-08-141-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (XCFLAGS): use -fvisibility=hidden if possible.nobu2010-07-211-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.matz2010-03-011-2/+1
| | | | | | | | * re.c (make_regexp): use onig_new() instead of onig_alloc_init(). * re.c (rb_reg_to_s): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regcomp.c (print_enc_string): follow enclen's change.naruse2009-12-211-1/+1
| | | | | | | | | | * regcomp.c (onig_print_compiled_byte_code): ditto. * regcomp.c (onig_print_compiled_byte_code): change prototype. * regint.c (onig_print_compiled_byte_code): comment out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.h: commit miss.nobu2009-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *regparse.c (CC_DUP_WARN): use rb_compile_warn if ScanEnv has sourcenaruse2009-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information. [ruby-dev:39105] *re.c (rb_reg_compile): add sourcefile and sourceline to the arguments. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_compile): ditto. *regcomp.c (onig_compile): ditto. *regint.h (onig_compile): ditto. *re.c (reg_compile_gen): follow above. *re.c (rb_reg_to_s): ditto. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_new_str): ditto. *re.c (rb_enc_reg_new): ditto. *re.c (rb_reg_initialize_m): ditto. *re.c (rb_reg_init_copy): ditto. *regcomp.c (onig_new): ditto. *regcomp.c (onig_compile): set sourcefile and sourceline to scan_env. *regparse.h (ScanEnv): add sourcefile and sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,nobu2009-06-301-11/+11
| | | | | | | regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_check_ints): added. please note thatko12008-08-131-2/+1
| | | | | | | | | | | this function may cause ruby's thread switching. * include/ruby/intern.h: ditto. * regint.h: use rb_thread_check_ints() instead of RUBY_CHECK_INTS() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 hasnobu2008-08-051-6/+0
| | | | | | | stdint.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regint.c (xmalloc, xrealloc, xfree): not to use ruby managed memory.nobu2008-07-251-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e