Bug 1553958 - Make JumpTarget.offset default value to invalid offset. r=jorendorff

Differential Revision: https://phabricator.services.mozilla.com/D32401

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tooru Fujisawa 2019-05-30 20:24:43 +00:00
Родитель 7b233f0619
Коммит 68db989149
5 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -121,14 +121,14 @@ class LoopControl : public BreakableControl {
JumpList entryJump_;
// The bytecode offset of JSOP_LOOPHEAD.
JumpTarget head_ = {BytecodeOffset::invalidOffset()};
JumpTarget head_;
// The target of break statement jumps.
JumpTarget breakTarget_ = {BytecodeOffset::invalidOffset()};
JumpTarget breakTarget_;
// The target of continue statement jumps, e.g., the update portion of a
// for(;;) loop.
JumpTarget continueTarget_ = {BytecodeOffset::invalidOffset()};
JumpTarget continueTarget_;
// Stack depth when this loop was pushed on the control stack.
int32_t stackDepth_;

Просмотреть файл

@ -6580,7 +6580,7 @@ bool BytecodeEmitter::emitYieldStar(ParseNode* iter) {
{
// goto tryStart;
JumpList beq;
JumpTarget breakTarget = {BytecodeOffset::invalidOffset()};
JumpTarget breakTarget;
if (!emitBackwardJump(JSOP_GOTO, tryStart, &beq, &breakTarget)) {
// [stack] NEXT ITER RESULT
return false;

Просмотреть файл

@ -252,7 +252,7 @@ class BytecodeSection {
// ---- Jump ----
// Last jump target emitted.
JumpTarget lastTarget_ = {BytecodeOffset::invalidOffset()};
JumpTarget lastTarget_;
// ---- Stack ----

Просмотреть файл

@ -55,7 +55,7 @@ namespace frontend {
// Offset of a jump target instruction, used for patching jump instructions.
struct JumpTarget {
BytecodeOffset offset;
BytecodeOffset offset = BytecodeOffset::invalidOffset();
};
struct JumpList {

Просмотреть файл

@ -318,7 +318,7 @@ class MOZ_STACK_CLASS SwitchEmitter {
BytecodeOffset lastCaseOffset_;
// Bytecode offset of the JSOP_JUMPTARGET for default body.
JumpTarget defaultJumpTargetOffset_ = {BytecodeOffset::invalidOffset()};
JumpTarget defaultJumpTargetOffset_;
// Bytecode offset of the JSOP_DEFAULT.
JumpList condSwitchDefaultOffset_;