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

Unified Diff: src/serialize.h

Issue 441983002: Check that external references are registered in the serializer. (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/mips/codegen-mips.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index 8409c951d8c8db9adb6990ee818719ef4f6c263e..e4e6c3ad86b4430cf0e47b9e375387efbf4e1ea3 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -17,17 +17,16 @@ namespace internal {
// A TypeCode is used to distinguish different kinds of external reference.
// It is a single bit to make testing for types easy.
enum TypeCode {
- UNCLASSIFIED, // One-of-a-kind references.
+ UNCLASSIFIED, // One-of-a-kind references.
+ C_BUILTIN,
BUILTIN,
RUNTIME_FUNCTION,
IC_UTILITY,
STATS_COUNTER,
TOP_ADDRESS,
- C_BUILTIN,
- EXTENSION,
ACCESSOR,
- RUNTIME_ENTRY,
STUB_CACHE_TABLE,
+ RUNTIME_ENTRY,
LAZY_DEOPTIMIZATION
};
@@ -81,8 +80,12 @@ class ExternalReferenceTable {
// For other types of references, the caller will figure out the address.
void Add(Address address, TypeCode type, uint16_t id, const char* name);
+ void Add(Address address, const char* name) {
+ Add(address, UNCLASSIFIED, ++max_id_[UNCLASSIFIED], name);
+ }
+
List<ExternalReferenceEntry> refs_;
- int max_id_[kTypeCodeCount];
+ uint16_t max_id_[kTypeCodeCount];
};
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698