- 09 Jan, 2017 1 commit
-
-
marja authored
This adds tracking the following: - Declarations created by catch (potentially destructuring) - Declarations created by for-each (potentially destructuring) - Class declarations BUG=v8:5501, v8:5516 Review-Url: https://codereview.chromium.org/2617923003 Cr-Commit-Position: refs/heads/master@{#42129}
-
- 05 Jan, 2017 1 commit
-
-
marja authored
This makes the context allocation less pessimistic in case of name clash. This is also required for being able to skip inner functions. BUG=v8:5501, v8:5516 Review-Url: https://codereview.chromium.org/2610823003 Cr-Commit-Position: refs/heads/master@{#42087}
-
- 16 Dec, 2016 1 commit
-
-
littledan authored
This patch removes parser code implementing desugaring for ESnext public and private fields on classes. The desugaring should probably be implemented in the interpreter instead, and more work needs to go into optimization and debugger support. The actual parsing of class fields is left in, as the syntax is relatively stable, and there are strong cctests for the grammar. R=marja BUG=v8:5367 Review-Url: https://codereview.chromium.org/2578893005 Cr-Commit-Position: refs/heads/master@{#41776}
-
- 13 Dec, 2016 1 commit
-
-
marja authored
The assignment in default parameters (e.g., function foo(a = somedefault) { } doesn't flow through PreParserFactory::NewAssignment even if the comment claims so. Thus, piping through the variables is not needed. Kudos to neis@ for pointing this out. BUG=v8:5501 R=neis@chromium.org Review-Url: https://codereview.chromium.org/2569983003 Cr-Commit-Position: refs/heads/master@{#41670}
-
- 12 Dec, 2016 1 commit
-
-
marja authored
BUG=v8:5501, v8:5678 Review-Url: https://codereview.chromium.org/2539123002 Cr-Commit-Position: refs/heads/master@{#41645}
-
- 07 Dec, 2016 2 commits
-
-
jwolfe authored
We're still collecting use counter data for this situation. BUG=v8:4973 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2510873005 Cr-Commit-Position: refs/heads/master@{#41563}
-
henrique.ferreiro authored
This allows to detect a static property also named 'name', and also makes sure 'name' is added last, to be standards-compliant. BUG=v8:4199 Review-Url: https://codereview.chromium.org/2423053002 Cr-Commit-Position: refs/heads/master@{#41546}
-
- 06 Dec, 2016 1 commit
-
-
marja authored
This makes the context allocation less pessimistic in the following cases: function outer() { var a; // Won't be context allocated function inner1() { var a; a; } function inner2(a) { a; } function inner3([a]) { a; } function inner4({ a: b}) { a; } } BUG=v8:5501 Review-Url: https://codereview.chromium.org/2407163003 Cr-Commit-Position: refs/heads/master@{#41521}
-
- 02 Dec, 2016 1 commit
-
-
vogelheim authored
This apparently gradually fell out of use after the more general Token::IsIdentifer was introduced, and whoever left last forgot to turn out the lights. The only remaining use was in an assertion in DeclareLabel, but meanwhile DeclareLabel is only called if IsIdentifier. I added re-formulated assertions, just in case. R=verwaest@chromium.org BUG=v8:4947 Review-Url: https://codereview.chromium.org/2549493002 Cr-Commit-Position: refs/heads/master@{#41452}
-
- 01 Dec, 2016 1 commit
-
-
petermarshall authored
Unfortunately we have to split this up into two cases: those with exactly one spread argument as the final argument, and all others, due to any side-effects of evaluation being visible. This is in preparation for a new bytecode which handles super calls. BUG=v8:5659 Review-Url: https://codereview.chromium.org/2540593003 Cr-Commit-Position: refs/heads/master@{#41415}
-
- 30 Nov, 2016 1 commit
-
-
jochen authored
Also move them to a separate interface header to avoid having to include parser.h so much BUG=v8:5589 R=verwaest@chromium.org,marja@chromium.org Review-Url: https://codereview.chromium.org/2534393002 Cr-Commit-Position: refs/heads/master@{#41386}
-
- 28 Nov, 2016 2 commits
-
-
jochen authored
They're supposed to be stable across several parse passes, so we'll also store them in the associated SharedFunctionInfos To achieve this, the PreParser and Parser need to generated the same number of FunctionLiterals. To achieve this, we teach the PreParser about desuggaring of class literals. For regular functions, the function IDs are assigned in the order they occur in the source. For arrow functions, however, we only know that it's an arrow function after parsing the parameter list, and so the ID assigned to the arrow function is larger than the IDs assigned to functions defined in the parameter list. This implies that we have to reset the function ID counter to before the parameter list when re-parsing an arrow function. To be able to do this, we store the number of function literals found in the parameter list of arrow functions as well. BUG=v8:5589 Review-Url: https://codereview.chromium.org/2481163002 Cr-Commit-Position: refs/heads/master@{#41309}
-
marja authored
ThreadedList is more memory-efficient than ZoneList. This also enables us to use ThreadedList when making Preparser track parameters (upcoming work). BUG=v8:5501 Review-Url: https://codereview.chromium.org/2531593002 Cr-Commit-Position: refs/heads/master@{#41307}
-
- 23 Nov, 2016 1 commit
-
-
marja authored
Eval calls are tracked by ParserBase::CheckPossibleEvalCall which doesn't use (Pre)?Parser::IsDirectEvalCall. Also we no longer seem to care about IsBinaryOperation (Parser didn't have it either). BUG= Review-Url: https://codereview.chromium.org/2528603003 Cr-Commit-Position: refs/heads/master@{#41216}
-
- 17 Nov, 2016 1 commit
-
-
neis authored
There's no need to return anything. Also add a DCHECK to make sure that we never mark a variable proxy as assigned that is already resolved (to avoid potential inconsistency with the variable's maybe_assigned status). R=littledan@chromium.org CC=mstarzinger@chromium.org BUG= Review-Url: https://codereview.chromium.org/2504613002 Cr-Commit-Position: refs/heads/master@{#41072}
-
- 16 Nov, 2016 1 commit
-
-
cbruni authored
BUG= Review-Url: https://codereview.chromium.org/2509683002 Cr-Commit-Position: refs/heads/master@{#41047}
-
- 15 Nov, 2016 2 commits
-
-
cbruni authored
BUG= Review-Url: https://codereview.chromium.org/2490643002 Cr-Commit-Position: refs/heads/master@{#41001}
-
verwaest authored
This shares the pending_error_handler from the parser to the preparser, allowing the preparser to directly log errors to it. This removes LogMessage from the loggers. ParserLogger::LogMessage was already unused, so this also removes error info from the preparse data altogether. BUG= Review-Url: https://codereview.chromium.org/2502633002 Cr-Commit-Position: refs/heads/master@{#40984}
-
- 09 Nov, 2016 1 commit
-
-
kozyatinskiy authored
Currently function like "() => 239" contains offset 3 as begin of function and 8 as end of function. This CL changes this to 6 and 9 respectively. BUG=chromium:566801 R=yangguo@chromium.org,dgozman@chromium.org TBR=adamk@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Review-Url: https://codereview.chromium.org/2488493003 Cr-Commit-Position: refs/heads/master@{#40864}
-
- 07 Nov, 2016 2 commits
-
-
verwaest authored
Otherwise we could in theory abort preparsing to the preparser and preparse again before aborting again... We shouldn't have this mess; so only set up mode_ in the parser in the first place. BUG= Review-Url: https://codereview.chromium.org/2479213002 Cr-Commit-Position: refs/heads/master@{#40809}
-
verwaest authored
This - removes the ParserRecorder base class, - devirtualizes the LogFunction and LogMessage functions, - reuses the SingletonLogger for all preparser calls In a subsequent step the preparser should probably log directly to the CompleteParserRecorder rather than indirectly through the singleton logger... BUG= Review-Url: https://codereview.chromium.org/2474393003 Cr-Commit-Position: refs/heads/master@{#40803}
-
- 04 Nov, 2016 1 commit
-
-
verwaest authored
Parameters of a lazily parsed function used to be parsed eagerly, and parameter handling was split between Parser::ParseFunctionLiteral and ParseEagerFunctionBody, leading to inconsistencies. After this CL, we preparse (lazy parse) the parameters of lazily parsed functions. (For arrow functions, we cannot do that ofc.) This is needed for later features (PreParser with scope analysis). -- CL adapted from marja's https://codereview.chromium.org/2411793003/ BUG= Review-Url: https://codereview.chromium.org/2472063002 Cr-Commit-Position: refs/heads/master@{#40771}
-
- 25 Oct, 2016 1 commit
-
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2445993002 Cr-Commit-Position: refs/heads/master@{#40548}
-
- 14 Oct, 2016 2 commits
-
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2414383002 Cr-Commit-Position: refs/heads/master@{#40318}
-
marja authored
It doesn't need to have this logic. ParseLazyFunctionLiteralBody is basically just ParseStatementList + log the function position. But PreParser doesn't need to have the "which functions to log" logic, since logging the function is always done exactly when Parser falls back to PreParser. (See PreParseLazyFunction.) So in the current state, PreParser would log several functions in a SingletonLogger, and only the last one would take effect (that's the one Parser also logs in SkipLazyFunctionBody). Also updated test-parsing/Regress928 to produce the preparse data the way we do now (i.e., not running the PreParser directly, but running the Parser). Error reporting: when PreParser finds an error, it doesn't need to ReportUnexpectedToken in PreParseLazyFunction, since it already has reported the error whenever it found it. BUG=v8:5515 Review-Url: https://codereview.chromium.org/2421833002 Cr-Commit-Position: refs/heads/master@{#40315}
-
- 13 Oct, 2016 2 commits
-
-
marja authored
It belongs there more logically. In addition, this is a pre-step needed for preparsing the parameters of a preparsed function. In addition, move the "subtract rest parameter from arity" logic from Parser to (Pre)?ParserFormalParameters. BUG=v8:5515 Review-Url: https://codereview.chromium.org/2414003002 Cr-Commit-Position: refs/heads/master@{#40258}
-
verwaest authored
Turn AllowsLazyParsingWithoutUnresolvedVariables into a whitelist stopping at the outer parsed context. Any context outer to what we're parsing already has proper context allocation, so we don't need to check those scopes. BUG=v8:5501 Review-Url: https://codereview.chromium.org/2417643003 Cr-Commit-Position: refs/heads/master@{#40256}
-
- 10 Oct, 2016 1 commit
-
-
marja authored
If an inner function only declares a variable but doesn't use it, Parser and PreParser produced different unresolved variables, and that confused the pessimistic context allocation. This is continuation to https://codereview.chromium.org/2388183003/ This CL fixes more complicated declarations (which are not just one identifier). For this, PreParser needs to accumulate identifiers used in expressions. In addition, this CL manifests FLAG_lazy_inner_functions in tests, so that we get clusterfuzz coverage for it. BUG=chromium:650969, v8:5501 Review-Url: https://codereview.chromium.org/2400613003 Cr-Commit-Position: refs/heads/master@{#40112}
-
- 07 Oct, 2016 1 commit
-
-
jochen authored
For now keep the logic in compiler.cc and add a DCHECK that the scopes and compiler.cc agree. Use this knowledge to only created ScopeInfos for literals we'll actually compile. BUG=v8:5394,v8:5422 R=marja@chromium.org,verwaest@chromium.org Review-Url: https://codereview.chromium.org/2399833002 Cr-Commit-Position: refs/heads/master@{#40074}
-
- 04 Oct, 2016 1 commit
-
-
marja authored
If an inner function only declares a variable but doesn't use it, Parser and PreParser produced different unresolved variables, and that confused the pessimistic context allocation. BUG=chromium:650969 Review-Url: https://codereview.chromium.org/2388183003 Cr-Commit-Position: refs/heads/master@{#39947}
-
- 30 Sep, 2016 1 commit
-
-
nikolaos authored
This patch moves the method ParseFunctionDeclaration to ParserBase. It also cleans up some forgotten method headers in parser and preparser. R=adamk@chromium.org, verwaest@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2376293002 Cr-Commit-Position: refs/heads/master@{#39901}
-
- 28 Sep, 2016 4 commits
-
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - ParseClassDeclaration - ParseClassLiteral - ParseNativeDeclaration R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Committed: https://crrev.com/7818355363b7a66ff7709e33c72bfdef5eb21450 Review-Url: https://codereview.chromium.org/2368083002 Cr-Original-Commit-Position: refs/heads/master@{#39814} Cr-Commit-Position: refs/heads/master@{#39829}
-
verwaest authored
Revert of [parser] Refactor of ParseClass* and ParseNativeDeclaration (patchset #7 id:120001 of https://codereview.chromium.org/2368083002/ ) Reason for revert: Blocks reverting https://codereview.chromium.org/2368313002 Original issue's description: > [parser] Refactor of ParseClass* and ParseNativeDeclaration > > This patch moves the following parsing method to ParserBase: > > - ParseClassDeclaration > - ParseClassLiteral > - ParseNativeDeclaration > > R=adamk@chromium.org, marja@chromium.org > BUG= > LOG=N > > Committed: https://crrev.com/7818355363b7a66ff7709e33c72bfdef5eb21450 > Cr-Commit-Position: refs/heads/master@{#39814} TBR=adamk@chromium.org,marja@chromium.org,nikolaos@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2380663002 Cr-Commit-Position: refs/heads/master@{#39820}
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - ParseClassDeclaration - ParseClassLiteral - ParseNativeDeclaration R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2368083002 Cr-Commit-Position: refs/heads/master@{#39814}
-
adamk authored
As a side-effect, this lets us remove bit_field_2_ from FunctionLiteral. R=verwaest@chromium.org BUG=v8:5209 Review-Url: https://codereview.chromium.org/2369293003 Cr-Commit-Position: refs/heads/master@{#39799}
-
- 27 Sep, 2016 4 commits
-
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - DesugarAsyncFunctionBody, renamed to ParseAsyncFunctionBody - ParseAsyncFunctionExpression, renamed to ParseAsyncFunctionLiteral - ParseAsyncFunctionDeclaration It renames the parser implementation methods: - ParseArrowFunctionFormalParameterList -> DeclareArrowFunctionFormalParameters - ParseArrowFunctionFormalParameters -> AddArrowFunctionFormalParameters It also eliminates method ParseAsyncArrowSingleExpressionBody. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2372733002 Cr-Commit-Position: refs/heads/master@{#39788}
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2367383002 Cr-Commit-Position: refs/heads/master@{#39763}
-
cbruni authored
Reland of Preparse functions in the scope that was created when parsing of the function was started (patchset #1 id:1 of https://codereview.chromium.org/2365393002/ ) Reason for revert: Stability thief found, relanding speculative reverts. Original issue's description: > Revert of Preparse functions in the scope that was created when parsing of the function was started (patchset #2 id:20001 of https://codereview.chromium.org/2370713003/ ) > > Reason for revert: > Needed for https://codereview.chromium.org/2373443003/ > > Original issue's description: > > Preparse functions in the scope that was created when parsing of the function was started > > > > This reduces the number of scopes for lazily parsed top-level functions from 3 to 1 > > > > BUG=v8:5209 > > > > Committed: https://crrev.com/9618d095903c604a032b33792c068f4a6169503c > > Cr-Commit-Position: refs/heads/master@{#39725} > > TBR=marja@chromium.org,verwaest@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=v8:5209 > > Committed: https://crrev.com/0cef7100da0b609403c9026fb7307192a898a390 > Cr-Commit-Position: refs/heads/master@{#39729} TBR=marja@chromium.org,verwaest@chromium.org,hablich@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5209 Review-Url: https://codereview.chromium.org/2377593002 Cr-Commit-Position: refs/heads/master@{#39756}
-
cbruni authored
Reland of Preparse inner functions (new try) (patchset #1 id:1 of https://codereview.chromium.org/2373443003/ ) Reason for revert: Stability thief found, relanding speculative reverts. Original issue's description: > Revert of Preparse inner functions (new try) (patchset #21 id:420001 of https://codereview.chromium.org/2352593002/ ) > > Reason for revert: > We currently have some stability issues on Canary. Let's reland this after we verified that we "fixed" Canary again. > > Original issue's description: > > Preparse inner functions (new try) > > > > This is an overly pessimistic approach where PreParser only keeps > > track of unresolved variables, but doesn't declare anything. This > > will result in context-allocating variables in the outer function > > unnecessarily, if the variable names clash with variable names > > used by the inner function (even if the variables are not the > > same). However, we have been unable to prove that this approach > > wouldn't be good enough for the practical purposes. > > > > Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ): > > Keep the context-allocation decision stable when compiling fully eagerly. > > > > Tests which exercise this functionality: > > mjsunit/fixed-context-shapes-when-recompiling.js > > > > Design document (chromium): > > > > https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing > > > > BUG= > > > > Committed: https://crrev.com/7c73cf32c60484cdf37c84f1d61b4640e87068d7 > > Cr-Commit-Position: refs/heads/master@{#39719} > > TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG= > > Committed: https://crrev.com/1e6296b2a7cfc307fd9e722e619f42965da4a267 > Cr-Commit-Position: refs/heads/master@{#39730} TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org,hablich@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2377513006 Cr-Commit-Position: refs/heads/master@{#39755}
-
- 26 Sep, 2016 1 commit
-
-
hablich authored
Revert of Preparse inner functions (new try) (patchset #21 id:420001 of https://codereview.chromium.org/2352593002/ ) Reason for revert: We currently have some stability issues on Canary. Let's reland this after we verified that we "fixed" Canary again. Original issue's description: > Preparse inner functions (new try) > > This is an overly pessimistic approach where PreParser only keeps > track of unresolved variables, but doesn't declare anything. This > will result in context-allocating variables in the outer function > unnecessarily, if the variable names clash with variable names > used by the inner function (even if the variables are not the > same). However, we have been unable to prove that this approach > wouldn't be good enough for the practical purposes. > > Fixes after the previous try ( https://codereview.chromium.org/2322243002/ ): > Keep the context-allocation decision stable when compiling fully eagerly. > > Tests which exercise this functionality: > mjsunit/fixed-context-shapes-when-recompiling.js > > Design document (chromium): > > https://docs.google.com/a/chromium.org/document/d/1rRv5JJZ0JpOZAZN2CSUwZPFJiBAdRnTiSYhazseNHFg/edit?usp=sharing > > BUG= > > Committed: https://crrev.com/7c73cf32c60484cdf37c84f1d61b4640e87068d7 > Cr-Commit-Position: refs/heads/master@{#39719} TBR=verwaest@chromium.org,adamk@chromium.org,marja@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2373443003 Cr-Commit-Position: refs/heads/master@{#39730}
-