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

Unified Diff: vm/symbols.h

Issue 10834069: Do not try to serialize VM objects, these are read only canonical objects and should be referred to… (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/snapshot.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 10306)
+++ vm/symbols.h (working copy)
@@ -71,7 +71,7 @@
// Access methods for symbols stored in the vm isolate.
#define DEFINE_SYMBOL_ACCESSOR(symbol, literal) \
- static RawString* symbol() { return Symbols::New(literal); }
+ static RawString* symbol() { return predefined_[k##symbol]; }
PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_ACCESSOR)
#undef DEFINE_SYMBOL_ACCESSOR
@@ -123,11 +123,19 @@
intptr_t begin_index,
intptr_t len,
intptr_t hash);
+ 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));
+ }
// List of symbols that are stored in the vm isolate for easy access.
static RawString* predefined_[kMaxPredefined];
friend class SnapshotReader;
+ friend class SnapshotWriter;
+ friend class ApiMessageReader;
DISALLOW_COPY_AND_ASSIGN(Symbols);
};
« no previous file with comments | « vm/snapshot.cc ('k') | vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698