#include "src/maglev/maglev-code-generator.h"
#include <algorithm>
#include "src/base/hashmap.h"
#include "src/base/logging.h"
#include "src/codegen/code-desc.h"
#include "src/codegen/compiler.h"
#include "src/codegen/interface-descriptors-inl.h"
#include "src/codegen/interface-descriptors.h"
#include "src/codegen/register.h"
#include "src/codegen/reglist.h"
#include "src/codegen/safepoint-table.h"
#include "src/codegen/source-position.h"
#include "src/common/globals.h"
#include "src/compiler/backend/instruction.h"
#include "src/deoptimizer/deoptimize-reason.h"
#include "src/deoptimizer/deoptimizer.h"
#include "src/deoptimizer/frame-translation-builder.h"
#include "src/execution/frame-constants.h"
#include "src/flags/flags.h"
#include "src/handles/global-handles-inl.h"
#include "src/interpreter/bytecode-register.h"
#include "src/maglev/maglev-assembler-inl.h"
#include "src/maglev/maglev-code-gen-state.h"
#include "src/maglev/maglev-compilation-unit.h"
#include "src/maglev/maglev-graph-labeller.h"
#include "src/maglev/maglev-graph-printer.h"
#include "src/maglev/maglev-graph-processor.h"
#include "src/maglev/maglev-graph.h"
#include "src/maglev/maglev-ir-inl.h"
#include "src/maglev/maglev-regalloc-data.h"
#include "src/objects/code-inl.h"
#include "src/objects/deoptimization-data.h"
#include "src/utils/identity-map.h"
namespace v8 {
namespace internal {
namespace maglev {
#define __ …
namespace {
template <typename RegisterT>
struct RegisterTHelper;
template <>
struct RegisterTHelper<Register> { … };
template <>
struct RegisterTHelper<DoubleRegister> { … };
enum NeedsDecompression { … };
template <typename RegisterT, bool DecompressIfNeeded>
class ParallelMoveResolver { … };
class ExceptionHandlerTrampolineBuilder { … };
class MaglevCodeGeneratingNodeProcessor { … };
class SafepointingNodeProcessor { … };
namespace {
DeoptimizationFrameTranslation::FrameCount GetFrameCount(
const DeoptFrame* deopt_frame) { … }
BytecodeOffset GetBytecodeOffset(const DeoptFrame& deopt_frame) { … }
SourcePosition GetSourcePosition(const DeoptFrame& deopt_frame) { … }
compiler::SharedFunctionInfoRef GetSharedFunctionInfo(
const DeoptFrame& deopt_frame) { … }
}
class MaglevFrameTranslationBuilder { … };
}
MaglevCodeGenerator::MaglevCodeGenerator(
LocalIsolate* isolate, MaglevCompilationInfo* compilation_info,
Graph* graph)
: … { … }
bool MaglevCodeGenerator::Assemble() { … }
MaybeHandle<Code> MaglevCodeGenerator::Generate(Isolate* isolate) { … }
GlobalHandleVector<Map> MaglevCodeGenerator::RetainedMaps(Isolate* isolate) { … }
bool MaglevCodeGenerator::EmitCode() { … }
void MaglevCodeGenerator::RecordInlinedFunctions() { … }
void MaglevCodeGenerator::EmitDeferredCode() { … }
bool MaglevCodeGenerator::EmitDeopts() { … }
void MaglevCodeGenerator::EmitExceptionHandlerTrampolines() { … }
void MaglevCodeGenerator::EmitMetadata() { … }
MaybeHandle<Code> MaglevCodeGenerator::BuildCodeObject(
LocalIsolate* local_isolate) { … }
GlobalHandleVector<Map> MaglevCodeGenerator::CollectRetainedMaps(
DirectHandle<Code> code) { … }
Handle<DeoptimizationData> MaglevCodeGenerator::GenerateDeoptimizationData(
LocalIsolate* local_isolate) { … }
}
}
}