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

Side by Side Diff: src/objects.h

Issue 707463002: Reland "Optimize function across closures." (again). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6769 matching lines...) Expand 10 before | Expand all | Expand 10 after
6780 inline void set_ast_node_count(int count); 6780 inline void set_ast_node_count(int count);
6781 6781
6782 inline int profiler_ticks() const; 6782 inline int profiler_ticks() const;
6783 inline void set_profiler_ticks(int ticks); 6783 inline void set_profiler_ticks(int ticks);
6784 6784
6785 // Inline cache age is used to infer whether the function survived a context 6785 // Inline cache age is used to infer whether the function survived a context
6786 // disposal or not. In the former case we reset the opt_count. 6786 // disposal or not. In the former case we reset the opt_count.
6787 inline int ic_age(); 6787 inline int ic_age();
6788 inline void set_ic_age(int age); 6788 inline void set_ic_age(int age);
6789 6789
6790 DECL_BOOLEAN_ACCESSORS(optimize_next_closure)
6791
6790 // Indicates if this function can be lazy compiled. 6792 // Indicates if this function can be lazy compiled.
6791 // This is used to determine if we can safely flush code from a function 6793 // This is used to determine if we can safely flush code from a function
6792 // when doing GC if we expect that the function will no longer be used. 6794 // when doing GC if we expect that the function will no longer be used.
6793 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation) 6795 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation)
6794 6796
6795 // Indicates if this function can be lazy compiled without a context. 6797 // Indicates if this function can be lazy compiled without a context.
6796 // This is used to determine if we can force compilation without reaching 6798 // This is used to determine if we can force compilation without reaching
6797 // the function through program execution but through other means (e.g. heap 6799 // the function through program execution but through other means (e.g. heap
6798 // iteration by the debugger). 6800 // iteration by the debugger).
6799 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation_without_context) 6801 DECL_BOOLEAN_ACCESSORS(allows_lazy_compilation_without_context)
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
7070 // the start_position_and_type field. 7072 // the start_position_and_type field.
7071 static const int kIsExpressionBit = 0; 7073 static const int kIsExpressionBit = 0;
7072 static const int kIsTopLevelBit = 1; 7074 static const int kIsTopLevelBit = 1;
7073 static const int kStartPositionShift = 2; 7075 static const int kStartPositionShift = 2;
7074 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 7076 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
7075 7077
7076 // Bit positions in compiler_hints. 7078 // Bit positions in compiler_hints.
7077 enum CompilerHints { 7079 enum CompilerHints {
7078 kAllowLazyCompilation, 7080 kAllowLazyCompilation,
7079 kAllowLazyCompilationWithoutContext, 7081 kAllowLazyCompilationWithoutContext,
7082 kOptimizeNextClosure,
7080 kOptimizationDisabled, 7083 kOptimizationDisabled,
7081 kStrictModeFunction, 7084 kStrictModeFunction,
7082 kUsesArguments, 7085 kUsesArguments,
7083 kHasDuplicateParameters, 7086 kHasDuplicateParameters,
7084 kNative, 7087 kNative,
7085 kInlineBuiltin, 7088 kInlineBuiltin,
7086 kBoundFunction, 7089 kBoundFunction,
7087 kIsAnonymous, 7090 kIsAnonymous,
7088 kNameShouldPrintAsAnonymous, 7091 kNameShouldPrintAsAnonymous,
7089 kIsFunction, 7092 kIsFunction,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
7295 7298
7296 // Tells whether or not this function has been optimized. 7299 // Tells whether or not this function has been optimized.
7297 inline bool IsOptimized(); 7300 inline bool IsOptimized();
7298 7301
7299 // Tells whether or not this function can be optimized. 7302 // Tells whether or not this function can be optimized.
7300 inline bool IsOptimizable(); 7303 inline bool IsOptimizable();
7301 7304
7302 // Mark this function for lazy recompilation. The function will be 7305 // Mark this function for lazy recompilation. The function will be
7303 // recompiled the next time it is executed. 7306 // recompiled the next time it is executed.
7304 void MarkForOptimization(); 7307 void MarkForOptimization();
7305 void MarkForConcurrentOptimization(); 7308 void AttemptConcurrentOptimization();
7306 void MarkInOptimizationQueue(); 7309 void MarkInOptimizationQueue();
7307 7310
7308 // Tells whether or not the function is already marked for lazy 7311 // Tells whether or not the function is already marked for lazy
7309 // recompilation. 7312 // recompilation.
7310 inline bool IsMarkedForOptimization(); 7313 inline bool IsMarkedForOptimization();
7311 inline bool IsMarkedForConcurrentOptimization(); 7314 inline bool IsMarkedForConcurrentOptimization();
7312 7315
7313 // Tells whether or not the function is on the concurrent recompilation queue. 7316 // Tells whether or not the function is on the concurrent recompilation queue.
7314 inline bool IsInOptimizationQueue(); 7317 inline bool IsInOptimizationQueue();
7315 7318
(...skipping 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after
10933 } else { 10936 } else {
10934 value &= ~(1 << bit_position); 10937 value &= ~(1 << bit_position);
10935 } 10938 }
10936 return value; 10939 return value;
10937 } 10940 }
10938 }; 10941 };
10939 10942
10940 } } // namespace v8::internal 10943 } } // namespace v8::internal
10941 10944
10942 #endif // V8_OBJECTS_H_ 10945 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698