зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
7b233f0619
Коммит
68db989149
|
@ -121,14 +121,14 @@ class LoopControl : public BreakableControl {
|
||||||
JumpList entryJump_;
|
JumpList entryJump_;
|
||||||
|
|
||||||
// The bytecode offset of JSOP_LOOPHEAD.
|
// The bytecode offset of JSOP_LOOPHEAD.
|
||||||
JumpTarget head_ = {BytecodeOffset::invalidOffset()};
|
JumpTarget head_;
|
||||||
|
|
||||||
// The target of break statement jumps.
|
// 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
|
// The target of continue statement jumps, e.g., the update portion of a
|
||||||
// for(;;) loop.
|
// for(;;) loop.
|
||||||
JumpTarget continueTarget_ = {BytecodeOffset::invalidOffset()};
|
JumpTarget continueTarget_;
|
||||||
|
|
||||||
// Stack depth when this loop was pushed on the control stack.
|
// Stack depth when this loop was pushed on the control stack.
|
||||||
int32_t stackDepth_;
|
int32_t stackDepth_;
|
||||||
|
|
|
@ -6580,7 +6580,7 @@ bool BytecodeEmitter::emitYieldStar(ParseNode* iter) {
|
||||||
{
|
{
|
||||||
// goto tryStart;
|
// goto tryStart;
|
||||||
JumpList beq;
|
JumpList beq;
|
||||||
JumpTarget breakTarget = {BytecodeOffset::invalidOffset()};
|
JumpTarget breakTarget;
|
||||||
if (!emitBackwardJump(JSOP_GOTO, tryStart, &beq, &breakTarget)) {
|
if (!emitBackwardJump(JSOP_GOTO, tryStart, &beq, &breakTarget)) {
|
||||||
// [stack] NEXT ITER RESULT
|
// [stack] NEXT ITER RESULT
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -252,7 +252,7 @@ class BytecodeSection {
|
||||||
// ---- Jump ----
|
// ---- Jump ----
|
||||||
|
|
||||||
// Last jump target emitted.
|
// Last jump target emitted.
|
||||||
JumpTarget lastTarget_ = {BytecodeOffset::invalidOffset()};
|
JumpTarget lastTarget_;
|
||||||
|
|
||||||
// ---- Stack ----
|
// ---- Stack ----
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace frontend {
|
||||||
|
|
||||||
// Offset of a jump target instruction, used for patching jump instructions.
|
// Offset of a jump target instruction, used for patching jump instructions.
|
||||||
struct JumpTarget {
|
struct JumpTarget {
|
||||||
BytecodeOffset offset;
|
BytecodeOffset offset = BytecodeOffset::invalidOffset();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct JumpList {
|
struct JumpList {
|
||||||
|
|
|
@ -318,7 +318,7 @@ class MOZ_STACK_CLASS SwitchEmitter {
|
||||||
BytecodeOffset lastCaseOffset_;
|
BytecodeOffset lastCaseOffset_;
|
||||||
|
|
||||||
// Bytecode offset of the JSOP_JUMPTARGET for default body.
|
// Bytecode offset of the JSOP_JUMPTARGET for default body.
|
||||||
JumpTarget defaultJumpTargetOffset_ = {BytecodeOffset::invalidOffset()};
|
JumpTarget defaultJumpTargetOffset_;
|
||||||
|
|
||||||
// Bytecode offset of the JSOP_DEFAULT.
|
// Bytecode offset of the JSOP_DEFAULT.
|
||||||
JumpList condSwitchDefaultOffset_;
|
JumpList condSwitchDefaultOffset_;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче