Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1215)

Unified Diff: src/ast/scopes.cc

Issue 2226803003: Replace SloppyBlockFunctionMap::Vector with linked list through SloppyBlockFunctionStatement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 4e107bd3fdab1a258a5ff747ebc63893094cd5e8..816fa03ee217dffaffc90c644a42c103fd07f590 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -67,11 +67,8 @@ void SloppyBlockFunctionMap::Declare(Zone* zone, const AstRawString* name,
Entry* p =
ZoneHashMap::LookupOrInsert(const_cast<AstRawString*>(name), name->hash(),
ZoneAllocationPolicy(zone));
- if (p->value == nullptr) {
- p->value = new (zone->New(sizeof(Vector))) Vector(zone);
- }
- Vector* delegates = static_cast<Vector*>(p->value);
- delegates->push_back(stmt);
+ stmt->set_next(static_cast<SloppyBlockFunctionStatement*>(p->value));
+ p->value = stmt;
}
« no previous file with comments | « src/ast/scopes.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698