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

Unified Diff: runtime/vm/compiler.cc

Issue 1857273002: Fix detection if a function was compiled, (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments Created 4 years, 8 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 | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index cad89e5569697eeabd475731d0f0e6f0a445b1ec..26e51fef239ea5441738b8d239fbafab070bfdf3 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1109,6 +1109,7 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
bool optimized,
intptr_t osr_id) {
ASSERT(!FLAG_precompiled_mode);
+ ASSERT(!optimized || function.was_compiled());
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
Thread* const thread = Thread::Current();
@@ -1165,7 +1166,11 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
}
const bool success = helper.Compile(pipeline);
- if (!success) {
+ if (success) {
+ if (!optimized) {
+ function.set_was_compiled(true);
+ }
+ } else {
if (optimized) {
if (Compiler::IsBackgroundCompilation()) {
// Try again later, background compilation may abort because of
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698