chromium/v8/src/compiler/representation-change.cc

// Copyright 2015 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/representation-change.h"

#include <sstream>

#include "src/base/safe_conversions.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/simplified-lowering-verifier.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/type-cache.h"
#include "src/heap/factory-inl.h"

namespace v8 {
namespace internal {
namespace compiler {

const char* Truncation::description() const {}

// Partial order for truncations:
//
//               kAny <-------+
//                 ^          |
//                 |          |
//  kOddballAndBigIntToNumber |
//               ^            |
//               /            |
//        kWord64             |
//             ^              |
//             |              |
//        kWord32           kBool
//              ^            ^
//              \            /
//               \          /
//                \        /
//                 \      /
//                  \    /
//                  kNone
//
// TODO(jarin) We might consider making kBool < kOddballAndBigIntToNumber.

// static
Truncation::TruncationKind Truncation::Generalize(TruncationKind rep1,
                                                  TruncationKind rep2) {}

// static
IdentifyZeros Truncation::GeneralizeIdentifyZeros(IdentifyZeros i1,
                                                  IdentifyZeros i2) {}

// static
bool Truncation::LessGeneral(TruncationKind rep1, TruncationKind rep2) {}

// static
bool Truncation::LessGeneralIdentifyZeros(IdentifyZeros i1, IdentifyZeros i2) {}

namespace {

bool IsWord(MachineRepresentation rep) {}

bool TypeCheckIsBigInt(TypeCheckKind type_check) {}

}  // namespace

RepresentationChanger::RepresentationChanger(
    JSGraph* jsgraph, JSHeapBroker* broker,
    SimplifiedLoweringVerifier* verifier)
    :{}

// Changes representation from {output_rep} to {use_rep}. The {truncation}
// parameter is only used for checking - if the changer cannot figure
// out signedness for the word32->float64 conversion, then we check that the
// uses truncate to word32 (so they do not care about signedness).
Node* RepresentationChanger::GetRepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

Node* RepresentationChanger::GetTaggedSignedRepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

Node* RepresentationChanger::GetTaggedPointerRepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

Node* RepresentationChanger::GetTaggedRepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Truncation truncation) {}

Node* RepresentationChanger::GetFloat32RepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Truncation truncation) {}

Node* RepresentationChanger::GetFloat64RepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

Node* RepresentationChanger::MakeTruncatedInt32Constant(double value) {}

Node* RepresentationChanger::InsertUnconditionalDeopt(
    Node* node, DeoptimizeReason reason, const FeedbackSource& feedback) {}

Node* RepresentationChanger::GetWord32RepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

Node* RepresentationChanger::InsertConversion(Node* node, const Operator* op,
                                              Node* use_node) {}

Node* RepresentationChanger::GetBitRepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type) {}

Node* RepresentationChanger::GetWord64RepresentationFor(
    Node* node, MachineRepresentation output_rep, Type output_type,
    Node* use_node, UseInfo use_info) {}

const Operator* RepresentationChanger::Int32OperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Int32OverflowOperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Int64OperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Int64OverflowOperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::BigIntOperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::TaggedSignedOperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Uint32OperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Uint32OverflowOperatorFor(
    IrOpcode::Value opcode) {}

const Operator* RepresentationChanger::Float64OperatorFor(
    IrOpcode::Value opcode) {}

Node* RepresentationChanger::TypeError(Node* node,
                                       MachineRepresentation output_rep,
                                       Type output_type,
                                       MachineRepresentation use) {}

Node* RepresentationChanger::InsertChangeBitToTagged(Node* node) {}

Node* RepresentationChanger::InsertChangeFloat32ToFloat64(Node* node) {}

Node* RepresentationChanger::InsertChangeFloat64ToUint32(Node* node) {}

Node* RepresentationChanger::InsertChangeFloat64ToInt32(Node* node) {}

Node* RepresentationChanger::InsertChangeInt32ToFloat64(Node* node) {}

Node* RepresentationChanger::InsertChangeTaggedSignedToInt32(Node* node) {}

Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {}

Node* RepresentationChanger::InsertChangeUint32ToFloat64(Node* node) {}

Node* RepresentationChanger::InsertTruncateInt64ToInt32(Node* node) {}

Node* RepresentationChanger::InsertCheckedFloat64ToInt32(
    Node* node, CheckForMinusZeroMode check, const FeedbackSource& feedback,
    Node* use_node) {}

Node* RepresentationChanger::InsertTypeOverrideForVerifier(const Type& type,
                                                           Node* node) {}

Isolate* RepresentationChanger::isolate() const {}

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