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

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

Issue 1672873003: Bailout if field state changed during background compilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comment 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/block_scheduler.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 static bool always_optimize(); 96 static bool always_optimize();
97
98 // Notify the compiler that background (optimized) compilation has failed
99 // because the mutator thread changed the state (e.g., deoptimization,
100 // deferred loading). The background compilation may retry to compile
101 // the same function later.
102 static void AbortBackgroundCompilation(intptr_t deopt_id);
97 }; 103 };
98 104
99 105
100 // Class to run optimizing compilation in a background thread. 106 // Class to run optimizing compilation in a background thread.
101 // Current implementation: one task per isolate, it dies with the owning 107 // Current implementation: one task per isolate, it dies with the owning
102 // isolate. 108 // isolate.
103 // No OSR compilation in the background compiler. 109 // No OSR compilation in the background compiler.
104 class BackgroundCompiler : public ThreadPool::Task { 110 class BackgroundCompiler : public ThreadPool::Task {
105 public: 111 public:
106 static void EnsureInit(Thread* thread); 112 static void EnsureInit(Thread* thread);
(...skipping 20 matching lines...) Expand all
127 Monitor* done_monitor_; // Notify/wait that the thread is done. 133 Monitor* done_monitor_; // Notify/wait that the thread is done.
128 134
129 BackgroundCompilationQueue* function_queue_; 135 BackgroundCompilationQueue* function_queue_;
130 136
131 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); 137 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler);
132 }; 138 };
133 139
134 } // namespace dart 140 } // namespace dart
135 141
136 #endif // VM_COMPILER_H_ 142 #endif // VM_COMPILER_H_
OLDNEW
« no previous file with comments | « runtime/vm/block_scheduler.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698