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

Side by Side Diff: src/objects.h

Issue 2401653002: [turbofan] Discard the shared code entry in the optimized code map. (Closed)
Patch Set: Dead code. Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 7149 matching lines...) Expand 10 before | Expand all | Expand 10 after
7160 // In case of non-OSR the code reference is cleared from the cache entry but 7160 // In case of non-OSR the code reference is cleared from the cache entry but
7161 // the entry itself is left in the map in order to proceed sharing literals. 7161 // the entry itself is left in the map in order to proceed sharing literals.
7162 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); 7162 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason);
7163 7163
7164 // Trims the optimized code map after entries have been removed. 7164 // Trims the optimized code map after entries have been removed.
7165 void TrimOptimizedCodeMap(int shrink_by); 7165 void TrimOptimizedCodeMap(int shrink_by);
7166 7166
7167 static Handle<LiteralsArray> FindOrCreateLiterals( 7167 static Handle<LiteralsArray> FindOrCreateLiterals(
7168 Handle<SharedFunctionInfo> shared, Handle<Context> native_context); 7168 Handle<SharedFunctionInfo> shared, Handle<Context> native_context);
7169 7169
7170 // Add or update entry in the optimized code map for context-independent code.
7171 static void AddSharedCodeToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
7172 Handle<Code> code);
7173
7174 // Add or update entry in the optimized code map for context-dependent code. 7170 // Add or update entry in the optimized code map for context-dependent code.
7175 // If {code} is not given, then an existing entry's code won't be overwritten. 7171 // If {code} is not given, then an existing entry's code won't be overwritten.
7176 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, 7172 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared,
7177 Handle<Context> native_context, 7173 Handle<Context> native_context,
7178 MaybeHandle<Code> code, 7174 MaybeHandle<Code> code,
7179 Handle<LiteralsArray> literals, 7175 Handle<LiteralsArray> literals,
7180 BailoutId osr_ast_id); 7176 BailoutId osr_ast_id);
7181 7177
7182 // Set up the link between shared function info and the script. The shared 7178 // Set up the link between shared function info and the script. The shared
7183 // function info is added to the list on the script. 7179 // function info is added to the list on the script.
7184 static void SetScript(Handle<SharedFunctionInfo> shared, 7180 static void SetScript(Handle<SharedFunctionInfo> shared,
7185 Handle<Object> script_object); 7181 Handle<Object> script_object);
7186 7182
7187 // Layout description of the optimized code map. 7183 // Layout description of the optimized code map.
7188 static const int kSharedCodeIndex = 0; 7184 static const int kEntriesStart = 0;
7189 static const int kEntriesStart = 1;
7190 static const int kContextOffset = 0; 7185 static const int kContextOffset = 0;
7191 static const int kCachedCodeOffset = 1; 7186 static const int kCachedCodeOffset = 1;
7192 static const int kLiteralsOffset = 2; 7187 static const int kLiteralsOffset = 2;
7193 static const int kOsrAstIdOffset = 3; 7188 static const int kOsrAstIdOffset = 3;
7194 static const int kEntryLength = 4; 7189 static const int kEntryLength = 4;
7195 static const int kInitialLength = kEntriesStart + kEntryLength; 7190 static const int kInitialLength = kEntriesStart + kEntryLength;
7196 7191
7197 static const int kNotFound = -1; 7192 static const int kNotFound = -1;
7198 7193
7199 // Helpers for assembly code that does a backwards walk of the optimized code 7194 // Helpers for assembly code that does a backwards walk of the optimized code
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
7781 #endif 7776 #endif
7782 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction); 7777 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction);
7783 static const int kNativeByteOffset = BYTE_OFFSET(kNative); 7778 static const int kNativeByteOffset = BYTE_OFFSET(kNative);
7784 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind); 7779 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind);
7785 static const int kHasDuplicateParametersByteOffset = 7780 static const int kHasDuplicateParametersByteOffset =
7786 BYTE_OFFSET(kHasDuplicateParameters); 7781 BYTE_OFFSET(kHasDuplicateParameters);
7787 #undef BYTE_OFFSET 7782 #undef BYTE_OFFSET
7788 7783
7789 private: 7784 private:
7790 // Returns entry from optimized code map for specified context and OSR entry. 7785 // Returns entry from optimized code map for specified context and OSR entry.
7791 // The result is either kNotFound, kSharedCodeIndex for context-independent 7786 // The result is either kNotFound, or a start index of the context-dependent
7792 // entry or a start index of the context-dependent entry. 7787 // entry.
7793 int SearchOptimizedCodeMapEntry(Context* native_context, 7788 int SearchOptimizedCodeMapEntry(Context* native_context,
7794 BailoutId osr_ast_id); 7789 BailoutId osr_ast_id);
7795 7790
7796 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); 7791 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
7797 }; 7792 };
7798 7793
7799 7794
7800 // Printing support. 7795 // Printing support.
7801 struct SourceCodeOf { 7796 struct SourceCodeOf {
7802 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) 7797 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1)
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
11405 } 11400 }
11406 return value; 11401 return value;
11407 } 11402 }
11408 }; 11403 };
11409 11404
11410 11405
11411 } // NOLINT, false-positive due to second-order macros. 11406 } // NOLINT, false-positive due to second-order macros.
11412 } // NOLINT, false-positive due to second-order macros. 11407 } // NOLINT, false-positive due to second-order macros.
11413 11408
11414 #endif // V8_OBJECTS_H_ 11409 #endif // V8_OBJECTS_H_
OLDNEW
« src/builtins/arm/builtins-arm.cc ('K') | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698