mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 22:57:31 +09:00
1342273 - Improve frontend tracelogging. [PARTIAL] Only implemented const to rvalue changes, no tracelogging
This commit is contained in:
parent
9b7c6181e6
commit
e48044fc01
2 changed files with 18 additions and 16 deletions
|
|
@ -3539,21 +3539,23 @@ BytecodeEmitter::needsImplicitThis()
|
||||||
bool
|
bool
|
||||||
BytecodeEmitter::maybeSetDisplayURL()
|
BytecodeEmitter::maybeSetDisplayURL()
|
||||||
{
|
{
|
||||||
if (tokenStream()->hasDisplayURL()) {
|
if (tokenStream().hasDisplayURL()) {
|
||||||
if (!parser->ss->setDisplayURL(cx, tokenStream()->displayURL()))
|
if (!parser->ss->setDisplayURL(cx, tokenStream().displayURL())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BytecodeEmitter::maybeSetSourceMap()
|
BytecodeEmitter::maybeSetSourceMap()
|
||||||
{
|
{
|
||||||
if (tokenStream()->hasSourceMapURL()) {
|
if (tokenStream().hasSourceMapURL()) {
|
||||||
MOZ_ASSERT(!parser->ss->hasSourceMapURL());
|
MOZ_ASSERT(!parser->ss->hasSourceMapURL());
|
||||||
if (!parser->ss->setSourceMapURL(cx, tokenStream()->sourceMapURL()))
|
if (!parser->ss->setSourceMapURL(cx, tokenStream().sourceMapURL())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Source map URLs passed as a compile option (usually via a HTTP source map
|
* Source map URLs passed as a compile option (usually via a HTTP source map
|
||||||
|
|
@ -3591,20 +3593,20 @@ BytecodeEmitter::tellDebuggerAboutCompiledScript(ExclusiveContext* cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline TokenStream*
|
inline TokenStream&
|
||||||
BytecodeEmitter::tokenStream()
|
BytecodeEmitter::tokenStream()
|
||||||
{
|
{
|
||||||
return &parser->tokenStream;
|
return parser->tokenStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...)
|
BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...)
|
||||||
{
|
{
|
||||||
TokenPos pos = pn ? pn->pn_pos : tokenStream()->currentToken().pos;
|
TokenPos pos = pn ? pn->pn_pos : tokenStream().currentToken().pos;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, errorNumber);
|
va_start(args, errorNumber);
|
||||||
bool result = tokenStream()->reportCompileErrorNumberVA(nullptr, pos.begin, JSREPORT_ERROR,
|
bool result = tokenStream().reportCompileErrorNumberVA(nullptr, pos.begin, JSREPORT_ERROR,
|
||||||
errorNumber, args);
|
errorNumber, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -3613,11 +3615,11 @@ BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...)
|
||||||
bool
|
bool
|
||||||
BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...)
|
BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...)
|
||||||
{
|
{
|
||||||
TokenPos pos = pn ? pn->pn_pos : tokenStream()->currentToken().pos;
|
TokenPos pos = pn ? pn->pn_pos : tokenStream().currentToken().pos;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, errorNumber);
|
va_start(args, errorNumber);
|
||||||
bool result = tokenStream()->reportExtraWarningErrorNumberVA(nullptr, pos.begin,
|
bool result = tokenStream().reportExtraWarningErrorNumberVA(nullptr, pos.begin,
|
||||||
errorNumber, args);
|
errorNumber, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -3626,11 +3628,11 @@ BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...)
|
||||||
bool
|
bool
|
||||||
BytecodeEmitter::reportStrictModeError(ParseNode* pn, unsigned errorNumber, ...)
|
BytecodeEmitter::reportStrictModeError(ParseNode* pn, unsigned errorNumber, ...)
|
||||||
{
|
{
|
||||||
TokenPos pos = pn ? pn->pn_pos : tokenStream()->currentToken().pos;
|
TokenPos pos = pn ? pn->pn_pos : tokenStream().currentToken().pos;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, errorNumber);
|
va_start(args, errorNumber);
|
||||||
bool result = tokenStream()->reportStrictModeErrorNumberVA(nullptr, pos.begin, sc->strict(),
|
bool result = tokenStream().reportStrictModeErrorNumberVA(nullptr, pos.begin, sc->strict(),
|
||||||
errorNumber, args);
|
errorNumber, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ struct MOZ_STACK_CLASS BytecodeEmitter
|
||||||
MOZ_MUST_USE bool maybeSetSourceMap();
|
MOZ_MUST_USE bool maybeSetSourceMap();
|
||||||
void tellDebuggerAboutCompiledScript(ExclusiveContext* cx);
|
void tellDebuggerAboutCompiledScript(ExclusiveContext* cx);
|
||||||
|
|
||||||
inline TokenStream* tokenStream();
|
inline TokenStream& tokenStream();
|
||||||
|
|
||||||
BytecodeVector& code() const { return current->code; }
|
BytecodeVector& code() const { return current->code; }
|
||||||
jsbytecode* code(ptrdiff_t offset) const { return current->code.begin() + offset; }
|
jsbytecode* code(ptrdiff_t offset) const { return current->code.begin() + offset; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue