- 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 4 commits
-
-
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}
-
hablich authored
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 Review-Url: https://codereview.chromium.org/2365393002 Cr-Commit-Position: refs/heads/master@{#39729}
-
verwaest authored
This reduces the number of scopes for lazily parsed top-level functions from 3 to 1 BUG=v8:5209 Review-Url: https://codereview.chromium.org/2370713003 Cr-Commit-Position: refs/heads/master@{#39725}
-
marja authored
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= Review-Url: https://codereview.chromium.org/2352593002 Cr-Commit-Position: refs/heads/master@{#39719}
-
- 21 Sep, 2016 1 commit
-
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - ParseForStatement R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2351233002 Cr-Commit-Position: refs/heads/master@{#39587}
-
- 20 Sep, 2016 1 commit
-
-
littledan authored
This patch uses temporaries rather than unresolved variables for .promise and .debug_is_active. For .promise, a new field is added to the FunctionState, similarly to .generator_object. This change fixes a bug where .promise was locally shadowable by with, affecting program semantics. BUG=v8:5405 Review-Url: https://codereview.chromium.org/2359513002 Cr-Commit-Position: refs/heads/master@{#39566}
-
- 19 Sep, 2016 1 commit
-
-
nikolaos authored
- Remove redundant "impl()->". - Remove NewBlock method from "impl()", exists in "factory()". - Resolve TODO comments. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2345103003 Cr-Commit-Position: refs/heads/master@{#39496}
-
- 16 Sep, 2016 5 commits
-
-
marja authored
Revert of Preparse inner functions. (patchset #23 id:440001 of https://codereview.chromium.org/2322243002/ ) Reason for revert: This approach is not good - breaks when we recompile. Original issue's description: > Preparse inner functions. > > 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. > > Committed: https://crrev.com/e1341ca8fa486bb2c9e4236672a64ec7756a164d > Cr-Commit-Position: refs/heads/master@{#39469} TBR=adamk@chromium.org,vogelheim@chromium.org,nikolaos@chromium.org,nednguyen@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2349473004 Cr-Commit-Position: refs/heads/master@{#39471}
-
marja authored
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. Review-Url: https://codereview.chromium.org/2322243002 Cr-Commit-Position: refs/heads/master@{#39469}
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - ParseTryStatement R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2339453002 Cr-Commit-Position: refs/heads/master@{#39467}
-
bakkot authored
This is one part of a WIP implementation of the stage-2 proposal to add fields to classes: https://github.com/tc39/proposal-class-public-fields See design doc: https://docs.google.com/document/d/1WRtNm3ZLNJT1WVr8aq4RJuByYgfuAFAhj20LwTW6JVE/ This adds the desugaring logic to the parser. It isn't usable without the (forthcoming) backend changes. BUG=v8:5367 Review-Url: https://codereview.chromium.org/2316233004 Cr-Commit-Position: refs/heads/master@{#39460}
-
bakkot authored
This is one part of a WIP implementation of the stage-2 proposal to add fields to classes: https://github.com/tc39/proposal-class-public-fields See design doc: https://docs.google.com/document/d/1WRtNm3ZLNJT1WVr8aq4RJuByYgfuAFAhj20LwTW6JVE/ This adds support for parsing fields in classes, including infrastructure. In particular, it adds: * Two booleans on function literal AST nodes * Two compiler hints on SharedFunctionInfos representing said bools * A new type of ClassLiteralProperty, FIELD * Parser support for the syntax * Syntax tests * A flag to enable it. Currently the fields are parsed and then droppped. Subsequent patches will add semantics, mostly by desugaring in the parser and the remainder in the non-crankshaft backends. BUG=v8:5367 Review-Url: https://codereview.chromium.org/2315733003 Cr-Commit-Position: refs/heads/master@{#39459}
-
- 12 Sep, 2016 1 commit
-
-
nikolaos authored
This patch moves the following parsing method to ParserBase: - ParseSwitchStatement It also removes ParseCaseClause and merges it with ParseSwitchStatement, mainly to avoid the complexity of introducing one more abstract typedef to be shared between parser implementations, but also because the merged ParseSwitchStatement is now only 59 lines. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2324843005 Cr-Commit-Position: refs/heads/master@{#39337}
-
- 10 Sep, 2016 2 commits
-
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseDoExpression - ParseDoWhileStatement - ParseWhileStatement - ParseThrowStatement R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2321103002 Cr-Commit-Position: refs/heads/master@{#39326}
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseExpressionOrLabelledStatement - ParseIfStatement - ParseContinueStatement - ParseBreakStatement - ParseReturnStatement - ParseWithStatement R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2323763002 Cr-Commit-Position: refs/heads/master@{#39325}
-
- 09 Sep, 2016 2 commits
-
-
adamk authored
R=nikolaos@chromium.org Review-Url: https://codereview.chromium.org/2316373006 Cr-Commit-Position: refs/heads/master@{#39316}
-
marja authored
BUG= Review-Url: https://codereview.chromium.org/2311903003 Cr-Commit-Position: refs/heads/master@{#39300}
-
- 08 Sep, 2016 1 commit
-
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseScopedStatement - ParseVariableStatement - ParseDebuggerStatement - ParseV8Intrinsic It also cleans up the implementation-specific use counter mechanism. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2318263002 Cr-Commit-Position: refs/heads/master@{#39272}
-
- 07 Sep, 2016 1 commit
-
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseBlock R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2312263002 Cr-Commit-Position: refs/heads/master@{#39251}
-
- 06 Sep, 2016 2 commits
-
-
bakkot authored
Move the code to perform function name inference for properties into parsing the properties themselves, instead of the containing object. This allows us to avoid unnecessary calls when parsing shorthand properties and methods and simplifies the logic in the remaining cases. Also fixes an edge case bug: inferring the name of the getter in `class { static get constructor(){} }`. Review-Url: https://codereview.chromium.org/2313723005 Cr-Commit-Position: refs/heads/master@{#39222}
-
bakkot authored
This introduces ClassLiteralProperty and a supertype LiteralProperty of it and ObjectLiteralProperty. It also splits the parsing of the two. This substiantially clarifies some logic, especially as classes continue to evolve, and is also about a 2% performance improvement to parsing either kind of property (since no work is wasted on logic only necessary for the other kind). Also, it saves a word on ObjectLiteralProperties. Review-Url: https://codereview.chromium.org/2302643002 Cr-Commit-Position: refs/heads/master@{#39219}
-
- 05 Sep, 2016 3 commits
-
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseStatementList - ParseStatementListItem - ParseStatement - ParseSubStatement (subsumed in ParseStatement) - ParseStatementAsUnlabeled It also refactors the Target and TargetScope objects, used by the parser. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Committed: https://crrev.com/df29f3fda25660075a273cc27ad9f7787f321072 Review-Url: https://codereview.chromium.org/2307073002 Cr-Original-Commit-Position: refs/heads/master@{#39167} Cr-Commit-Position: refs/heads/master@{#39175}
-
machenbach authored
Revert of [parser] Refactor of Parse*Statement*, part 1 (patchset #2 id:20001 of https://codereview.chromium.org/2307073002/ ) Reason for revert: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder Original issue's description: > [parser] Refactor of Parse*Statement*, part 1 > > This patch moves the following parsing methods to ParserBase: > > - ParseStatementList > - ParseStatementListItem > - ParseStatement > - ParseSubStatement (subsumed in ParseStatement) > - ParseStatementAsUnlabeled > > It also refactors the Target and TargetScope objects, used by the > parser. > > R=adamk@chromium.org, marja@chromium.org > BUG= > LOG=N > > Committed: https://crrev.com/df29f3fda25660075a273cc27ad9f7787f321072 > Cr-Commit-Position: refs/heads/master@{#39167} 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/2313703002 Cr-Commit-Position: refs/heads/master@{#39169}
-
nikolaos authored
This patch moves the following parsing methods to ParserBase: - ParseStatementList - ParseStatementListItem - ParseStatement - ParseSubStatement (subsumed in ParseStatement) - ParseStatementAsUnlabeled It also refactors the Target and TargetScope objects, used by the parser. R=adamk@chromium.org, marja@chromium.org BUG= LOG=N Review-Url: https://codereview.chromium.org/2307073002 Cr-Commit-Position: refs/heads/master@{#39167}
-