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

Unified Diff: src/compiler/instruction.h

Issue 505133003: Introduce subclass wrappers for STL containers that make them a lot easier (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/compiler/graph-reducer.cc ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index da0135127f71985ef0b1b857b624d0c6e0fc5a61..98c85bc89d24e30c033cef10cc409954bf8ef0b2 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -89,8 +89,7 @@ class InstructionOperand : public ZoneObject {
unsigned value_;
};
-typedef std::vector<InstructionOperand*, zone_allocator<InstructionOperand*> >
- InstructionOperandVector;
+typedef ZoneVector<InstructionOperand*> InstructionOperandVector;
OStream& operator<<(OStream& os, const InstructionOperand& op);
@@ -725,18 +724,13 @@ class FrameStateDescriptor : public ZoneObject {
OStream& operator<<(OStream& os, const Constant& constant);
-typedef std::deque<Constant, zone_allocator<Constant> > ConstantDeque;
+typedef ZoneDeque<Constant> ConstantDeque;
typedef std::map<int, Constant, std::less<int>,
zone_allocator<std::pair<int, Constant> > > ConstantMap;
-
-typedef std::deque<Instruction*, zone_allocator<Instruction*> >
- InstructionDeque;
-typedef std::deque<PointerMap*, zone_allocator<PointerMap*> > PointerMapDeque;
-typedef std::vector<FrameStateDescriptor*,
- zone_allocator<FrameStateDescriptor*> >
- DeoptimizationVector;
-
+typedef ZoneDeque<Instruction*> InstructionDeque;
+typedef ZoneDeque<PointerMap*> PointerMapDeque;
+typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector;
// Represents architecture-specific generated code before, during, and after
// register allocation.
@@ -749,14 +743,14 @@ class InstructionSequence V8_FINAL {
schedule_(schedule),
constants_(ConstantMap::key_compare(),
ConstantMap::allocator_type(zone())),
- immediates_(ConstantDeque::allocator_type(zone())),
- instructions_(InstructionDeque::allocator_type(zone())),
+ immediates_(zone()),
+ instructions_(zone()),
next_virtual_register_(graph->NodeCount()),
- pointer_maps_(PointerMapDeque::allocator_type(zone())),
+ pointer_maps_(zone()),
doubles_(std::less<int>(), VirtualRegisterSet::allocator_type(zone())),
references_(std::less<int>(),
VirtualRegisterSet::allocator_type(zone())),
- deoptimization_entries_(DeoptimizationVector::allocator_type(zone())) {}
+ deoptimization_entries_(zone()) {}
int NextVirtualRegister() { return next_virtual_register_++; }
int VirtualRegisterCount() const { return next_virtual_register_; }
« no previous file with comments | « src/compiler/graph-reducer.cc ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698