| Index: courgette/assembly_program.h
|
| ===================================================================
|
| --- courgette/assembly_program.h (revision 76470)
|
| +++ courgette/assembly_program.h (working copy)
|
| @@ -12,12 +12,16 @@
|
| #include "base/basictypes.h"
|
|
|
| #include "courgette/image_info.h"
|
| +#include "courgette/memory_allocator.h"
|
|
|
| namespace courgette {
|
|
|
| class EncodedProgram;
|
| class Instruction;
|
|
|
| +typedef std::vector<Instruction*, MemoryAllocator<Instruction*> >
|
| + InstructionVector;
|
| +
|
| // A Label is a symbolic reference to an address. Unlike a conventional
|
| // assembly language, we always know the address. The address will later be
|
| // stored in a table and the Label will be replaced with the index into the
|
| @@ -89,7 +93,7 @@
|
| EncodedProgram* Encode() const;
|
|
|
| // Accessor for instruction list.
|
| - const std::vector<Instruction*>& instructions() const {
|
| + const InstructionVector& instructions() const {
|
| return instructions_;
|
| }
|
|
|
| @@ -101,7 +105,6 @@
|
| // otherwise returns NULL.
|
| Label* InstructionRel32Label(const Instruction* instruction) const;
|
|
|
| -
|
| private:
|
| void Emit(Instruction* instruction) { instructions_.push_back(instruction); }
|
|
|
| @@ -118,7 +121,7 @@
|
|
|
| uint64 image_base_; // Desired or mandated base address of image.
|
|
|
| - std::vector<Instruction*> instructions_; // All the instructions in program.
|
| + InstructionVector instructions_; // All the instructions in program.
|
|
|
| // These are lookup maps to find the label associated with a given address.
|
| // We have separate label spaces for addresses referenced by rel32 labels and
|
|
|