- 24 Feb, 2017 1 commit
-
-
Marja Hölttä authored
This is also needed so that PreParser doesn't need to gather more data for arrow function params in order to create the uninteresting varblock scopes matching the scopes created in Parser::BuildParameterInitializationBlock. This cancels the changes in https://chromium-review.googlesource.com/c/444747 which make PreParser create uninteresting scopes for the normal (non-arrow) function "eval in default param" case. R=vogelheim@chromium.org BUG=v8:5516 Change-Id: I8957ac0796d8738c63492f7928bca6f00e4b4241 Reviewed-on: https://chromium-review.googlesource.com/446339Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#43411}
-
- 22 Feb, 2017 1 commit
-
-
bakkot authored
This implements the proposal at https://github.com/tc39/proposal-template-literal-revision staged behind a flag --harmony-template-escapes. The proposal allows invalid octal, unicode, and hexadecimal escape sequences to appear in tagged template literals, instead of being a syntax error. These have a 'cooked' value of 'undefined', but are still accessible through the 'raw' property. BUG=v8:5546 Review-Url: https://codereview.chromium.org/2665513002 Cr-Commit-Position: refs/heads/master@{#43384}
-
- 20 Feb, 2017 2 commits
-
-
Marja Hölttä authored
Handle eval in default parameters. BUG=v8:5516 R=vogelheim@chromium.org Change-Id: Ib6543a4aef9a3cc9636e65d0337bc269c8a079dc Reviewed-on: https://chromium-review.googlesource.com/444747 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/master@{#43328}
-
Toon Verwaest authored
By now lazy allocation of block scopes probably doesn't make that much sense anymore, since the memory overhead significantly reduced. Not indirecting scope() over ScopeState is faster, which is more important at this point. BUG=v8:5209 Change-Id: I2968f01252769e7b1198a0a0876765a06ab0d3bd Reviewed-on: https://chromium-review.googlesource.com/445025Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#43313}
-
- 16 Feb, 2017 3 commits
-
-
jwolfe authored
For functions declared in source code, the .toString() representation will be an excerpt of the source code. * For functions declared with the "function" keyword, the excerpt starts at the "function" or "async" keyword and ends at the final "}". The previous behavior would start the excerpt at the "(" of the parameter list, and prepend a canonical `"function " + name` or similar, which would discard comments and formatting surrounding the function's name. Anonymous functions declared as function expressions no longer get the name "anonymous" in their toString representation. * For methods, the excerpt starts at the "get", "set", "*" (for generator methods), or property name, whichever comes first. Previously, the toString representation for methods would use a canonical prefix before the "(" of the parameter list. Note that any "static" keyword is omitted. * For arrow functions and class declarations, the excerpt is unchanged. For functions created with the Function, GeneratorFunction, or AsyncFunction constructors: * The string separating the parameter text and body text is now "\n) {\n", where previously it was "\n/*``*/) {\n" or ") {\n". * At one point, newline normalization was required by the spec here, but that was removed from the spec, and so this CL does not do it. Included in this CL is a fix for CreateDynamicFunction parsing. ')' and '`' characters in the parameter string are no longer disallowed, and Function("a=function(", "}){") is no longer allowed. BUG=v8:4958, v8:4230 Review-Url: https://codereview.chromium.org/2156303002 Cr-Commit-Position: refs/heads/master@{#43262}
-
Marja Hölttä authored
Patch adopted from mvstanton@ ( https://codereview.chromium.org/2657413002/ ) BUG= Change-Id: I4296b3d5694116e250a6bb88296fbed0f0c444e6 Reviewed-on: https://chromium-review.googlesource.com/443246Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#43238}
-
neis authored
This is in order to prevent accidental bugs in desugarings. R=adamk@chromium.org BUG=v8:5636 Review-Url: https://codereview.chromium.org/2693313002 Cr-Commit-Position: refs/heads/master@{#43237}
-
- 15 Feb, 2017 2 commits
-
-
caitp authored
When --harmony-async-iteration is enabled, it is now possible to use the for-await-of loop, which uses the Async Iteration protocol rather than the ordinary ES6 Iteration protocol. the Async-from-Sync Iterator object is not implemented in this CL, and so for-await-of loops will abort execution if the iterated object does not have a Symbol.asyncIterator() method. Async-from-Sync Iterators are implemented seperately in https://codereview.chromium.org/2645313003/ BUG=v8:5855, v8:4483 R=neis@chromium.org, littledan@chromium.org, adamk@chromium.org Review-Url: https://codereview.chromium.org/2637403008 Cr-Commit-Position: refs/heads/master@{#43224}
-
Marja Hölttä authored
- Different places used is_simple to mean different things; renamed one. - No need to do Scope::SetHasNoSimpleParameters multiple times. - Normally we create VAR parameters with a name, or (for destructuring parameters), TEMPORARY parmeters with an empty name. *Except* for destructuring rest parameters; then we create VAR a parameter with an empty name. This CL makes the empty-named parameter TEMPORARY instead of VAR. - This makes it clear that Parser::DeclareFormalParameters declares exactly those params which Parser::BuildParamerterInitializationBlock doesn't declare. - This unification doesn't change any functionality, but it makes sense to do since I'll need to make PreParser emulate what Parser does; this way I don't need to emulate the weird behavior. BUG=v8:5501 Change-Id: Ifa6c116bc5908f4e03a36e74f47558888d1582bd Reviewed-on: https://chromium-review.googlesource.com/443106Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#43220}
-
- 13 Feb, 2017 1 commit
-
-
adamk authored
R=neis@chromium.org Review-Url: https://codereview.chromium.org/2690723002 Cr-Commit-Position: refs/heads/master@{#43144}
-
- 10 Feb, 2017 5 commits
-
-
rmcilroy authored
In order to compile eager inner functions on a background thread we need to keep the handles created during parsing and scope analysis alive until the background compilation is complete. In order to do that, we allocate the handles in a deferred handle scope and keep the deferred handles alive with a shared_ptr in the ParseInfo and CompileInfo respectively. BUG=v8:5203 Review-Url: https://codereview.chromium.org/2650883002 Cr-Commit-Position: refs/heads/master@{#43107}
-
caitp authored
Alternative approach to https://codereview.chromium.org/2667983004/, which does not depend on implicit control flow changes from https://codereview.chromium.org/2664083002 - Remove handling for `async function` from Parser::RewriteReturn(). This functionality is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution is deferred until all finally blocks are evaluated fully. - Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to generate return code using BuildAsyncReturn rather than BuildReturn. - Parser has a new `NewReturnStatement()` helper which determines what type of return statement to generate based on the type of function. BUG=v8:5896, v8:4483 R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org Review-Url: https://codereview.chromium.org/2685683002 Cr-Commit-Position: refs/heads/master@{#43104}
-
neis authored
Move the logic into Scope::DeclareVariable to be more robust. BUG=v8:5636 Review-Url: https://codereview.chromium.org/2685293003 Cr-Commit-Position: refs/heads/master@{#43098}
-
rmcilroy authored
Revert of [Compiler] Enable handles created during parsing and scope analysis to be deferred. (patchset #9 id:180001 of https://codereview.chromium.org/2650883002/ ) Reason for revert: Issue on arm64: https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim/builds/5752 Original issue's description: > [Compiler] Enable handles created during parsing and scope analysis to be deferred. > > In order to compile eager inner functions on a background thread we need to > keep the handles created during parsing and scope analysis alive until the > background compilation is complete. In order to do that, we allocate the > handles in a deferred handle scope and keep the deferred handles alive with > a shared_ptr in the ParseInfo and CompileInfo respectively. > > BUG=v8:5203 > > Review-Url: https://codereview.chromium.org/2650883002 > Cr-Commit-Position: refs/heads/master@{#43091} > Committed: https://chromium.googlesource.com/v8/v8/+/9346cd9b4c50466aa8d50e98c56b84ba47c2a115 TBR=marja@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5203 Review-Url: https://codereview.chromium.org/2687973003 Cr-Commit-Position: refs/heads/master@{#43093}
-
rmcilroy authored
In order to compile eager inner functions on a background thread we need to keep the handles created during parsing and scope analysis alive until the background compilation is complete. In order to do that, we allocate the handles in a deferred handle scope and keep the deferred handles alive with a shared_ptr in the ParseInfo and CompileInfo respectively. BUG=v8:5203 Review-Url: https://codereview.chromium.org/2650883002 Cr-Commit-Position: refs/heads/master@{#43091}
-
- 09 Feb, 2017 1 commit
-
-
Leszek Swirski authored
Cleans up the internalization. Also, clean up no-longer-used ast symbols, iterator and hasInstance, which were left behind after other refactors. Having an enum here should keep this clean in the future. Change-Id: Id526784b0361c7a2242b21ecf2af72b0403c6ad8 Reviewed-on: https://chromium-review.googlesource.com/440204Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#43069}
-
- 07 Feb, 2017 1 commit
-
-
neis authored
A script like "{ function foo() {} }" declares a VAR-variable at the top-level and a LET-variable inside the block. The LET-variable does not need to be unconditionally marked as assigned. BUG=v8:5636 Review-Url: https://codereview.chromium.org/2680443002 Cr-Commit-Position: refs/heads/master@{#42980}
-
- 06 Feb, 2017 2 commits
-
-
littledan authored
R=adamk Review-Url: https://codereview.chromium.org/2677373002 Cr-Commit-Position: refs/heads/master@{#42976}
-
marja authored
BUG=v8:5516 R=vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2673313003 Cr-Commit-Position: refs/heads/master@{#42957}
-
- 03 Feb, 2017 1 commit
-
-
marja authored
Turns out is_hidden is not the right condition for "scope should be present in the preparse data". For now, replaced it with "is hidden leaf scope" (i.e., doesn't contain any non-hidden scopes). That's probably not the right condition either; will be fixed once there's more data to decide what the right condition is. BUG=v8:5516 R=vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2669163002 Cr-Commit-Position: refs/heads/master@{#42909}
-
- 01 Feb, 2017 1 commit
-
-
adamk authored
The hoist_scope member of DeclarationDescriptor was only used to pass the function scope for declaration of parameters containing sloppy evals, for example: function f(x = eval("var y")) { } In cases like this, "x" is declared in the function scope but "y" is declared in an inner scope. Rather than passing the function scope as "hoist_scope", we simply ask for the outer_scope() of the inner scope as needed in PatternRewriter. This reduces the cognitive overhead of understanding what a DeclarationDescriptor has; for example, it removes some dead code from the PreParser which never has to deal with a situation like the example above. Review-Url: https://codereview.chromium.org/2662183002 Cr-Commit-Position: refs/heads/master@{#42861}
-
- 31 Jan, 2017 2 commits
-
-
gsathya authored
Rewrites import expression into a runtime call. Uses peekahead to determine if parsing an import declaration or import expression. The runtime call doesn't actually do the import yet, will be added in follow on patch. Adds a new --harmony-dynamic-import flag. Adds a ignore_error_msg parameter to the test runner to ignore the discrepancy in the error messages while parsing import expression with parser and pre parser. This discrepancy will actually never happen in real code. BUG=v8:5785 Review-Url: https://codereview.chromium.org/2661933003 Cr-Commit-Position: refs/heads/master@{#42820}
-
neis authored
A previous CL (https://codereview.chromium.org/2634123002) did that for let-declared variables. This CL also does it for var- and function-declared variables. BUG=v8:5636 Review-Url: https://codereview.chromium.org/2656753003 Cr-Commit-Position: refs/heads/master@{#42813}
-
- 30 Jan, 2017 1 commit
-
-
mvstanton authored
They have the same lifetime. It's a match! Both structures are native context dependent and dealt with (creation, clearing, gathering feedback) at the same time. By treating the spaces used for literal boilerplates as feedback vector slots, we no longer have to keep track of the materialized literal count elsewhere. A follow-on CL removes even more parser infrastructure related to this count. BUG=v8:5456 Review-Url: https://codereview.chromium.org/2655853010 Cr-Commit-Position: refs/heads/master@{#42771}
-
- 25 Jan, 2017 1 commit
-
-
marja authored
[parser]: Skipping inner funcs / initial implemetation of storing scope analysis data from preparsed scopes. The data produced at the moment only contains information about scope type + positions, and only the most trivial tests pass. Upcoming CLs will extend the data to contain information about variables (once PreParser can produce it) and add more test cases. BUG=v8:5516 Review-Url: https://codereview.chromium.org/2650703003 Cr-Commit-Position: refs/heads/master@{#42656}
-
- 23 Jan, 2017 1 commit
-
-
petermarshall authored
Also, emit a NewWithSpread bytecode for CallNew AST nodes where possible, rather than desugaring in the parser. BUG=v8:5511 Review-Url: https://codereview.chromium.org/2629363002 Cr-Original-Commit-Position: refs/heads/master@{#42455} Committed: https://chromium.googlesource.com/v8/v8/+/4bae43471d5685e34d8bd74458889b83e60235a0 Review-Url: https://codereview.chromium.org/2629363002 Cr-Commit-Position: refs/heads/master@{#42590}
-
- 20 Jan, 2017 1 commit
-
-
marja authored
Rationale: - To do scope analysis based on PreParser, and use the result again when parsing later, PreParser and Parser need to produce the same Scopes and variable declarations in them. - This is not the case for non-simple parameters: Parser creates an additional inner Scope where the declarations were, whereas PreParser does DeclareVariableName directly in the function Scope. - So this CL fixes that by moving the Scope creation for non-simple parameters into ParserBase. - As a side product (and a partial proof that this change makes sense), PreParser::ParseEagerFunctionBody is now gone. BUG=v8:5516 Review-Url: https://codereview.chromium.org/2638333002 Cr-Commit-Position: refs/heads/master@{#42537}
-
- 19 Jan, 2017 1 commit
-
-
jgruber authored
Just desugar directly into the runtime call instead. BUG=v8:5639 Review-Url: https://codereview.chromium.org/2633353002 Cr-Commit-Position: refs/heads/master@{#42492}
-
- 18 Jan, 2017 4 commits
-
-
petermarshall authored
Revert of [Ignition/turbo] Add a CallWithSpread bytecode. (patchset #10 id:170001 of https://codereview.chromium.org/2629363002/ ) Reason for revert: Causes a few bugs caught by clusterfuzz. Original issue's description: > [Ignition/turbo] Add a CallWithSpread bytecode. > > Also, emit a NewWithSpread bytecode for CallNew AST nodes where possible, rather than desugaring in the parser. > > BUG=v8:5511 > > Review-Url: https://codereview.chromium.org/2629363002 > Cr-Commit-Position: refs/heads/master@{#42455} > Committed: https://chromium.googlesource.com/v8/v8/+/4bae43471d5685e34d8bd74458889b83e60235a0 TBR=bmeurer@chromium.org,rmcilroy@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:5511 Review-Url: https://codereview.chromium.org/2642843002 Cr-Commit-Position: refs/heads/master@{#42470}
-
petermarshall authored
Also, emit a NewWithSpread bytecode for CallNew AST nodes where possible, rather than desugaring in the parser. BUG=v8:5511 Review-Url: https://codereview.chromium.org/2629363002 Cr-Commit-Position: refs/heads/master@{#42455}
-
neis authored
R=adamk@chromium.org BUG= NOTRY=true NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2634313002 Cr-Commit-Position: refs/heads/master@{#42438}
-
gsathya authored
This rewrites the rest property into a runtime call which sets up the correct properties in the newly created object. - Changes flag to --harmony-object-rest-spread - Changes pattern rewriter to desugar rest property - Adds new runtime function CopyDataPropertiesWithExcludedProperties BUG=v8:5549 Review-Url: https://codereview.chromium.org/2620943002 Cr-Commit-Position: refs/heads/master@{#42430}
-
- 17 Jan, 2017 2 commits
-
-
marja authored
This makes it clearer which places are creating variables which are something else than NORMAL_VARIABLE + kCreatedInitialized. BUG= Review-Url: https://codereview.chromium.org/2631173002 Cr-Commit-Position: refs/heads/master@{#42395}
-
rmcilroy authored
Creates an AstStringConstants container which pre-initializes the string constants used by AstValueFactory. This ensures that all AstValueFactories will produce the same AstValue objects for constants, and so they can be used by the BytecodeGenerator without having to pass the AstValueFactory to it, enabling construction off-thread. BUG=v8:5203 Review-Url: https://codereview.chromium.org/2630343002 Cr-Original-Commit-Position: refs/heads/master@{#42381} Committed: https://chromium.googlesource.com/v8/v8/+/d611496b8ed30af787d8668f96b400617c858508 Review-Url: https://codereview.chromium.org/2630343002 Cr-Commit-Position: refs/heads/master@{#42394}
-
- 16 Jan, 2017 3 commits
-
-
rmcilroy authored
Revert of [Parser] Introduce AstStringConstants to share constants across AstValueFactory (patchset #4 id:80001 of https://codereview.chromium.org/2630343002/ ) Reason for revert: Seems to break modules-namespace2 on gcstress. Original issue's description: > [Parser] Introduce AstStringConstants to share constants across AstValueFactory > > Creates an AstStringConstants container which pre-initializes the > string constants used by AstValueFactory. This ensures that all > AstValueFactories will produce the same AstValue objects for constants, > and so they can be used by the BytecodeGenerator without having to pass > the AstValueFactory to it, enabling construction off-thread. > > BUG=v8:5203 > > Review-Url: https://codereview.chromium.org/2630343002 > Cr-Commit-Position: refs/heads/master@{#42381} > Committed: https://chromium.googlesource.com/v8/v8/+/d611496b8ed30af787d8668f96b400617c858508 TBR=ahaas@chromium.org,marja@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5203 Review-Url: https://codereview.chromium.org/2638783002 Cr-Commit-Position: refs/heads/master@{#42382}
-
rmcilroy authored
Creates an AstStringConstants container which pre-initializes the string constants used by AstValueFactory. This ensures that all AstValueFactories will produce the same AstValue objects for constants, and so they can be used by the BytecodeGenerator without having to pass the AstValueFactory to it, enabling construction off-thread. BUG=v8:5203 Review-Url: https://codereview.chromium.org/2630343002 Cr-Commit-Position: refs/heads/master@{#42381}
-
marja authored
- Generalize the sloppy block function data structures to allow PreParser adding and hoisting sloppy block funcs. - This completes PreParser scope analysis. BUG=v8:5501, v8:5516 R=verwaest@chromium.org Review-Url: https://codereview.chromium.org/2636543002 Cr-Commit-Position: refs/heads/master@{#42368}
-
- 12 Jan, 2017 1 commit
-
-
marja authored
The bug was caused by AstTraversalVisitor refactoring: https://codereview.chromium.org/2169833002/ InitializerRewriter::VisitRewritableExpression in parser.cc didn't recurse; so it fails when a rewritable expression contains another rewritable expression. See the bug for more details. BUG=chromium:679727 Review-Url: https://codereview.chromium.org/2629623002 Cr-Commit-Position: refs/heads/master@{#42274}
-
- 10 Jan, 2017 1 commit
-
-
adamk authored
It shipped with Chrome 55 stable. R=littledan@chromium.org Review-Url: https://codereview.chromium.org/2621173002 Cr-Commit-Position: refs/heads/master@{#42203}
-
- 09 Jan, 2017 1 commit
-
-
marja authored
Downside: this adds all kinds of weird includes in the .cc files. (See design doc linked in the bug.) BUG=v8:5402 Review-Url: https://codereview.chromium.org/2622503002 Cr-Commit-Position: refs/heads/master@{#42140}
-