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

Side by Side Diff: src/compiler/machine-operator.h

Issue 1513383003: [turbofan] Store nodes use only MachineRepresentation, not MachineType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: please mips64 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // A Load needs a MachineType. 62 // A Load needs a MachineType.
63 typedef MachineType LoadRepresentation; 63 typedef MachineType LoadRepresentation;
64 64
65 LoadRepresentation LoadRepresentationOf(Operator const*); 65 LoadRepresentation LoadRepresentationOf(Operator const*);
66 66
67 // A Store needs a MachineType and a WriteBarrierKind in order to emit the 67 // A Store needs a MachineType and a WriteBarrierKind in order to emit the
68 // correct write barrier. 68 // correct write barrier.
69 class StoreRepresentation final { 69 class StoreRepresentation final {
70 public: 70 public:
71 StoreRepresentation(MachineType machine_type, 71 StoreRepresentation(MachineRepresentation representation,
72 WriteBarrierKind write_barrier_kind) 72 WriteBarrierKind write_barrier_kind)
73 : machine_type_(machine_type), write_barrier_kind_(write_barrier_kind) {} 73 : representation_(representation),
74 write_barrier_kind_(write_barrier_kind) {}
74 75
75 MachineType machine_type() const { return machine_type_; } 76 MachineRepresentation representation() const { return representation_; }
76 WriteBarrierKind write_barrier_kind() const { return write_barrier_kind_; } 77 WriteBarrierKind write_barrier_kind() const { return write_barrier_kind_; }
77 78
78 private: 79 private:
79 MachineType machine_type_; 80 MachineRepresentation representation_;
80 WriteBarrierKind write_barrier_kind_; 81 WriteBarrierKind write_barrier_kind_;
81 }; 82 };
82 83
83 bool operator==(StoreRepresentation, StoreRepresentation); 84 bool operator==(StoreRepresentation, StoreRepresentation);
84 bool operator!=(StoreRepresentation, StoreRepresentation); 85 bool operator!=(StoreRepresentation, StoreRepresentation);
85 86
86 size_t hash_value(StoreRepresentation); 87 size_t hash_value(StoreRepresentation);
87 88
88 std::ostream& operator<<(std::ostream&, StoreRepresentation); 89 std::ostream& operator<<(std::ostream&, StoreRepresentation);
89 90
90 StoreRepresentation const& StoreRepresentationOf(Operator const*); 91 StoreRepresentation const& StoreRepresentationOf(Operator const*);
91 92
92 93
93 // A CheckedLoad needs a MachineType. 94 // A CheckedLoad needs a MachineType.
94 typedef MachineType CheckedLoadRepresentation; 95 typedef MachineType CheckedLoadRepresentation;
95 96
96 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*); 97 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*);
97 98
98 99
99 // A CheckedStore needs a MachineType. 100 // A CheckedStore needs a MachineType.
100 typedef MachineType CheckedStoreRepresentation; 101 typedef MachineRepresentation CheckedStoreRepresentation;
101 102
102 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); 103 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*);
103 104
104 105
105 // Interface for building machine-level operators. These operators are 106 // Interface for building machine-level operators. These operators are
106 // machine-level but machine-independent and thus define a language suitable 107 // machine-level but machine-independent and thus define a language suitable
107 // for generating code to run on architectures such as ia32, x64, arm, etc. 108 // for generating code to run on architectures such as ia32, x64, arm, etc.
108 class MachineOperatorBuilder final : public ZoneObject { 109 class MachineOperatorBuilder final : public ZoneObject {
109 public: 110 public:
110 // Flags that specify which operations are available. This is useful 111 // Flags that specify which operations are available. This is useful
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 }; 353 };
353 354
354 355
355 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 356 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
356 357
357 } // namespace compiler 358 } // namespace compiler
358 } // namespace internal 359 } // namespace internal
359 } // namespace v8 360 } // namespace v8
360 361
361 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 362 #endif // V8_COMPILER_MACHINE_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698