зеркало из 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 "frontend/BytecodeSection.h"
|
||||||
|
|
||||||
#include "mozilla/Assertions.h" // MOZ_ASSERT
|
#include "mozilla/Assertions.h" // MOZ_ASSERT
|
||||||
#include "mozilla/PodOperations.h" // PodZero
|
|
||||||
#include "mozilla/ReverseIterator.h" // mozilla::Reversed
|
#include "mozilla/ReverseIterator.h" // mozilla::Reversed
|
||||||
|
|
||||||
#include "frontend/CompilationInfo.h"
|
#include "frontend/CompilationInfo.h"
|
||||||
|
@ -143,13 +142,9 @@ bool CGTryNoteList::append(JSTryNoteKind kind, uint32_t stackDepth,
|
||||||
bool CGScopeNoteList::append(uint32_t scopeIndex, BytecodeOffset offset,
|
bool CGScopeNoteList::append(uint32_t scopeIndex, BytecodeOffset offset,
|
||||||
uint32_t parent) {
|
uint32_t parent) {
|
||||||
ScopeNote note;
|
ScopeNote note;
|
||||||
mozilla::PodZero(¬e);
|
|
||||||
|
|
||||||
// Offsets are given relative to sections. In finish() we will fixup base
|
|
||||||
// offset if needed.
|
|
||||||
|
|
||||||
note.index = scopeIndex;
|
note.index = scopeIndex;
|
||||||
note.start = offset.toUint32();
|
note.start = offset.toUint32();
|
||||||
|
note.length = 0;
|
||||||
note.parent = parent;
|
note.parent = parent;
|
||||||
|
|
||||||
return list.append(note);
|
return list.append(note);
|
||||||
|
|
|
@ -184,13 +184,18 @@ struct ScopeNote {
|
||||||
// Sentinel index for no ScopeNote.
|
// Sentinel index for no ScopeNote.
|
||||||
static const uint32_t NoScopeNoteIndex = UINT32_MAX;
|
static const uint32_t NoScopeNoteIndex = UINT32_MAX;
|
||||||
|
|
||||||
uint32_t index; // Index of Scope in the scopes array, or
|
// Index of the js::Scope in the script's gcthings array, or NoScopeIndex if
|
||||||
// NoScopeIndex if there is no block scope in
|
// there is no block scope in this range.
|
||||||
// this range.
|
uint32_t index = 0;
|
||||||
uint32_t start; // Bytecode offset at which this scope starts
|
|
||||||
// relative to script->code().
|
// Bytecode offset at which this scope starts relative to script->code().
|
||||||
uint32_t length; // Bytecode length of scope.
|
uint32_t start = 0;
|
||||||
uint32_t parent; // Index of parent block scope in notes, or NoScopeNote.
|
|
||||||
|
// 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>
|
template <js::XDRMode mode>
|
||||||
js::XDRResult XDR(js::XDRState<mode>* xdr);
|
js::XDRResult XDR(js::XDRState<mode>* xdr);
|
||||||
|
|
|
@ -61,7 +61,6 @@ using namespace js;
|
||||||
using mozilla::Atomic;
|
using mozilla::Atomic;
|
||||||
using mozilla::DebugOnly;
|
using mozilla::DebugOnly;
|
||||||
using mozilla::NegativeInfinity;
|
using mozilla::NegativeInfinity;
|
||||||
using mozilla::PodZero;
|
|
||||||
using mozilla::PositiveInfinity;
|
using mozilla::PositiveInfinity;
|
||||||
|
|
||||||
/* static */ MOZ_THREAD_LOCAL(JSContext*) js::TlsContext;
|
/* static */ MOZ_THREAD_LOCAL(JSContext*) js::TlsContext;
|
||||||
|
|
|
@ -52,7 +52,6 @@ using mozilla::DebugOnly;
|
||||||
using mozilla::Maybe;
|
using mozilla::Maybe;
|
||||||
using mozilla::PodArrayZero;
|
using mozilla::PodArrayZero;
|
||||||
using mozilla::PodCopy;
|
using mozilla::PodCopy;
|
||||||
using mozilla::PodZero;
|
|
||||||
|
|
||||||
using js::jit::JitScript;
|
using js::jit::JitScript;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче