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

Revert of [compiler] Prepare for partially shipping Ignition. (patchset #1...

Revert of [compiler] Prepare for partially shipping Ignition. (patchset #1 id:1 of https://codereview.chromium.org/2443573002/ )

Reason for revert:
Causes regressions: https://bugs.chromium.org/p/chromium/issues/detail?id=658711

Original issue's description:
> [compiler] Prepare for partially shipping Ignition.
>
> This prepares the code-base so that Ignition can be enabled on a certain
> subset of compilations without setting the {FLAG_ignition} flag (which
> enables Ignition on all compilations). We should not check the flag in
> question explicitly anywhere outside of the compiler heuristics.
>
> R=mvstanton@chromium.org

BUG=chromium:658711
TBR=mvstanton@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2448443002
Cr-Commit-Position: refs/heads/master@{#40534}
parent cc448ff0
......@@ -2268,10 +2268,11 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
source->info->set_script(script);
{
// Create a canonical handle scope for compiling Ignition bytecode. This is
// Create a canonical handle scope if compiling ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
// dereferencing handles.
i::CanonicalHandleScope canonical(isolate);
std::unique_ptr<i::CanonicalHandleScope> canonical;
if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
// Do the parsing tasks which need to be done on the main thread. This will
// also handle parse errors.
......
......@@ -4061,7 +4061,7 @@ bool Genesis::InstallExtensions(Handle<Context> native_context,
InstallExtension(isolate, "v8/statistics", &extension_states)) &&
(!FLAG_expose_trigger_failure ||
InstallExtension(isolate, "v8/trigger-failure", &extension_states)) &&
(!FLAG_trace_ignition_dispatches ||
(!(FLAG_ignition && FLAG_trace_ignition_dispatches) ||
InstallExtension(isolate, "v8/ignition-statistics",
&extension_states)) &&
InstallRequestedExtensions(isolate, extensions, &extension_states);
......
......@@ -151,10 +151,11 @@ bool CompilerDispatcherJob::FinalizeParsingOnMainThread() {
parse_info_->set_shared_info(shared_);
{
// Create a canonical handle scope for compiling Ignition bytecode. This
// is required by the constant array builder to de-duplicate objects
// without dereferencing handles.
CanonicalHandleScope canonical(isolate_);
// Create a canonical handle scope if compiling ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
// dereferencing handles.
std::unique_ptr<CanonicalHandleScope> canonical;
if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate_));
// Do the parsing tasks which need to be done on the main thread. This
// will also handle parse errors.
......
......@@ -252,10 +252,11 @@ void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
namespace {
bool Parse(ParseInfo* info) {
// Create a canonical handle scope for compiling Ignition bytecode. This is
// Create a canonical handle scope if compiling ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
// dereferencing handles.
CanonicalHandleScope canonical(info->isolate());
std::unique_ptr<CanonicalHandleScope> canonical;
if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(info->isolate()));
return Parser::ParseStatic(info);
}
......@@ -491,10 +492,13 @@ void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
}
bool Renumber(ParseInfo* parse_info) {
// Create a canonical handle scope for compiling Ignition bytecode. This is
// Create a canonical handle scope if compiling ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
// dereferencing handles.
CanonicalHandleScope canonical(parse_info->isolate());
std::unique_ptr<CanonicalHandleScope> canonical;
if (FLAG_ignition) {
canonical.reset(new CanonicalHandleScope(parse_info->isolate()));
}
if (!AstNumbering::Renumber(parse_info->isolate(), parse_info->zone(),
parse_info->literal())) {
......
......@@ -2922,7 +2922,7 @@ int Shell::Main(int argc, char* argv[]) {
RunShell(isolate);
}
if (i::FLAG_trace_ignition_dispatches &&
if (i::FLAG_ignition && i::FLAG_trace_ignition_dispatches &&
i::FLAG_trace_ignition_dispatches_output_file != nullptr) {
WriteIgnitionDispatchCountersFile(isolate);
}
......
......@@ -439,8 +439,8 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
if (!marker->IsSmi()) {
if (maybe_function->IsSmi()) {
return NONE;
} else if (IsInterpreterFramePc(iterator->isolate(),
*(state->pc_address))) {
} else if (FLAG_ignition && IsInterpreterFramePc(iterator->isolate(),
*(state->pc_address))) {
return INTERPRETED;
} else {
return JAVA_SCRIPT;
......
......@@ -1633,7 +1633,7 @@ class MarkCompactCollector::EvacuateVisitorBase
DCHECK_OBJECT_SIZE(size);
DCHECK(IsAligned(size, kPointerSize));
heap_->CopyBlock(dst_addr, src_addr, size);
if ((mode == kProfiled) && dst->IsBytecodeArray()) {
if ((mode == kProfiled) && FLAG_ignition && dst->IsBytecodeArray()) {
PROFILE(heap_->isolate(),
CodeMoveEvent(AbstractCode::cast(src), dst_addr));
}
......
......@@ -242,8 +242,9 @@ SharedFunctionInfo* IC::GetSharedFunctionInfo() const {
// corresponding to the frame.
StackFrameIterator it(isolate());
while (it.frame()->fp() != this->fp()) it.Advance();
if (it.frame()->type() == StackFrame::STUB) {
// We might need to advance over bytecode handler frame for Ignition.
if (FLAG_ignition && it.frame()->type() == StackFrame::STUB) {
// Advance over bytecode handler frame.
// TODO(rmcilroy): Remove this once bytecode handlers don't need a frame.
it.Advance();
}
JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
......
......@@ -2535,7 +2535,9 @@ bool Isolate::Init(Deserializer* des) {
}
load_stub_cache_->Initialize();
store_stub_cache_->Initialize();
interpreter_->Initialize();
if (FLAG_ignition || serializer_enabled()) {
interpreter_->Initialize();
}
heap_.NotifyDeserializationComplete();
}
......
......@@ -1484,6 +1484,8 @@ void Logger::LogCodeObjects() {
}
void Logger::LogBytecodeHandlers() {
if (!FLAG_ignition) return;
const interpreter::OperandScale kOperandScales[] = {
#define VALUE(Name, _) interpreter::OperandScale::k##Name,
OPERAND_SCALE_LIST(VALUE)
......
......@@ -81,8 +81,9 @@ static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) {
frame_iterator.Advance();
CHECK(frame_iterator.frame()->is_construct());
frame_iterator.Advance();
if (frame_iterator.frame()->type() == i::StackFrame::STUB) {
if (i::FLAG_ignition) {
// Skip over bytecode handler frame.
CHECK(frame_iterator.frame()->type() == i::StackFrame::STUB);
frame_iterator.Advance();
}
i::StackFrame* calling_frame = frame_iterator.frame();
......
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