| 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 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static RawString* symbol() { return predefined_[k##symbol]; } | 73 static RawString* symbol() { return predefined_[k##symbol]; } |
| 74 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_ACCESSOR) | 74 PREDEFINED_SYMBOLS_LIST(DEFINE_SYMBOL_ACCESSOR) |
| 75 #undef DEFINE_SYMBOL_ACCESSOR | 75 #undef DEFINE_SYMBOL_ACCESSOR |
| 76 | 76 |
| 77 // Initialize frequently used symbols in the vm isolate. | 77 // Initialize frequently used symbols in the vm isolate. |
| 78 static void InitOnce(Isolate* isolate); | 78 static void InitOnce(Isolate* isolate); |
| 79 | 79 |
| 80 // Initialize and setup a symbol table for the isolate. | 80 // Initialize and setup a symbol table for the isolate. |
| 81 static void SetupSymbolTable(Isolate* isolate); | 81 static void SetupSymbolTable(Isolate* isolate); |
| 82 | 82 |
| 83 // Get number of symbols in an isolate's symbol table. |
| 84 static intptr_t Size(Isolate* isolate); |
| 85 |
| 83 // Helper functions to create a symbol given a string or set of characters. | 86 // Helper functions to create a symbol given a string or set of characters. |
| 84 static RawString* New(const char* str); | 87 static RawString* New(const char* str); |
| 85 template<typename T> | 88 template<typename T> |
| 86 static RawString* New(const T* characters, intptr_t len); | 89 static RawString* New(const T* characters, intptr_t len); |
| 87 static RawString* New(const String& str); | 90 static RawString* New(const String& str); |
| 88 static RawString* New(const String& str, | 91 static RawString* New(const String& str, |
| 89 intptr_t begin_index, | 92 intptr_t begin_index, |
| 90 intptr_t length); | 93 intptr_t length); |
| 91 | 94 |
| 92 | 95 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 static RawString* predefined_[kMaxPredefined]; | 127 static RawString* predefined_[kMaxPredefined]; |
| 125 | 128 |
| 126 friend class SnapshotReader; | 129 friend class SnapshotReader; |
| 127 | 130 |
| 128 DISALLOW_COPY_AND_ASSIGN(Symbols); | 131 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace dart | 134 } // namespace dart |
| 132 | 135 |
| 133 #endif // VM_SYMBOLS_H_ | 136 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |