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

Side by Side Diff: src/heap.h

Issue 239083005: Callers of Heap::AllocateStringFromOneByte() and Heap::AllocateStringFromUtf8() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/heap-inl.h » ('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 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 788 MUST_USE_RESULT MaybeObject* AllocateStringFromOneByte(
789 Vector<const uint8_t> str, 789 Vector<const uint8_t> str,
790 PretenureFlag pretenure = NOT_TENURED); 790 PretenureFlag pretenure = NOT_TENURED);
791 // TODO(dcarney): remove this function.
792 MUST_USE_RESULT inline MaybeObject* AllocateStringFromOneByte(
793 Vector<const char> str,
794 PretenureFlag pretenure = NOT_TENURED) {
795 return AllocateStringFromOneByte(Vector<const uint8_t>::cast(str),
796 pretenure);
797 }
798 MUST_USE_RESULT inline MaybeObject* AllocateStringFromUtf8(
799 Vector<const char> str,
800 PretenureFlag pretenure = NOT_TENURED);
801 MUST_USE_RESULT MaybeObject* AllocateStringFromUtf8Slow( 791 MUST_USE_RESULT MaybeObject* AllocateStringFromUtf8Slow(
802 Vector<const char> str, 792 Vector<const char> str,
803 int non_ascii_start, 793 int non_ascii_start,
804 PretenureFlag pretenure = NOT_TENURED); 794 PretenureFlag pretenure = NOT_TENURED);
805 MUST_USE_RESULT MaybeObject* AllocateStringFromTwoByte( 795 MUST_USE_RESULT MaybeObject* AllocateStringFromTwoByte(
806 Vector<const uc16> str, 796 Vector<const uc16> str,
807 PretenureFlag pretenure = NOT_TENURED); 797 PretenureFlag pretenure = NOT_TENURED);
808 798
809 // Allocates an internalized string in old space based on the character 799 // Allocates an internalized string in old space based on the character
810 // stream. Returns Failure::RetryAfterGC(requested_bytes, space) if the 800 // stream. Returns Failure::RetryAfterGC(requested_bytes, space) if the
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2895 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2906 2896
2907 private: 2897 private:
2908 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2898 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2909 }; 2899 };
2910 #endif // DEBUG 2900 #endif // DEBUG
2911 2901
2912 } } // namespace v8::internal 2902 } } // namespace v8::internal
2913 2903
2914 #endif // V8_HEAP_H_ 2904 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698