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

Unified Diff: vm/symbols.h

Issue 10827209: Unify class ids and snapshot object ids list so that we don't have disparate and sometimes confusin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/stub_code_x64.cc ('k') | vm/symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/symbols.h
===================================================================
--- vm/symbols.h (revision 10409)
+++ vm/symbols.h (working copy)
@@ -6,6 +6,7 @@
#define VM_SYMBOLS_H_
#include "vm/object.h"
+#include "vm/snapshot_ids.h"
namespace dart {
@@ -63,11 +64,11 @@
kIllegal = 0,
#define DEFINE_SYMBOL_INDEX(symbol, literal) \
- k##symbol,
+ k##symbol,
PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_INDEX)
#undef DEFINE_SYMBOL_INDEX
- kMaxPredefined,
+ kMaxId,
};
// Access methods for symbols stored in the vm isolate.
@@ -97,7 +98,7 @@
private:
enum {
- kInitialVMIsolateSymtabSize = ((kMaxPredefined + 15) & -16),
+ kInitialVMIsolateSymtabSize = ((Symbols::kMaxId + 15) & -16),
kInitialSymtabSize = 256
};
@@ -127,12 +128,12 @@
static intptr_t LookupVMSymbol(RawObject* obj);
static RawObject* GetVMSymbol(intptr_t object_id);
static bool IsVMSymbolId(intptr_t object_id) {
- return (object_id >= Object::kMaxId &&
- object_id < (Object::kMaxId + kMaxPredefined));
+ return (object_id >= kMaxPredefinedObjectIds &&
+ object_id < (kMaxPredefinedObjectIds + Symbols::kMaxId));
}
// List of symbols that are stored in the vm isolate for easy access.
- static RawString* predefined_[kMaxPredefined];
+ static RawString* predefined_[Symbols::kMaxId];
friend class SnapshotReader;
friend class SnapshotWriter;
« no previous file with comments | « vm/stub_code_x64.cc ('k') | vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698