Curtis Man
|
a4058ce9b6
Parser refactor: More use stronger type instead of casting from ParseNode
|
8 anni fa |
Sandeep Agarwal
|
81dd72303a
Remove isEval field from ByteCode Symbol class
|
8 anni fa |
Paul Leathers
|
ec180eb879
[CVE-2017-8740] Fix bad byte code gen for 'with'. The original (conservative) fix for this issue relied on marking scopes as containing 'with'. But because block scopes are created lazily, we can miss the opportunity to mark a scope. Instead, implementing a more accurate fix that marks symbols that are referenced from within 'with' statements as needing scope objects if they are closure-captured.
|
8 anni fa |
Aneesh Divakarakurup
|
27d6b57366
[2.0>master] [1.4>2.0] [MERGE #2723 @aneeshdk] Enabling eval in param scope
|
9 anni fa |
Paul Leathers
|
050ab56aed
Fix bad byte code when block-scoped function is called from with. Yesterday's fix was incomplete, because it failed to address the case in which the nested function called from a with statement is declared in a lexical scope. The concept we're conservatively using, of a scope containing a with statement as well as closure-captured data, has to be tracked on individual scopes rather than functions.
|
9 anni fa |
Aneesh Divakarakurup
|
08dc260232
Enabling eval in param scope
|
9 anni fa |
Paul Leathers
|
61cafb86d8
Defer functions enclosed in all contexts. Support deferral of functions enclosed in scopes other than function body and function expression scope -- in particular, ES6-style lexical scopes and parameter scopes. This requires changing ScopeInfo so that it is associated with a single scope rather than a function body. Instead of carrying per-function information for body/var scope, parameter scope, and function expression scope, ScopeInfo will describe one scope, with a value identifying the scope type, a pointer to the FunctionInfo that contains it, and a pointer to the enclosing ScopeInfo.. A FunctionProxy will point to the ScopeInfo that is the nearest enclosing scope. At parse time, we will reconstitute the closure environment by walking the list of enclosing ScopeInfo's. The code that allowed redeferral to work around the context limitation of deferring parsing is deleted, and the OptimizeBlockScope feature is off by default, as it doesn't play well with this new logic and isn't required to make (re-)deferral effective. (We will want to revisit it.)
|
9 anni fa |
Paul Leathers
|
1e22d8df49
Let redeferral work around block scope limitation of deferred parsing. Detect cases where only block-scoping prevents upfront deferral. Also detect cases where it is safe to treat a lexically-scoped function as a var-scoped one. For functions that meet both criteria, use the var binding for it in place of the lexical binding. If at byte code gen time there are no lexical/with/catch scopes in the current chain, mark the function as a redeferral candidate.
|
9 anni fa |
Paul Leathers
|
cf2be31e16
Precise closure-capture of local variables in the presence of deferred
|
9 anni fa |
Paul Leathers
|
defdee0560
Remove ParserBind phase switch and related dead code. The redeferral work makes this path too much of a headache to maintain, so we should cut it loose now.
|
9 anni fa |
Hitesh Kanwathirtha
|
33a6f43792
Merge branch 'master' into linux_m2
|
9 anni fa |
Aneesh Divakarakurup
|
3fff752f11
Fixing scope issues with function expressions with split scope
|
10 anni fa |
Jianchun Xu
|
c943fea326
Merge remote-tracking branch 'master' into linux
|
10 anni fa |
Aneesh Divakarakurup
|
3c28308d8d
This change set implements param scope and the body scope as parallel scopes.
|
10 anni fa |
Jianchun Xu
|
6b9ad09592
linux: partially builds lib/Parser
|
10 anni fa |
Jianchun Xu
|
47eab483b9
change top-level dir Lib back to lib
|
10 anni fa |
Jianchun Xu
|
4e05cc2969
rename /lib/ files to CamelCase
|
10 anni fa |
Aneesh Divakarakurup
|
4ce5b678b6
Split Scope:
|
10 anni fa |
Paul Leathers
|
582c19ea69
Remove invalid assert. Inner scope enumeration can happen multiple times if we re-visit the AST during byte code gen. The re-enumeration is valid, so just let it happen.
|
10 anni fa |
Aneesh Divakarakurup
|
d8bef2e941
Adding syntax errors for duplicate parameters scenarios,
|
10 anni fa |
ChakraBot
|
5d8406741f
Initial commit
|
10 anni fa |