Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: runtime/vm/symbols.h

Issue 1322973006: Symbols::NewFormatted and old space allocation. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comment Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 static RawString* FromUTF16(const uint16_t* utf16_array, intptr_t len); 588 static RawString* FromUTF16(const uint16_t* utf16_array, intptr_t len);
589 589
590 // Creates a new Symbol from an array of UTF-32 encoded characters. 590 // Creates a new Symbol from an array of UTF-32 encoded characters.
591 static RawString* FromUTF32(const int32_t* utf32_array, intptr_t len); 591 static RawString* FromUTF32(const int32_t* utf32_array, intptr_t len);
592 592
593 static RawString* New(const String& str); 593 static RawString* New(const String& str);
594 static RawString* New(const String& str, 594 static RawString* New(const String& str,
595 intptr_t begin_index, 595 intptr_t begin_index,
596 intptr_t length); 596 intptr_t length);
597 597
598 static RawString* NewFormatted(const char* format, ...)
599 PRINTF_ATTRIBUTE(1, 2);
600 static RawString* NewFormattedV(const char* format, va_list args);
601
598 static RawString* FromConcat(const String& str1, const String& str2); 602 static RawString* FromConcat(const String& str1, const String& str2);
599 603
600 static RawString* FromConcatAll( 604 static RawString* FromConcatAll(
601 const GrowableHandlePtrArray<const String>& strs); 605 const GrowableHandlePtrArray<const String>& strs);
602 606
603 // Returns char* of predefined symbol. 607 // Returns char* of predefined symbol.
604 static const char* Name(SymbolId symbol); 608 static const char* Name(SymbolId symbol);
605 609
606 static RawString* FromCharCode(int32_t char_code); 610 static RawString* FromCharCode(int32_t char_code);
607 611
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 friend class SnapshotReader; 655 friend class SnapshotReader;
652 friend class SnapshotWriter; 656 friend class SnapshotWriter;
653 friend class ApiMessageReader; 657 friend class ApiMessageReader;
654 658
655 DISALLOW_COPY_AND_ASSIGN(Symbols); 659 DISALLOW_COPY_AND_ASSIGN(Symbols);
656 }; 660 };
657 661
658 } // namespace dart 662 } // namespace dart
659 663
660 #endif // VM_SYMBOLS_H_ 664 #endif // VM_SYMBOLS_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698