| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 6765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6776 inline void set_ast_node_count(int count); | 6776 inline void set_ast_node_count(int count); |
| 6777 | 6777 |
| 6778 inline int profiler_ticks() const; | 6778 inline int profiler_ticks() const; |
| 6779 inline void set_profiler_ticks(int ticks); | 6779 inline void set_profiler_ticks(int ticks); |
| 6780 | 6780 |
| 6781 // Inline cache age is used to infer whether the function survived a context | 6781 // Inline cache age is used to infer whether the function survived a context |
| 6782 // disposal or not. In the former case we reset the opt_count. | 6782 // disposal or not. In the former case we reset the opt_count. |
| 6783 inline int ic_age(); | 6783 inline int ic_age(); |
| 6784 inline void set_ic_age(int age); | 6784 inline void set_ic_age(int age); |
| 6785 | 6785 |
| 6786 DECL_BOOLEAN_ACCESSORS(optimize_next_closure) |
| 6787 |
| 6786 // Indicates if this function can be lazy compiled. | 6788 // Indicates if this function can be lazy compiled. |
| 6787 // This is used to determine if we can safely flush code from a function | 6789 // This is used to determine if we can safely flush code from a function |
| 6788 // when doing GC if we expect that the function will no longer be used. | 6790 // when doing GC if we expect that the function will no longer be used. |
| 6789 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation) | 6791 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation) |
| 6790 | 6792 |
| 6791 // Indicates if this function can be lazy compiled without a context. | 6793 // Indicates if this function can be lazy compiled without a context. |
| 6792 // This is used to determine if we can force compilation without reaching | 6794 // This is used to determine if we can force compilation without reaching |
| 6793 // the function through program execution but through other means (e.g. heap | 6795 // the function through program execution but through other means (e.g. heap |
| 6794 // iteration by the debugger). | 6796 // iteration by the debugger). |
| 6795 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation_without_context) | 6797 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation_without_context) |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7066 // the start_position_and_type field. | 7068 // the start_position_and_type field. |
| 7067 static const int kIsExpressionBit = 0; | 7069 static const int kIsExpressionBit = 0; |
| 7068 static const int kIsTopLevelBit = 1; | 7070 static const int kIsTopLevelBit = 1; |
| 7069 static const int kStartPositionShift = 2; | 7071 static const int kStartPositionShift = 2; |
| 7070 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 7072 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
| 7071 | 7073 |
| 7072 // Bit positions in compiler_hints. | 7074 // Bit positions in compiler_hints. |
| 7073 enum CompilerHints { | 7075 enum CompilerHints { |
| 7074 kAllowLazyCompilation, | 7076 kAllowLazyCompilation, |
| 7075 kAllowLazyCompilationWithoutContext, | 7077 kAllowLazyCompilationWithoutContext, |
| 7078 kOptimizeNextClosure, |
| 7076 kOptimizationDisabled, | 7079 kOptimizationDisabled, |
| 7077 kStrictModeFunction, | 7080 kStrictModeFunction, |
| 7078 kUsesArguments, | 7081 kUsesArguments, |
| 7079 kHasDuplicateParameters, | 7082 kHasDuplicateParameters, |
| 7080 kNative, | 7083 kNative, |
| 7081 kInlineBuiltin, | 7084 kInlineBuiltin, |
| 7082 kBoundFunction, | 7085 kBoundFunction, |
| 7083 kIsAnonymous, | 7086 kIsAnonymous, |
| 7084 kNameShouldPrintAsAnonymous, | 7087 kNameShouldPrintAsAnonymous, |
| 7085 kIsFunction, | 7088 kIsFunction, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7291 | 7294 |
| 7292 // Tells whether or not this function has been optimized. | 7295 // Tells whether or not this function has been optimized. |
| 7293 inline bool IsOptimized(); | 7296 inline bool IsOptimized(); |
| 7294 | 7297 |
| 7295 // Tells whether or not this function can be optimized. | 7298 // Tells whether or not this function can be optimized. |
| 7296 inline bool IsOptimizable(); | 7299 inline bool IsOptimizable(); |
| 7297 | 7300 |
| 7298 // Mark this function for lazy recompilation. The function will be | 7301 // Mark this function for lazy recompilation. The function will be |
| 7299 // recompiled the next time it is executed. | 7302 // recompiled the next time it is executed. |
| 7300 void MarkForOptimization(); | 7303 void MarkForOptimization(); |
| 7301 void MarkForConcurrentOptimization(); | 7304 void AttemptConcurrentOptimization(); |
| 7302 void MarkInOptimizationQueue(); | 7305 void MarkInOptimizationQueue(); |
| 7303 | 7306 |
| 7304 // Tells whether or not the function is already marked for lazy | 7307 // Tells whether or not the function is already marked for lazy |
| 7305 // recompilation. | 7308 // recompilation. |
| 7306 inline bool IsMarkedForOptimization(); | 7309 inline bool IsMarkedForOptimization(); |
| 7307 inline bool IsMarkedForConcurrentOptimization(); | 7310 inline bool IsMarkedForConcurrentOptimization(); |
| 7308 | 7311 |
| 7309 // Tells whether or not the function is on the concurrent recompilation queue. | 7312 // Tells whether or not the function is on the concurrent recompilation queue. |
| 7310 inline bool IsInOptimizationQueue(); | 7313 inline bool IsInOptimizationQueue(); |
| 7311 | 7314 |
| (...skipping 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10929 } else { | 10932 } else { |
| 10930 value &= ~(1 << bit_position); | 10933 value &= ~(1 << bit_position); |
| 10931 } | 10934 } |
| 10932 return value; | 10935 return value; |
| 10933 } | 10936 } |
| 10934 }; | 10937 }; |
| 10935 | 10938 |
| 10936 } } // namespace v8::internal | 10939 } } // namespace v8::internal |
| 10937 | 10940 |
| 10938 #endif // V8_OBJECTS_H_ | 10941 #endif // V8_OBJECTS_H_ |
| OLD | NEW |