| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 static const String& DoubleQuotes() { | 276 static const String& DoubleQuotes() { |
| 277 return *(symbol_handles_[kNullCharId + '"']); | 277 return *(symbol_handles_[kNullCharId + '"']); |
| 278 } | 278 } |
| 279 static const String& LowercaseR() { | 279 static const String& LowercaseR() { |
| 280 return *(symbol_handles_[kNullCharId + 'r']); | 280 return *(symbol_handles_[kNullCharId + 'r']); |
| 281 } | 281 } |
| 282 static const String& Dash() { | 282 static const String& Dash() { |
| 283 return *(symbol_handles_[kNullCharId + '-']); | 283 return *(symbol_handles_[kNullCharId + '-']); |
| 284 } | 284 } |
| 285 static const String& Ampersand() { |
| 286 return *(symbol_handles_[kNullCharId + '&']); |
| 287 } |
| 285 | 288 |
| 286 // Access methods for symbol handles stored in the vm isolate. | 289 // Access methods for symbol handles stored in the vm isolate. |
| 287 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ | 290 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ |
| 288 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } | 291 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } |
| 289 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) | 292 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) |
| 290 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR | 293 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR |
| 291 | 294 |
| 292 // Initialize frequently used symbols in the vm isolate. | 295 // Initialize frequently used symbols in the vm isolate. |
| 293 static void InitOnce(Isolate* isolate); | 296 static void InitOnce(Isolate* isolate); |
| 294 | 297 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 friend class SnapshotReader; | 393 friend class SnapshotReader; |
| 391 friend class SnapshotWriter; | 394 friend class SnapshotWriter; |
| 392 friend class ApiMessageReader; | 395 friend class ApiMessageReader; |
| 393 | 396 |
| 394 DISALLOW_COPY_AND_ASSIGN(Symbols); | 397 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 395 }; | 398 }; |
| 396 | 399 |
| 397 } // namespace dart | 400 } // namespace dart |
| 398 | 401 |
| 399 #endif // VM_SYMBOLS_H_ | 402 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |