From f36315a519f8ca99c873946eb62b90417ffda260 Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 20 Jul 2014 04:18:49 +0000 Subject: re_pattern_buffer: shrink from 464 to 448 bytes on 64-bit * 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 --- ChangeLog | 6 ++++++ include/ruby/oniguruma.h | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c6db2e142..375a945adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jul 20 12:36:46 2014 Eric Wong + + * include/ruby/oniguruma.h (struct re_pattern_buffer): shrink to 448 + bytes from 464 bytes on 64-bit. This breaks the ABI. + [Feature #10034] + Sun Jul 20 01:06:06 2014 SHIBATA Hiroshi * ext/openssl/ossl.c: use encryptor instead of encrypter in doc. diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 10217fdf0e..acb7365a88 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -674,13 +674,15 @@ typedef struct re_pattern_buffer { unsigned int bt_mem_end; /* need backtrack flag */ int stack_pop_level; int repeat_range_alloc; + + OnigOptionType options; + OnigRepeatRange* repeat_range; OnigEncoding enc; - OnigOptionType options; const OnigSyntaxType* syntax; - OnigCaseFoldType case_fold_flag; void* name_table; + OnigCaseFoldType case_fold_flag; /* optimization info (string search, char-map and anchors) */ int optimize; /* optimize flag */ -- cgit v1.2.3