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

Side by Side Diff: runtime/vm/compiler.h

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed unnecessary includes Created 4 years, 10 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
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/compiler.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_COMPILER_H_ 5 #ifndef VM_COMPILER_H_
6 #define VM_COMPILER_H_ 6 #define VM_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 // Generates local var descriptors and sets it in 'code'. Do not call if the 87 // Generates local var descriptors and sets it in 'code'. Do not call if the
88 // local var descriptor already exists. 88 // local var descriptor already exists.
89 static void ComputeLocalVarDescriptors(const Code& code); 89 static void ComputeLocalVarDescriptors(const Code& code);
90 90
91 // Eagerly compiles all functions in a class. 91 // Eagerly compiles all functions in a class.
92 // 92 //
93 // Returns Error::null() if there is no compilation error. 93 // Returns Error::null() if there is no compilation error.
94 static RawError* CompileAllFunctions(const Class& cls); 94 static RawError* CompileAllFunctions(const Class& cls);
95 95
96 // The following global flags are changed by --noopt handler; 96 static bool always_optimize();
97 // the flags are changed when generating best unoptimized code (no runtime
98 // feedback, no deoptimization).
99
100 // Default: false.
101 static bool always_optimize() { return always_optimize_; }
102 static void set_always_optimize(bool value) { always_optimize_ = value; }
103
104 static bool allow_recompilation() { return allow_recompilation_; }
105 static void set_allow_recompilation(bool value) {
106 allow_recompilation_ = value;
107 }
108
109 private:
110 static bool always_optimize_;
111 static bool allow_recompilation_;
112 }; 97 };
113 98
114 99
115 // Class to run optimizing compilation in a background thread. 100 // Class to run optimizing compilation in a background thread.
116 // Current implementation: one task per isolate, it dies with the owning 101 // Current implementation: one task per isolate, it dies with the owning
117 // isolate. 102 // isolate.
118 // No OSR compilation in the background compiler. 103 // No OSR compilation in the background compiler.
119 class BackgroundCompiler : public ThreadPool::Task { 104 class BackgroundCompiler : public ThreadPool::Task {
120 public: 105 public:
121 static void EnsureInit(Thread* thread); 106 static void EnsureInit(Thread* thread);
(...skipping 20 matching lines...) Expand all
142 Monitor* done_monitor_; // Notify/wait that the thread is done. 127 Monitor* done_monitor_; // Notify/wait that the thread is done.
143 128
144 BackgroundCompilationQueue* function_queue_; 129 BackgroundCompilationQueue* function_queue_;
145 130
146 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); 131 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler);
147 }; 132 };
148 133
149 } // namespace dart 134 } // namespace dart
150 135
151 #endif // VM_COMPILER_H_ 136 #endif // VM_COMPILER_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698