| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 0280c960ac52b9f8a285b4b3e8b3f5a8a8932b42..b2448793e821a8256a0d51e442c0fbb96f0c2c35 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -7114,7 +7114,7 @@
|
|
|
| // [shared_function_infos]: weak fixed array containing all shared
|
| // function infos created from this script.
|
| - DECL_ACCESSORS(shared_function_infos, FixedArray)
|
| + DECL_ACCESSORS(shared_function_infos, Object)
|
|
|
| // [flags]: Holds an exciting bitfield.
|
| DECL_INT_ACCESSORS(flags)
|
| @@ -7199,8 +7199,7 @@
|
|
|
| // Look through the list of existing shared function infos to find one
|
| // that matches the function literal. Return empty handle if not found.
|
| - MaybeHandle<SharedFunctionInfo> FindSharedFunctionInfo(Isolate* isolate,
|
| - FunctionLiteral* fun);
|
| + MaybeHandle<SharedFunctionInfo> FindSharedFunctionInfo(FunctionLiteral* fun);
|
|
|
| // Iterate over all script objects on the heap.
|
| class Iterator {
|
| @@ -7728,6 +7727,9 @@
|
| // Indicates that the the shared function info is deserialized from cache.
|
| DECL_BOOLEAN_ACCESSORS(deserialized)
|
|
|
| + // Indicates that the the shared function info has never been compiled before.
|
| + DECL_BOOLEAN_ACCESSORS(never_compiled)
|
| +
|
| // Whether this function was created from a FunctionDeclaration.
|
| DECL_BOOLEAN_ACCESSORS(is_declaration)
|
|
|
| @@ -7815,35 +7817,19 @@
|
|
|
| void ResetForNewContext(int new_ic_age);
|
|
|
| - // Iterate over all shared function infos in a given script.
|
| - class ScriptIterator {
|
| + // Iterate over all shared function infos.
|
| + class Iterator {
|
| public:
|
| - explicit ScriptIterator(Handle<Script> script);
|
| - ScriptIterator(Isolate* isolate, Handle<FixedArray> shared_function_infos);
|
| + explicit Iterator(Isolate* isolate);
|
| SharedFunctionInfo* Next();
|
|
|
| - // Reset the iterator to run on |script|.
|
| - void Reset(Handle<Script> script);
|
| -
|
| private:
|
| - Isolate* isolate_;
|
| - Handle<FixedArray> shared_function_infos_;
|
| - int index_;
|
| - DISALLOW_COPY_AND_ASSIGN(ScriptIterator);
|
| - };
|
| -
|
| - // Iterate over all shared function infos on the heap.
|
| - class GlobalIterator {
|
| - public:
|
| - explicit GlobalIterator(Isolate* isolate);
|
| - SharedFunctionInfo* Next();
|
| -
|
| - private:
|
| + bool NextScript();
|
| +
|
| Script::Iterator script_iterator_;
|
| - WeakFixedArray::Iterator noscript_sfi_iterator_;
|
| - SharedFunctionInfo::ScriptIterator sfi_iterator_;
|
| + WeakFixedArray::Iterator sfi_iterator_;
|
| DisallowHeapAllocation no_gc_;
|
| - DISALLOW_COPY_AND_ASSIGN(GlobalIterator);
|
| + DISALLOW_COPY_AND_ASSIGN(Iterator);
|
| };
|
|
|
| DECLARE_CAST(SharedFunctionInfo)
|
| @@ -8003,7 +7989,7 @@
|
| kAllowLazyCompilation,
|
| kMarkedForTierUp,
|
| kOptimizationDisabled,
|
| - kIsClassFieldInitializer,
|
| + kNeverCompiled,
|
| kNative,
|
| kStrictModeFunction,
|
| kUsesArguments,
|
| @@ -8025,6 +8011,7 @@
|
| kIsDeclaration,
|
| kIsAsmWasmBroken,
|
| kRequiresClassFieldInit,
|
| + kIsClassFieldInitializer,
|
| kCompilerHintsCount, // Pseudo entry
|
| };
|
| // kFunctionKind has to be byte-aligned
|
|
|