chromium/v8/src/compiler/js-typed-lowering.cc

// Copyright 2014 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/js-typed-lowering.h"

#include <optional>

#include "src/ast/modules.h"
#include "src/builtins/builtins-utils.h"
#include "src/codegen/code-factory.h"
#include "src/codegen/interface-descriptors-inl.h"
#include "src/compiler/access-builder.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/compilation-dependencies.h"
#include "src/compiler/graph-assembler.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/node.h"
#include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h"
#include "src/compiler/types.h"
#include "src/execution/protectors.h"
#include "src/objects/js-generator.h"
#include "src/objects/module-inl.h"
#include "src/objects/objects-inl.h"

namespace v8 {
namespace internal {
namespace compiler {

// A helper class to simplify the process of reducing a single binop node with a
// JSOperator. This class manages the rewriting of context, control, and effect
// dependencies during lowering of a binop and contains numerous helper
// functions for matching the types of inputs to an operation.
class JSBinopReduction final {};


// TODO(turbofan): js-typed-lowering improvements possible
// - immediately put in type bounds for all new nodes
// - relax effects from generic but not-side-effecting operations

JSTypedLowering::JSTypedLowering(Editor* editor, JSGraph* jsgraph,
                                 JSHeapBroker* broker, Zone* zone)
    :{}

Reduction JSTypedLowering::ReduceJSBitwiseNot(Node* node) {}

Reduction JSTypedLowering::ReduceJSDecrement(Node* node) {}

Reduction JSTypedLowering::ReduceJSIncrement(Node* node) {}

Reduction JSTypedLowering::ReduceJSNegate(Node* node) {}

Reduction JSTypedLowering::GenerateStringAddition(
    Node* node, Node* left, Node* right, Node* context, Node* frame_state,
    Node** effect, Node** control, bool should_create_cons_string) {}

Node* JSTypedLowering::UnwrapStringWrapper(Node* string_or_wrapper,
                                           Node** effect, Node** control) {}

Reduction JSTypedLowering::ReduceJSAdd(Node* node) {}

Reduction JSTypedLowering::ReduceNumberBinop(Node* node) {}

Reduction JSTypedLowering::ReduceInt32Binop(Node* node) {}

Reduction JSTypedLowering::ReduceUI32Shift(Node* node, Signedness signedness) {}

Reduction JSTypedLowering::ReduceJSComparison(Node* node) {}

Reduction JSTypedLowering::ReduceJSEqual(Node* node) {}

Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node) {}

Reduction JSTypedLowering::ReduceJSToName(Node* node) {}

Reduction JSTypedLowering::ReduceJSToLength(Node* node) {}

Reduction JSTypedLowering::ReduceJSToNumberInput(Node* input) {}

Reduction JSTypedLowering::ReduceJSToNumber(Node* node) {}

Reduction JSTypedLowering::ReduceJSToBigInt(Node* node) {}

Reduction JSTypedLowering::ReduceJSToBigIntConvertNumber(Node* node) {}

Reduction JSTypedLowering::ReduceJSToNumeric(Node* node) {}

Reduction JSTypedLowering::ReduceJSToStringInput(Node* input) {}

Reduction JSTypedLowering::ReduceJSToString(Node* node) {}

Reduction JSTypedLowering::ReduceJSToObject(Node* node) {}

Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) {}

Reduction JSTypedLowering::ReduceJSHasInPrototypeChain(Node* node) {}

Reduction JSTypedLowering::ReduceJSOrdinaryHasInstance(Node* node) {}

Reduction JSTypedLowering::ReduceJSHasContextExtension(Node* node) {}

Reduction JSTypedLowering::ReduceJSLoadContext(Node* node) {}

Reduction JSTypedLowering::ReduceJSStoreContext(Node* node) {}

Node* JSTypedLowering::BuildGetModuleCell(Node* node) {}

Reduction JSTypedLowering::ReduceJSLoadModule(Node* node) {}

Reduction JSTypedLowering::ReduceJSStoreModule(Node* node) {}

namespace {

void ReduceBuiltin(JSGraph* jsgraph, Node* node, Builtin builtin, int arity,
                   CallDescriptor::Flags flags) {}
}  // namespace

Reduction JSTypedLowering::ReduceJSConstructForwardVarargs(Node* node) {}

Reduction JSTypedLowering::ReduceJSConstruct(Node* node) {}

Reduction JSTypedLowering::ReduceJSCallForwardVarargs(Node* node) {}

Reduction JSTypedLowering::ReduceJSCall(Node* node) {}

Reduction JSTypedLowering::ReduceJSForInNext(Node* node) {}

Reduction JSTypedLowering::ReduceJSForInPrepare(Node* node) {}

Reduction JSTypedLowering::ReduceJSLoadMessage(Node* node) {}

Reduction JSTypedLowering::ReduceJSStoreMessage(Node* node) {}

Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) {}

Reduction JSTypedLowering::ReduceJSGeneratorRestoreContinuation(Node* node) {}

Reduction JSTypedLowering::ReduceJSGeneratorRestoreContext(Node* node) {}

Reduction JSTypedLowering::ReduceJSGeneratorRestoreRegister(Node* node) {}

Reduction JSTypedLowering::ReduceJSGeneratorRestoreInputOrDebugPos(Node* node) {}

Reduction JSTypedLowering::ReduceObjectIsArray(Node* node) {}

Reduction JSTypedLowering::ReduceJSParseInt(Node* node) {}

Reduction JSTypedLowering::ReduceJSResolvePromise(Node* node) {}

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

Factory* JSTypedLowering::factory() const {}

Graph* JSTypedLowering::graph() const {}

CompilationDependencies* JSTypedLowering::dependencies() const {}

Isolate* JSTypedLowering::isolate() const {}

JSOperatorBuilder* JSTypedLowering::javascript() const {}

CommonOperatorBuilder* JSTypedLowering::common() const {}

SimplifiedOperatorBuilder* JSTypedLowering::simplified() const {}

}  // namespace compiler
}  // namespace internal
}  // namespace v8