chromium/v8/src/compiler/wasm-load-elimination.cc

// Copyright 2023 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/compiler/wasm-load-elimination.h"

#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/wasm/struct-types.h"
#include "src/wasm/wasm-subtyping.h"

namespace v8::internal::compiler {

/**** Helpers ****/

namespace {
bool TypesUnrelated(Node* lhs, Node* rhs) {}

bool IsFresh(Node* node) {}

bool IsConstant(Node* node) {}

bool MayAlias(Node* lhs, Node* rhs) {}

Node* ResolveAliases(Node* node) {}

// We model array length and string canonicalization as fields at negative
// indices.
constexpr int kArrayLengthFieldIndex =;
constexpr int kStringPrepareForGetCodeunitIndex =;
constexpr int kStringAsWtf16Index =;
constexpr int kAnyConvertExternIndex =;
}  // namespace

Reduction WasmLoadElimination::UpdateState(Node* node,
                                           AbstractState const* state) {}

std::tuple<Node*, Node*> WasmLoadElimination::TruncateAndExtendOrType(
    Node* value, Node* effect, Node* control, wasm::ValueType field_type,
    bool is_signed) {}

/***** Reductions *****/

Reduction WasmLoadElimination::Reduce(Node* node) {}

Reduction WasmLoadElimination::ReduceWasmStructGet(Node* node) {}

Reduction WasmLoadElimination::ReduceWasmStructSet(Node* node) {}

Reduction WasmLoadElimination::ReduceLoadLikeFromImmutable(Node* node,
                                                           int index) {}

Reduction WasmLoadElimination::ReduceWasmArrayLength(Node* node) {}

Reduction WasmLoadElimination::ReduceWasmArrayInitializeLength(Node* node) {}

Reduction WasmLoadElimination::ReduceStringPrepareForGetCodeunit(Node* node) {}

Reduction WasmLoadElimination::ReduceStringAsWtf16(Node* node) {}

Reduction WasmLoadElimination::ReduceAnyConvertExtern(Node* node) {}

Reduction WasmLoadElimination::ReduceOtherNode(Node* node) {}

Reduction WasmLoadElimination::ReduceStart(Node* node) {}

Reduction WasmLoadElimination::ReduceEffectPhi(Node* node) {}

/***** AbstractState implementation *****/

WasmLoadElimination::FieldOrElementValue
WasmLoadElimination::HalfState::LookupField(int field_index,
                                            Node* object) const {}

WasmLoadElimination::HalfState const* WasmLoadElimination::HalfState::AddField(
    int field_index, Node* object, Node* value) const {}

WasmLoadElimination::HalfState const* WasmLoadElimination::HalfState::KillField(
    int field_index, Node* object) const {}

WasmLoadElimination::AbstractState const* WasmLoadElimination::ComputeLoopState(
    Node* node, AbstractState const* state) const {}

void WasmLoadElimination::HalfState::IntersectWith(HalfState const* that) {}

/***** Constructor/ trivial accessors *****/
WasmLoadElimination::WasmLoadElimination(Editor* editor, JSGraph* jsgraph,
                                         Zone* zone)
    :{}

CommonOperatorBuilder* WasmLoadElimination::common() const {}

MachineOperatorBuilder* WasmLoadElimination::machine() const {}

Graph* WasmLoadElimination::graph() const {}

Isolate* WasmLoadElimination::isolate() const {}

}  // namespace v8::internal::compiler