Chromium Code Reviews| Index: src/IceFixups.h | 
| diff --git a/src/IceFixups.h b/src/IceFixups.h | 
| index 43284ac9fefb8b3f81fc40c35ec0e6d7c1eb3e0f..bad27cf402cc892f848a16cc8ca1d1ceb0bd8621 100644 | 
| --- a/src/IceFixups.h | 
| +++ b/src/IceFixups.h | 
| @@ -45,7 +45,9 @@ public: | 
| void set_value(const Constant *Value) { value_ = Value; } | 
| - void emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset) const; | 
| + // Emits fixup, then returns the number of bytes to skip. | 
| 
 
Jim Stichnoth
2015/10/21 01:13:38
Use /// doxygen style comment?
 
Karl
2015/10/22 15:20:53
Done.
 
 | 
| + virtual size_t emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset, | 
| + bool IsPCRel) const; | 
| private: | 
| intptr_t position_ = 0; | 
| @@ -53,6 +55,22 @@ private: | 
| const Constant *value_ = nullptr; | 
| }; | 
| +/// Extends a fixup to be a textual. That is, it emits text instead of a | 
| 
 
Jim Stichnoth
2015/10/21 01:13:38
I would say s/to be a/to be/ .
 
Karl
2015/10/22 15:20:53
Done.
 
 | 
| +/// sequence of bytes. This class is used to implement unimplemented emitIAS | 
| 
 
Jim Stichnoth
2015/10/21 01:13:38
maybe "as a fallback for" instead of "to implement
 
Karl
2015/10/22 15:20:53
Done.
 
 | 
| +/// methods, allowing them to generate compilable assembly code. | 
| +class AssemblerTextFixup : public AssemblerFixup { | 
| 
 
Jim Stichnoth
2015/10/21 01:13:38
Delete default copy ctor, assignment operator, etc
 
Karl
2015/10/22 15:20:53
Done.
 
 | 
| +public: | 
| + AssemblerTextFixup(const std::string &Message, size_t NumBytes) | 
| + : AssemblerFixup(), Message(Message), NumBytes(NumBytes) {} | 
| + ~AssemblerTextFixup() = default; | 
| + virtual size_t emit(GlobalContext *Ctx, RelocOffsetT OverrideOffset, | 
| + bool isPcRel) const; | 
| + | 
| +private: | 
| + const std::string Message; | 
| + const size_t NumBytes; | 
| +}; | 
| + | 
| using FixupList = std::vector<AssemblerFixup>; | 
| using FixupRefList = std::vector<AssemblerFixup *>; |