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

Unified Diff: src/compiler/register-allocator-verifier.cc

Issue 889963002: add maps and sets to zone containers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | src/zone-containers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator-verifier.cc
diff --git a/src/compiler/register-allocator-verifier.cc b/src/compiler/register-allocator-verifier.cc
index 0f053331a6a998d3748deba3099b8544ce394ea4..276aa8806defbab34351e47ca134749982bd3d2a 100644
--- a/src/compiler/register-allocator-verifier.cc
+++ b/src/compiler/register-allocator-verifier.cc
@@ -240,13 +240,9 @@ struct PhiData : public ZoneObject {
IntVector operands;
};
-typedef std::map<int, PhiData*, std::less<int>,
- zone_allocator<std::pair<int, PhiData*>>> PhiMapBase;
-
-class PhiMap : public PhiMapBase, public ZoneObject {
+class PhiMap : public ZoneMap<int, PhiData*>, public ZoneObject {
public:
- explicit PhiMap(Zone* zone)
- : PhiMapBase(key_compare(), allocator_type(zone)) {}
+ explicit PhiMap(Zone* zone) : ZoneMap<int, PhiData*>(zone) {}
};
struct OperandLess {
@@ -271,13 +267,11 @@ class OperandMap : public ZoneObject {
int succ_vreg; // valid if propagated back from successor block.
};
- typedef std::map<
- const InstructionOperand*, MapValue*, OperandLess,
- zone_allocator<std::pair<const InstructionOperand*, MapValue*>>> MapBase;
-
- class Map : public MapBase {
+ class Map
+ : public ZoneMap<const InstructionOperand*, MapValue*, OperandLess> {
public:
- explicit Map(Zone* zone) : MapBase(key_compare(), allocator_type(zone)) {}
+ explicit Map(Zone* zone)
+ : ZoneMap<const InstructionOperand*, MapValue*, OperandLess>(zone) {}
// Remove all entries with keys not in other.
void Intersect(const Map& other) {
« no previous file with comments | « no previous file | src/zone-containers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698