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

Unified Diff: runtime/vm/code_generator.cc

Issue 1410363005: Make ICData changes thread safe (first compute array, then set it). Install code in the main thread… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 2 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/compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 4ab89ca6e7260fe4025b94ac6fff64b7ad9b8468..d2c5a9b3848544f922f6accb1a81d651dacafa97 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1387,7 +1387,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
ASSERT(function.unoptimized_code() != Object::null());
intptr_t osr_id =
Code::Handle(function.unoptimized_code()).GetDeoptIdForOsr(frame->pc());
- ASSERT(osr_id != Thread::kNoDeoptId);
+ ASSERT(osr_id != Compiler::kNoOSRDeoptId);
if (FLAG_trace_osr) {
OS::Print("Attempting OSR for %s at id=%" Pd ", count=%" Pd "\n",
function.ToFullyQualifiedCString(),
@@ -1457,6 +1457,8 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
BackgroundCompiler::EnsureInit(thread);
ASSERT(isolate->background_compiler() != NULL);
isolate->background_compiler()->CompileOptimized(function);
+ // Install all generated optimized code in the mutator thread (this one).
+ isolate->background_compiler()->InstallGeneratedCode();
// Continue in the same code.
arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
return;
« no previous file with comments | « no previous file | runtime/vm/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698