From 33ea5e55ba821beedb6156c039c9e57b9b9f0e30 Mon Sep 17 00:00:00 2001 From: Leszek Swirski Date: Tue, 21 Apr 2020 12:13:39 +0000 Subject: [PATCH] Revert "Reland^4 "[parser] Introduce UnoptimizedCompileFlags"" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e1b93a4ff5a080680ad9fbe1853d019b306c3488. Reason for revert: MSVC failing https://ci.chromium.org/p/v8/builders/ci/V8%20Win64%20-%20msvc/13274 Original change's description: > Reland^4 "[parser] Introduce UnoptimizedCompileFlags" > > This is a reland of 313d4844d9961826aabfe44fa3b9b809e8b5a4e6 > which was a reland of 0a59e0cb082e62bd00cfc03c0538d6d4dcccbf03 > which was a reland of 146f5375da34d647542fdb50a1dfb076187bc0fc > which was a reland of d91679bf3a43a931bdb95ee58e376ffb6b0b1e53 > > Manually zero out flags with memset, since GCC appears not to initialize > the bitfield values to zero even with a default constructor. > > Original change's description: > > [parser] Introduce UnoptimizedCompileFlags > > > > UnoptimizedCompileFlags defines the input flags shared between parse and > > compile (currently parse-only). It is set initially with some values, and > > is immutable after being passed to ParseInfo (ParseInfo still has getters > > for the fields, but no setters). > > > > Since a few of the existing flags were output flags, ParseInfo now has a > > new output_flags field, which will eventually migrate to a ParseOutputs > > structure. > > > > Bug: v8:10314 > > Change-Id: If3890a5fad883bca80a97bf9dfe44d91797dc286 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096580 > > Commit-Queue: Leszek Swirski > > Reviewed-by: Ulan Degenbaev > > Reviewed-by: Simon Zünd > > Reviewed-by: Ross McIlroy > > Cr-Commit-Position: refs/heads/master@{#66782} > > TBR=ulan@chromium.org,szuend@chromium.org,rmcilroy@chromium.org > > Bug: v8:10314 > Change-Id: I23bd6f9f14e9d0bbdde91aad46be1a646fd9647d > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157372 > Reviewed-by: Leszek Swirski > Commit-Queue: Leszek Swirski > Cr-Commit-Position: refs/heads/master@{#67271} TBR=ulan@chromium.org,rmcilroy@chromium.org,leszeks@chromium.org,szuend@chromium.org Change-Id: I0f41e847d4edae67e131cc6d0f782137ab73bac2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10314 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157377 Reviewed-by: Leszek Swirski Commit-Queue: Leszek Swirski Cr-Commit-Position: refs/heads/master@{#67275} --- src/ast/scopes.cc | 2 +- src/codegen/compiler.cc | 174 ++++----- src/codegen/compiler.h | 7 - src/codegen/unoptimized-compilation-info.cc | 11 +- src/codegen/unoptimized-compilation-info.h | 31 +- src/common/globals.h | 2 +- src/d8/d8.cc | 18 +- src/debug/debug-scopes.cc | 29 +- src/debug/debug-scopes.h | 2 +- src/debug/liveedit.cc | 11 +- src/execution/messages.cc | 9 +- src/interpreter/bytecode-generator.cc | 6 +- src/interpreter/interpreter.cc | 11 +- src/objects/function-kind.h | 4 - src/objects/shared-function-info-inl.h | 2 - src/parsing/parse-info.cc | 345 ++++++++---------- src/parsing/parse-info.h | 260 ++++++++----- src/parsing/parser-base.h | 72 ++-- src/parsing/parser.cc | 134 ++++--- src/parsing/parser.h | 18 +- src/parsing/parsing.cc | 10 +- src/parsing/preparser.cc | 8 +- src/parsing/preparser.h | 11 +- src/parsing/rewriter.cc | 2 +- src/parsing/scanner.cc | 9 +- src/parsing/scanner.h | 7 +- test/cctest/parsing/test-preparser.cc | 14 +- test/cctest/parsing/test-scanner.cc | 6 +- test/cctest/test-parsing.cc | 202 ++++------ test/fuzzer/parser.cc | 5 +- .../heap/off-thread-factory-unittest.cc | 12 +- test/unittests/test-helpers.cc | 4 +- 32 files changed, 709 insertions(+), 729 deletions(-) diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc index 7f93df1732..8c13556db9 100644 --- a/src/ast/scopes.cc +++ b/src/ast/scopes.cc @@ -2725,7 +2725,7 @@ bool ClassScope::ResolvePrivateNames(ParseInfo* info) { if (var == nullptr) { // It's only possible to fail to resolve private names here if // this is at the top level or the private name is accessed through eval. - DCHECK(info->flags().is_eval || outer_scope_->is_script_scope()); + DCHECK(info->is_eval() || outer_scope_->is_script_scope()); Scanner::Location loc = proxy->location(); info->pending_error_handler()->ReportMessageAt( loc.beg_pos, loc.end_pos, diff --git a/src/codegen/compiler.cc b/src/codegen/compiler.cc index d1c48528f1..0946a4eb6d 100644 --- a/src/codegen/compiler.cc +++ b/src/codegen/compiler.cc @@ -496,7 +496,7 @@ template void EnsureSharedFunctionInfosArrayOnScript(Handle