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

Unified Diff: runtime/vm/code_generator.cc

Issue 1424703004: Getting rid of Isolate::current_zone() usage. Pass thread instead of isolate where it makes sense. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix build 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 | « runtime/lib/vmservice.cc ('k') | runtime/vm/debugger.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..a8c0ffbd5aee516bd6d22bf9e95b9af6f6c0d9a7 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1214,10 +1214,11 @@ DEFINE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod, 3) {
}
-static bool CanOptimizeFunction(const Function& function, Isolate* isolate) {
+static bool CanOptimizeFunction(const Function& function, Thread* thread) {
const intptr_t kLowInvocationCount = -100000000;
+ Isolate* isolate = thread->isolate();
if (isolate->debugger()->IsStepping() ||
- isolate->debugger()->HasBreakpoint(function)) {
+ isolate->debugger()->HasBreakpoint(function, thread->zone())) {
// We cannot set breakpoints and single step in optimized code,
// so do not optimize the function.
function.set_usage_counter(0);
@@ -1378,7 +1379,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
ASSERT(function.HasCode());
// Don't do OSR on intrinsified functions: The intrinsic code expects to be
// called like a regular function and can't be entered via OSR.
- if (!CanOptimizeFunction(function, isolate) || function.is_intrinsic()) {
+ if (!CanOptimizeFunction(function, thread) || function.is_intrinsic()) {
return;
}
@@ -1447,7 +1448,7 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
ASSERT(!function.IsNull());
ASSERT(function.HasCode());
- if (CanOptimizeFunction(function, isolate)) {
+ if (CanOptimizeFunction(function, thread)) {
if (FLAG_background_compilation) {
// Reduce the chance of triggering optimization while the function is
// being optimized in the background. INT_MIN should ensure that it takes
« no previous file with comments | « runtime/lib/vmservice.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698