summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/representation-change.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/representation-change.h')
-rw-r--r--deps/v8/src/compiler/representation-change.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/deps/v8/src/compiler/representation-change.h b/deps/v8/src/compiler/representation-change.h
index fac328072a..f27108ed46 100644
--- a/deps/v8/src/compiler/representation-change.h
+++ b/deps/v8/src/compiler/representation-change.h
@@ -29,6 +29,9 @@ class Truncation final {
// Queries.
bool IsUnused() const { return kind_ == TruncationKind::kNone; }
+ bool IsUsedAsBool() const {
+ return LessGeneral(kind_, TruncationKind::kBool);
+ }
bool IsUsedAsWord32() const {
return LessGeneral(kind_, TruncationKind::kWord32);
}
@@ -139,8 +142,18 @@ class UseInfo {
static UseInfo AnyTagged() {
return UseInfo(MachineRepresentation::kTagged, Truncation::Any());
}
+ static UseInfo TaggedSigned() {
+ return UseInfo(MachineRepresentation::kTaggedSigned, Truncation::Any());
+ }
+ static UseInfo TaggedPointer() {
+ return UseInfo(MachineRepresentation::kTaggedPointer, Truncation::Any());
+ }
// Possibly deoptimizing conversions.
+ static UseInfo CheckedSignedSmallAsTaggedSigned() {
+ return UseInfo(MachineRepresentation::kTaggedSigned, Truncation::Any(),
+ TypeCheckKind::kSignedSmall);
+ }
static UseInfo CheckedSignedSmallAsWord32() {
return UseInfo(MachineRepresentation::kWord32, Truncation::Any(),
TypeCheckKind::kSignedSmall);
@@ -232,8 +245,15 @@ class RepresentationChanger final {
bool testing_type_errors_; // If {true}, don't abort on a type error.
bool type_error_; // Set when a type error is detected.
+ Node* GetTaggedSignedRepresentationFor(Node* node,
+ MachineRepresentation output_rep,
+ Type* output_type, Node* use_node,
+ UseInfo use_info);
+ Node* GetTaggedPointerRepresentationFor(Node* node,
+ MachineRepresentation output_rep,
+ Type* output_type);
Node* GetTaggedRepresentationFor(Node* node, MachineRepresentation output_rep,
- Type* output_type);
+ Type* output_type, Truncation truncation);
Node* GetFloat32RepresentationFor(Node* node,
MachineRepresentation output_rep,
Type* output_type, Truncation truncation);
@@ -251,6 +271,7 @@ class RepresentationChanger final {
Node* TypeError(Node* node, MachineRepresentation output_rep,
Type* output_type, MachineRepresentation use);
Node* MakeTruncatedInt32Constant(double value);
+ Node* InsertChangeBitToTagged(Node* node);
Node* InsertChangeFloat32ToFloat64(Node* node);
Node* InsertChangeFloat64ToInt32(Node* node);
Node* InsertChangeFloat64ToUint32(Node* node);