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

Unified Diff: src/objects.h

Issue 2547483002: Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (Closed)
Patch Set: updates 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 5327b7a7fc69301413bae1b8d8c39166a4a4c250..d0c1f1d9307afa54aefa52fef4a8796603e4ba9c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7120,7 +7120,7 @@ class Script: public Struct {
// [shared_function_infos]: weak fixed array containing all shared
// function infos created from this script.
- DECL_ACCESSORS(shared_function_infos, Object)
+ DECL_ACCESSORS(shared_function_infos, FixedArray)
// [flags]: Holds an exciting bitfield.
DECL_INT_ACCESSORS(flags)
@@ -7739,9 +7739,6 @@ class SharedFunctionInfo: public HeapObject {
// 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)
@@ -7836,10 +7833,12 @@ class SharedFunctionInfo: public HeapObject {
SharedFunctionInfo* Next();
private:
- bool NextScript();
+ void NextScript();
Script::Iterator script_iterator_;
WeakFixedArray::Iterator sfi_iterator_;
+ Script* current_script_;
+ int index_;
DisallowHeapAllocation no_gc_;
DISALLOW_COPY_AND_ASSIGN(Iterator);
};
@@ -8001,7 +8000,7 @@ class SharedFunctionInfo: public HeapObject {
kAllowLazyCompilation,
kMarkedForTierUp,
kOptimizationDisabled,
- kNeverCompiled,
+ kIsClassFieldInitializer,
kNative,
kStrictModeFunction,
kUsesArguments,
@@ -8023,7 +8022,6 @@ class SharedFunctionInfo: public HeapObject {
kIsDeclaration,
kIsAsmWasmBroken,
kRequiresClassFieldInit,
- kIsClassFieldInitializer,
kCompilerHintsCount, // Pseudo entry
};
// kFunctionKind has to be byte-aligned

Powered by Google App Engine
This is Rietveld 408576698