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

Unified Diff: src/objects.h

Issue 2578433002: Revert of Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/promise.js ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/js/promise.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698