- 08 Dec, 2016 1 commit
-
-
neis authored
This CL attempts to set the maybe-assigned flag for variables that are written to as part of a destructuring or loop header. For instance, in the following two cases we now mark x as maybe-assigned. a) [x] = [1]; b) for (x of [1,2,3]) {}; There's more work to do here, this is just a first step. R=adamk@chromium.org, mstarzinger@chromium.org BUG=v8:5636 Review-Url: https://codereview.chromium.org/2562443003 Cr-Commit-Position: refs/heads/master@{#41582}
-
- 07 Dec, 2016 4 commits
-
-
jwolfe authored
We're still collecting use counter data for this situation. BUG=v8:4973 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2510873005 Cr-Commit-Position: refs/heads/master@{#41563}
-
jwolfe authored
When an octal escape sequence is in a string in strict mode: - Octal literals are not allowed in strict mode. + Octal escape sequences are not allowed in strict mode. When an octal escape sequence is in a template string: - Octal literals are not allowed in template strings. + Octal escape sequences are not allowed in template strings. BUG=v8:4973 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2551633002 Cr-Commit-Position: refs/heads/master@{#41560}
-
caitp authored
Introduces: - a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions. - a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan. The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST. This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value. BUG=v8:4280 R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org TBR=rossberg@chromium.org Review-Url: https://codereview.chromium.org/2557593004 Cr-Commit-Position: refs/heads/master@{#41555}
-
henrique.ferreiro authored
This allows to detect a static property also named 'name', and also makes sure 'name' is added last, to be standards-compliant. BUG=v8:4199 Review-Url: https://codereview.chromium.org/2423053002 Cr-Commit-Position: refs/heads/master@{#41546}
-
- 06 Dec, 2016 1 commit
-
-
marja authored
This makes the context allocation less pessimistic in the following cases: function outer() { var a; // Won't be context allocated function inner1() { var a; a; } function inner2(a) { a; } function inner3([a]) { a; } function inner4({ a: b}) { a; } } BUG=v8:5501 Review-Url: https://codereview.chromium.org/2407163003 Cr-Commit-Position: refs/heads/master@{#41521}
-
- 05 Dec, 2016 2 commits
-
-
neis authored
R=adamk@chromium.org, verwaest@chromium.org BUG=v8:5698 Review-Url: https://codereview.chromium.org/2537413003 Cr-Commit-Position: refs/heads/master@{#41495}
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2549083002 Cr-Commit-Position: refs/heads/master@{#41492}
-
- 02 Dec, 2016 3 commits
-
-
vogelheim authored
BUG=v8:4947 Review-Url: https://codereview.chromium.org/2547493002 Cr-Commit-Position: refs/heads/master@{#41453}
-
vogelheim authored
This apparently gradually fell out of use after the more general Token::IsIdentifer was introduced, and whoever left last forgot to turn out the lights. The only remaining use was in an assertion in DeclareLabel, but meanwhile DeclareLabel is only called if IsIdentifier. I added re-formulated assertions, just in case. R=verwaest@chromium.org BUG=v8:4947 Review-Url: https://codereview.chromium.org/2549493002 Cr-Commit-Position: refs/heads/master@{#41452}
-
jochen authored
Revert of Introduce a separate FunctionLiteral ID for Eval (patchset #1 id:1 of https://codereview.chromium.org/2533303006/ ) Reason for revert: My assumption that eval and top-level code should be handled differently was wrong Original issue's description: > Introduce a separate FunctionLiteral ID for Eval > > Top level SharedFunctionInfos will end up in a scripts SFI list, but > eval'd SFIs shouldn't. Separate IDs will allow for adding a > corresponding DCHECK. > > BUG=v8:5589 > R=marja@chromium.org > > Committed: https://crrev.com/c6d421ff9aee7f3cab9e48faac88f6b08d2f1cf5 > Cr-Commit-Position: refs/heads/master@{#41421} TBR=marja@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5589 Review-Url: https://codereview.chromium.org/2544003003 Cr-Commit-Position: refs/heads/master@{#41448}
-
- 01 Dec, 2016 3 commits
-
-
cbruni authored
BUG= Review-Url: https://codereview.chromium.org/2541793004 Cr-Commit-Position: refs/heads/master@{#41436}
-
jochen authored
Top level SharedFunctionInfos will end up in a scripts SFI list, but eval'd SFIs shouldn't. Separate IDs will allow for adding a corresponding DCHECK. BUG=v8:5589 R=marja@chromium.org Review-Url: https://codereview.chromium.org/2533303006 Cr-Commit-Position: refs/heads/master@{#41421}
-
petermarshall authored
Unfortunately we have to split this up into two cases: those with exactly one spread argument as the final argument, and all others, due to any side-effects of evaluation being visible. This is in preparation for a new bytecode which handles super calls. BUG=v8:5659 Review-Url: https://codereview.chromium.org/2540593003 Cr-Commit-Position: refs/heads/master@{#41415}
-
- 30 Nov, 2016 2 commits
-
-
jochen authored
Also move them to a separate interface header to avoid having to include parser.h so much BUG=v8:5589 R=verwaest@chromium.org,marja@chromium.org Review-Url: https://codereview.chromium.org/2534393002 Cr-Commit-Position: refs/heads/master@{#41386}
-
bradnelson authored
Make the AsmWasmBuilder drive the process of typing and potentially parsing function bodies. This will allow us to keep only a single asm.js function's AST in memory as we convert to WebAssembly. This is needed to keep our memory footprint low. Add some additional output to a few tests that's helpful to see which stage they fail at. BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203 LOG=N R=marja@chromium.org,adamk@chromium.org,aseemgarg@chromium.org,titzer@chromium.org Review-Url: https://codereview.chromium.org/2398023002 Cr-Commit-Position: refs/heads/master@{#41372}
-
- 29 Nov, 2016 1 commit
-
-
vogelheim authored
BUG=chromium:669017 Review-Url: https://codereview.chromium.org/2536783003 Cr-Commit-Position: refs/heads/master@{#41364}
-
- 28 Nov, 2016 4 commits
-
-
tebbi authored
Removed a redundant check: If completion is not normal, then #iterator cannot be undefined. Review-Url: https://codereview.chromium.org/2533803002 Cr-Commit-Position: refs/heads/master@{#41321}
-
Jochen Eisinger authored
R=verwaest@chromium.org TBR=marja@chromium.org, verwaest@chromium.org BUG= Review URL: https://codereview.chromium.org/2531233002 . Cr-Commit-Position: refs/heads/master@{#41310}
-
jochen authored
They're supposed to be stable across several parse passes, so we'll also store them in the associated SharedFunctionInfos To achieve this, the PreParser and Parser need to generated the same number of FunctionLiterals. To achieve this, we teach the PreParser about desuggaring of class literals. For regular functions, the function IDs are assigned in the order they occur in the source. For arrow functions, however, we only know that it's an arrow function after parsing the parameter list, and so the ID assigned to the arrow function is larger than the IDs assigned to functions defined in the parameter list. This implies that we have to reset the function ID counter to before the parameter list when re-parsing an arrow function. To be able to do this, we store the number of function literals found in the parameter list of arrow functions as well. BUG=v8:5589 Review-Url: https://codereview.chromium.org/2481163002 Cr-Commit-Position: refs/heads/master@{#41309}
-
marja authored
ThreadedList is more memory-efficient than ZoneList. This also enables us to use ThreadedList when making Preparser track parameters (upcoming work). BUG=v8:5501 Review-Url: https://codereview.chromium.org/2531593002 Cr-Commit-Position: refs/heads/master@{#41307}
-
- 24 Nov, 2016 4 commits
-
-
verwaest authored
BUG=chromium:417697 Review-Url: https://codereview.chromium.org/2522223002 Cr-Commit-Position: refs/heads/master@{#41271}
-
vogelheim authored
R=verwaest@chromium.org BUG=v8:5643 Review-Url: https://codereview.chromium.org/2524263003 Cr-Commit-Position: refs/heads/master@{#41267}
-
neis authored
In the ParseInfo constructor that takes a SharedFunctionInfo, we must set the module flag when the function represents a module. BUG=v8:1569 Review-Url: https://codereview.chromium.org/2525013002 Cr-Commit-Position: refs/heads/master@{#41257}
-
neis authored
The catch scopes were created with the wrong parent scope. R=littledan@chromium.org BUG=v8:5648 Committed: https://crrev.com/f385268d11d6da9508e481202b39f75f4b56afdd Review-Url: https://codereview.chromium.org/2520883002 Cr-Original-Commit-Position: refs/heads/master@{#41222} Cr-Commit-Position: refs/heads/master@{#41253}
-
- 23 Nov, 2016 3 commits
-
-
machenbach authored
Revert of [parser] Fix scopes in rewriting of for-of and destructuring assignments. (patchset #6 id:100001 of https://codereview.chromium.org/2520883002/ ) Reason for revert: Speculative revert: Seems to break jsfunfuzz: https://build.chromium.org/p/client.v8/builders/V8%20Fuzzer/builds/14385 Original issue's description: > [parser] Fix scopes in rewriting of for-of and destructuring assignments. > > The catch scopes were created with the wrong parent scope. > > R=littledan@chromium.org > BUG=v8:5648 > > Committed: https://crrev.com/f385268d11d6da9508e481202b39f75f4b56afdd > Cr-Commit-Position: refs/heads/master@{#41222} TBR=littledan@chromium.org,verwaest@chromium.org,neis@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5648 Review-Url: https://codereview.chromium.org/2519333005 Cr-Commit-Position: refs/heads/master@{#41228}
-
neis authored
The catch scopes were created with the wrong parent scope. R=littledan@chromium.org BUG=v8:5648 Review-Url: https://codereview.chromium.org/2520883002 Cr-Commit-Position: refs/heads/master@{#41222}
-
marja authored
Eval calls are tracked by ParserBase::CheckPossibleEvalCall which doesn't use (Pre)?Parser::IsDirectEvalCall. Also we no longer seem to care about IsBinaryOperation (Parser didn't have it either). BUG= Review-Url: https://codereview.chromium.org/2528603003 Cr-Commit-Position: refs/heads/master@{#41216}
-
- 22 Nov, 2016 2 commits
-
-
marja authored
... but be less pessimistic about context allocation (see below). We might have just (pessimistically) context-allocated a variable based on references coming from an inner function, but after that we still need to set maybe_assigned (pessimistically). This makes test-parsing/InnerAssignment pass with FLAG_lazy_inner_functions. This was undetected until now because we didn't have lazy parsing enabled for small scripts. Less pessimistic approach: now that inner functions laziness decisions are stable (if we have once compiled a piece of code with lazy inner functions, we never compile the same code with eager inner functions), we don't need to be as pessimistic with context allocation as before. BUG=v8:5501 Review-Url: https://codereview.chromium.org/2521513004 Cr-Commit-Position: refs/heads/master@{#41183}
-
neis authored
TBR=littledan@chromium.org BUG= Review-Url: https://codereview.chromium.org/2517143003 Cr-Commit-Position: refs/heads/master@{#41180}
-
- 21 Nov, 2016 1 commit
-
-
verwaest authored
[parser] Keep track of whether we are in a temp-zone in the parser, and don't lazy parse anymore once we are This avoids entering a nested temp zone, and fixes up tracing and runtime callstats names. BUG= Review-Url: https://codereview.chromium.org/2514353002 Cr-Commit-Position: refs/heads/master@{#41147}
-
- 18 Nov, 2016 3 commits
-
-
littledan authored
The code which pushes and pops to the function name inference stack generally checks if the stack is active with the IsOpen method. One piece of code pertaining to async functions was missing that check. This patch adds it. BUG=chromium:658267 R=gsathya,caitp Review-Url: https://codereview.chromium.org/2514893002 Cr-Commit-Position: refs/heads/master@{#41120}
-
vogelheim authored
Some minifiers use the pattern !function ... () for JS code that should be immediately executed. This change recognizes that pattern and treats it equally to parenthesized functions. A bit more background info is in the referenced bug. R=verwaest@chromium.org BUG=v8:5643 Review-Url: https://codereview.chromium.org/2509143003 Cr-Commit-Position: refs/heads/master@{#41114}
-
marja authored
It originates from the era where we used to run a separate preparse step before parsing and store the function data. Now the usage of preparser is something completely different, so this flag doesn't make sense any more. In addition, this way we get more test coverage for preparser (for small scripts). BUG= Review-Url: https://codereview.chromium.org/2513563002 Cr-Commit-Position: refs/heads/master@{#41110}
-
- 17 Nov, 2016 2 commits
-
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2507293003 Cr-Commit-Position: refs/heads/master@{#41088}
-
neis authored
There's no need to return anything. Also add a DCHECK to make sure that we never mark a variable proxy as assigned that is already resolved (to avoid potential inconsistency with the variable's maybe_assigned status). R=littledan@chromium.org CC=mstarzinger@chromium.org BUG= Review-Url: https://codereview.chromium.org/2504613002 Cr-Commit-Position: refs/heads/master@{#41072}
-
- 16 Nov, 2016 4 commits
-
-
cbruni authored
BUG= Review-Url: https://codereview.chromium.org/2509683002 Cr-Commit-Position: refs/heads/master@{#41047}
-
verwaest authored
BUG= Review-Url: https://codereview.chromium.org/2506613002 Cr-Commit-Position: refs/heads/master@{#41031}
-
cbruni authored
BUG= Review-Url: https://codereview.chromium.org/2504933002 Cr-Commit-Position: refs/heads/master@{#41030}
-
vogelheim authored
Reason: $ git log --author=verwaest --since="6 months ago" --oneline src/parsing BUG= Review-Url: https://codereview.chromium.org/2505623002 Cr-Commit-Position: refs/heads/master@{#41026}
-