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

Unified Diff: src/snapshot/serializer-common.h

Issue 1812853002: Moved the ExternalReferenceTable class to src/external-reference-table.cc/.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 9 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/snapshot/deserializer.cc ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer-common.h
diff --git a/src/snapshot/serializer-common.h b/src/snapshot/serializer-common.h
index 4a315a3ec3b4b643924d589eed08a716a27357f6..645a9af3bf647ded9672abfe47cb042b709601e1 100644
--- a/src/snapshot/serializer-common.h
+++ b/src/snapshot/serializer-common.h
@@ -6,6 +6,7 @@
#define V8_SNAPSHOT_SERIALIZER_COMMON_H_
#include "src/address-map.h"
+#include "src/external-reference-table.h"
#include "src/globals.h"
namespace v8 {
@@ -13,39 +14,6 @@ namespace internal {
class Isolate;
-// ExternalReferenceTable is a helper class that defines the relationship
-// between external references and their encodings. It is used to build
-// hashmaps in ExternalReferenceEncoder and ExternalReferenceDecoder.
-class ExternalReferenceTable {
- public:
- static ExternalReferenceTable* instance(Isolate* isolate);
-
- int size() const { return refs_.length(); }
- Address address(int i) { return refs_[i].address; }
- const char* name(int i) { return refs_[i].name; }
-
- inline static Address NotAvailable() { return NULL; }
-
- static const int kDeoptTableSerializeEntryCount = 64;
-
- private:
- struct ExternalReferenceEntry {
- Address address;
- const char* name;
- };
-
- explicit ExternalReferenceTable(Isolate* isolate);
-
- void Add(Address address, const char* name) {
- ExternalReferenceEntry entry = {address, name};
- refs_.Add(entry);
- }
-
- List<ExternalReferenceEntry> refs_;
-
- DISALLOW_COPY_AND_ASSIGN(ExternalReferenceTable);
-};
-
class ExternalReferenceEncoder {
public:
explicit ExternalReferenceEncoder(Isolate* isolate);
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698