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

Unified Diff: src/asmjs/asm-wasm-builder.cc

Issue 2345233003: [base] Move hashmap allocator to a field (Closed)
Patch Set: Remove zone arguments where the parameters were removed so that the bloody thing compiles again Created 4 years, 3 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/asmjs/asm-typer.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-wasm-builder.cc
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc
index 00e304bbcb76edd7b89d4408b720cd434c9b2161..5425be8a59e58d501a2b5211aa82dcc2ed0c99ef 100644
--- a/src/asmjs/asm-wasm-builder.cc
+++ b/src/asmjs/asm-wasm-builder.cc
@@ -656,8 +656,8 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
FunctionTableIndices* container = new (zone()) FunctionTableIndices();
container->start_index = start_index;
container->signature_index = signature_index;
- ZoneHashMap::Entry* entry = function_tables_.LookupOrInsert(
- v, ComputePointerHash(v), ZoneAllocationPolicy(zone()));
+ ZoneHashMap::Entry* entry =
+ function_tables_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = container;
}
@@ -692,8 +692,8 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
void AddImport(Variable* v, const char* name, int name_length) {
ImportedFunctionIndices* indices = new (builder_->zone())
ImportedFunctionIndices(name, name_length, builder_->zone());
- ZoneHashMap::Entry* entry = table_.LookupOrInsert(
- v, ComputePointerHash(v), ZoneAllocationPolicy(builder_->zone()));
+ ZoneHashMap::Entry* entry =
+ table_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = indices;
}
@@ -1686,8 +1686,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
index = current_function_builder_->AddLocal(type);
IndexContainer* container = new (zone()) IndexContainer();
container->index = index;
- entry = local_variables_.LookupOrInsert(v, ComputePointerHash(v),
- ZoneAllocationPolicy(zone()));
+ entry = local_variables_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = container;
}
return (reinterpret_cast<IndexContainer*>(entry->value))->index;
@@ -1701,8 +1700,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
DCHECK_NULL(entry);
IndexContainer* container = new (zone()) IndexContainer();
container->index = index;
- entry = local_variables_.LookupOrInsert(v, ComputePointerHash(v),
- ZoneAllocationPolicy(zone()));
+ entry = local_variables_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = container;
}
@@ -1713,8 +1711,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
uint32_t index = builder_->AddGlobal(type, 0);
IndexContainer* container = new (zone()) IndexContainer();
container->index = index;
- entry = global_variables_.LookupOrInsert(v, ComputePointerHash(v),
- ZoneAllocationPolicy(zone()));
+ entry = global_variables_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = container;
}
return (reinterpret_cast<IndexContainer*>(entry->value))->index;
@@ -1727,8 +1724,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
uint32_t index = builder_->AddFunction();
IndexContainer* container = new (zone()) IndexContainer();
container->index = index;
- entry = functions_.LookupOrInsert(v, ComputePointerHash(v),
- ZoneAllocationPolicy(zone()));
+ entry = functions_.LookupOrInsert(v, ComputePointerHash(v));
entry->value = container;
}
return (reinterpret_cast<IndexContainer*>(entry->value))->index;
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698