| 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/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/snapshot_ids.h" | 10 #include "vm/snapshot_ids.h" |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 static const char* Name(SymbolId symbol); | 604 static const char* Name(SymbolId symbol); |
| 605 | 605 |
| 606 static RawString* FromCharCode(int32_t char_code); | 606 static RawString* FromCharCode(int32_t char_code); |
| 607 | 607 |
| 608 static RawString** PredefinedAddress() { | 608 static RawString** PredefinedAddress() { |
| 609 return reinterpret_cast<RawString**>(&predefined_); | 609 return reinterpret_cast<RawString**>(&predefined_); |
| 610 } | 610 } |
| 611 | 611 |
| 612 static void DumpStats(); | 612 static void DumpStats(); |
| 613 | 613 |
| 614 // Returns Symbol::Null if no symbol is found. |
| 615 template<typename StringType> |
| 616 static RawString* Lookup(const StringType& str); |
| 617 |
| 618 // Returns Symbol::Null if no symbol is found. |
| 619 static RawString* LookupFromConcat(const String& str1, const String& str2); |
| 620 |
| 614 private: | 621 private: |
| 615 enum { | 622 enum { |
| 616 kInitialVMIsolateSymtabSize = 1024, | 623 kInitialVMIsolateSymtabSize = 1024, |
| 617 kInitialSymtabSize = 2048 | 624 kInitialSymtabSize = 2048 |
| 618 }; | 625 }; |
| 619 | 626 |
| 620 static void GetStats(Isolate* isolate, | 627 static void GetStats(Isolate* isolate, |
| 621 intptr_t* size, | 628 intptr_t* size, |
| 622 intptr_t* capacity); | 629 intptr_t* capacity); |
| 623 | 630 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 644 friend class SnapshotReader; | 651 friend class SnapshotReader; |
| 645 friend class SnapshotWriter; | 652 friend class SnapshotWriter; |
| 646 friend class ApiMessageReader; | 653 friend class ApiMessageReader; |
| 647 | 654 |
| 648 DISALLOW_COPY_AND_ASSIGN(Symbols); | 655 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 649 }; | 656 }; |
| 650 | 657 |
| 651 } // namespace dart | 658 } // namespace dart |
| 652 | 659 |
| 653 #endif // VM_SYMBOLS_H_ | 660 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |