- 08 Apr, 2016 2 commits
-
-
mstarzinger authored
The parser should never need to look at the underlying closure object, hence the field can be moved from ParseInfo into CompilationInfo. R=rossberg@chromium.org Review URL: https://codereview.chromium.org/1863083002 Cr-Commit-Position: refs/heads/master@{#35358}
-
adamk authored
These were all on by default in M49 without complaint. R=littledan@chromium.org Review URL: https://codereview.chromium.org/1858943002 Cr-Commit-Position: refs/heads/master@{#35342}
-
- 01 Apr, 2016 1 commit
-
-
jochen authored
We expect that the majority of malloc'd memory held by V8 is allocated in Zone objects. Introduce an Allocator class that is used by Zones to manage memory, and allows for querying the current usage. BUG=none R=titzer@chromium.org,bmeurer@chromium.org,jarin@chromium.org LOG=n TBR=rossberg@chromium.org Review URL: https://codereview.chromium.org/1847543002 Cr-Commit-Position: refs/heads/master@{#35196}
-
- 24 Mar, 2016 2 commits
-
-
rmcilroy authored
Makes --ignition cause eager compilation if we aren't building the startup snapshot. BUG=v8:4280 LOG=N Review URL: https://codereview.chromium.org/1811553003 Cr-Commit-Position: refs/heads/master@{#35066}
-
littledan authored
ES#sec-islabelledfunction specifies that labelled function declarations may not occur as the body of a control flow construct such as an if statement. This patch implements those restrictions, which also eliminates a previous case resulting in a DCHECK failure which is now a SyntaxError. BUG=chromium:595309 R=adamk LOG=Y Review URL: https://codereview.chromium.org/1808373003 Cr-Commit-Position: refs/heads/master@{#35049}
-
- 22 Mar, 2016 1 commit
-
-
adamk authored
Now that ES2015 const has shipped, in Chrome 49, legacy const declarations are no more. This lets us remove a bunch of code from many parts of the codebase. In this patch, I remove parser support for generating legacy const variables from const declarations. This also removes the special "illegal declaration" bit from Scope, which has ripples into all compiler backends. Also gone are any tests which relied on legacy const declarations. Note that we do still generate a Variable in mode CONST_LEGACY in one case: function name bindings in sloppy mode. The likely fix there is to add a new Variable::Kind for this case and handle it appropriately for stores in each backend, but I leave that for a later patch to make this one completely subtractive. Review URL: https://codereview.chromium.org/1819123002 Cr-Commit-Position: refs/heads/master@{#35002}
-
- 21 Mar, 2016 1 commit
-
-
vogelheim authored
Revert of Parser: Make skipping HTML comments optional. (patchset #6 id:140001 of https://codereview.chromium.org/1801203002/ ) Reason for revert: Violates ES6 spec (crbug.com/4850), and implementation was over-eager. Will revert for now. Original issue's description: > Parser: Make skipping HTML comments optional. > > API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources. > > (That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.) > > The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes. > > BUG=chromium:573887 > LOG=Y > > Committed: https://crrev.com/91d344288aa51ed03eaaa1cb3e368ac1e82f0173 > Cr-Commit-Position: refs/heads/master@{#34904} TBR=jochen@chromium.org,rossberg@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:573887, v8:4850 LOG=Y Review URL: https://codereview.chromium.org/1817163003 Cr-Commit-Position: refs/heads/master@{#34958}
-
- 18 Mar, 2016 2 commits
-
-
vogelheim authored
API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources. (That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.) The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes. BUG=chromium:573887 LOG=Y Review URL: https://codereview.chromium.org/1801203002 Cr-Commit-Position: refs/heads/master@{#34904}
-
caitpotter88 authored
Implements Stage 4 proposal from http://rwaldron.github.io/exponentiation-operator/, without adding any knowledge of the feature to compiler backends. BUG=v8:3915 LOG=Y R=adamk@chromium.org, rossberg@chromium.org, littledan@chromium.org Review URL: https://codereview.chromium.org/1678303002 Cr-Commit-Position: refs/heads/master@{#34890}
-
- 16 Mar, 2016 1 commit
-
-
caitpotter88 authored
Report correct error message when a scanner error occurs while parsing a tagged template within an expression context. BUG=v8:4829, v8:3230 LOG=N R=adamk@chromium.org, littledan@chromium.org Review URL: https://codereview.chromium.org/1806063002 Cr-Commit-Position: refs/heads/master@{#34839}
-
- 15 Mar, 2016 1 commit
-
-
adamk authored
Modules already have a separate entrypoint into the engine (at the moment, this is v8::ScriptCompiler::CompileModule, though that will change to something like ParseModule). This meant that requiring a commandline flag simply added an extra complexity burden on embedders. By removing the v8 flag, this lets embedders use their own flagging mechanism (such as d8's "--module", or Blink's RuntimeEnabledFeatures) to control whether modules are to be used. Also remove old modules tests that were being skipped (since they test very old, pre-ES2015 modules syntax). R=littledan@chromium.org BUG=v8:1569, chromium:594639 LOG=y Review URL: https://codereview.chromium.org/1804693002 Cr-Commit-Position: refs/heads/master@{#34764}
-
- 10 Mar, 2016 2 commits
-
-
adamk authored
These flags have been on by default since version 4.9, which has been in stable Chrome for over a week now, demonstrating that they're here to stay. Also moved the tests out of harmony/ and into es6/. Review URL: https://codereview.chromium.org/1776683003 Cr-Commit-Position: refs/heads/master@{#34692}
-
rossberg authored
R=mstarzinger@chromium.org,bmeurer@chromium.org,adamk@chromium.org BUG=v8:3956 LOG=Y Review URL: https://codereview.chromium.org/1773653002 Cr-Commit-Position: refs/heads/master@{#34669}
-
- 08 Mar, 2016 1 commit
-
-
verwaest authored
Also move GetProperty with string-name to JSReceiver BUG= Review URL: https://codereview.chromium.org/1775973002 Cr-Commit-Position: refs/heads/master@{#34596}
-
- 03 Mar, 2016 1 commit
-
-
littledan authored
ES2015 generally bans FunctionDeclarations in positions which expect a Statement, as opposed to a StatementListItem, such as a FunctionDeclaration which constitutes the body of a for loop. However, Annex B 3.2 and 3.4 make exceptions for labeled function declarations and function declarations as the body of an if statement in sloppy mode, in the latter case specifying that the semantics are as if the function declaration occurred in a block. Chrome has historically permitted further extensions, for the body of any flow control construct. This patch addresses both the syntactic and semantic mismatches between V8 and the spec. For the semantic mismatch, function declarations as the body of if statements change from unconditionally hoisting in certain cases to acquiring the sloppy mode function in block semantics (based on Annex B 3.3). For the extra syntax permitted, this patch adds a flag, --harmony-restrictive-declarations, which excludes disallowed function declaration cases. A new UseCounter, LegacyFunctionDeclaration, is added to count how often function declarations occur as the body of other constructs in sloppy mode. With this patch, the code generally follows the form of the specification with respect to parsing FunctionDeclarations, rather than allowing them in arbitrary Statement positions, and makes it more clear where our extensions occur. BUG=v8:4647 R=adamk LOG=Y Review URL: https://codereview.chromium.org/1757543003 Cr-Commit-Position: refs/heads/master@{#34470}
-
- 01 Mar, 2016 1 commit
-
-
nikolaos authored
The preparser should ignore "use strong" if the --strong_mode flag is not turned on, but this should not stop processing subsequent directives. R=rossberg@chromium.org BUG= LOG=N Review URL: https://codereview.chromium.org/1752753002 Cr-Commit-Position: refs/heads/master@{#34392}
-
- 18 Feb, 2016 1 commit
-
-
adamk authored
This frees up one bit in FunctionKind, which I plan to make slightly more syntactic info about functions available in SharedFunctionInfo (needed for ES2015 Function.name support). BUG=v8:3956, v8:4760 LOG=n Review URL: https://codereview.chromium.org/1704223002 Cr-Commit-Position: refs/heads/master@{#34125}
-
- 17 Feb, 2016 1 commit
-
-
caitpotter88 authored
BUG= LOG=N R=adamk@chromium.org, littledan@chromium.org Review URL: https://codereview.chromium.org/1702853002 Cr-Commit-Position: refs/heads/master@{#34051}
-
- 16 Feb, 2016 1 commit
-
-
caitpotter88 authored
BUG=v8:4756 LOG=N R=adamk@chromium.org, littledan@chromium.org, wingo@igalia.com Review URL: https://codereview.chromium.org/1700123003 Cr-Commit-Position: refs/heads/master@{#34050}
-
- 12 Feb, 2016 1 commit
-
-
adamk authored
This is hopefully the last in a series of cleanup patches around destructuring assignment. It simplifies the ParseAssignmentExpression API, making the callers call CheckDestructuringElement() where appropriate. CheckDestructuringElement has been further simplified to only emit the errors that the parser depends on it emitting. I've also beefed up the test coverage in test-parsing.cc to handling all the destructuring flags being on, which caught an oddity in how we disallow initializers in spreads in patterns (we need to treat RewritableAssignmentExpressions as Assignments for the purpose of error checking). Finally, I added a few helper methods to ParserBase to handle a few classes of expressions (assignments and literals-as-patterns). Review URL: https://codereview.chromium.org/1696603002 Cr-Commit-Position: refs/heads/master@{#33961}
-
- 02 Feb, 2016 1 commit
-
-
caitpotter88 authored
Based on vogelheim's CL at https://codereview.chromium.org/1657783002/ BUG=chromium:582626, v8:2700 LOG=N R=adamk@chromium.org, rossberg@chromium.org, vogelheim@chromium.org Review URL: https://codereview.chromium.org/1656993002 Cr-Commit-Position: refs/heads/master@{#33651}
-
- 26 Jan, 2016 1 commit
-
-
adamk authored
They were already treated as a BindingPattern error; this patch simply replaces that call with one marking them as both a binding and assignment error, and adds parsing tests for both cases. BUG=v8:4707 LOG=n Review URL: https://codereview.chromium.org/1632303002 Cr-Commit-Position: refs/heads/master@{#33528}
-
- 20 Jan, 2016 1 commit
-
-
mike authored
Although the `for..in` statement allows Expressions to define the iterator, only an AssignmentExpression may occupy this position in the `for..of` statement. BUG=v8:4692 LOG=N R=adamk@chromium.org Review URL: https://codereview.chromium.org/1602823003 Cr-Commit-Position: refs/heads/master@{#33420}
-
- 19 Jan, 2016 1 commit
-
-
adamk authored
The old handling of escaped keywords erroneously treated escaped versions of "let" and "static" as ESCAPED_KEYWORD, leading to erroneous errors in sloppy mode. Moreover, though the class literal parsing code attempted to fix up the parsing of escaped versions of "static" to allow it in the right places, that code wasn't complete. Fixing the scanner to mark escaped "static" as ESCAPED_STRICT_RESERVED_WORD allows simplifying the class literal parsing code. A little extra code was needed to properly handle the new treatment of escaped "let". Note that "yield" is still broken (that is, we're overly restrictive of escaped "yield" in sloppy mode). Review URL: https://codereview.chromium.org/1602013007 Cr-Commit-Position: refs/heads/master@{#33396}
-
- 15 Jan, 2016 1 commit
-
-
adamk authored
This includes anonymous Function, Generator, and Class declarations when preceded by 'export default'. Parsing only at the moment, nothing useful is done with the parsed Function/ClassLiteral. BUG=v8:1569 LOG=n Review URL: https://codereview.chromium.org/1589173002 Cr-Commit-Position: refs/heads/master@{#33344}
-
- 14 Jan, 2016 1 commit
-
-
caitpotter88 authored
When parsing a pattern element with an assignment operator that is not Token::ASSIGN, record a pattern error to indicate the invalid assignment target. BUG=v8:811, v8:4666 LOG=N R=adamk@chromium.org, rossberg@chromium.org, littledan@chromium.org Review URL: https://codereview.chromium.org/1583863003 Cr-Commit-Position: refs/heads/master@{#33279}
-
- 13 Jan, 2016 1 commit
-
-
caitpotter88 authored
http://tc39.github.io/ecma262/#sec-destructuring-assignment-static-semantics-early-errors requires that DestructuringAssignmentTargets which do not match Pattern productions, must return true for IsValidSimpleAssignmentTarget. This change rejects parenthesized patterns with a SyntaxError. BUG=v8:4662, v8:811 LOG=N R=adamk@chromium.org, rossberg@chromium.org, nikolaos@chromium.org Review URL: https://codereview.chromium.org/1585473002 Cr-Commit-Position: refs/heads/master@{#33254}
-
- 11 Jan, 2016 1 commit
-
-
littledan authored
This patch moves the semantics of 'const' in sloppy mode to match those in strict mode, that is, const makes lexical (let-like) bindings, must have an initializer, and does not create properties of the global object. R=adamk LOG=Y BUG=v8:3305 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1571873004 Cr-Commit-Position: refs/heads/master@{#33218}
-
- 08 Jan, 2016 3 commits
-
-
caitpotter88 authored
Originally, only BindingIdentifiers were a legal operand for the `...` ellipsis in a function rest parameter. This has since changed, allowing the rest array to be destructured. The grammar is now the following: ``` FunctionRestParameter[Yield]: BindingRestElement[?Yield] BindingRestElement[Yield]: ... BindingIdentifier[?Yield] ... BindingPattern[?Yield] ``` *Spec change: https://github.com/tc39/ecma262/commit/d322357e6be95bc4bd3e03f5944a736aac55fa50 *TC39 Discussion: https://github.com/tc39/tc39-notes/blob/master/es7/2015-07/july-28.md#66-bindingrestelement-should-allow-a-bindingpattern-ala-assignmentrestelement BUG=v8:4627, v8:2159 LOG=N R=littledan@chromium.org, adamk@chromium.org, wingo@igalia.com, rossberg@chromium.org Review URL: https://codereview.chromium.org/1532873004 Cr-Commit-Position: refs/heads/master@{#33192}
-
caitpotter88 authored
Encode "parenthesized" status of parenthesized Expressions to prevent them from being treated as Patterns. BUG=v8:4657, v8:811 LOG=N R=rossberg@chromium.org, adamk@chromium.org, littledan@chromium.org Review URL: https://codereview.chromium.org/1570793002 Cr-Commit-Position: refs/heads/master@{#33190}
-
littledan authored
The sloppy block-scoped function declaration placeholder statements are held in parser_zone_-allocated hashtables. These hashtables are not updated when local_zone_s are removed. Therefore, the NewSloppyBlockFunctionStatement method should allocate SloppyBlockScopeFunctionStatements in the parser_zone_ to avoid a use-after-free. Scope fixup code may end up updating something which is thrown away, but this is a small cost and much simpler than removing dead hashtable entries later. R=adamk LOG=Y BUG=chromium:537816 Review URL: https://codereview.chromium.org/1564923007 Cr-Commit-Position: refs/heads/master@{#33185}
-
- 16 Dec, 2015 1 commit
-
-
caitpotter88 authored
BUG=v8:4613 LOG=N R=adamk@chromium.org Review URL: https://codereview.chromium.org/1522693002 Cr-Commit-Position: refs/heads/master@{#32888}
-
- 12 Dec, 2015 1 commit
-
-
adamk authored
It shipped in Chrome 47. Review URL: https://codereview.chromium.org/1519073004 Cr-Commit-Position: refs/heads/master@{#32816}
-
- 11 Dec, 2015 3 commits
-
-
caitpotter88 authored
BUG=v8:811, v8:4599 LOG=N R=adamk@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/1517973002 Cr-Commit-Position: refs/heads/master@{#32814}
-
adamk authored
Revert of [es6] support AssignmentPattern as LHS in for-in/of loops (patchset #9 id:280001 of https://codereview.chromium.org/1508933004/ ) Reason for revert: Hits unreachable code (found by fuzzer). Example crasher: "for(();;);" Original issue's description: > [es6] support AssignmentPattern as LHS in for-in/of loops > > BUG=v8:811, v8:4599 > LOG=N > R=adamk@chromium.org, rossberg@chromium.org > > Committed: https://crrev.com/e47bdb775564b2cd8365047425898ab4274190a6 > Cr-Commit-Position: refs/heads/master@{#32773} TBR=rossberg@chromium.org,caitpotter88@gmail.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:811, v8:4599 Review URL: https://codereview.chromium.org/1511773009 Cr-Commit-Position: refs/heads/master@{#32774}
-
caitpotter88 authored
BUG=v8:811, v8:4599 LOG=N R=adamk@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/1508933004 Cr-Commit-Position: refs/heads/master@{#32773}
-
- 09 Dec, 2015 1 commit
-
-
jochen authored
Embedders still can use those APIs by default test-api.cc still has an exception to use the old APIs... BUG=v8:4143 R=vogelheim@chromium.org LOG=n Review URL: https://codereview.chromium.org/1505803004 Cr-Commit-Position: refs/heads/master@{#32701}
-
- 07 Dec, 2015 1 commit
-
-
bmeurer authored
The test expectations should fail consistently in both release and debug builds. DCHECK is only meant for debug-only checks in production code. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1506753002 Cr-Commit-Position: refs/heads/master@{#32639}
-
- 04 Dec, 2015 1 commit
-
-
caitpotter88 authored
Attempt #<really big number> Parses, and lazily rewrites Destructuring Assignment expressions. The rewriting strategy involves inserting a placeholder RewritableAssignmentExpression into the AST, whose content expression can be completely rewritten at a later time. Lazy rewriting ensures that errors do not occur due to eagerly rewriting nodes which form part of a binding pattern, thus breaking the meaning of the pattern --- or by eagerly rewriting ambiguous constructs that are not immediately known BUG=v8:811 LOG=Y R=adamk@chromium.org, bmeurer@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/1309813007 Cr-Commit-Position: refs/heads/master@{#32623}
-
- 03 Dec, 2015 1 commit
-
-
bradnelson authored
Fix several operations in the parser that rewrite constant expressions to preserve knowledge regarding whether a value originally contained a ".". This information is required to accurately validate Asm.js typing. Making the assumption that if either side of a binary operation contains a dot, that the rewritten expression should be treated as a double for Asm.js purposes. This is a slight deviation from the spec (which would forbid mix type operations). BUG= https://code.google.com/p/v8/issues/detail?id=4203 TEST=test-asm-validator, test-parsing R=titzer@chromium.org,marja@chromium.org,aseemgarg@chromium.org LOG=N Review URL: https://codereview.chromium.org/1492123002 Cr-Commit-Position: refs/heads/master@{#32581}
-