mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1055337
- only set FunctionBox::useAsm when actively parsing asm.js, not on validation failure re-parses (r=jorendorff)
--HG-- extra : rebase_source : 1afc962d0175c540435339f65af02e25bcd6dabe
This commit is contained in:
parent
e32adaf25c
commit
182e711a53
@ -509,7 +509,7 @@ FunctionBox::FunctionBox(ExclusiveContext *cx, ObjectBox* traceListHead, JSFunct
|
||||
inWith(false), // initialized below
|
||||
inGenexpLambda(false),
|
||||
hasDestructuringArgs(false),
|
||||
useAsm(directives.asmJS()),
|
||||
useAsm(false),
|
||||
insideUseAsm(outerpc && outerpc->useAsmOrInsideUseAsm()),
|
||||
usesArguments(false),
|
||||
usesApply(false),
|
||||
@ -2421,10 +2421,11 @@ template <>
|
||||
bool
|
||||
Parser<FullParseHandler>::asmJS(Node list)
|
||||
{
|
||||
// If we are already inside "use asm" that means we are either actively
|
||||
// compiling or we are reparsing after asm.js validation failure. In either
|
||||
// case, nothing to do here.
|
||||
if (pc->useAsmOrInsideUseAsm())
|
||||
// We should be encountering the "use asm" directive for the first time; if
|
||||
// the directive is already, we must have failed asm.js validation and we're
|
||||
// reparsing. In that case, don't try to validate again. A non-null
|
||||
// newDirectives means we're not in a normal function.
|
||||
if (!pc->newDirectives || pc->newDirectives->asmJS())
|
||||
return true;
|
||||
|
||||
// If there is no ScriptSource, then we are doing a non-compiling parse and
|
||||
|
Loading…
Reference in New Issue
Block a user