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

Unified Diff: courgette/assembly_program.h

Issue 1491703003: [Courgette] Initial Implementation of LabelManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 5 years 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 | « courgette/BUILD.gn ('k') | courgette/consecutive_range_visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/assembly_program.h
diff --git a/courgette/assembly_program.h b/courgette/assembly_program.h
index ba7ad59f1823b2c1652d43300a04eed9d22efcf7..88cf2e82746eec7b79fc72cbd81f51a2bf73f966 100644
--- a/courgette/assembly_program.h
+++ b/courgette/assembly_program.h
@@ -13,29 +13,13 @@
#include "base/memory/scoped_ptr.h"
#include "courgette/disassembler.h"
+#include "courgette/image_utils.h"
#include "courgette/memory_allocator.h"
namespace courgette {
class EncodedProgram;
-// 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
-// table.
-//
-// TODO(sra): Make fields private and add setters and getters.
-class Label {
- public:
- static const int kNoIndex = -1;
- Label() : rva_(0), index_(kNoIndex), count_(0) {}
- explicit Label(RVA rva) : rva_(rva), index_(kNoIndex), count_(0) {}
-
- RVA rva_; // Address referred to by the label.
- int index_; // Index of address in address table, kNoIndex until assigned.
- int count_;
-};
-
typedef std::map<RVA, Label*> RVAToLabel;
// Opcodes of simple assembly language
« no previous file with comments | « courgette/BUILD.gn ('k') | courgette/consecutive_range_visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698