- 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
-
- 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
-
- 18 Sep, 2014 1 commit
-
-
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 2 commits
-
-
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
-
yangguo@chromium.org authored
R=dcarney@chromium.org, marja@chromium.org Review URL: https://codereview.chromium.org/559913002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Sep, 2014 1 commit
-
-
bmeurer@chromium.org authored
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/544043002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Sep, 2014 1 commit
-
-
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
-
- 26 Aug, 2014 1 commit
-
-
bmeurer@chromium.org authored
Our own ARRAY_SIZE() was pretty bad at error checking. If you use arrasize() in a wrong way, the compiler will issue an error instead of silently doing the wrong thing. The previous ARRAY_SIZE() macro is still available as ARRAYSIZE_UNSAFE() similar to Chrome. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/501323002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Aug, 2014 1 commit
-
-
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
-
- 20 Aug, 2014 1 commit
-
-
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
-
- 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
-
- 30 Jul, 2014 1 commit
-
-
danno@chromium.org authored
R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/426233002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Jul, 2014 2 commits
-
-
mstarzinger@chromium.org authored
TBR=ishell@chromium.org Review URL: https://codereview.chromium.org/429583002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22670 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
mstarzinger@chromium.org authored
R=jacob.bramley@arm.com, titzer@chromium.org, rossberg@chromium.org Review URL: https://codereview.chromium.org/410153002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22666 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
-
- 16 Jul, 2014 1 commit
-
-
vogelheim@chromium.org authored
(parser or code) and to be explicit about cache consumption or production (rather than making presence of cached_data imply one or the other.) Also add a --cache flag to d8, to allow testing the functionality. ----------------------------- API change Reason: Currently, V8 supports a 'parser cache' for repeatedly executing the same script. We'd like to add a 2nd mode that would cache code, and would like to let the embedder decide which mode they chose (if any). Note: Previously, the 'use cached data' property was implied by the presence of the cached data itself. (That is, kNoCompileOptions and source->cached_data != NULL.) That is no longer sufficient, since the presence of data is no longer sufficient to determine /which kind/ of data is present. Changes from old behaviour: - If you previously didn't use caching, nothing changes. Example: v8::CompileUnbound(isolate, source, kNoCompileOptions); - If you previously used caching, it worked like this: - 1st run: v8::CompileUnbound(isolate, source, kProduceToCache); Then, source->cached_data would contain the data-to-be cached. This remains the same, except you need to tell V8 which type of data you want. v8::CompileUnbound(isolate, source, kProduceParserCache); - 2nd run: v8::CompileUnbound(isolate, source, kNoCompileOptions); with source->cached_data set to the data you received in the first run. This will now ignore the cached data, and you need to explicitly tell V8 to use it: v8::CompileUnbound(isolate, source, kConsumeParserCache); ----------------------------- BUG= R=marja@chromium.org, yangguo@chromium.org Review URL: https://codereview.chromium.org/389573006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 15 Jul, 2014 1 commit
-
-
marja@chromium.org authored
There are a lot of tests in cctest/test-parsing/ErrorsArrowFunctions, so it is quite slow. This patch removes some flags to make it faster. Removing three flags that don't affect the test brings down the run time one order of magnitude, which is fast enough even for debug/ASAN bots. Also, remove the unneeded kArrowFunctions flag from cctest/test-parsing/NoErrorsYieldSloppyAllModes BUG= R=marja@chromium.org Review URL: https://codereview.chromium.org/387383002 Patch from Adrián Pérez de Castro <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22392 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 4 commits
-
-
rossberg@chromium.org authored
R=marja@chromium.org BUG= Review URL: https://codereview.chromium.org/385613002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22324 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
-
yangguo@chromium.org authored
TBR=marja@chromium.org Review URL: https://codereview.chromium.org/384663002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
yangguo@chromium.org authored
R=marja@chromium.org, vogelheim@chromium.org Review URL: https://codereview.chromium.org/376223002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Jul, 2014 2 commits
-
-
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
-
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 ParseFunctionLiteral(), 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 ParseExpression() expects parenthesized expressions to not be empty, so checking for a closing parenthesis is added in handling the empty parameter list "()" will accept a right-paren and return an empty expression, which means that the parameter list is empty. Additionally, this adds the following machinery: - A runtime flag "harmony_arrow_functions" (disabled by default). Enabling "harmony" will enable it as well. - An IsArrow bit in SharedFunctionInfo, and accessors for it. - An IsArrow bit in FunctionLiteral, accessorts for it, and a constructor parameter to set its value. - In ParserBase: allow_arrow_functions() and set_allow_arrow_functions() - A V8 native %FunctionIsArrow(), which is used to skip adding the "function " prefix when getting the source code for an arrow function. R=marja@chromium.org Review URL: https://codereview.chromium.org/160073006 Patch from Adrián Pérez de Castro <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 03 Jul, 2014 1 commit
-
-
ishell@chromium.org authored
BUG=chromium:376287 BUG=chromium:376262 BUG=chromium:369962 LOG=N R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/368053002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Jul, 2014 2 commits
-
-
wingo@igalia.com authored
R=marja@chromium.org BUG= Review URL: https://codereview.chromium.org/348893007 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
wingo@igalia.com authored
R=marja@chromium.org BUG= Review URL: https://codereview.chromium.org/362963002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22155 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 30 Jun, 2014 2 commits
-
-
marja@chromium.org authored
R=jochen@chromium.org BUG= Review URL: https://codereview.chromium.org/336863007 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
jochen@chromium.org authored
Also split v8-core independent methods from checks.h to base/logging.h and merge v8checks with the rest of checks. The CPU::FlushICache method is moved to CpuFeatures::FlushICache RoundUp and related methods are moved to base/macros.h Remove all layering violations from src/libplatform BUG=none R=jkummerow@chromium.org LOG=n Review URL: https://codereview.chromium.org/358363002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 26 Jun, 2014 1 commit
-
-
rossberg@chromium.org authored
R=titzer@chromium.org BUG= Review URL: https://codereview.chromium.org/345573002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 25 Jun, 2014 1 commit
-
-
wingo@igalia.com authored
ES6 will allow trailing commas in object literals. It turns out that V8 already allowed it, too, as does JSC and SpiderMonkey. R=marja@chromium.org BUG= Review URL: https://codereview.chromium.org/350353002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Jun, 2014 1 commit
-
-
marja@chromium.org authored
This is a reincarnation of r21841. The previous try was https://codereview.chromium.org/314603004/ but it regressed JSBench and morejs. BUG= R=rossberg@chromium.org Review URL: https://codereview.chromium.org/335293004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-