Commit Graph

80 Commits

Author SHA1 Message Date
Dorel Luca
8cc61e1d4b Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
8cc3e9bf3f Bug 1605934 - Use nested namespaces r=sg
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
2020-01-18 13:16:39 +00:00
Emilio Cobos Álvarez
3ed9a0d131 Bug 1607595 - Remove uses of mozilla::IsBaseOf. r=froydnj
Automatically generated by:

$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/mozilla::IsBaseOf</std::is_base_of</g'
$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/IsBaseOf</std::is_base_of</g

Differential Revision: https://phabricator.services.mozilla.com/D59013
2020-01-08 14:52:10 +00:00
Ted Campbell
f7b1181751 Bug 1604792 - Move parseGoal from Parser to SharedContext. r=mgaudet
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
2019-12-18 22:14:34 +00:00
Matthew Gaudet
548a40d5a5 Bug 1601698 - Replace GenerateFunctionCreationData with constructor r=caroline
Differential Revision: https://phabricator.services.mozilla.com/D57158
2019-12-13 22:17:44 +00:00
Ted Campbell
568523a18a Bug 1602878 - Don't call FunctionBox::initWithEnclosingScope with nullptr. r=mgaudet
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
2019-12-11 20:12:35 +00:00
Tooru Fujisawa
53a9e4e438 Bug 1597152 - Part 1: Set lazy function position after reading tree. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D53368
2019-11-22 14:19:29 +00:00
vad118
4def7cc9c3 Bug 1592433 - Hoist Deferred Allocation mode from FunctionTreeHolder to ParseInfo r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D52726
2019-11-19 16:25:41 +00:00
Ted Campbell
204dac71fa Bug 1589904 - Remove LazyScript::functionNonDelazifying() r=jandem
Replace with LazyScript::function() for the same reasons as removing
JSScript::functionNonDelazifying().

Depends on D50505

Differential Revision: https://phabricator.services.mozilla.com/D50506
2019-10-25 13:07:36 +00:00
Tooru Fujisawa
175c3f88bc Bug 1587338 - Remove const BinASTKind kind parameter from non-sum parser methods. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D48662
2019-10-11 03:48:14 +00:00
Tooru Fujisawa
8416b132b5 Bug 1585519 - Part 1: Add MOZ_UNLIKELY to error handling code. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D48013
2019-10-07 05:11:01 +00:00
Tooru Fujisawa
d0ddb105e3 Bug 1585234 - Part 2: Use smaller Variant for context. r=Yoric
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
2019-10-07 05:10:49 +00:00
Tooru Fujisawa
b50941f06d Bug 1585234 - Part 1: Remove unnecessary Variant wrap/match on context. r=Yoric
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
2019-10-07 05:10:32 +00:00
wartmanm
63585b0983 Bug 1570881 - Update remaining BytecodeEmitter constructor to use FunctionBox line/column r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D43390
2019-09-18 21:33:28 +00:00
Matthew Gaudet
d7c5d8d4ed Bug 1577857 - Create ParseInfo class to manage Parser related information r=tcampbell
- 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
2019-09-10 15:53:20 +00:00
Ted Campbell
a98dc1e4a2 Bug 1569315 - Follow-up formatting nits. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D41060
2019-08-07 18:54:06 +00:00
Matthew Gaudet
422d1cc81b Bug 1569315 - Make FunctionTree processing either Eager or Deferred. r=tcampbell
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
2019-08-06 21:01:42 +00:00
Matthew Gaudet
0b04adbd4d Bug 1569315 - Factor out FunctionCreationData from AllocNewFunction r=tcampbell,jonco
Differential Revision: https://phabricator.services.mozilla.com/D39771
2019-08-02 14:51:21 +00:00
Andreea Pavel
8d1e7c4fe1 Backed out 2 changesets (bug 1569315) on request from mgaudet on a CLOSED TREE
Backed out changeset eb0b2f561461 (bug 1569315)
Backed out changeset 5d553fb84ecb (bug 1569315)
2019-08-02 02:02:52 +03:00
Matthew Gaudet
d558fd88df Bug 1569315 - Factor out FunctionCreationData from AllocNewFunction r=tcampbell,jonco
Differential Revision: https://phabricator.services.mozilla.com/D39771
2019-08-01 16:09:05 +00:00
Matthew Gaudet
b16a11fff7 Bug 1569315 - Create FunctionFlags class to allow recycling function flag queries elsewhere r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D39773
2019-07-31 19:30:27 +00:00
Matthew Gaudet
3e710f0359 Bug 1569315 - Sink prototype fetching into AllocNewFunction r=tcampbell
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
2019-07-31 19:30:27 +00:00
Matthew Gaudet
b711ad8e20 Bug 1567579 - Store inner FunctionBoxes instead of inner functions r=tcampbell
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
2019-07-31 19:27:57 +00:00
Matthew Gaudet
2b0501c598 Bug 1567579 - Set the toStringEnd on the lazyScript directly during construction. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D39681
2019-07-31 19:31:40 +00:00
Matthew Gaudet
2297bd167c Bug 1558604 - Defer initialization of JSFunction::nargs until after function parsing is done. r=jorendorff
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
2019-07-23 17:49:31 +00:00
Matthew Gaudet
f7aef0db6b Bug 1558604 - Keep interpreted and interpretedLazy on FunctionBox r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D34587
2019-07-23 17:49:31 +00:00
Ted Campbell
97d7258eed Bug 1567221 - Remove JSScript::ImmutableFlags::IsBinAST flag. r=arai
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
2019-07-19 01:58:09 +00:00
Tooru Fujisawa
7472917f42 Bug 1563489 - Part 1: Add BinASTParserPerTokenizer::finish{Eager,Lazy}Function and remove BinASTParserPerTokenizer::buildFunction. r=Yoric,mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D36931
2019-07-11 19:20:05 +00:00
Tooru Fujisawa
2ea1669c11 Bug 1563489 - Part 0: Remove generator related code from BinAST. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D36930
2019-07-11 19:19:49 +00:00
Noemi Erli
c9f58c6f32 Backed out 2 changesets (bug 1558604) for causing failures in class-declaration-explicit-ctor.js CLOSED TREE
Backed out changeset 2fa5845aab8f (bug 1558604)
Backed out changeset 6accf00aa7cc (bug 1558604)
2019-06-13 16:06:59 +03:00
Matthew Gaudet
23a6561745 Bug 1558604 - Defer initializaton of JSFunction::nargs until after function parsing is done. r=jorendorff
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
2019-06-12 23:49:04 +00:00
Brindusan Cristian
fded3907eb Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-05-25 00:54:26 +03:00
Steve Fink
4182d41ae5 No bug. Reformat js/** to fix accumulated divergences.
# ignore-this-changeset
2019-05-24 11:57:18 -07:00
David Teller
3568baf9cd Bug 1553482 - Use BinASTInterfaceAndField in Context;r=arai
Depends on D32295

Differential Revision: https://phabricator.services.mozilla.com/D32395
2019-05-24 18:48:57 +00:00
Noemi Erli
09d064067f Backed out 4 changesets (bug 1553482) for build bustages in BinASTTokenReaderBase.h CLOSED TREE
Backed out changeset 49278023aa7d (bug 1553482)
Backed out changeset 57a5c8689ed3 (bug 1553482)
Backed out changeset c50879a48ff8 (bug 1553482)
Backed out changeset 5570e3e6c5e5 (bug 1553482)
2019-05-24 16:49:30 +03:00
David Teller
67f6e89796 Bug 1553482 - Use BinASTInterfaceAndField in Context;r=arai
Depends on D32295

Differential Revision: https://phabricator.services.mozilla.com/D32395
2019-05-24 12:11:02 +00:00
arthur.iakab
699b884244 Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Noemi Erli
32ca015d5e Backed out 4 changesets (bug 1553482) for causing build bustages in BinASTTokenReaderBase.h CLOSED TREE
Backed out changeset dea9d20a1162 (bug 1553482)
Backed out changeset f6e6533c5db2 (bug 1553482)
Backed out changeset 82f5e463bcb5 (bug 1553482)
Backed out changeset 9db8b5eba797 (bug 1553482)
2019-05-24 13:05:09 +03:00
Sylvestre Ledru
10a773a4ca Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883
2019-05-24 09:59:17 +00:00
David Teller
583270d723 Bug 1553482 - Use BinASTInterfaceAndField in Context;r=arai
Depends on D32295

Differential Revision: https://phabricator.services.mozilla.com/D32395
2019-05-24 09:12:22 +00:00
Matthew Gaudet
2a49444202 Bug 1552316 - Don't rely on functionbox for initFromLazyFunction r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D31536
2019-05-21 13:47:44 +00:00
Matthew Gaudet
c96f27829a Bug 1552316 - Don't rely on functionbox in initWithEnclosingParseContext and initFiledInitializer r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D31535
2019-05-21 13:47:40 +00:00
Matthew Gaudet
8a1aee1183 Bug 1552316 - Hoist some queries from function into FunctionBox r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D31530
2019-05-21 13:45:21 +00:00
Tooru Fujisawa
5121de08d8 Bug 1551489 - Part 2: Instantiate BinASTParser<BinASTTokenReaderContext>. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D31058
2019-05-20 10:40:42 +00:00
David Teller
1f9fc2902b Bug 1545751 - In BinAST, pass Context while parsing;r=arai
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
2019-04-29 17:24:55 +00:00
Sylvestre Ledru
fbb733807d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28948
2019-04-28 09:30:05 +00:00
Bogdan Tara
404585d2f4 Backed out changeset d0eebfb3d916 (bug 1545751) for spidermonkey builds bustages CLOSED TREE 2019-04-25 18:20:18 +03:00
David Teller
98e9fbcec6 Bug 1545751 - In BinAST, pass Context while parsing;r=arai
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
2019-04-25 08:07:57 +00:00
Ashley Hauck
fcc9a674a6 Bug 1542406 - Restrict contents of direct eval in fields. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D27152
2019-04-24 18:45:13 +00:00
Cosmin Sabou
27e466a122 Backed out changeset a4847e3f634e (bug 1545751) for bustages on BinASTTokenReaderBase. CLOSED TREE 2019-04-24 12:57:19 +03:00