Chromium Code Reviews| Index: runtime/vm/dart_entry.h |
| =================================================================== |
| --- runtime/vm/dart_entry.h (revision 16642) |
| +++ runtime/vm/dart_entry.h (working copy) |
| @@ -57,6 +57,9 @@ |
| // arguments. All arguments are positional. |
| static RawArray* New(intptr_t count); |
| + // Initialize the preallocated fixed length arguments descriptors cache. |
| + static void InitOnce(); |
| + |
| private: |
| // Absolute indexes into the array. |
| enum { |
| @@ -72,13 +75,22 @@ |
| kNamedEntrySize, |
| }; |
| + enum { |
| + kCachedDescriptors = 32 |
|
regis
2013/01/05 01:05:29
kCachedDescriptorCount?
Ivan Posva
2013/01/07 18:27:12
Done.
|
| + }; |
| + |
| static intptr_t LengthFor(intptr_t count) { |
| // Add 1 for the terminating null. |
| return kFirstNamedEntryIndex + (kNamedEntrySize * count) + 1; |
| } |
| + static RawArray* NewNonCached(intptr_t count, bool canonicalize = true); |
| + |
| const Array& array_; |
| + // A cache of VM heap allocated arguments descriptors. |
| + static RawArray* cached_args_descriptors_[kCachedDescriptors]; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor); |
| }; |