v8/src/ast
Marja Hölttä f6450b97ec Reland [super] Store home object in Context instead of JSFunction
1) Computed property keys (esp functions in them) shouldn't be inside
the object literal scope.

2) I was using an imprecise "maybe uses super" and storing it to
preparse data. This won't fly, since it pollutes sister scopes and
leads to confusion wrt whether an object literal needs a home object
or not. Made it precise (mostly cancelling changes in the original CL).

3) PreParser::NewSuperPropertyReference was creating a VariableProxy for
this_function (which made it used) -> inconsistent scopes between
parsing and preparsing.

4) MultipleEntryBlockContextScope was messing up the accumulator

Original: https://chromium-review.googlesource.com/c/v8/v8/+/2563275

This saves memory (the home object doesn't need to be stored for each
method, but only once per class) and hopefully makes the home object
a constant in the optimized code.

Detailed documentation of the changes:
https://docs.google.com/document/d/1ZVXcoQdf9IdMsnRI9iyUjyq9NDoEyx9nA3XqMgwflMs/edit?usp=sharing

Bug: v8:9237, chromium:1167918, chromium:1167981, chromium:1167988, chromium:1168055
Change-Id: I4f53f18cc18762c33e53d8c802909b42f1c33538
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637220
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72169}
2021-01-19 17:05:01 +00:00
..
ast-function-literal-id-reindexer.cc [parser] Fix AST func reindexing for function fields 2020-10-01 07:53:01 +00:00
ast-function-literal-id-reindexer.h [cleanup][ast] Remove uses of DISALLOW_COPY_AND_ASSIGN 2020-12-07 09:38:09 +00:00
ast-source-ranges.h [coverage] optional chaining coverage 2021-01-13 17:09:47 +00:00
ast-traversal-visitor.h Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
ast-value-factory.cc [utils] Add CompareCharsEqual 2020-11-24 20:10:32 +00:00
ast-value-factory.h Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
ast.cc Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
ast.h Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
modules.cc [modules][api] Implement HostGetSupportedImportAssertions 2020-12-16 03:48:45 +00:00
modules.h Sort import assertions by code point order of the keys 2020-11-12 20:03:03 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
prettyprinter.cc Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
prettyprinter.h Revert "[ast] Remove literal allocation from CallPrinter" 2020-04-29 17:13:34 +00:00
scopes.cc Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
scopes.h Reland [super] Store home object in Context instead of JSFunction 2021-01-19 17:05:01 +00:00
source-range-ast-visitor.cc [coverage] remove the last continuation range before synthetic return 2020-07-07 15:53:21 +00:00
source-range-ast-visitor.h [coverage] Improve whitespace precision of coverage reporting 2020-01-07 10:29:45 +00:00
variables.cc Reland "Implement top-level await for REPL mode" 2019-12-06 10:13:00 +00:00
variables.h [class] mark private name load as immutable 2020-05-08 07:29:19 +00:00