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

Unified Diff: src/objects.cc

Issue 755883003: Refactor use of Isolate::use_crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assert Created 6 years, 1 month 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 | « src/objects.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 991466d6131c73262c00af185d7bf0cb01929e3f..82ff09b317970bd03f1cca12f1b8878f3ce719ed 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9409,12 +9409,14 @@ void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
void JSFunction::MarkForOptimization() {
+ Isolate* isolate = GetIsolate();
+ DCHECK(isolate->use_crankshaft());
DCHECK(!IsOptimized());
DCHECK(shared()->allows_lazy_compilation() ||
code()->optimizable());
DCHECK(!shared()->is_generator());
set_code_no_write_barrier(
- GetIsolate()->builtins()->builtin(Builtins::kCompileOptimized));
+ isolate->builtins()->builtin(Builtins::kCompileOptimized));
// No write barrier required, since the builtin is part of the root set.
}
@@ -9434,6 +9436,7 @@ void JSFunction::AttemptConcurrentOptimization() {
// recompilation race. This goes away as soon as OSR becomes one-shot.
return;
}
+ DCHECK(isolate->use_crankshaft());
DCHECK(!IsInOptimizationQueue());
DCHECK(is_compiled() || isolate->DebuggerHasBreakPoints());
DCHECK(!IsOptimized());
@@ -9451,24 +9454,6 @@ void JSFunction::AttemptConcurrentOptimization() {
}
-void JSFunction::MarkInOptimizationQueue() {
- // We can only arrive here via the concurrent-recompilation builtin. If
- // break points were set, the code would point to the lazy-compile builtin.
- DCHECK(!GetIsolate()->DebuggerHasBreakPoints());
- DCHECK(IsMarkedForConcurrentOptimization() && !IsOptimized());
- DCHECK(shared()->allows_lazy_compilation() || code()->optimizable());
- DCHECK(GetIsolate()->concurrent_recompilation_enabled());
- if (FLAG_trace_concurrent_recompilation) {
- PrintF(" ** Queueing ");
- ShortPrint();
- PrintF(" for concurrent recompilation.\n");
- }
- set_code_no_write_barrier(
- GetIsolate()->builtins()->builtin(Builtins::kInOptimizationQueue));
- // No write barrier required, since the builtin is part of the root set.
-}
-
-
Handle<JSFunction> JSFunction::CloneClosure(Handle<JSFunction> function) {
Isolate* isolate = function->GetIsolate();
Handle<Map> map(function->map());
« no previous file with comments | « src/objects.h ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698