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

Side by Side Diff: vm/symbols.h

Issue 11443005: Issue - 7123 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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
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 #include "vm/snapshot_ids.h" 9 #include "vm/snapshot_ids.h"
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 return reinterpret_cast<RawString**>(&predefined_); 208 return reinterpret_cast<RawString**>(&predefined_);
209 } 209 }
210 210
211 private: 211 private:
212 enum { 212 enum {
213 kInitialVMIsolateSymtabSize = ((kMaxId + 15) & -16), 213 kInitialVMIsolateSymtabSize = ((kMaxId + 15) & -16),
214 kInitialSymtabSize = 256 214 kInitialSymtabSize = 256
215 }; 215 };
216 216
217 // Helper functions to create a symbol given a string or set of characters. 217 // Helper functions to create a symbol given a string or set of characters.
218 template<typename T> 218 template<typename T>
cshapiro 2012/12/05 20:40:16 I would rename T to CharacterType and add a Callba
siva 2012/12/05 23:33:14 Done.
219 static RawString* NewSymbol(const T* characters, intptr_t len); 219 static RawString* NewSymbol(const T* characters,
220 intptr_t len,
221 RawString* (*New)(const T* chars,
cshapiro 2012/12/05 20:40:16 s/New/new_string/ (Can't call it new because that
siva 2012/12/05 23:33:14 Done.
222 intptr_t len,
223 Heap::Space space));
220 224
221 // Add the string into the VM isolate symbol table. 225 // Add the string into the VM isolate symbol table.
222 static void Add(const Array& symbol_table, const String& str); 226 static void Add(const Array& symbol_table, const String& str);
223 227
224 // Insert symbol into symbol table, growing it if necessary. 228 // Insert symbol into symbol table, growing it if necessary.
225 static void InsertIntoSymbolTable(const Array& symbol_table, 229 static void InsertIntoSymbolTable(const Array& symbol_table,
226 const String& symbol, 230 const String& symbol,
227 intptr_t index); 231 intptr_t index);
228 232
229 // Grow the symbol table. 233 // Grow the symbol table.
(...skipping 25 matching lines...) Expand all
255 friend class SnapshotReader; 259 friend class SnapshotReader;
256 friend class SnapshotWriter; 260 friend class SnapshotWriter;
257 friend class ApiMessageReader; 261 friend class ApiMessageReader;
258 262
259 DISALLOW_COPY_AND_ASSIGN(Symbols); 263 DISALLOW_COPY_AND_ASSIGN(Symbols);
260 }; 264 };
261 265
262 } // namespace dart 266 } // namespace dart
263 267
264 #endif // VM_SYMBOLS_H_ 268 #endif // VM_SYMBOLS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698