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

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

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months 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/node-properties.h ('k') | src/compiler/operator-properties.h » ('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_OPERATOR_H_ 5 #ifndef V8_COMPILER_OPERATOR_H_
6 #define V8_COMPILER_OPERATOR_H_ 6 #define V8_COMPILER_OPERATOR_H_
7 7
8 #include <ostream> // NOLINT(readability/streams) 8 #include <ostream> // NOLINT(readability/streams)
9 9
10 #include "src/base/flags.h" 10 #include "src/base/flags.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 size_t value_out, size_t effect_out, size_t control_out, 146 size_t value_out, size_t effect_out, size_t control_out,
147 T parameter, Pred const& pred = Pred(), Hash const& hash = Hash()) 147 T parameter, Pred const& pred = Pred(), Hash const& hash = Hash())
148 : Operator(opcode, properties, mnemonic, value_in, effect_in, control_in, 148 : Operator(opcode, properties, mnemonic, value_in, effect_in, control_in,
149 value_out, effect_out, control_out), 149 value_out, effect_out, control_out),
150 parameter_(parameter), 150 parameter_(parameter),
151 pred_(pred), 151 pred_(pred),
152 hash_(hash) {} 152 hash_(hash) {}
153 153
154 T const& parameter() const { return parameter_; } 154 T const& parameter() const { return parameter_; }
155 155
156 bool Equals(const Operator* other) const FINAL { 156 bool Equals(const Operator* other) const final {
157 if (opcode() != other->opcode()) return false; 157 if (opcode() != other->opcode()) return false;
158 const Operator1<T>* that = reinterpret_cast<const Operator1<T>*>(other); 158 const Operator1<T>* that = reinterpret_cast<const Operator1<T>*>(other);
159 return this->pred_(this->parameter(), that->parameter()); 159 return this->pred_(this->parameter(), that->parameter());
160 } 160 }
161 size_t HashCode() const FINAL { 161 size_t HashCode() const final {
162 return base::hash_combine(this->opcode(), this->hash_(this->parameter())); 162 return base::hash_combine(this->opcode(), this->hash_(this->parameter()));
163 } 163 }
164 virtual void PrintParameter(std::ostream& os) const { 164 virtual void PrintParameter(std::ostream& os) const {
165 os << "[" << this->parameter() << "]"; 165 os << "[" << this->parameter() << "]";
166 } 166 }
167 167
168 protected: 168 protected:
169 void PrintTo(std::ostream& os) const FINAL { 169 void PrintTo(std::ostream& os) const final {
170 os << mnemonic(); 170 os << mnemonic();
171 PrintParameter(os); 171 PrintParameter(os);
172 } 172 }
173 173
174 private: 174 private:
175 T const parameter_; 175 T const parameter_;
176 Pred const pred_; 176 Pred const pred_;
177 Hash const hash_; 177 Hash const hash_;
178 }; 178 };
179 179
(...skipping 18 matching lines...) Expand all
198 return reinterpret_cast<const Operator1<double, base::bit_equal_to<double>, 198 return reinterpret_cast<const Operator1<double, base::bit_equal_to<double>,
199 base::bit_hash<double>>*>(op) 199 base::bit_hash<double>>*>(op)
200 ->parameter(); 200 ->parameter();
201 } 201 }
202 202
203 } // namespace compiler 203 } // namespace compiler
204 } // namespace internal 204 } // namespace internal
205 } // namespace v8 205 } // namespace v8
206 206
207 #endif // V8_COMPILER_OPERATOR_H_ 207 #endif // V8_COMPILER_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/operator-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698