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