OLD | NEW |
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 #include "vm/snapshot_ids.h" | 9 #include "vm/snapshot_ids.h" |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 template<typename T> | 181 template<typename T> |
182 static RawString* New(const T* characters, intptr_t len); | 182 static RawString* New(const T* characters, intptr_t len); |
183 static RawString* New(const String& str); | 183 static RawString* New(const String& str); |
184 static RawString* New(const String& str, | 184 static RawString* New(const String& str, |
185 intptr_t begin_index, | 185 intptr_t begin_index, |
186 intptr_t length); | 186 intptr_t length); |
187 | 187 |
188 // Returns char* of predefined symbol. | 188 // Returns char* of predefined symbol. |
189 static const char* Name(SymbolId symbol); | 189 static const char* Name(SymbolId symbol); |
190 | 190 |
191 static RawString* FromCharCode(int32_t char_code); | 191 static RawString* FromCharCode(uint32_t char_code); |
192 | 192 |
193 private: | 193 private: |
194 enum { | 194 enum { |
195 kInitialVMIsolateSymtabSize = ((kMaxId + 15) & -16), | 195 kInitialVMIsolateSymtabSize = ((kMaxId + 15) & -16), |
196 kInitialSymtabSize = 256 | 196 kInitialSymtabSize = 256 |
197 }; | 197 }; |
198 | 198 |
199 // Add the string into the VM isolate symbol table. | 199 // Add the string into the VM isolate symbol table. |
200 static void Add(const Array& symbol_table, const String& str); | 200 static void Add(const Array& symbol_table, const String& str); |
201 | 201 |
(...skipping 30 matching lines...) Expand all Loading... |
232 friend class SnapshotReader; | 232 friend class SnapshotReader; |
233 friend class SnapshotWriter; | 233 friend class SnapshotWriter; |
234 friend class ApiMessageReader; | 234 friend class ApiMessageReader; |
235 | 235 |
236 DISALLOW_COPY_AND_ASSIGN(Symbols); | 236 DISALLOW_COPY_AND_ASSIGN(Symbols); |
237 }; | 237 }; |
238 | 238 |
239 } // namespace dart | 239 } // namespace dart |
240 | 240 |
241 #endif // VM_SYMBOLS_H_ | 241 #endif // VM_SYMBOLS_H_ |
OLD | NEW |