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

Side by Side Diff: vm/symbols.h

Issue 10825039: Don't use vm heap for symbols yet, we need to change the snapshot writer to not mark object header … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_SYMBOLS_H_ 5 #ifndef VM_SYMBOLS_H_
6 #define VM_SYMBOLS_H_ 6 #define VM_SYMBOLS_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #define DEFINE_SYMBOL_INDEX(symbol, literal) \ 63 #define DEFINE_SYMBOL_INDEX(symbol, literal) \
64 k##symbol, 64 k##symbol,
65 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_INDEX) 65 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_INDEX)
66 #undef DEFINE_SYMBOL_INDEX 66 #undef DEFINE_SYMBOL_INDEX
67 67
68 kMaxPredefined, 68 kMaxPredefined,
69 }; 69 };
70 70
71 // Access methods for symbols stored in the vm isolate. 71 // Access methods for symbols stored in the vm isolate.
72 #define DEFINE_SYMBOL_ACCESSOR(symbol, literal) \ 72 #define DEFINE_SYMBOL_ACCESSOR(symbol, literal) \
73 static RawString* symbol() { return predefined_[k##symbol]; } 73 static RawString* symbol() { return Symbols::New(literal); }
74 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_ACCESSOR) 74 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_ACCESSOR)
75 #undef DEFINE_SYMBOL_ACCESSOR 75 #undef DEFINE_SYMBOL_ACCESSOR
76 76
77 // Initialize frequently used symbols in the vm isolate. 77 // Initialize frequently used symbols in the vm isolate.
78 static void InitOnce(Isolate* isolate); 78 static void InitOnce(Isolate* isolate);
79 79
80 // Initialize and setup a symbol table for the isolate. 80 // Initialize and setup a symbol table for the isolate.
81 static void SetupSymbolTable(Isolate* isolate); 81 static void SetupSymbolTable(Isolate* isolate);
82 82
83 // Get number of symbols in an isolate's symbol table. 83 // Get number of symbols in an isolate's symbol table.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 static RawString* predefined_[kMaxPredefined]; 127 static RawString* predefined_[kMaxPredefined];
128 128
129 friend class SnapshotReader; 129 friend class SnapshotReader;
130 130
131 DISALLOW_COPY_AND_ASSIGN(Symbols); 131 DISALLOW_COPY_AND_ASSIGN(Symbols);
132 }; 132 };
133 133
134 } // namespace dart 134 } // namespace dart
135 135
136 #endif // VM_SYMBOLS_H_ 136 #endif // VM_SYMBOLS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698