Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: src/compiler/representation-change.h

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/register-allocator-verifier.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/representation-change.h
diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h
index c26fdd3dcd62e3ccc28de6ed3a797664353e306b..b157b0b3feffcffaaf7bf4f70ffb9976801934ed 100644
--- a/src/compiler/representation-change.h
+++ b/src/compiler/representation-change.h
@@ -86,20 +86,22 @@ class RepresentationChanger final {
// parameter is only used for sanity 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* GetRepresentationFor(Node* node, MachineTypeUnion output_type,
- MachineTypeUnion use_rep,
+ Node* GetRepresentationFor(Node* node, MachineType output_type,
+ MachineRepresentation use_rep,
Truncation truncation = Truncation::None());
const Operator* Int32OperatorFor(IrOpcode::Value opcode);
const Operator* Uint32OperatorFor(IrOpcode::Value opcode);
const Operator* Float64OperatorFor(IrOpcode::Value opcode);
- MachineType TypeFromUpperBound(Type* type);
+ MachineSemantic TypeFromUpperBound(Type* type);
MachineType TypeForBasePointer(const FieldAccess& access) {
- return access.tag() != 0 ? kMachAnyTagged : kMachPtr;
+ return access.tag() != 0 ? MachineType::AnyTagged()
+ : MachineType::Pointer();
}
MachineType TypeForBasePointer(const ElementAccess& access) {
- return access.tag() != 0 ? kMachAnyTagged : kMachPtr;
+ return access.tag() != 0 ? MachineType::AnyTagged()
+ : MachineType::Pointer();
}
private:
@@ -111,16 +113,16 @@ 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* GetTaggedRepresentationFor(Node* node, MachineTypeUnion output_type);
- Node* GetFloat32RepresentationFor(Node* node, MachineTypeUnion output_type,
+ Node* GetTaggedRepresentationFor(Node* node, MachineType output_type);
+ Node* GetFloat32RepresentationFor(Node* node, MachineType output_type,
Truncation truncation);
- Node* GetFloat64RepresentationFor(Node* node, MachineTypeUnion output_type,
+ Node* GetFloat64RepresentationFor(Node* node, MachineType output_type,
Truncation truncation);
- Node* GetWord32RepresentationFor(Node* node, MachineTypeUnion output_type);
- Node* GetBitRepresentationFor(Node* node, MachineTypeUnion output_type);
- Node* GetWord64RepresentationFor(Node* node, MachineTypeUnion output_type);
- Node* TypeError(Node* node, MachineTypeUnion output_type,
- MachineTypeUnion use);
+ Node* GetWord32RepresentationFor(Node* node, MachineType output_type);
+ Node* GetBitRepresentationFor(Node* node, MachineType output_type);
+ Node* GetWord64RepresentationFor(Node* node, MachineType output_type);
+ Node* TypeError(Node* node, MachineType output_type,
+ MachineRepresentation use);
Node* MakeTruncatedInt32Constant(double value);
Node* InsertChangeFloat32ToFloat64(Node* node);
Node* InsertChangeTaggedToFloat64(Node* node);
« no previous file with comments | « src/compiler/register-allocator-verifier.cc ('k') | src/compiler/representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698