зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1597943 part 2 - Remove For::UpdateOffset and DoWhile::CondOffset source notes. r=arai
Depends on D54087 Differential Revision: https://phabricator.services.mozilla.com/D54088 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0798d11d6c
Коммит
369d0d0f41
|
@ -163,12 +163,6 @@ class LoopControl : public BreakableControl {
|
|||
return loopEndOffset_ - head_.offset;
|
||||
}
|
||||
|
||||
// The offset of the continue target from the loop's top, in case there was
|
||||
// no entry jump.
|
||||
BytecodeOffsetDiff continueTargetOffsetFromLoopHead() const {
|
||||
return continueTarget_.offset - head_.offset;
|
||||
}
|
||||
|
||||
// A continue target can be specified by the following 2 ways:
|
||||
// * Use the existing JUMPTARGET by calling `setContinueTarget` with
|
||||
// the offset of the JUMPTARGET
|
||||
|
|
|
@ -209,10 +209,6 @@ bool CForEmitter::emitEnd() {
|
|||
condOffset_ - biasedTop_)) {
|
||||
return false;
|
||||
}
|
||||
if (!bce_->setSrcNoteOffset(noteIndex_, SrcNote::For::UpdateOffset,
|
||||
loopInfo_->continueTargetOffset() - biasedTop_)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If no loop condition, just emit a loop-closing jump.
|
||||
if (!loopInfo_->emitLoopEnd(bce_,
|
||||
|
|
|
@ -35,7 +35,7 @@ bool DoWhileEmitter::emitBody(const Maybe<uint32_t>& doPos,
|
|||
}
|
||||
|
||||
// Emit an annotated nop so IonBuilder can recognize the 'do' loop.
|
||||
if (!bce_->newSrcNote3(SRC_DO_WHILE, 0, 0, ¬eIndex_)) {
|
||||
if (!bce_->newSrcNote(SRC_DO_WHILE, ¬eIndex_)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -81,12 +81,7 @@ bool DoWhileEmitter::emitEnd() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Update the annotations with the update and back edge positions, for
|
||||
// IonBuilder.
|
||||
if (!bce_->setSrcNoteOffset(noteIndex_, SrcNote::DoWhile::CondOffset,
|
||||
loopInfo_->continueTargetOffsetFromLoopHead())) {
|
||||
return false;
|
||||
}
|
||||
// Update the annotation with the back edge position, for IonBuilder.
|
||||
if (!bce_->setSrcNoteOffset(noteIndex_, SrcNote::DoWhile::BackJumpOffset,
|
||||
loopInfo_->loopEndOffsetFromLoopHead())) {
|
||||
return false;
|
||||
|
|
|
@ -46,9 +46,6 @@ class SrcNote {
|
|||
// The offset of the condition expression ops from JSOP_NOP.
|
||||
CondOffset,
|
||||
|
||||
// The offset of the update expression ops from JSOP_NOP.
|
||||
UpdateOffset,
|
||||
|
||||
// The offset of JSOP_GOTO/JSOP_IFNE at the end of the loop from
|
||||
// JSOP_NOP.
|
||||
BackJumpOffset,
|
||||
|
@ -69,9 +66,6 @@ class SrcNote {
|
|||
class DoWhile {
|
||||
public:
|
||||
enum Fields {
|
||||
// The offset of the condition ops from JSOP_LOOPHEAD.
|
||||
CondOffset,
|
||||
|
||||
// The offset of JSOP_IFNE at the end of the loop from
|
||||
// JSOP_LOOPHEAD.
|
||||
BackJumpOffset,
|
||||
|
|
|
@ -3073,9 +3073,8 @@ static MOZ_MUST_USE bool SrcNotes(JSContext* cx, HandleScript script,
|
|||
|
||||
case SRC_FOR:
|
||||
if (!sp->jsprintf(
|
||||
" cond %u update %u backjump %u",
|
||||
" cond %u backjump %u",
|
||||
unsigned(GetSrcNoteOffset(sn, SrcNote::For::CondOffset)),
|
||||
unsigned(GetSrcNoteOffset(sn, SrcNote::For::UpdateOffset)),
|
||||
unsigned(GetSrcNoteOffset(sn, SrcNote::For::BackJumpOffset)))) {
|
||||
return false;
|
||||
}
|
||||
|
@ -3100,11 +3099,9 @@ static MOZ_MUST_USE bool SrcNotes(JSContext* cx, HandleScript script,
|
|||
break;
|
||||
|
||||
case SRC_DO_WHILE:
|
||||
if (!sp->jsprintf(
|
||||
" cond %u backjump %u",
|
||||
unsigned(GetSrcNoteOffset(sn, SrcNote::DoWhile::CondOffset)),
|
||||
unsigned(
|
||||
GetSrcNoteOffset(sn, SrcNote::DoWhile::BackJumpOffset)))) {
|
||||
if (!sp->jsprintf(" backjump %u",
|
||||
unsigned(GetSrcNoteOffset(
|
||||
sn, SrcNote::DoWhile::BackJumpOffset)))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче