Skip to content

Commit

Permalink
[ast] Remove unused Scope::RemoveUnresolved
Browse files Browse the repository at this point in the history
Change-Id: I62c5cf9acb778fa611a94ae61a6cda3ab79adfc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4552607
Commit-Queue: Shu-yu Guo <[email protected]>
Reviewed-by: Marja Hölttä <[email protected]>
Auto-Submit: Shu-yu Guo <[email protected]>
Commit-Queue: Marja Hölttä <[email protected]>
Cr-Commit-Position: refs/heads/main@{#87780}
  • Loading branch information
syg authored and V8 LUCI CQ committed May 22, 2023
1 parent 39b7eb8 commit fb7837b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/ast/scopes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1244,10 +1244,6 @@ Variable* DeclarationScope::DeclareDynamicGlobal(const AstRawString* name,
// TODO(neis): Mark variable as maybe-assigned?
}

bool Scope::RemoveUnresolved(VariableProxy* var) {
return unresolved_list_.Remove(var);
}

void Scope::DeleteUnresolved(VariableProxy* var) {
DCHECK(unresolved_list_.Contains(var));
var->mark_removed_from_unresolved();
Expand Down
8 changes: 0 additions & 8 deletions src/ast/scopes.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
VariableProxy* NewUnresolved(AstNodeFactory* factory,
const AstRawString* name, int start_pos,
VariableKind kind = NORMAL_VARIABLE) {
// Note that we must not share the unresolved variables with
// the same name because they may be removed selectively via
// RemoveUnresolved().
DCHECK(!already_resolved_);
DCHECK_EQ(factory->zone(), zone());
VariableProxy* proxy = factory->NewVariableProxy(name, kind, start_pos);
Expand All @@ -239,11 +236,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {

void AddUnresolved(VariableProxy* proxy);

// Removes an unresolved variable from the list so it can be readded to
// another list. This is used to reparent parameter initializers that contain
// sloppy eval.
bool RemoveUnresolved(VariableProxy* var);

// Deletes an unresolved variable. The variable proxy cannot be reused for
// another list later. During parsing, an unresolved variable may have been
// added optimistically, but then only the variable name was used (typically
Expand Down

0 comments on commit fb7837b

Please sign in to comment.