Commit 6daecbd5 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Allow --always-opt to go further into the pipeline (2).

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/855873002

Cr-Commit-Position: refs/heads/master@{#26131}
parent 6dc82c18
......@@ -2509,11 +2509,6 @@ bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) {
isolate(), builtins, Builtins::GetName(id)).ToHandleChecked();
Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
builtins->set_javascript_builtin(id, *function);
// TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
// the correct solution is to restore the context register after invoking
// builtins from full-codegen.
function->shared()->set_disable_optimization_reason(kOptimizationDisabled);
function->shared()->set_optimization_disabled(true);
if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) {
return false;
}
......
......@@ -344,13 +344,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
DCHECK(info()->IsOptimizing());
DCHECK(!info()->IsCompilingForDebugging());
// Optimization could have been disabled by the parser.
if (info()->shared_info()->optimization_disabled()) {
return AbortOptimization(
info()->shared_info()->disable_optimization_reason());
}
// Do not use crankshaft if we need to be able to set break points.
// Do not use Crankshaft/TurboFan if we need to be able to set break points.
if (isolate()->DebuggerHasBreakPoints()) {
return RetryOptimization(kDebuggerHasBreakPoints);
}
......@@ -441,6 +435,13 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
// Type-check the function.
AstTyper::Run(info());
// Optimization could have been disabled by the parser. Note that this check
// is only needed because the Hydrogen graph builder is missing some bailouts.
if (info()->shared_info()->optimization_disabled()) {
return AbortOptimization(
info()->shared_info()->disable_optimization_reason());
}
graph_builder_ = (FLAG_hydrogen_track_positions || FLAG_trace_ic)
? new(info()->zone()) HOptimizedGraphBuilderWithPositions(info())
: new(info()->zone()) HOptimizedGraphBuilder(info());
......
......@@ -809,12 +809,14 @@ void AstGraphBuilder::VisitForOfStatement(ForOfStatement* stmt) {
void AstGraphBuilder::VisitTryCatchStatement(TryCatchStatement* stmt) {
UNREACHABLE();
// TODO(turbofan): Implement try-catch here.
SetStackOverflow();
}
void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
UNREACHABLE();
// TODO(turbofan): Implement try-catch here.
SetStackOverflow();
}
......@@ -1305,11 +1307,8 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
void AstGraphBuilder::VisitYield(Yield* expr) {
VisitForValue(expr->generator_object());
VisitForValue(expr->expression());
environment()->Pop();
environment()->Pop();
// TODO(turbofan): VisitYield
// TODO(turbofan): Implement yield here.
SetStackOverflow();
ast_context()->ProduceValue(jsgraph()->UndefinedConstant());
}
......@@ -1402,7 +1401,7 @@ void AstGraphBuilder::VisitCall(Call* expr) {
break;
}
case Call::SUPER_CALL: {
// todo(dslomov): implement super calls in turbofan.
// TODO(dslomov): Implement super calls.
UNIMPLEMENTED();
break;
}
......@@ -1726,7 +1725,9 @@ void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) {
void AstGraphBuilder::VisitSuperReference(SuperReference* expr) {
UNREACHABLE();
// TODO(turbofan): Implement super here.
SetStackOverflow();
ast_context()->ProduceValue(jsgraph()->UndefinedConstant());
}
......
......@@ -8,6 +8,7 @@
#include <sstream>
#include "src/base/platform/elapsed-timer.h"
#include "src/bootstrapper.h" // TODO(mstarzinger): Only temporary.
#include "src/compiler/ast-graph-builder.h"
#include "src/compiler/ast-loop-assignment-analyzer.h"
#include "src/compiler/basic-block-instrumentor.h"
......@@ -754,6 +755,11 @@ Handle<Code> Pipeline::GenerateCode() {
// TODO(turbofan): Make OSR work with inner loops and remove this bailout.
if (info()->is_osr() && !FLAG_turbo_osr) return Handle<Code>::null();
// TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
// the correct solution is to restore the context register after invoking
// builtins from full-codegen.
if (isolate()->bootstrapper()->IsActive()) return Handle<Code>::null();
ZonePool zone_pool(isolate());
SmartPointer<PipelineStatistics> pipeline_statistics;
......
......@@ -90,6 +90,11 @@
# BUG(3742).
'test-mark-compact/MarkCompactCollector': [PASS, ['arch==arm', NO_VARIANTS]],
# TODO(jarin/mstarzinger): Investigate debugger issues with TurboFan.
'test-debug/DebugStepNatives': [PASS, NO_VARIANTS],
'test-debug/DebugStepFunctionApply': [PASS, NO_VARIANTS],
'test-debug/DebugStepFunctionCall': [PASS, NO_VARIANTS],
# TODO(jarin): Some tests don't like --turbo-deoptimzation very much.
'test-api/ApiUncaughtExceptionInObjectObserve': [PASS, NO_VARIANTS],
'test-api/GetPrototypeAccessControl': [PASS, NO_VARIANTS],
......
......@@ -67,8 +67,10 @@
'array-feedback': [PASS, NO_VARIANTS],
'compare-known-objects-slow': [PASS, NO_VARIANTS],
'elements-kind': [PASS, NO_VARIANTS],
'opt-elements-kind': [PASS, NO_VARIANTS],
# Some tests are just too slow to run for now.
'big-object-literal': [PASS, NO_VARIANTS],
'bit-not': [PASS, NO_VARIANTS],
'json2': [PASS, NO_VARIANTS],
'packed-elements': [PASS, NO_VARIANTS],
......@@ -82,6 +84,25 @@
# not work, but we expect it to not crash.
'debug-step-turbofan': [PASS, FAIL],
# TODO(jarin/mstarzinger): Investigate debugger issues with TurboFan.
'debug-evaluate-const': [PASS, NO_VARIANTS],
'debug-evaluate-locals': [PASS, NO_VARIANTS],
'debug-liveedit-check-stack': [PASS, NO_VARIANTS], # only in no-snap mode.
'debug-liveedit-double-call': [PASS, NO_VARIANTS],
'debug-step-stub-callfunction': [PASS, NO_VARIANTS],
'debug-set-variable-value': [PASS, NO_VARIANTS],
'debug-stepin-accessor': [PASS, NO_VARIANTS],
'debug-stepin-builtin': [PASS, NO_VARIANTS],
'debug-stepin-constructor': [PASS, NO_VARIANTS],
'debug-stepin-function-call': [PASS, NO_VARIANTS],
'debug-stepnext-do-while': [PASS, NO_VARIANTS],
'debug-stepout-scope-part1': [PASS, NO_VARIANTS],
'debug-stepout-scope-part2': [PASS, NO_VARIANTS],
'debug-stepout-scope-part3': [PASS, NO_VARIANTS],
'es6/debug-stepin-microtasks': [PASS, NO_VARIANTS],
'es6/debug-stepnext-for': [PASS, NO_VARIANTS],
'harmony/debug-evaluate-blockscopes': [PASS, NO_VARIANTS],
# TODO(jarin): Some tests don't like --turbo-deoptimzation very much.
'asm/embenchen/lua_binarytrees': [SKIP],
'es6/symbols': [PASS, NO_VARIANTS],
......@@ -90,6 +111,9 @@
'regress/regress-354433': [PASS, NO_VARIANTS], # only on ARM simulator.
'regress/regress-crbug-259300': [PASS, NO_VARIANTS],
# TODO(dslomov): Implement super calls.
'harmony/super': [PASS, NO_VARIANTS],
# TODO(arv): TurboFan does not yet add [[HomeObject]] as needed.
'harmony/object-literals-super': [PASS, NO_VARIANTS],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment