[ruby-cvs:78491] f9e5c74cd2 (master): compile.c: stop wrong peephole optimization when covearge is enabled

"Yusuke Endoh" <[email protected]>
Newsgroups gmane.comp.lang.ruby.cvs
Message-ID <[email protected]>
Yusuke Endoh	2019-12-04 10:33:35 +0900 (Wed, 04 Dec 2019)

  New Revision: f9e5c74cd2

  https://github.com/ruby/ruby/commit/f9e5c74cd2

  Log:
    compile.c: stop wrong peephole optimization when covearge is enabled
    
    jump-jump optimization ignores the event flags of the jump instruction
    being skipped, which leads to overlook of line events.
    
    This changeset stops the wrong optimization when coverage measurement is
    neabled and when the jump instruction has any event flag.
    
    Note that this issue is not only for coverage but also for TracePoint,
    and this change does not fix TracePoint.
    However, fixing it fundamentally is tough (which requires revamp of
    the compiler).  This issue is critical in terms of coverage measurement,
    but minor for TracePoint (ko1 said), so we here choose a stopgap
    measurement.
    
    [Bug #15980] [Bug #16397]
    
    Note for backporters: this changeset can be viewed by `git diff -w`.

  Modified files:
    compile.c
    test/coverage/test_coverage.rb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.