OLD | NEW |
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 7445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7456 // We have a special root FixedArray with the right shape and values | 7456 // We have a special root FixedArray with the right shape and values |
7457 // to represent the cleared optimized code map. This predicate checks | 7457 // to represent the cleared optimized code map. This predicate checks |
7458 // if that root is installed. | 7458 // if that root is installed. |
7459 inline bool OptimizedCodeMapIsCleared() const; | 7459 inline bool OptimizedCodeMapIsCleared() const; |
7460 | 7460 |
7461 // Removes a specific optimized code object from the optimized code map. | 7461 // Removes a specific optimized code object from the optimized code map. |
7462 // In case of non-OSR the code reference is cleared from the cache entry but | 7462 // In case of non-OSR the code reference is cleared from the cache entry but |
7463 // the entry itself is left in the map in order to proceed sharing literals. | 7463 // the entry itself is left in the map in order to proceed sharing literals. |
7464 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); | 7464 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); |
7465 | 7465 |
7466 // Trims the optimized code map after entries have been removed. | |
7467 void TrimOptimizedCodeMap(int shrink_by); | |
7468 | |
7469 static Handle<LiteralsArray> FindOrCreateLiterals( | 7466 static Handle<LiteralsArray> FindOrCreateLiterals( |
7470 Handle<SharedFunctionInfo> shared, Handle<Context> native_context); | 7467 Handle<SharedFunctionInfo> shared, Handle<Context> native_context); |
7471 | 7468 |
7472 // Add or update entry in the optimized code map for context-dependent code. | 7469 // Add or update entry in the optimized code map for context-dependent code. |
7473 // If {code} is not given, then an existing entry's code won't be overwritten. | 7470 // If {code} is not given, then an existing entry's code won't be overwritten. |
7474 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, | 7471 static void AddToOptimizedCodeMap(Handle<SharedFunctionInfo> shared, |
7475 Handle<Context> native_context, | 7472 Handle<Context> native_context, |
7476 MaybeHandle<Code> code, | 7473 MaybeHandle<Code> code, |
7477 Handle<LiteralsArray> literals, | 7474 Handle<LiteralsArray> literals, |
7478 BailoutId osr_ast_id); | 7475 BailoutId osr_ast_id); |
(...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11993 } | 11990 } |
11994 return value; | 11991 return value; |
11995 } | 11992 } |
11996 }; | 11993 }; |
11997 | 11994 |
11998 | 11995 |
11999 } // NOLINT, false-positive due to second-order macros. | 11996 } // NOLINT, false-positive due to second-order macros. |
12000 } // NOLINT, false-positive due to second-order macros. | 11997 } // NOLINT, false-positive due to second-order macros. |
12001 | 11998 |
12002 #endif // V8_OBJECTS_H_ | 11999 #endif // V8_OBJECTS_H_ |
OLD | NEW |