зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1615402 - Part 6: Add field initializers to ScopeNote. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D66352 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cd712d5d96
Коммит
8d54c0409b
|
@ -7,7 +7,6 @@
|
|||
#include "frontend/BytecodeSection.h"
|
||||
|
||||
#include "mozilla/Assertions.h" // MOZ_ASSERT
|
||||
#include "mozilla/PodOperations.h" // PodZero
|
||||
#include "mozilla/ReverseIterator.h" // mozilla::Reversed
|
||||
|
||||
#include "frontend/CompilationInfo.h"
|
||||
|
@ -143,13 +142,9 @@ bool CGTryNoteList::append(JSTryNoteKind kind, uint32_t stackDepth,
|
|||
bool CGScopeNoteList::append(uint32_t scopeIndex, BytecodeOffset offset,
|
||||
uint32_t parent) {
|
||||
ScopeNote note;
|
||||
mozilla::PodZero(¬e);
|
||||
|
||||
// Offsets are given relative to sections. In finish() we will fixup base
|
||||
// offset if needed.
|
||||
|
||||
note.index = scopeIndex;
|
||||
note.start = offset.toUint32();
|
||||
note.length = 0;
|
||||
note.parent = parent;
|
||||
|
||||
return list.append(note);
|
||||
|
|
|
@ -184,13 +184,18 @@ struct ScopeNote {
|
|||
// Sentinel index for no ScopeNote.
|
||||
static const uint32_t NoScopeNoteIndex = UINT32_MAX;
|
||||
|
||||
uint32_t index; // Index of Scope in the scopes array, or
|
||||
// NoScopeIndex if there is no block scope in
|
||||
// this range.
|
||||
uint32_t start; // Bytecode offset at which this scope starts
|
||||
// relative to script->code().
|
||||
uint32_t length; // Bytecode length of scope.
|
||||
uint32_t parent; // Index of parent block scope in notes, or NoScopeNote.
|
||||
// Index of the js::Scope in the script's gcthings array, or NoScopeIndex if
|
||||
// there is no block scope in this range.
|
||||
uint32_t index = 0;
|
||||
|
||||
// Bytecode offset at which this scope starts relative to script->code().
|
||||
uint32_t start = 0;
|
||||
|
||||
// Length of bytecode span this scope covers.
|
||||
uint32_t length = 0;
|
||||
|
||||
// Index of parent block scope in notes, or NoScopeNote.
|
||||
uint32_t parent = 0;
|
||||
|
||||
template <js::XDRMode mode>
|
||||
js::XDRResult XDR(js::XDRState<mode>* xdr);
|
||||
|
|
|
@ -61,7 +61,6 @@ using namespace js;
|
|||
using mozilla::Atomic;
|
||||
using mozilla::DebugOnly;
|
||||
using mozilla::NegativeInfinity;
|
||||
using mozilla::PodZero;
|
||||
using mozilla::PositiveInfinity;
|
||||
|
||||
/* static */ MOZ_THREAD_LOCAL(JSContext*) js::TlsContext;
|
||||
|
|
|
@ -52,7 +52,6 @@ using mozilla::DebugOnly;
|
|||
using mozilla::Maybe;
|
||||
using mozilla::PodArrayZero;
|
||||
using mozilla::PodCopy;
|
||||
using mozilla::PodZero;
|
||||
|
||||
using js::jit::JitScript;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче