| OLD | NEW |
| 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/hydrogen-bce.h" | 5 #include "src/hydrogen-bce.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 | 9 |
| 10 | 10 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 | 302 |
| 303 BoundsCheckTable::BoundsCheckTable(Zone* zone) | 303 BoundsCheckTable::BoundsCheckTable(Zone* zone) |
| 304 : ZoneHashMap(BoundsCheckKeyMatch, ZoneHashMap::kDefaultHashMapCapacity, | 304 : ZoneHashMap(BoundsCheckKeyMatch, ZoneHashMap::kDefaultHashMapCapacity, |
| 305 ZoneAllocationPolicy(zone)) { } | 305 ZoneAllocationPolicy(zone)) { } |
| 306 | 306 |
| 307 | 307 |
| 308 BoundsCheckBbData** BoundsCheckTable::LookupOrInsert(BoundsCheckKey* key, | 308 BoundsCheckBbData** BoundsCheckTable::LookupOrInsert(BoundsCheckKey* key, |
| 309 Zone* zone) { | 309 Zone* zone) { |
| 310 return reinterpret_cast<BoundsCheckBbData**>( | 310 return reinterpret_cast<BoundsCheckBbData**>( |
| 311 &(Lookup(key, key->Hash(), true, ZoneAllocationPolicy(zone))->value)); | 311 &(ZoneHashMap::LookupOrInsert(key, key->Hash(), |
| 312 ZoneAllocationPolicy(zone))->value)); |
| 312 } | 313 } |
| 313 | 314 |
| 314 | 315 |
| 315 void BoundsCheckTable::Insert(BoundsCheckKey* key, | 316 void BoundsCheckTable::Insert(BoundsCheckKey* key, |
| 316 BoundsCheckBbData* data, | 317 BoundsCheckBbData* data, |
| 317 Zone* zone) { | 318 Zone* zone) { |
| 318 Lookup(key, key->Hash(), true, ZoneAllocationPolicy(zone))->value = data; | 319 ZoneHashMap::LookupOrInsert(key, key->Hash(), ZoneAllocationPolicy(zone)) |
| 320 ->value = data; |
| 319 } | 321 } |
| 320 | 322 |
| 321 | 323 |
| 322 void BoundsCheckTable::Delete(BoundsCheckKey* key) { | 324 void BoundsCheckTable::Delete(BoundsCheckKey* key) { |
| 323 Remove(key, key->Hash()); | 325 Remove(key, key->Hash()); |
| 324 } | 326 } |
| 325 | 327 |
| 326 | 328 |
| 327 class HBoundsCheckEliminationState { | 329 class HBoundsCheckEliminationState { |
| 328 public: | 330 public: |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 if (data->FatherInDominatorTree()) { | 459 if (data->FatherInDominatorTree()) { |
| 458 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 460 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
| 459 } else { | 461 } else { |
| 460 table_.Delete(data->Key()); | 462 table_.Delete(data->Key()); |
| 461 } | 463 } |
| 462 data = data->NextInBasicBlock(); | 464 data = data->NextInBasicBlock(); |
| 463 } | 465 } |
| 464 } | 466 } |
| 465 | 467 |
| 466 } } // namespace v8::internal | 468 } } // namespace v8::internal |
| OLD | NEW |