Chromium Code Reviews| 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" |
|
koda
2015/08/26 17:37:06
Include growable_array.h
koda
2015/08/26 20:02:03
Any reason not to do this?
srdjan
2015/08/26 20:23:42
Added.
| |
| 10 | 10 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 // Forward declarations. | 13 // Forward declarations. |
| 14 class Isolate; | 14 class Isolate; |
| 15 class ObjectPointerVisitor; | 15 class ObjectPointerVisitor; |
| 16 | 16 |
| 17 // One-character symbols are added implicitly. | 17 // One-character symbols are added implicitly. |
| 18 #define PREDEFINED_SYMBOLS_LIST(V) \ | 18 #define PREDEFINED_SYMBOLS_LIST(V) \ |
| 19 V(EqualOperator, "==") \ | 19 V(EqualOperator, "==") \ |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 587 // Creates a new Symbol from an array of UTF-32 encoded characters. | 587 // Creates a new Symbol from an array of UTF-32 encoded characters. |
| 588 static RawString* FromUTF32(const int32_t* utf32_array, intptr_t len); | 588 static RawString* FromUTF32(const int32_t* utf32_array, intptr_t len); |
| 589 | 589 |
| 590 static RawString* New(const String& str); | 590 static RawString* New(const String& str); |
| 591 static RawString* New(const String& str, | 591 static RawString* New(const String& str, |
| 592 intptr_t begin_index, | 592 intptr_t begin_index, |
| 593 intptr_t length); | 593 intptr_t length); |
| 594 | 594 |
| 595 static RawString* FromConcat(const String& str1, const String& str2); | 595 static RawString* FromConcat(const String& str1, const String& str2); |
| 596 | 596 |
| 597 static RawString* FromConcatAll(const GrowableArray<const String*>& strs); | |
| 598 | |
| 597 // Returns char* of predefined symbol. | 599 // Returns char* of predefined symbol. |
| 598 static const char* Name(SymbolId symbol); | 600 static const char* Name(SymbolId symbol); |
| 599 | 601 |
| 600 static RawString* FromCharCode(int32_t char_code); | 602 static RawString* FromCharCode(int32_t char_code); |
| 601 | 603 |
| 602 static RawString** PredefinedAddress() { | 604 static RawString** PredefinedAddress() { |
| 603 return reinterpret_cast<RawString**>(&predefined_); | 605 return reinterpret_cast<RawString**>(&predefined_); |
| 604 } | 606 } |
| 605 | 607 |
| 606 static void DumpStats(); | 608 static void DumpStats(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 638 friend class SnapshotReader; | 640 friend class SnapshotReader; |
| 639 friend class SnapshotWriter; | 641 friend class SnapshotWriter; |
| 640 friend class ApiMessageReader; | 642 friend class ApiMessageReader; |
| 641 | 643 |
| 642 DISALLOW_COPY_AND_ASSIGN(Symbols); | 644 DISALLOW_COPY_AND_ASSIGN(Symbols); |
| 643 }; | 645 }; |
| 644 | 646 |
| 645 } // namespace dart | 647 } // namespace dart |
| 646 | 648 |
| 647 #endif // VM_SYMBOLS_H_ | 649 #endif // VM_SYMBOLS_H_ |
| OLD | NEW |