⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238499 in webkit


Ignore:
Timestamp:
Nov 26, 2018, 10:15:18 AM (8 years ago)
Author:
Tadeu Zagallo
Message:

ASSERTION FAILED: m_outOfLineJumpTargets.contains(bytecodeOffset)
https://bugs.webkit.org/show_bug.cgi?id=191716
<rdar://problem/45723878>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-187373.js: Added.

(async.fn):

Source/JavaScriptCore:

After https://bugs.webkit.org/show_bug.cgi?id=187373, when updating
jump targets during generatorification, we only stored the new jump
target when it changed. However, the out-of-line jump targets are
cleared at the beginning of the pass, so we need to store it
unconditionally.

  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::extractStoredJumpTargetsForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r238437 r238499  
     12018-11-26  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        ASSERTION FAILED: m_outOfLineJumpTargets.contains(bytecodeOffset)
     4        https://bugs.webkit.org/show_bug.cgi?id=191716
     5        <rdar://problem/45723878>
     6
     7        Reviewed by Saam Barati.
     8
     9        * stress/regress-187373.js: Added.
     10        (async.fn):
     11
    1122018-11-21  Saam barati  <sbarati@apple.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r238461 r238499  
     12018-11-26  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        ASSERTION FAILED: m_outOfLineJumpTargets.contains(bytecodeOffset)
     4        https://bugs.webkit.org/show_bug.cgi?id=191716
     5        <rdar://problem/45723878>
     6
     7        Reviewed by Saam Barati.
     8
     9        After https://bugs.webkit.org/show_bug.cgi?id=187373, when updating
     10        jump targets during generatorification, we only stored the new jump
     11        target when it changed. However, the out-of-line jump targets are
     12        cleared at the beginning of the pass, so we need to store it
     13        unconditionally.
     14
     15        * bytecode/PreciseJumpTargetsInlines.h:
     16        (JSC::extractStoredJumpTargetsForInstruction):
     17        (JSC::updateStoredJumpTargetsForInstruction):
     18
    1192018-11-23  Wenson Hsieh  <wenson_hsieh@apple.com>
    220
  • trunk/Source/JavaScriptCore/bytecode/PreciseJumpTargetsInlines.h

    r237933 r238499  
    113113
    114114template<typename Block, typename Function>
    115 inline void extractStoredJumpTargetsForInstruction(Block&& codeBlock, const InstructionStream::Ref& instruction, Function function)
     115inline void extractStoredJumpTargetsForInstruction(Block&& codeBlock, const InstructionStream::Ref& instruction, const Function& function)
    116116{
    117117#define CASE_OP(__op) \
     
    134134
    135135template<typename Block, typename Function, typename CodeBlockOrHashMap>
    136 inline void updateStoredJumpTargetsForInstruction(Block&& codeBlock, unsigned finalOffset, InstructionStream::MutableRef instruction, Function function, CodeBlockOrHashMap codeBlockOrHashMap)
     136inline void updateStoredJumpTargetsForInstruction(Block&& codeBlock, unsigned finalOffset, InstructionStream::MutableRef instruction, const Function& function, CodeBlockOrHashMap& codeBlockOrHashMap)
    137137{
    138138#define CASE_OP(__op) \
     
    140140        int32_t target = jumpTargetForInstruction<__op>(codeBlockOrHashMap, instruction); \
    141141        int32_t newTarget = function(target); \
    142         if (newTarget != target || finalOffset) { \
    143             instruction->cast<__op>()->setTarget(BoundLabel(newTarget), [&]() { \
    144                 codeBlock->addOutOfLineJumpTarget(finalOffset + instruction.offset(), newTarget); \
    145                 return BoundLabel(); \
    146             }); \
    147         } \
     142        instruction->cast<__op>()->setTarget(BoundLabel(newTarget), [&]() { \
     143            codeBlock->addOutOfLineJumpTarget(finalOffset + instruction.offset(), newTarget); \
     144            return BoundLabel(); \
     145        }); \
    148146        break; \
    149147    }
     
    152150    do { \
    153151        int32_t target = __target; \
    154         int32_t newTarget = function(target); \
    155         if (newTarget != target) \
    156             __target = newTarget; \
     152        __target = function(target); \
    157153    } while (false)
    158154
     
    161157        int32_t target = jumpTargetForInstruction(codeBlockOrHashMap, instruction, bytecode.defaultOffset); \
    162158        int32_t newTarget = function(target); \
    163         if (newTarget != target || finalOffset) { \
    164             instruction->cast<__op>()->setDefaultOffset(BoundLabel(newTarget), [&]() { \
    165                 codeBlock->addOutOfLineJumpTarget(finalOffset + instruction.offset(), newTarget); \
    166                 return BoundLabel(); \
    167             }); \
    168         } \
     159        instruction->cast<__op>()->setDefaultOffset(BoundLabel(newTarget), [&]() { \
     160            codeBlock->addOutOfLineJumpTarget(finalOffset + instruction.offset(), newTarget); \
     161            return BoundLabel(); \
     162        }); \
    169163    } while (false)
    170164
Note: See TracChangeset for help on using the changeset viewer.