| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 340 } |
| 341 static const String& Ampersand() { | 341 static const String& Ampersand() { |
| 342 return *(symbol_handles_[kNullCharId + '&']); | 342 return *(symbol_handles_[kNullCharId + '&']); |
| 343 } | 343 } |
| 344 static const String& Backtick() { | 344 static const String& Backtick() { |
| 345 return *(symbol_handles_[kNullCharId + '`']); | 345 return *(symbol_handles_[kNullCharId + '`']); |
| 346 } | 346 } |
| 347 static const String& Slash() { | 347 static const String& Slash() { |
| 348 return *(symbol_handles_[kNullCharId + '/']); | 348 return *(symbol_handles_[kNullCharId + '/']); |
| 349 } | 349 } |
| 350 static const String& At() { |
| 351 return *(symbol_handles_[kNullCharId + '@']); |
| 352 } |
| 350 | 353 |
| 351 // Access methods for symbol handles stored in the vm isolate. | 354 // Access methods for symbol handles stored in the vm isolate. |
| 352 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ | 355 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ |
| 353 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } | 356 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } |
| 354 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) | 357 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) |
| 355 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR | 358 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR |
| 356 | 359 |
| 357 // Initialize frequently used symbols in the vm isolate. | 360 // Initialize frequently used symbols in the vm isolate. |
| 358 static void InitOnce(Isolate* isolate); | 361 static void InitOnce(Isolate* isolate); |
| 359 | 362 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 friend class SnapshotReader; | 458 friend class SnapshotReader; |
| 456 friend class SnapshotWriter; | 459 friend class SnapshotWriter; |
| 457 friend class ApiMessageReader; | 460 friend class ApiMessageReader; |
| 458 | 461 |
| 459 DISALLOW_COPY_AND_ASSIGN(Symbols); | 462 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 460 }; | 463 }; |
| 461 | 464 |
| 462 } // namespace dart | 465 } // namespace dart |
| 463 | 466 |
| 464 #endif // VM_SYMBOLS_H_ | 467 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |