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

Side by Side Diff: src/heap.h

Issue 28783002: Handlify PropertyCell::SetValueInferType and friends. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 7 years, 2 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 int capacity, 654 int capacity,
655 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS); 655 ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
656 656
657 // Allocate a JSArray with no elements 657 // Allocate a JSArray with no elements
658 MUST_USE_RESULT MaybeObject* AllocateJSArrayWithElements( 658 MUST_USE_RESULT MaybeObject* AllocateJSArrayWithElements(
659 FixedArrayBase* array_base, 659 FixedArrayBase* array_base,
660 ElementsKind elements_kind, 660 ElementsKind elements_kind,
661 int length, 661 int length,
662 PretenureFlag pretenure = NOT_TENURED); 662 PretenureFlag pretenure = NOT_TENURED);
663 663
664 // Allocates and initializes a new global object based on a constructor.
665 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
666 // failed.
667 // Please note this does not perform a garbage collection.
668 MUST_USE_RESULT MaybeObject* AllocateGlobalObject(JSFunction* constructor);
669
670 // Returns a deep copy of the JavaScript object. 664 // Returns a deep copy of the JavaScript object.
671 // Properties and elements are copied too. 665 // Properties and elements are copied too.
672 // Returns failure if allocation failed. 666 // Returns failure if allocation failed.
673 // Optionally takes an AllocationSite to be appended in an AllocationMemento. 667 // Optionally takes an AllocationSite to be appended in an AllocationMemento.
674 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source, 668 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source,
675 AllocationSite* site = NULL); 669 AllocationSite* site = NULL);
676 670
677 // Allocates the function prototype. 671 // Allocates the function prototype.
678 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 672 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
679 // failed. 673 // failed.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 ExternalArrayType array_type, 875 ExternalArrayType array_type,
882 void* external_pointer, 876 void* external_pointer,
883 PretenureFlag pretenure); 877 PretenureFlag pretenure);
884 878
885 // Allocate a symbol in old space. 879 // Allocate a symbol in old space.
886 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 880 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
887 // failed. 881 // failed.
888 // Please note this does not perform a garbage collection. 882 // Please note this does not perform a garbage collection.
889 MUST_USE_RESULT MaybeObject* AllocateSymbol(); 883 MUST_USE_RESULT MaybeObject* AllocateSymbol();
890 884
891 // Allocate a tenured simple cell.
892 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
893 // failed.
894 // Please note this does not perform a garbage collection.
895 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value);
896
897 // Allocate a tenured JS global property cell.
898 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
899 // failed.
900 // Please note this does not perform a garbage collection.
901 MUST_USE_RESULT MaybeObject* AllocatePropertyCell(Object* value);
902
903 // Allocate Box.
904 MUST_USE_RESULT MaybeObject* AllocateBox(Object* value,
905 PretenureFlag pretenure);
906
907 // Allocate a tenured AllocationSite. It's payload is null 885 // Allocate a tenured AllocationSite. It's payload is null
908 MUST_USE_RESULT MaybeObject* AllocateAllocationSite(); 886 MUST_USE_RESULT MaybeObject* AllocateAllocationSite();
909 887
910 // Allocates a fixed array initialized with undefined values 888 // Allocates a fixed array initialized with undefined values
911 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 889 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
912 // failed. 890 // failed.
913 // Please note this does not perform a garbage collection. 891 // Please note this does not perform a garbage collection.
914 MUST_USE_RESULT MaybeObject* AllocateFixedArray( 892 MUST_USE_RESULT MaybeObject* AllocateFixedArray(
915 int length, 893 int length,
916 PretenureFlag pretenure = NOT_TENURED); 894 PretenureFlag pretenure = NOT_TENURED);
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 // Allocate empty fixed array. 2136 // Allocate empty fixed array.
2159 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); 2137 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
2160 2138
2161 // Allocate empty external array of given type. 2139 // Allocate empty external array of given type.
2162 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray( 2140 MUST_USE_RESULT MaybeObject* AllocateEmptyExternalArray(
2163 ExternalArrayType array_type); 2141 ExternalArrayType array_type);
2164 2142
2165 // Allocate empty fixed double array. 2143 // Allocate empty fixed double array.
2166 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray(); 2144 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedDoubleArray();
2167 2145
2146 // Allocate a tenured simple cell.
2147 MUST_USE_RESULT MaybeObject* AllocateCell(Object* value);
2148
2149 // Allocate a tenured JS global property cell initialized with the hole.
2150 MUST_USE_RESULT MaybeObject* AllocatePropertyCell();
2151
2152 // Allocate Box.
2153 MUST_USE_RESULT MaybeObject* AllocateBox(Object* value,
2154 PretenureFlag pretenure);
2155
2168 // Performs a minor collection in new generation. 2156 // Performs a minor collection in new generation.
2169 void Scavenge(); 2157 void Scavenge();
2170 2158
2171 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( 2159 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(
2172 Heap* heap, 2160 Heap* heap,
2173 Object** pointer); 2161 Object** pointer);
2174 2162
2175 Address DoScavenge(ObjectVisitor* scavenge_visitor, Address new_space_front); 2163 Address DoScavenge(ObjectVisitor* scavenge_visitor, Address new_space_front);
2176 static void ScavengeStoreBufferCallback(Heap* heap, 2164 static void ScavengeStoreBufferCallback(Heap* heap,
2177 MemoryChunk* page, 2165 MemoryChunk* page,
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3076 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3089 3077
3090 private: 3078 private:
3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3079 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3092 }; 3080 };
3093 #endif // DEBUG 3081 #endif // DEBUG
3094 3082
3095 } } // namespace v8::internal 3083 } } // namespace v8::internal
3096 3084
3097 #endif // V8_HEAP_H_ 3085 #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