| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 334 } |
| 335 static const String& Dash() { | 335 static const String& Dash() { |
| 336 return *(symbol_handles_[kNullCharId + '-']); | 336 return *(symbol_handles_[kNullCharId + '-']); |
| 337 } | 337 } |
| 338 static const String& Ampersand() { | 338 static const String& Ampersand() { |
| 339 return *(symbol_handles_[kNullCharId + '&']); | 339 return *(symbol_handles_[kNullCharId + '&']); |
| 340 } | 340 } |
| 341 static const String& Backtick() { | 341 static const String& Backtick() { |
| 342 return *(symbol_handles_[kNullCharId + '`']); | 342 return *(symbol_handles_[kNullCharId + '`']); |
| 343 } | 343 } |
| 344 static const String& Slash() { | |
| 345 return *(symbol_handles_[kNullCharId + '/']); | |
| 346 } | |
| 347 | 344 |
| 348 // Access methods for symbol handles stored in the vm isolate. | 345 // Access methods for symbol handles stored in the vm isolate. |
| 349 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ | 346 #define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \ |
| 350 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } | 347 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); } |
| 351 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) | 348 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_HANDLE_ACCESSOR) |
| 352 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR | 349 #undef DEFINE_SYMBOL_HANDLE_ACCESSOR |
| 353 | 350 |
| 354 // Initialize frequently used symbols in the vm isolate. | 351 // Initialize frequently used symbols in the vm isolate. |
| 355 static void InitOnce(Isolate* isolate); | 352 static void InitOnce(Isolate* isolate); |
| 356 | 353 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 friend class SnapshotReader; | 449 friend class SnapshotReader; |
| 453 friend class SnapshotWriter; | 450 friend class SnapshotWriter; |
| 454 friend class ApiMessageReader; | 451 friend class ApiMessageReader; |
| 455 | 452 |
| 456 DISALLOW_COPY_AND_ASSIGN(Symbols); | 453 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 457 }; | 454 }; |
| 458 | 455 |
| 459 } // namespace dart | 456 } // namespace dart |
| 460 | 457 |
| 461 #endif // VM_SYMBOLS_H_ | 458 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |