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

Side by Side Diff: src/heap.h

Issue 240263002: Handlify six more allocators in from the Heap class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.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 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 PretenureFlag pretenure = NOT_TENURED, 716 PretenureFlag pretenure = NOT_TENURED,
717 AllocationSite* allocation_site = NULL); 717 AllocationSite* allocation_site = NULL);
718 718
719 // Returns a deep copy of the JavaScript object. 719 // Returns a deep copy of the JavaScript object.
720 // Properties and elements are copied too. 720 // Properties and elements are copied too.
721 // Returns failure if allocation failed. 721 // Returns failure if allocation failed.
722 // Optionally takes an AllocationSite to be appended in an AllocationMemento. 722 // Optionally takes an AllocationSite to be appended in an AllocationMemento.
723 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source, 723 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source,
724 AllocationSite* site = NULL); 724 AllocationSite* site = NULL);
725 725
726 // Allocates a Harmony proxy or function proxy.
727 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
728 // failed.
729 // Please note this does not perform a garbage collection.
730 MUST_USE_RESULT MaybeObject* AllocateJSProxy(Object* handler,
731 Object* prototype);
732
733 MUST_USE_RESULT MaybeObject* AllocateJSFunctionProxy(Object* handler,
734 Object* call_trap,
735 Object* construct_trap,
736 Object* prototype);
737
738 // Allocates and initializes a new JavaScript object based on a map. 726 // Allocates and initializes a new JavaScript object based on a map.
739 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 727 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
740 // failed. 728 // failed.
741 // Passing an allocation site means that a memento will be created that 729 // Passing an allocation site means that a memento will be created that
742 // points to the site. 730 // points to the site.
743 // Please note this does not perform a garbage collection. 731 // Please note this does not perform a garbage collection.
744 MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap( 732 MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap(
745 Map* map, 733 Map* map,
746 PretenureFlag pretenure = NOT_TENURED, 734 PretenureFlag pretenure = NOT_TENURED,
747 bool alloc_props = true, 735 bool alloc_props = true,
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 MUST_USE_RESULT inline MaybeObject* NumberFromUint32( 1005 MUST_USE_RESULT inline MaybeObject* NumberFromUint32(
1018 uint32_t value, PretenureFlag pretenure = NOT_TENURED); 1006 uint32_t value, PretenureFlag pretenure = NOT_TENURED);
1019 1007
1020 // Allocates a new foreign object. 1008 // Allocates a new foreign object.
1021 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 1009 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1022 // failed. 1010 // failed.
1023 // Please note this does not perform a garbage collection. 1011 // Please note this does not perform a garbage collection.
1024 MUST_USE_RESULT MaybeObject* AllocateForeign( 1012 MUST_USE_RESULT MaybeObject* AllocateForeign(
1025 Address address, PretenureFlag pretenure = NOT_TENURED); 1013 Address address, PretenureFlag pretenure = NOT_TENURED);
1026 1014
1027 // Allocates a new SharedFunctionInfo object.
1028 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1029 // failed.
1030 // Please note this does not perform a garbage collection.
1031 MUST_USE_RESULT MaybeObject* AllocateSharedFunctionInfo(Object* name);
1032
1033 // Allocates a new JSMessageObject object.
1034 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1035 // failed.
1036 // Please note that this does not perform a garbage collection.
1037 MUST_USE_RESULT MaybeObject* AllocateJSMessageObject(
1038 String* type,
1039 JSArray* arguments,
1040 int start_position,
1041 int end_position,
1042 Object* script,
1043 Object* stack_frames);
1044
1045 // Allocate a new external string object, which is backed by a string
1046 // resource that resides outside the V8 heap.
1047 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1048 // failed.
1049 // Please note this does not perform a garbage collection.
1050 MUST_USE_RESULT MaybeObject* AllocateExternalStringFromAscii(
1051 const ExternalAsciiString::Resource* resource);
1052 MUST_USE_RESULT MaybeObject* AllocateExternalStringFromTwoByte(
1053 const ExternalTwoByteString::Resource* resource);
1054
1055 // Finalizes an external string by deleting the associated external 1015 // Finalizes an external string by deleting the associated external
1056 // data and clearing the resource pointer. 1016 // data and clearing the resource pointer.
1057 inline void FinalizeExternalString(String* string); 1017 inline void FinalizeExternalString(String* string);
1058 1018
1059 // Allocates an uninitialized object. The memory is non-executable if the 1019 // Allocates an uninitialized object. The memory is non-executable if the
1060 // hardware and OS allow. 1020 // hardware and OS allow.
1061 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 1021 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1062 // failed. 1022 // failed.
1063 // Please note this function does not perform a garbage collection. 1023 // Please note this function does not perform a garbage collection.
1064 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes, 1024 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes,
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after
2980 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2940 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2981 2941
2982 private: 2942 private:
2983 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2943 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2984 }; 2944 };
2985 #endif // DEBUG 2945 #endif // DEBUG
2986 2946
2987 } } // namespace v8::internal 2947 } } // namespace v8::internal
2988 2948
2989 #endif // V8_HEAP_H_ 2949 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698