Commit e31e5e91 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[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

Review-Url: https://chromiumcodereview.appspot.com/2443573002
Cr-Commit-Position: refs/heads/master@{#40507}
parent 4a31323e
......@@ -2268,11 +2268,10 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
source->info->set_script(script);
{
// Create a canonical handle scope if compiling ignition bytecode. This is
// Create a canonical handle scope for compiling Ignition bytecode. This is
// required by the constant array builder to de-duplicate objects without
// dereferencing handles.
std::unique_ptr<i::CanonicalHandleScope> canonical;
if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
i::CanonicalHandleScope canonical(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_ignition && FLAG_trace_ignition_dispatches) ||
(!FLAG_trace_ignition_dispatches ||
InstallExtension(isolate, "v8/ignition-statistics",
&extension_states)) &&
InstallRequestedExtensions(isolate, extensions, &extension_states);
......
......@@ -151,11 +151,10 @@ bool CompilerDispatcherJob::FinalizeParsingOnMainThread() {
parse_info_->set_shared_info(shared_);
{
// 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_));
// 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_);
// Do the parsing tasks which need to be done on the main thread. This
// will also handle parse errors.
......
......@@ -252,11 +252,10 @@ void CompilationJob::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
namespace {
bool Parse(ParseInfo* info) {
// Create a canonical handle scope if compiling ignition bytecode. This is
// Create a canonical handle scope for 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(info->isolate()));
CanonicalHandleScope canonical(info->isolate());
return Parser::ParseStatic(info);
}
......@@ -492,13 +491,10 @@ void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) {
}
bool Renumber(ParseInfo* parse_info) {
// Create a canonical handle scope if compiling ignition bytecode. This is
// Create a canonical handle scope for 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(parse_info->isolate()));
}
CanonicalHandleScope canonical(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_ignition && i::FLAG_trace_ignition_dispatches &&
if (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 (FLAG_ignition && IsInterpreterFramePc(iterator->isolate(),
*(state->pc_address))) {
} else if (IsInterpreterFramePc(iterator->isolate(),
*(state->pc_address))) {
return INTERPRETED;
} else {
return JAVA_SCRIPT;
......
......@@ -1632,7 +1632,7 @@ class MarkCompactCollector::EvacuateVisitorBase
DCHECK_OBJECT_SIZE(size);
DCHECK(IsAligned(size, kPointerSize));
heap_->CopyBlock(dst_addr, src_addr, size);
if ((mode == kProfiled) && FLAG_ignition && dst->IsBytecodeArray()) {
if ((mode == kProfiled) && dst->IsBytecodeArray()) {
PROFILE(heap_->isolate(),
CodeMoveEvent(AbstractCode::cast(src), dst_addr));
}
......
......@@ -242,9 +242,8 @@ SharedFunctionInfo* IC::GetSharedFunctionInfo() const {
// corresponding to the frame.
StackFrameIterator it(isolate());
while (it.frame()->fp() != this->fp()) it.Advance();
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.
if (it.frame()->type() == StackFrame::STUB) {
// We might need to advance over bytecode handler frame for Ignition.
it.Advance();
}
JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
......
......@@ -2535,9 +2535,7 @@ bool Isolate::Init(Deserializer* des) {
}
load_stub_cache_->Initialize();
store_stub_cache_->Initialize();
if (FLAG_ignition || serializer_enabled()) {
interpreter_->Initialize();
}
interpreter_->Initialize();
heap_.NotifyDeserializationComplete();
}
......
......@@ -1484,8 +1484,6 @@ 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,9 +81,8 @@ static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) {
frame_iterator.Advance();
CHECK(frame_iterator.frame()->is_construct());
frame_iterator.Advance();
if (i::FLAG_ignition) {
if (frame_iterator.frame()->type() == i::StackFrame::STUB) {
// 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