| Index: src/key-accumulator.h
|
| diff --git a/src/key-accumulator.h b/src/key-accumulator.h
|
| index 9daee10cd357bf758340f143958b4d0862c45519..0abc37b027f18661b0a2c7a6c16d9f9bb9381be7 100644
|
| --- a/src/key-accumulator.h
|
| +++ b/src/key-accumulator.h
|
| @@ -86,6 +86,35 @@ class KeyAccumulator final BASE_EMBEDDED {
|
| DISALLOW_COPY_AND_ASSIGN(KeyAccumulator);
|
| };
|
|
|
| +class FastKeyAccumulator {
|
| + public:
|
| + FastKeyAccumulator(Isolate* isolate, Handle<JSReceiver> receiver,
|
| + KeyCollectionType type, PropertyFilter filter)
|
| + : isolate_(isolate), receiver_(receiver), type_(type), filter_(filter) {
|
| + Prepare();
|
| + }
|
| +
|
| + void UseVars();
|
| +
|
| + bool is_simple_enum() { return is_simple_enum_; }
|
| + bool has_empty_prototype() { return has_empty_prototype_; }
|
| +
|
| + MaybeHandle<FixedArray> GetKeys(GetKeysConversion convert = KEEP_NUMBERS);
|
| +
|
| + private:
|
| + void Prepare();
|
| + MaybeHandle<FixedArray> GetKeysFast(GetKeysConversion convert);
|
| + MaybeHandle<FixedArray> GetKeysSlow(GetKeysConversion convert);
|
| +
|
| + Isolate* isolate_;
|
| + Handle<JSReceiver> receiver_;
|
| + KeyCollectionType type_;
|
| + PropertyFilter filter_;
|
| + bool is_simple_enum_ = false;
|
| + bool has_empty_prototype_ = false;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FastKeyAccumulator);
|
| +};
|
|
|
| } // namespace internal
|
| } // namespace v8
|
|
|