Reviewers: rossberg,
Message:
This is a first step towards regaining TurboFan test coverage. It allows
--always-opt to go all the way to GetOptimizedCodeNow in compiler.cc, where
graph creation will bailout in OptimizedCompileJob::CreateGraph and abort.
Description:
Allow --always-opt to go further into the pipeline (1).
[email protected]
Please review this at https://codereview.chromium.org/841213003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -10 lines):
M src/compiler.cc
M src/factory.cc
M src/objects.cc
M src/runtime/runtime-test.cc
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
0136e5ba16c5417c17f452cfbc2c4bd68d7c1ccd..544b4dd4595d0a07ec6a23a30bdc062882c5c4bc
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -967,7 +967,6 @@ MaybeHandle<Code>
Compiler::GetLazyCode(Handle<JSFunction> function) {
Code);
if (FLAG_always_opt && isolate->use_crankshaft() &&
- !info.shared_info()->optimization_disabled() &&
!isolate->DebuggerHasBreakPoints()) {
Handle<Code> opt_code;
if (Compiler::GetOptimizedCode(
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index
96883052dad1a9105cd23dd0e641952821fbc730..fe99aa63227892c8f9527935c3f4bfe824b8f7fa
100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1362,7 +1362,7 @@ static bool ShouldOptimizeNewClosure(Isolate* isolate,
Handle<SharedFunctionInfo> info) {
return isolate->use_crankshaft() && !info->is_toplevel() &&
info->is_compiled() && info->allows_lazy_compilation() &&
- !info->optimization_disabled()
&& !isolate->DebuggerHasBreakPoints();
+ !isolate->DebuggerHasBreakPoints();
}
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
9edbdc9623475e24b2cfbc622a8f12a40c9eccde..cbca81753b59b90ec9f25ae4e7e6607bec5a2dc2
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9437,9 +9437,7 @@ void JSFunction::MarkForOptimization() {
Isolate* isolate = GetIsolate();
DCHECK(isolate->use_crankshaft());
DCHECK(!IsOptimized());
- DCHECK(shared()->allows_lazy_compilation() ||
- code()->optimizable());
- DCHECK(!shared()->is_generator());
+ DCHECK(shared()->allows_lazy_compilation() || code()->optimizable());
set_code_no_write_barrier(
isolate->builtins()->builtin(Builtins::kCompileOptimized));
// No write barrier required, since the builtin is part of the root set.
@@ -9466,7 +9464,6 @@ void JSFunction::AttemptConcurrentOptimization() {
DCHECK(is_compiled() || isolate->DebuggerHasBreakPoints());
DCHECK(!IsOptimized());
DCHECK(shared()->allows_lazy_compilation() || code()->optimizable());
- DCHECK(!shared()->is_generator());
DCHECK(isolate->concurrent_recompilation_enabled());
if (FLAG_trace_concurrent_recompilation) {
PrintF(" ** Marking ");
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index
b4b90e2c5824463d548bc2816333caee7f8314f0..68169af225ec340e8d566ad603cef4bb54bf3f4b
100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -53,12 +53,10 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
HandleScope scope(isolate);
RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
- // The following two assertions are lifted from the DCHECKs inside
+ // The following assertion was lifted from the DCHECK inside
// JSFunction::MarkForOptimization().
- RUNTIME_ASSERT(!function->shared()->is_generator());
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() ||
- (function->code()->kind() == Code::FUNCTION &&
- function->code()->optimizable()));
+ function->code()->optimizable());
if (!isolate->use_crankshaft()) return
isolate->heap()->undefined_value();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.