Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files
Differential Revision: https://phabricator.services.mozilla.com/D58217
Since this flag is preserved on LazyScript, it is useful to track it on
SharedContext and initialize it consistently on lazy and non-lazy scripts.
This patch removes the plumbing of passing the ParseGoal through the parser
class hierarchy.
Differential Revision: https://phabricator.services.mozilla.com/D57661
When creating a FunctionBox for a skipped-over-lazy function we do not yet
know it's enclosing scope. Remove calls to initWithEnclosingScope for this
case. This avoids asking for the enclosingScope() of a function that doesn't
have one yet.
Also remove an assert from the BytecodeEmitter that was using partially
initialized flags. The condition was previously checked when the
LazyScript::NeedsHomeObject flag was initialized.
Differential Revision: https://phabricator.services.mozilla.com/D56723
Replace with LazyScript::function() for the same reasons as removing
JSScript::functionNonDelazifying().
Depends on D50505
Differential Revision: https://phabricator.services.mozilla.com/D50506
Part 2 addes smaller Variant types (FieldOrRootContext and FieldOrListContext),
and modifies the code generator to use smaller Variant instead of Context.
Differential Revision: https://phabricator.services.mozilla.com/D48012
A half of Parser methods are using single context type, and remaining are using
2 context types. There are no place that uses 3 context types necessarily.
Part 1 modifies the code generator to collect context type information, and
reflect the information to Parser methods, to use single non-Variant type
if possible.
Also changed corresponding TokenReader methods to use single non-Variant type.
Differential Revision: https://phabricator.services.mozilla.com/D48011
- Hoists the UsedNameTracker and and the FunctionTreeHolder into a new ParseInfo structure.
- Make LifoAllocScopes lifetimes lexically explicit throughout parser.
- Removes allocator argument to Parser construction in lieu of the LifoAllocScope inside of ParseInfo.
Differential Revision: https://phabricator.services.mozilla.com/D45042
This makes eager processing the default as well, which makes the code
effectively work how it does before the FunctionTree patches.
Differential Revision: https://phabricator.services.mozilla.com/D40480
GetFunctionPrototype already returns null for 'normal' functions. Eventually
the real %FunctionPrototype% is provided based on the class proto key.
Differential Revision: https://phabricator.services.mozilla.com/D39770
This is a good preparation fo deferred function allocation (Bug 1569315),
but also removes some awkward rooting / type issues in deferred lazyscript
allocation
Differential Revision: https://phabricator.services.mozilla.com/D39745
The args count needs to be set before the LazyScript takes hold of the
functionbox, or else some code that references lazy functions can get the wrong
number of arguments (ie, CloneFunctionObjectIfNotSingleton on a lazy function)
Differential Revision: https://phabricator.services.mozilla.com/D36984
This flag is only being used for debug asserts and a similar effect
could be gotten by checking if the ScriptSource has BinAST.
Differential Revision: https://phabricator.services.mozilla.com/D38511
The args count needs to be set before the LazyScript takes hold of the
functionbox, or else some code that references lazy functions can get the wrong
number of arguments (ie, CloneFunctionObjectIfNotSingleton on a lazy function)
Differential Revision: https://phabricator.services.mozilla.com/D34586
The Context 0.1 format specifies that the (de)compression of nodes is determined by:
- its node type;
- its parent type;
- the index in the parent node;
- whether the node is an element of an array.
This patch modifies the parser generator to pass the information during parsing.
Differential Revision: https://phabricator.services.mozilla.com/D28534
The Context 0.1 format specifies that the (de)compression of nodes is determined by:
- its node type;
- its parent type;
- the index in the parent node;
- whether the node is an element of an array.
This patch modifies the parser generator to pass the information during parsing.
Differential Revision: https://phabricator.services.mozilla.com/D28534