- 12 Jun, 2013 1 commit
-
-
wingo@igalia.com authored
R=rossberg@chromium.org BUG=v8:2720 Review URL: https://codereview.chromium.org/16739008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Jun, 2013 1 commit
-
-
wingo@igalia.com authored
This commit adds initial parser support for harmony iteration. Specifically, it will parse: for (x of y) {} for (let x of y) {} for (var x of y) {} The semantics are still unimplemented. TEST=mjsunit/harmony/for-of-syntax BUG=v8:2214 R=rossberg@chromium.org Review URL: https://codereview.chromium.org/15300018 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Apr, 2013 1 commit
-
-
mstarzinger@chromium.org authored
This patch refactors the parser and preparser interface to be more readable and type-safe. It has no behavior changes. Previously, parsers and preparsers were configured via bitfield called parser_flags in the Parser constructor, and flags in PreParser::PreParseProgram, ParserApi::Parse, and ParserApi::PreParse. This was error-prone in practice: six call sites passed incorrectly typed values to this interface (a boolean FLAG value, a boolean false and a boolean true value). None of these errors were caught by the compiler because it's just an "int". The parser flags interface was also awkward because it encoded a language mode, but the language mode was only used to turn on harmony scoping or not -- it wasn't used to actually set the parser's language mode. Fundamentally these errors came in because of the desire for a procedural parser interface, in ParserApi. Because we need to be able to configure the parser in various ways, the flags argument got added; but no one understood how to use the flags properly. Also they were only used by constructors: callers packed bits, and the constructors unpacked them into booleans on the parser or preparser. The solution is to allow parser construction, configuration, and invocation to be separated. This patch does that. It passes the existing tests. BUG= Review URL: https://codereview.chromium.org/13450007 Patch from Andy Wingo <wingo@igalia.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 02 Apr, 2013 2 commits
-
-
mstarzinger@chromium.org authored
TBR=yangguo@chromium.org Review URL: https://codereview.chromium.org/13465010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
mstarzinger@chromium.org authored
This patchset begins by adding support for "yield", which is unlike other tokens in JS. In a generator, whether strict or classic, it is a syntactic keyword. In classic mode it is an identifier. In strict mode it is reserved. This patch adds YIELD as a token to the scanner, and adapts the preparser and parser appropriately. It also parses "function*", indicating that a function is actually a generator, for both eagerly and lazily parsed functions. Currently "yield" just compiles as "return". BUG=v8:2355 TEST=mjsunit/harmony/generators-parsing Review URL: https://codereview.chromium.org/12646003 Patch from Andy Wingo <wingo@igalia.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Dec, 2012 1 commit
-
-
rossberg@chromium.org authored
For strict-mode eval, this requires _disabling_ lazy parsing of inner functions, because we need to collect their free variables to do allocation for the eval scope properly. R=mstarzinger@chromium.org BUG=v8:2315 Review URL: https://codereview.chromium.org/11438042 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13161 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 30 Apr, 2012 1 commit
-
-
svenpanne@chromium.org authored
BUG=v8:2109 TBR=jkummerow@chromium.org Review URL: https://chromiumcodereview.appspot.com/10270007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11468 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Mar, 2012 1 commit
-
-
erik.corry@gmail.com authored
Review URL: https://chromiumcodereview.appspot.com/9600009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Feb, 2012 1 commit
-
-
fschneider@chromium.org authored
The old HashMap class had an explicit member to determine the allocation policy. The template version matches the approach used already for lists. Cleanup some include dependencies and unnecessary forward declarations. Cleanup some dead code from isolate.h and replace some HEAP macros with GetHeap(). Review URL: https://chromiumcodereview.appspot.com/9372106 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Feb, 2012 1 commit
-
-
rossberg@chromium.org authored
R=mstarzinger@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/9352013 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Jan, 2012 1 commit
-
-
erik.corry@gmail.com authored
Review URL: http://codereview.chromium.org/9139051 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 25 Nov, 2011 1 commit
-
-
lrn@chromium.org authored
Instead use the preparser inline to parse only the lazy function bodies. This is still disabled for small files. More measurements are needed to determine if lazy-compiling small sources is worth it. Review URL: http://codereview.chromium.org/8662037 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Nov, 2011 1 commit
-
-
keuchel@chromium.org authored
This CL introduces a third mode next to the non-strict (henceforth called 'classic mode') and 'strict mode' which is called 'extended mode' as in the current ES.next specification drafts. The extended mode is based on the 'strict mode' and adds new functionality to it. This means that most of the semantics of these two modes coincide. The 'extended mode' is entered instead of the 'strict mode' during parsing when using the 'strict mode' directive "use strict" and when the the harmony-scoping flag is active. This should be changed once it is fully specified how the 'extended mode' is entered. This change introduces a new 3 valued enum LanguageMode (see globals.h) corresponding to the modes which is mostly used by the frontend code. This includes the following components: * (Pre)Parser * Compiler * SharedFunctionInfo, Scope and ScopeInfo * runtime functions: StoreContextSlot, ResolvePossiblyDirectEval, InitializeVarGlobal, DeclareGlobals The old enum StrictModeFlag is still used in the backend when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes: * SetProperty runtime function, Delete builtin * StoreIC and KeyedStoreIC * StubCache Review URL: http://codereview.chromium.org/8417035 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 01 Nov, 2011 1 commit
-
-
lrn@chromium.org authored
JavaScriptScanner had become the only concrete subclass of Scanner, so there was no longer a need for the distinction. Also fixed up comments. Review URL: http://codereview.chromium.org/8384003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 27 Oct, 2011 1 commit
-
-
keuchel@chromium.org authored
Review URL: http://codereview.chromium.org/8396040 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Oct, 2011 1 commit
-
-
keuchel@chromium.org authored
Review URL: http://codereview.chromium.org/8344082 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 17 Oct, 2011 2 commits
-
-
lrn@chromium.org authored
Previously the preparser always accepted natives syntax and let the real parser throw the syntax error. In ES5, it should be an early error, so the preparser must catch the error. The perparser library does not expose parsing for natives syntax, it's only used internally. Review URL: http://codereview.chromium.org/8306024 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
keuchel@chromium.org authored
TEST=mjsunit/harmony/block-for.js Review URL: http://codereview.chromium.org/7837028 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 12 Oct, 2011 1 commit
-
-
rossberg@chromium.org authored
Shorten --harmony-block-scoping to --harmony-scoping. R=keuchel@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8226017 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 08 Sep, 2011 2 commits
-
-
lrn@chromium.org authored
Small cleanups in preparser. TEST=cctest/test-utils/SequenceCollectorRegression Review URL: http://codereview.chromium.org/7754014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
lrn@chromium.org authored
R=lrn@chromium.org Signed-off-by:
Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/7739020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Sep, 2011 1 commit
-
-
lrn@chromium.org authored
Duplicate identifier detection must be an early syntax error in strict code, so errors in otherwise lazily compiled functions must be caught in the preparser. Originally introduced in r8541 and reverted in r8542. Now really compiles on Windows. Review URL: http://codereview.chromium.org/7782023 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 16 Aug, 2011 1 commit
-
-
keuchel@chromium.org authored
Implementation of the harmony block scoped let bindings as proposed here: http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings Changes to the syntax are explained there. They are active under the harmony_block_scoping_ flag in the parser. Review URL: http://codereview.chromium.org/7616009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 Jul, 2011 2 commits
-
-
lrn@chromium.org authored
Doesn't work on Windows yet. Crashes some layout-tests. Review URL: http://codereview.chromium.org/7278039 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
lrn@chromium.org authored
This is a fix and reapply of r8516 with some comments addressed and more tests added. The difference from r8516 is that canonicalization of number literals is no performed using the same methods as in v8, to avoid false positives/negatives when detecting duplicates. Review URL: http://codereview.chromium.org/7193045 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 01 Jul, 2011 2 commits
-
-
lrn@chromium.org authored
Revision 8516 contained a temporary hack that doesn't work on Windows. TBR: ricow Review URL: http://codereview.chromium.org/7298008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
lrn@chromium.org authored
Add tests for duplicate properties of object initialisers to preparser. TEST=preparser Review URL: http://codereview.chromium.org/7168016 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 Jun, 2011 1 commit
-
-
keuchel@chromium.org authored
BUG=86442 TEST=mjsunit/keywords-and-reserved_words.js Review URL: http://codereview.chromium.org/7207007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 20 Jun, 2011 1 commit
-
-
lrn@chromium.org authored
We now only recognize "native function" when it occurs in extension scripts (parsing with a non-NULL extension), and only if there is no line-terminator between "native" and "function" (so that it would otherwise be a Syntax Error). Preparsing never recognizes native functions, which is acceptable since we never preparse extension scripts (because we don't allow lazy functions anyway). BUG=v8:1097 Review URL: http://codereview.chromium.org/7206020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 07 Jun, 2011 1 commit
-
-
mikhail.naganov@gmail.com authored
Mainly, there were errors concerning blank lines before and after class access control sections [whitespace/blank_line]. BEFORE an access control section (e.g. public:, private:) there should be a blank line (except for the section right after the class declaration). AFTER an access control section there should be no blank line. TBR=ager@chromium.org git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 24 May, 2011 1 commit
-
-
lrn@chromium.org authored
Small fixes. Added test for const declaration in strict mode. TEST=preparser/strict-function-statement Review URL: http://codereview.chromium.org/6990056 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 19 May, 2011 2 commits
-
-
lrn@chromium.org authored
Make builder happy. Review URL: http://codereview.chromium.org/7046004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
lrn@chromium.org authored
Now tests for use of eval, arguments, reserved words and with statement. Review URL: http://codereview.chromium.org/7037024 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 06 May, 2011 1 commit
-
-
lrn@chromium.org authored
Handle octal escapes in everything but RegExps. Extend preparser test suite to test whether the preparser reports exceptions to throw. TEST=preparser/* Review URL: http://codereview.chromium.org/6927075 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Feb, 2011 1 commit
-
-
peterhal@chromium.org authored
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 14 Jan, 2011 1 commit
-
-
lrn@chromium.org authored
We heuristically expect those functions to be called immediately. Review URL: http://codereview.chromium.org/6311005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6309 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 04 Jan, 2011 1 commit
-
-
lrn@chromium.org authored
Allow object initializers to define getters using string and number literals. Review URL: http://codereview.chromium.org/5985010 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Nov, 2010 1 commit
-
-
lrn@chromium.org authored
No scons target yet. Review URL: http://codereview.chromium.org/5295004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Nov, 2010 1 commit
-
-
lrn@chromium.org authored
Extracted preparse-data specification and logging classes. Review URL: http://codereview.chromium.org/5166006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 18 Nov, 2010 1 commit
-
-
lrn@chromium.org authored
Review URL: http://codereview.chromium.org/5195002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-