summaryrefslogtreecommitdiffstats
path: root/js/src/wasm/AsmJS.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-13 23:02:36 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:41 -0400
commit22dba02b7bcab4d6dfe6b326ecc0a746e5a87191 (patch)
tree63d231709fe5745edef27b7b43bd9844006d7bfc /js/src/wasm/AsmJS.cpp
parent53e46b1e12ef01ccaabb3256738ea1eac74b7941 (diff)
downloadUXP-22dba02b7bcab4d6dfe6b326ecc0a746e5a87191.tar
UXP-22dba02b7bcab4d6dfe6b326ecc0a746e5a87191.tar.gz
UXP-22dba02b7bcab4d6dfe6b326ecc0a746e5a87191.tar.lz
UXP-22dba02b7bcab4d6dfe6b326ecc0a746e5a87191.tar.xz
UXP-22dba02b7bcab4d6dfe6b326ecc0a746e5a87191.zip
1216630 - Rename preludeStart and postludeEnd to toStringStart and toStringEnd and misc fixes.
Diffstat (limited to 'js/src/wasm/AsmJS.cpp')
-rw-r--r--js/src/wasm/AsmJS.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
index 51632a683..52b8eeed1 100644
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -319,7 +319,7 @@ struct js::AsmJSMetadata : Metadata, AsmJSMetadataCacheablePod
// Function constructor, this will be the first character in the function
// source. Otherwise, it will be the opening parenthesis of the arguments
// list.
- uint32_t preludeStart;
+ uint32_t toStringStart;
uint32_t srcStart;
uint32_t srcBodyStart;
bool strict;
@@ -1760,7 +1760,7 @@ class MOZ_STACK_CLASS ModuleValidator
if (!asmJSMetadata_)
return false;
- asmJSMetadata_->preludeStart = moduleFunctionNode_->pn_funbox->preludeStart;
+ asmJSMetadata_->toStringStart = moduleFunctionNode_->pn_funbox->toStringStart;
asmJSMetadata_->srcStart = moduleFunctionNode_->pn_body->pn_pos.begin;
asmJSMetadata_->srcBodyStart = parser_.tokenStream.currentToken().pos.end;
asmJSMetadata_->strict = parser_.pc->sc()->strict() &&
@@ -7051,7 +7051,7 @@ ParseFunction(ModuleValidator& m, ParseNode** fnOut, unsigned* line)
TokenStream& tokenStream = m.tokenStream();
tokenStream.consumeKnownToken(TOK_FUNCTION, TokenStream::Operand);
- uint32_t preludeStart = tokenStream.currentToken().pos.begin;
+ uint32_t toStringStart = tokenStream.currentToken().pos.begin;
*line = tokenStream.srcCoords.lineNum(tokenStream.currentToken().pos.end);
TokenKind tk;
@@ -7074,7 +7074,7 @@ ParseFunction(ModuleValidator& m, ParseNode** fnOut, unsigned* line)
ParseContext* outerpc = m.parser().pc;
Directives directives(outerpc);
- FunctionBox* funbox = m.parser().newFunctionBox(fn, fun, preludeStart, directives, NotGenerator,
+ FunctionBox* funbox = m.parser().newFunctionBox(fn, fun, toStringStart, directives, NotGenerator,
SyncFunction, /* tryAnnexB = */ false);
if (!funbox)
return false;
@@ -8071,7 +8071,7 @@ HandleInstantiationFailure(JSContext* cx, CallArgs args, const AsmJSMetadata& me
return false;
}
- uint32_t begin = metadata.preludeStart;
+ uint32_t begin = metadata.toStringStart;
uint32_t end = metadata.srcEndAfterCurly();
Rooted<JSFlatString*> src(cx, source->substringDontDeflate(cx, begin, end));
if (!src)
@@ -8554,7 +8554,7 @@ LookupAsmJSModuleInCache(ExclusiveContext* cx, AsmJSParser& parser, bool* loaded
return true;
// See AsmJSMetadata comment as well as ModuleValidator::init().
- asmJSMetadata->preludeStart = parser.pc->functionBox()->preludeStart;
+ asmJSMetadata->toStringStart = parser.pc->functionBox()->toStringStart;
asmJSMetadata->srcStart = parser.pc->functionBox()->functionNode->pn_body->pn_pos.begin;
asmJSMetadata->srcBodyStart = parser.tokenStream.currentToken().pos.end;
asmJSMetadata->strict = parser.pc->sc()->strict() && !parser.pc->sc()->hasExplicitUseStrict();
@@ -8852,7 +8852,7 @@ js::AsmJSModuleToString(JSContext* cx, HandleFunction fun, bool addParenToLambda
MOZ_ASSERT(IsAsmJSModule(fun));
const AsmJSMetadata& metadata = AsmJSModuleFunctionToModule(fun).metadata().asAsmJS();
- uint32_t begin = metadata.preludeStart;
+ uint32_t begin = metadata.toStringStart;
uint32_t end = metadata.srcEndAfterCurly();
ScriptSource* source = metadata.scriptSource.get();