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

Unified Diff: src/compiler.h

Issue 616263003: Fix data race when concurrent compilation is aborted due to dependency change. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reworded comment Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index e9176d322d950b0b3c0d9c8ef0afd328a13561ed..4564b9004f7a333026a45520cc0f4fd8f88f91db 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -85,8 +85,7 @@ class CompilationInfo {
kInliningEnabled = 1 << 17,
kTypingEnabled = 1 << 18,
kDisableFutureOptimization = 1 << 19,
- kAbortedDueToDependency = 1 << 20,
- kToplevel = 1 << 21
+ kToplevel = 1 << 20
};
CompilationInfo(Handle<JSFunction> closure, Zone* zone);
@@ -371,12 +370,12 @@ class CompilationInfo {
void AbortDueToDependencyChange() {
DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
- SetFlag(kAbortedDueToDependency);
+ aborted_due_to_dependency_change_ = true;
}
bool HasAbortedDueToDependencyChange() const {
DCHECK(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
- return GetFlag(kAbortedDueToDependency);
+ return aborted_due_to_dependency_change_;
}
bool HasSameOsrEntry(Handle<JSFunction> function, BailoutId osr_ast_id) {
@@ -515,6 +514,10 @@ class CompilationInfo {
bool ast_value_factory_owned_;
AstNode::IdGen ast_node_id_gen_;
+ // This flag is used by the main thread to track whether this compilation
+ // should be abandoned due to dependency change.
+ bool aborted_due_to_dependency_change_;
+
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
};
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698