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

Side by Side Diff: src/factory.h

Issue 2041963003: [elements] Precisely estimate elements size for large-object limits (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add missing method on string wrapper Created 4 years, 1 month 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 | « src/elements.cc ('k') | src/factory.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FACTORY_H_ 5 #ifndef V8_FACTORY_H_
6 #define V8_FACTORY_H_ 6 #define V8_FACTORY_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 13 matching lines...) Expand all
24 // Interface for handle based allocation. 24 // Interface for handle based allocation.
25 class V8_EXPORT_PRIVATE Factory final { 25 class V8_EXPORT_PRIVATE Factory final {
26 public: 26 public:
27 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string, 27 Handle<Oddball> NewOddball(Handle<Map> map, const char* to_string,
28 Handle<Object> to_number, const char* type_of, 28 Handle<Object> to_number, const char* type_of,
29 byte kind); 29 byte kind);
30 30
31 // Allocates a fixed array initialized with undefined values. 31 // Allocates a fixed array initialized with undefined values.
32 Handle<FixedArray> NewFixedArray(int size, 32 Handle<FixedArray> NewFixedArray(int size,
33 PretenureFlag pretenure = NOT_TENURED); 33 PretenureFlag pretenure = NOT_TENURED);
34 // Tries allocating a fixed array initialized with undefined values.
35 // In case of an allocation failure (OOM) an empty handle is returned.
36 // The caller has to manually signal an
37 // v8::internal::Heap::FatalProcessOutOfMemory typically by calling
38 // NewFixedArray as a fallback.
39 MUST_USE_RESULT
40 MaybeHandle<FixedArray> TryNewFixedArray(
41 int size, PretenureFlag pretenure = NOT_TENURED);
34 42
35 // Allocate a new fixed array with non-existing entries (the hole). 43 // Allocate a new fixed array with non-existing entries (the hole).
36 Handle<FixedArray> NewFixedArrayWithHoles( 44 Handle<FixedArray> NewFixedArrayWithHoles(
37 int size, 45 int size,
38 PretenureFlag pretenure = NOT_TENURED); 46 PretenureFlag pretenure = NOT_TENURED);
39 47
40 // Allocates an uninitialized fixed array. It must be filled by the caller. 48 // Allocates an uninitialized fixed array. It must be filled by the caller.
41 Handle<FixedArray> NewUninitializedFixedArray(int size); 49 Handle<FixedArray> NewUninitializedFixedArray(int size);
42 50
43 // Allocate a new uninitialized fixed double array. 51 // Allocate a new uninitialized fixed double array.
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 FunctionMode function_mode); 796 FunctionMode function_mode);
789 797
790 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, 798 void SetStrictFunctionInstanceDescriptor(Handle<Map> map,
791 FunctionMode function_mode); 799 FunctionMode function_mode);
792 }; 800 };
793 801
794 } // namespace internal 802 } // namespace internal
795 } // namespace v8 803 } // namespace v8
796 804
797 #endif // V8_FACTORY_H_ 805 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698