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

Side by Side Diff: src/crankshaft/hydrogen-bce.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 unified diff | Download patch
« no previous file with comments | « src/compiler/state-values-utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen-bce.h" 5 #include "src/crankshaft/hydrogen-bce.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 310
311 BoundsCheckTable::BoundsCheckTable(Zone* zone) 311 BoundsCheckTable::BoundsCheckTable(Zone* zone)
312 : ZoneHashMap(BoundsCheckKeyMatch, ZoneHashMap::kDefaultHashMapCapacity, 312 : ZoneHashMap(BoundsCheckKeyMatch, ZoneHashMap::kDefaultHashMapCapacity,
313 ZoneAllocationPolicy(zone)) { } 313 ZoneAllocationPolicy(zone)) { }
314 314
315 315
316 BoundsCheckBbData** BoundsCheckTable::LookupOrInsert(BoundsCheckKey* key, 316 BoundsCheckBbData** BoundsCheckTable::LookupOrInsert(BoundsCheckKey* key,
317 Zone* zone) { 317 Zone* zone) {
318 return reinterpret_cast<BoundsCheckBbData**>( 318 return reinterpret_cast<BoundsCheckBbData**>(
319 &(ZoneHashMap::LookupOrInsert(key, key->Hash(), 319 &(ZoneHashMap::LookupOrInsert(key, key->Hash())->value));
320 ZoneAllocationPolicy(zone))->value));
321 } 320 }
322 321
323 322
324 void BoundsCheckTable::Insert(BoundsCheckKey* key, 323 void BoundsCheckTable::Insert(BoundsCheckKey* key,
325 BoundsCheckBbData* data, 324 BoundsCheckBbData* data,
326 Zone* zone) { 325 Zone* zone) {
327 ZoneHashMap::LookupOrInsert(key, key->Hash(), ZoneAllocationPolicy(zone)) 326 ZoneHashMap::LookupOrInsert(key, key->Hash())->value = data;
328 ->value = data;
329 } 327 }
330 328
331 329
332 void BoundsCheckTable::Delete(BoundsCheckKey* key) { 330 void BoundsCheckTable::Delete(BoundsCheckKey* key) {
333 Remove(key, key->Hash()); 331 Remove(key, key->Hash());
334 } 332 }
335 333
336 334
337 class HBoundsCheckEliminationState { 335 class HBoundsCheckEliminationState {
338 public: 336 public:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); 466 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone());
469 } else { 467 } else {
470 table_.Delete(data->Key()); 468 table_.Delete(data->Key());
471 } 469 }
472 data = data->NextInBasicBlock(); 470 data = data->NextInBasicBlock();
473 } 471 }
474 } 472 }
475 473
476 } // namespace internal 474 } // namespace internal
477 } // namespace v8 475 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/state-values-utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698