[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[ruby-core:83908] [Ruby trunk Feature#10328] [PATCH] make OPT_SUPPORT_JOKE a proper VM option
From:
mame@...
Date:
2017-11-28 05:25:18 UTC
List:
ruby-core #83908
Issue #10328 has been updated by mame (Yusuke Endoh).
A patch to remove joke instructions when `SUPPORT_JOKE` is false:
```
diff --git a/tool/instruction.rb b/tool/instruction.rb
index 3354933da9..e917826ffe 100755
--- a/tool/instruction.rb
+++ b/tool/instruction.rb
@@ -885,6 +885,7 @@ def make_footer_undefs insn
def make_header insn
label = insn.trace ? '' : "start_of_#{insn.name}:;"
+ commit "#ifdef SUPPORT_JOKE" if insn.comm[:c] == "joke"
commit "INSN_ENTRY(#{insn.name}){#{label}"
make_header_prepare_stack insn
commit "{"
@@ -911,6 +912,7 @@ def make_footer insn
make_footer_undefs insn
end
commit " END_INSN(#{insn.name});}}}"
+ commit "#endif /* SUPPORT_JOKE */" if insn.comm[:c] == "joke"
end
def make_insn_def insn
```
I'm neutral to the SUPPORT_JOKE feature. I don't care 736 bytes if the feature is funny enough. But I'm unsure if the feature is funny enough.
----------------------------------------
Feature #10328: [PATCH] make OPT_SUPPORT_JOKE a proper VM option
https://bugs.ruby-lang.org/issues/10328#change-67958
* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
* Assignee: normalperson (Eric Wong)
* Target version: 2.2.0
----------------------------------------
This is not a joke :)
I worry about executable size with things like [Feature #10326],
and I noticed unused instructions are emitted even with jokes disabled
This reduces executable size slightly on x86-64-linux:
text | data | bss | dec | hex | filename
--------+-------+--------+---------+--------+------------
2782156 | 22400 | 71880 | 2876436 | 2be414 | ruby.before
2781420 | 22400 | 71880 | 2875700 | 2be134 | ruby.after
Pretty trivial so I'll commit in a day or two.
---
~~~
compile.c | 4 ++--
eval.c | 2 +-
iseq.h | 2 +-
tool/instruction.rb | 9 ++++++---
vm_opts.h | 2 +-
5 files changed, 11 insertions(+), 8 deletions(-)
~~~
---Files--------------------------------
0001-make-OPT_SUPPORT_JOKE-a-proper-VM-option.patch (3.18 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>