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

Unified Diff: src/compiler/machine-operator.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/loop-peeling.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator.h
diff --git a/src/compiler/machine-operator.h b/src/compiler/machine-operator.h
index bc84db441600ba3da4dd6aba879216155864a652..660fee7065be4edc79800c5c2e69463a95c3a02e 100644
--- a/src/compiler/machine-operator.h
+++ b/src/compiler/machine-operator.h
@@ -62,6 +62,7 @@ std::ostream& operator<<(std::ostream& os, WriteBarrierKind);
// A Load needs a MachineType.
typedef MachineType LoadRepresentation;
+LoadRepresentation LoadRepresentationOf(Operator const*);
// A Store needs a MachineType and a WriteBarrierKind in order to emit the
// correct write barrier.
@@ -141,8 +142,10 @@ class MachineOperatorBuilder final : public ZoneObject {
};
typedef base::Flags<Flag, unsigned> Flags;
- explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr,
- Flags supportedOperators = kNoFlags);
+ explicit MachineOperatorBuilder(
+ Zone* zone,
+ MachineRepresentation word = MachineType::PointerRepresentation(),
+ Flags supportedOperators = kNoFlags);
const Operator* Word32And();
const Operator* Word32Or();
@@ -307,9 +310,9 @@ class MachineOperatorBuilder final : public ZoneObject {
const Operator* CheckedStore(CheckedStoreRepresentation);
// Target machine word-size assumed by this builder.
- bool Is32() const { return word() == kRepWord32; }
- bool Is64() const { return word() == kRepWord64; }
- MachineType word() const { return word_; }
+ bool Is32() const { return word() == MachineRepresentation::kWord32; }
+ bool Is64() const { return word() == MachineRepresentation::kWord64; }
+ MachineRepresentation word() const { return word_; }
// Pseudo operators that translate to 32/64-bit operators depending on the
// word-size of the target machine assumed by this builder.
@@ -342,7 +345,7 @@ class MachineOperatorBuilder final : public ZoneObject {
private:
MachineOperatorGlobalCache const& cache_;
- MachineType const word_;
+ MachineRepresentation const word_;
Flags const flags_;
DISALLOW_COPY_AND_ASSIGN(MachineOperatorBuilder);
« no previous file with comments | « src/compiler/loop-peeling.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698