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

Side by Side Diff: src/crankshaft/hydrogen-bce.cc

Issue 2351393003: [base] Revert "Move hashmap allocator to a field" (Closed)
Patch Set: Whoops, patch sets should build 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 } 308 }
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())->value)); 319 ZoneHashMap::LookupOrInsert(key, key->Hash(), ZoneAllocationPolicy(zone))
320 ->value));
320 } 321 }
321 322
322 323
323 void BoundsCheckTable::Insert(BoundsCheckKey* key, 324 void BoundsCheckTable::Insert(BoundsCheckKey* key,
324 BoundsCheckBbData* data, 325 BoundsCheckBbData* data,
325 Zone* zone) { 326 Zone* zone) {
326 ZoneHashMap::LookupOrInsert(key, key->Hash())->value = data; 327 ZoneHashMap::LookupOrInsert(key, key->Hash(), ZoneAllocationPolicy(zone))
328 ->value = data;
327 } 329 }
328 330
329 331
330 void BoundsCheckTable::Delete(BoundsCheckKey* key) { 332 void BoundsCheckTable::Delete(BoundsCheckKey* key) {
331 Remove(key, key->Hash()); 333 Remove(key, key->Hash());
332 } 334 }
333 335
334 336
335 class HBoundsCheckEliminationState { 337 class HBoundsCheckEliminationState {
336 public: 338 public:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); 468 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone());
467 } else { 469 } else {
468 table_.Delete(data->Key()); 470 table_.Delete(data->Key());
469 } 471 }
470 data = data->NextInBasicBlock(); 472 data = data->NextInBasicBlock();
471 } 473 }
472 } 474 }
473 475
474 } // namespace internal 476 } // namespace internal
475 } // namespace v8 477 } // 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