OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // encoded. If the characters are all single-byte characters, the | 778 // encoded. If the characters are all single-byte characters, the |
779 // result will be ASCII encoded, otherwise it will converted to two | 779 // result will be ASCII encoded, otherwise it will converted to two |
780 // byte. | 780 // byte. |
781 // - ...FromTwoByte initializes the string from a buffer that is two-byte | 781 // - ...FromTwoByte initializes the string from a buffer that is two-byte |
782 // encoded. If the characters are all single-byte characters, the | 782 // encoded. If the characters are all single-byte characters, the |
783 // result will be converted to ASCII, otherwise it will be left as | 783 // result will be converted to ASCII, otherwise it will be left as |
784 // two-byte. | 784 // two-byte. |
785 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 785 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
786 // failed. | 786 // failed. |
787 // Please note this does not perform a garbage collection. | 787 // Please note this does not perform a garbage collection. |
788 MUST_USE_RESULT MaybeObject* AllocateStringFromOneByte( | |
789 Vector<const uint8_t> str, | |
790 PretenureFlag pretenure = NOT_TENURED); | |
791 MUST_USE_RESULT MaybeObject* AllocateStringFromUtf8Slow( | 788 MUST_USE_RESULT MaybeObject* AllocateStringFromUtf8Slow( |
792 Vector<const char> str, | 789 Vector<const char> str, |
793 int non_ascii_start, | 790 int non_ascii_start, |
794 PretenureFlag pretenure = NOT_TENURED); | 791 PretenureFlag pretenure = NOT_TENURED); |
795 MUST_USE_RESULT MaybeObject* AllocateStringFromTwoByte( | 792 MUST_USE_RESULT MaybeObject* AllocateStringFromTwoByte( |
796 Vector<const uc16> str, | 793 Vector<const uc16> str, |
797 PretenureFlag pretenure = NOT_TENURED); | 794 PretenureFlag pretenure = NOT_TENURED); |
798 | 795 |
799 // Allocates an internalized string in old space based on the character | 796 // Allocates an internalized string in old space based on the character |
800 // stream. Returns Failure::RetryAfterGC(requested_bytes, space) if the | 797 // stream. Returns Failure::RetryAfterGC(requested_bytes, space) if the |
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2892 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2896 | 2893 |
2897 private: | 2894 private: |
2898 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2895 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2899 }; | 2896 }; |
2900 #endif // DEBUG | 2897 #endif // DEBUG |
2901 | 2898 |
2902 } } // namespace v8::internal | 2899 } } // namespace v8::internal |
2903 | 2900 |
2904 #endif // V8_HEAP_H_ | 2901 #endif // V8_HEAP_H_ |
OLD | NEW |