Commit dc2e7786 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Only clear tempzone if we actually parse in it

The previous clear mechanism would also unnecessarily allocate a preparser.

This fixes regressions introduced by
https://chromium-review.googlesource.com/c/v8/v8/+/1238614

Change-Id: Ia3eef371c80857f2cd6cdd5852c849fa7f8716fc
Reviewed-on: https://chromium-review.googlesource.com/1238918
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56171}
parent a0c48e1d
......@@ -102,7 +102,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
void SetScopeName(const AstRawString* scope_name) {
scope_name_ = scope_name;
}
void set_needs_migration() { needs_migration_ = true; }
#endif
// TODO(verwaest): Is this needed on Scope?
......@@ -684,7 +683,12 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
}
bool is_being_lazily_parsed() const { return is_being_lazily_parsed_; }
#endif
void set_zone(Zone* zone) { zone_ = zone; }
void set_zone(Zone* zone) {
#ifdef DEBUG
needs_migration_ = true;
#endif
zone_ = zone;
}
bool ShouldEagerCompile() const;
void set_should_eager_compile();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment