- 21 Oct, 2014 3 commits
-
-
wingo@igalia.com authored
This will allow us to move expressions from one function to another, for example when the parser determines that a given cover grammar instance is actually the default value initializer for an arrow function. This is a re-land of https://codereview.chromium.org/636403003/ with a fix for the arm64 code generator. R=svenpanne@chromium.org BUG= Review URL: https://codereview.chromium.org/663373003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
This reverts r24757, which breaks the ARM64 simulator build. Simple repro: out/arm64.debug/d8 -e 'eval("(function(){ const x; var x; })")' TBR=bmeurer@chromium.org Review URL: https://codereview.chromium.org/652543006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
This will allow us to move expressions from one function to another, for example when the parser determines that a given cover grammar instance is actually the default value initializer for an arrow function. R=svenpanne@chromium.org, marja@chromium.org BUG= Review URL: https://codereview.chromium.org/636403003 Patch from Andy Wingo <wingo@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Oct, 2014 1 commit
-
-
wingo@igalia.com authored
This adds flags in Scope to track wheter a Scope uses "this" and, "arguments". The information is exposed via Scope::uses_this(), and Scope::uses_arguments(), respectively. Flags for tracking usage on any inner scope uses are available as well via Scope::inner_uses_this(), and Scope::inner_uses_arguments(). Knowing whether scopes use "this" and "arguments" will be handy to generate the code needed to capture their values when generating the code for arrow functions. BUG=v8:2700 LOG= R=rossberg@chromium.org Review URL: https://codereview.chromium.org/422923004 Patch from Adrian Perez de Castro <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 09 Oct, 2014 2 commits
-
-
dslomov@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/643603002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
Every CompilationInfo has an ID generator now, and it is never reset/copied/assigned. Simplified FunctionState. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/633373003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Oct, 2014 1 commit
-
-
arv@chromium.org authored
BUG=v8:3330 LOG=Y R=dslomov@chromium.org Review URL: https://codereview.chromium.org/624013005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Oct, 2014 3 commits
-
-
arv@chromium.org authored
prototype. This does not add the methods/accessors to the prototype or the constructor. BUG=v8:3330 LOG=Y R=dslomov@chromium.org Review URL: https://codereview.chromium.org/631433002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
svenpanne@chromium.org authored
AST ids only need to be unique, so there is no need to fiddle around with them. R=dslomov@chromium.org Review URL: https://codereview.chromium.org/633053002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
Instead of using an integer value and manual bit-fiddling, use C++'s support for specifying bit sizes for integral types. This way the bits used to describe a PreParserExpression are handled by the compiler. BUG= LOG= R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/422363002 Patch from Adrian Perez <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Sep, 2014 1 commit
-
-
arv@chromium.org authored
This allows the following: var x = 1; var o = {x}; This is under the --harmony-object-literals flag. BUG=v8:3584 LOG=y R=marja@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/584993002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Sep, 2014 1 commit
-
-
yangguo@chromium.org authored
R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/596783002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 18 Sep, 2014 2 commits
-
-
arv@chromium.org authored
BUG=v8:3330 LOG=Y R=marja@chromium.org Review URL: https://codereview.chromium.org/575083002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
arv@chromium.org authored
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-method-definitions BUG=v8:3516 LOG=Y R=dslomov@chromium.org Review URL: https://codereview.chromium.org/577973002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Sep, 2014 2 commits
-
-
arv@chromium.org authored
This implements parsing for ClassExpression and ClassDeclaration. The runtime is not yet implemented and the value is currently hard coded to undefined. BUG=v8:3330 LOG=Y R=dslomov@chromium.org, marja@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/561913002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
R=rossberg@chromium.org BUG=v8:2355 LOG=Y Review URL: https://codereview.chromium.org/573963003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Sep, 2014 1 commit
-
-
arv@chromium.org authored
This is governed by the harmony-object-literals flag. BUG=v8:3516 LOG=Y R=rossberg@chromium.org Review URL: https://codereview.chromium.org/477263002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Sep, 2014 2 commits
-
-
marja@chromium.org authored
- Background Parsers cannot get the following data from Isolate (pass it to the ctor instead): stack limit (background Parsers need a different stack limit), UnicodeCache (background parsers need a separate UnicodeCache), hash seed (Parser cannot access the Heap to get it). The Parser::Parse API won't change. - Make the internalization phase (where Parser interacts with the heap) more explicit. Previously, Parser was interacting with the heap here and there. - Move HandleSourceURLComments out of DoParseProgram, so that background parsing can use DoParseProgram too. BUG= R=rossberg@chromium.org Review URL: https://codereview.chromium.org/527763002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
bmeurer@chromium.org authored
Less useless creativity is best creativity! R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/526223002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 22 Aug, 2014 2 commits
-
-
arv@chromium.org authored
We were not correctly treating 1.0 as 1, nor 1.20 as 1.2 in accessors. BUG=v8:3507 LOG=Y R=marja@chromium.org Review URL: https://codereview.chromium.org/493173003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
marja@chromium.org authored
When we're going to parse multiple scripts in parallel, we cannot have the Isolate count the ast node ids. Now the counter is stored in CompilationInfo instead. This is because we need to add ast nodes after parsing too. R=rossberg@chromium.org BUG= Review URL: https://codereview.chromium.org/490173002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Aug, 2014 2 commits
-
-
arv@chromium.org authored
We're not quite ready to make this change. BUG=v8:3498 LOG=Y R=rossberg@chromium.org Review URL: https://codereview.chromium.org/491053002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
marja@chromium.org authored
Why this is better: 1) Not needing an extra template parameter for Checkpoints ctors. This was especially confusing since the template parameter was named Parser and Parser is also used as a type name and is also a concrete type. This CL makes it clear that ParserTraits::Checkpoint is consturcted with ParserBase<ParserTraits> - that's the only sensemaking type for the ctor param anyway. 2) This CL makes ParserBase define a Checkpoint base class (which knows how to create and restore a checkpoint with ParserBase) which PreParserTraits::Checkpoint and ParserTraits::Checkpoint inherit, and not the other way around. This is a more intuitive way to implement the "base functionality + extending it" concept than the previous solution. The previous solution was to allow Traits to define a Checkpoint class and make ParserBase<Traits>::ParserCheckpoint (which defines the base functionality) inherit from it. 3) This CL moves the Checkpoint class definitions out of the SomeTraits::Type struct; SomeTraits::Type is supposed to be a collection of typedefs and not contain anything else. Checkpoints were introduced in r22925 ( https://codereview.chromium.org/443903003 ). BUG= R=wingo@igalia.com Review URL: https://codereview.chromium.org/485473004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 20 Aug, 2014 2 commits
-
-
arv@chromium.org authored
This extracts the parsing of the ObjectLiteralProperty into its own function. This is in preparation for adding support for parsing classes. BUG=None LOG=Y R=dslomov@chromium.org, marja@chromium.org Review URL: https://codereview.chromium.org/458613004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
arv@chromium.org authored
This removes the duplicate property checker and updates the tests. BUG=v8:3498 LOG=Y R=marja@chromium.org Review URL: https://codereview.chromium.org/459463002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 18 Aug, 2014 1 commit
-
-
dslomov@chromium.org authored
BUG=v8:3330 LOG=N R=arv@chromium.org, marja@chromium.org Review URL: https://codereview.chromium.org/480543002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23157 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Aug, 2014 1 commit
-
-
wingo@igalia.com authored
This enables for-of, as well as @@iterator implementations for strings and arrays. R=rossberg@chromium.org BUG=v8:2214 LOG=Y Review URL: https://codereview.chromium.org/446023002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Aug, 2014 3 commits
-
-
wingo@igalia.com authored
The new ParserCheckpoint mechanism resets some state, notably the bailout ID counter but also some statement counters (only applicable once we get "do" expressions) when we decide to reinterpret a comma expression as arrow function arguments. R=rossberg@chromium.org, marja@chromium.org BUG=v8:3475 LOG=N Review URL: https://codereview.chromium.org/443903003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
This reverts r22906. TBR=rossberg@chromium.org BUG= Review URL: https://codereview.chromium.org/440373003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
The new ParserCheckpoint mechanism resets some state, notably the bailout ID counter but also some statement counters (only applicable once we get "do" expressions) when we decide to reinterpret a comma expression as arrow function arguments. R=marja@chromium.org, rossberg@chromium.org BUG=v8:3475 LOG=N Review URL: https://codereview.chromium.org/437393004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Aug, 2014 2 commits
-
-
wingo@igalia.com authored
The FunctionState corresponding to the arrow function's body should be torn down before the function literal is allocated, so that the function literal gets a bailout id for the environment in which it appears. We will also need to rewind bailout IDs in the environment of the function literal, to return IDs allocated for arrow function arguments. This will come in the next patch. R=rossberg@chromium.org BUG=v8:3475 LOG=N Review URL: https://codereview.chromium.org/442573004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
R=rossberg@chromium.org BUG=v8:3422 LOG=N Review URL: https://codereview.chromium.org/430693003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Aug, 2014 1 commit
-
-
bmeurer@chromium.org authored
This way we don't clash with the ASSERT* macros defined by GoogleTest, and we are one step closer to being able to replace our homegrown base/ with base/ from Chrome. R=jochen@chromium.org, svenpanne@chromium.org Review URL: https://codereview.chromium.org/430503007 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Jul, 2014 1 commit
-
-
svenpanne@chromium.org authored
This fixes checks on the "code_" member of PreParserExpression, in order to make methods IsThis(), IsThisProperty(), IsProperty(), IsCall() and IsValidReferenceExpression() work correctly. BUG=v8:3456 LOG= R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/410873004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Jul, 2014 1 commit
-
-
rossberg@chromium.org authored
Implements code generation for arrow functions by desugaring them into a FunctionLiteral. For the moment, a normal FUNCTION_SCOPE is used, so "this" and "arguments" behave as in normal functions. Implementing the correct scoping rules is to be done later on. BUG=v8:2700 LOG= R=rossberg@chromium.org Review URL: https://codereview.chromium.org/382893003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Jul, 2014 1 commit
-
-
marja@chromium.org authored
Arrow functions are parsed from ParseAssignmentExpression(). Handling the parameter list is done by letting ParseConditionalExpression() parse a comma separated list of identifiers, and it returns a tree of BinaryOperation nodes with VariableProxy leaves, or a single VariableProxy if there is only one parameter. When the arrow token "=>" is found, the VariableProxy nodes are passed to ParseArrowFunctionLiteral(), which will then skip parsing the paramaeter list. This avoids having to rewind when the arrow is found and restart parsing the parameter list. Note that the empty parameter list "()" is handled directly in ParsePrimaryExpression(): after is has consumed the opening parenthesis, if a closing parenthesis follows, then the only valid input is an arrow function. In this case, ParsePrimaryExpression() directly calls ParseArrowFunctionLiteral(), to avoid needing to return a sentinel value to signal the empty parameter list. Because it will consume the body of the arrow function, ParseAssignmentExpression() will not see the arrow "=>" token as next, and return the already-parser expression. The implementation is done in ParserBase, so it was needed to do some additions to ParserBase, ParserTraits and PreParserTraits. Some of the glue code can be removed later on when more more functionality is moved to ParserBase. Additionally, this adds a runtime flag "harmony_arrow_functions" (disabled by default); enabling "harmony" will enable it as well. BUG=v8:2700 LOG=N R=marja@chromium.org Review URL: https://codereview.chromium.org/383983002 Patch from Adrián Pérez de Castro <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 11 Jul, 2014 1 commit
-
-
marja@chromium.org authored
This reverts revision 22320. Reason: ASAN still detects leaks! Conflicts: src/preparser.h TBR=aperez@igalia.com,marja@chromium.org BUG= Review URL: https://codereview.chromium.org/389503002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 10 Jul, 2014 2 commits
-
-
rossberg@chromium.org authored
All of our mjsunit suite now runs through with --harmony-scoping enabled, up to expected failures (tests checking syntax errors for const/function in strict mode). R=marja@chromium.org, ulan@chromium.org BUG=v8:2198 LOG=Y Review URL: https://codereview.chromium.org/378303003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
marja@chromium.org authored
Arrow functions are parsed from ParseAssignmentExpression(). Handling the parameter list is done by letting ParseConditionalExpression() parse a comma separated list of identifiers, and it returns a tree of BinaryOperation nodes with VariableProxy leaves, or a single VariableProxy if there is only one parameter. When the arrow token "=>" is found, the VariableProxy nodes are passed to ParseArrowFunctionLiteral(), which will then skip parsing the paramaeter list. This avoids having to rewind when the arrow is found and restart parsing the parameter list. Note that the empty parameter list "()" is handled directly in ParsePrimaryExpression(): after is has consumed the opening parenthesis, if a closing parenthesis follows, then the only valid input is an arrow function. In this case, ParsePrimaryExpression() directly calls ParseArrowFunctionLiteral(), to avoid needing to return a sentinel value to signal the empty parameter list. Because it will consume the body of the arrow function, ParseAssignmentExpression() will not see the arrow "=>" token as next, and return the already-parser expression. The implementation is done in ParserBase, so it was needed to do some additions to ParserBase, ParserTraits and PreParserTraits. Some of the glue code can be removed later on when more more functionality is moved to ParserBase. Additionally, this adds a runtime flag "harmony_arrow_functions" (disabled by default); enabling "harmony" will enable it as well. BUG=v8:2700 LOG=N R=marja@chromium.org Review URL: https://codereview.chromium.org/385553003 Patch from Adrián Pérez de Castro <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Jul, 2014 1 commit
-
-
marja@chromium.org authored
This reverts r22265. Reason: ASAN tests fail. BUG= TBR=marja@chromium.org,aperez@igalia.com Review URL: https://codereview.chromium.org/372983003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-