#include "src/compiler/js-inlining.h"
#include <optional>
#include "src/codegen/optimized-compilation-info.h"
#include "src/codegen/tick-counter.h"
#include "src/compiler/access-builder.h"
#include "src/compiler/all-nodes.h"
#include "src/compiler/bytecode-graph-builder.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/compiler-source-position-table.h"
#include "src/compiler/graph-reducer.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/execution/isolate-inl.h"
#include "src/objects/feedback-cell-inl.h"
#if V8_ENABLE_WEBASSEMBLY
#include "src/compiler/wasm-compiler.h"
#include "src/wasm/names-provider.h"
#include "src/wasm/string-builder.h"
#endif
namespace v8 {
namespace internal {
namespace compiler {
namespace {
static const int kMaxDepthForInlining = …;
}
#define TRACE …
class JSCallAccessor { … };
#if V8_ENABLE_WEBASSEMBLY
Reduction JSInliner::InlineJSWasmCall(Node* call, Node* new_target,
Node* context, Node* frame_state,
StartNode start, Node* end,
Node* exception_target,
const NodeVector& uncaught_subcalls) { … }
#endif
Reduction JSInliner::InlineCall(Node* call, Node* new_target, Node* context,
Node* frame_state, StartNode start, Node* end,
Node* exception_target,
const NodeVector& uncaught_subcalls,
int argument_count) { … }
FrameState JSInliner::CreateArtificialFrameState(
Node* node, FrameState outer_frame_state, int parameter_count,
FrameStateType frame_state_type, SharedFunctionInfoRef shared,
Node* context, Node* callee) { … }
namespace {
bool NeedsImplicitReceiver(SharedFunctionInfoRef shared_info) { … }
}
OptionalSharedFunctionInfoRef JSInliner::DetermineCallTarget(Node* node) { … }
FeedbackCellRef JSInliner::DetermineCallContext(Node* node,
Node** context_out) { … }
#if V8_ENABLE_WEBASSEMBLY
static std::string WasmFunctionNameForTrace(wasm::NativeModule* native_module,
int fct_index) { … }
JSInliner::WasmInlineResult JSInliner::TryWasmInlining(
const JSWasmCallNode& call_node) { … }
Reduction JSInliner::ReduceJSWasmCall(Node* node) { … }
void JSInliner::InlineWasmFunction(Node* call, Node* inlinee_start,
Node* inlinee_end, Node* frame_state,
SharedFunctionInfoRef shared_fct_info,
int argument_count, Node* context) { … }
#endif
Reduction JSInliner::ReduceJSCall(Node* node) { … }
Graph* JSInliner::graph() const { … }
JSOperatorBuilder* JSInliner::javascript() const { … }
CommonOperatorBuilder* JSInliner::common() const { … }
SimplifiedOperatorBuilder* JSInliner::simplified() const { … }
#undef TRACE
}
}
}