| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 LInstruction* CompileToLithium(LChunkBuilder* builder) final; \ | 179 LInstruction* CompileToLithium(LChunkBuilder* builder) final; \ |
| 180 static H##type* cast(HValue* value) { \ | 180 static H##type* cast(HValue* value) { \ |
| 181 DCHECK(value->Is##type()); \ | 181 DCHECK(value->Is##type()); \ |
| 182 return reinterpret_cast<H##type*>(value); \ | 182 return reinterpret_cast<H##type*>(value); \ |
| 183 } \ | 183 } \ |
| 184 Opcode opcode() const final { return HValue::k##type; } | 184 Opcode opcode() const final { return HValue::k##type; } |
| 185 | 185 |
| 186 | 186 |
| 187 enum PropertyAccessType { LOAD, STORE }; | 187 enum PropertyAccessType { LOAD, STORE }; |
| 188 | 188 |
| 189 | |
| 190 class Range final : public ZoneObject { | 189 class Range final : public ZoneObject { |
| 191 public: | 190 public: |
| 192 Range() | 191 Range() |
| 193 : lower_(kMinInt), | 192 : lower_(kMinInt), |
| 194 upper_(kMaxInt), | 193 upper_(kMaxInt), |
| 195 next_(NULL), | 194 next_(NULL), |
| 196 can_be_minus_zero_(false) { } | 195 can_be_minus_zero_(false) { } |
| 197 | 196 |
| 198 Range(int32_t lower, int32_t upper) | 197 Range(int32_t lower, int32_t upper) |
| 199 : lower_(lower), | 198 : lower_(lower), |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 bool SubAndCheckOverflow(const Representation& r, Range* other); | 254 bool SubAndCheckOverflow(const Representation& r, Range* other); |
| 256 bool MulAndCheckOverflow(const Representation& r, Range* other); | 255 bool MulAndCheckOverflow(const Representation& r, Range* other); |
| 257 | 256 |
| 258 private: | 257 private: |
| 259 int32_t lower_; | 258 int32_t lower_; |
| 260 int32_t upper_; | 259 int32_t upper_; |
| 261 Range* next_; | 260 Range* next_; |
| 262 bool can_be_minus_zero_; | 261 bool can_be_minus_zero_; |
| 263 }; | 262 }; |
| 264 | 263 |
| 265 | 264 class HUseListNode : public ZoneObject { |
| 266 class HUseListNode: public ZoneObject { | |
| 267 public: | 265 public: |
| 268 HUseListNode(HValue* value, int index, HUseListNode* tail) | 266 HUseListNode(HValue* value, int index, HUseListNode* tail) |
| 269 : tail_(tail), value_(value), index_(index) { | 267 : tail_(tail), value_(value), index_(index) { |
| 270 } | 268 } |
| 271 | 269 |
| 272 HUseListNode* tail(); | 270 HUseListNode* tail(); |
| 273 HValue* value() const { return value_; } | 271 HValue* value() const { return value_; } |
| 274 int index() const { return index_; } | 272 int index() const { return index_; } |
| 275 | 273 |
| 276 void set_tail(HUseListNode* list) { tail_ = list; } | 274 void set_tail(HUseListNode* list) { tail_ = list; } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 379 } |
| 382 | 380 |
| 383 HValue* base_; | 381 HValue* base_; |
| 384 int offset_; | 382 int offset_; |
| 385 int scale_; | 383 int scale_; |
| 386 }; | 384 }; |
| 387 | 385 |
| 388 | 386 |
| 389 typedef EnumSet<GVNFlag, int32_t> GVNFlagSet; | 387 typedef EnumSet<GVNFlag, int32_t> GVNFlagSet; |
| 390 | 388 |
| 391 | |
| 392 class HValue : public ZoneObject { | 389 class HValue : public ZoneObject { |
| 393 public: | 390 public: |
| 394 static const int kNoNumber = -1; | 391 static const int kNoNumber = -1; |
| 395 | 392 |
| 396 enum Flag { | 393 enum Flag { |
| 397 kFlexibleRepresentation, | 394 kFlexibleRepresentation, |
| 398 kCannotBeTagged, | 395 kCannotBeTagged, |
| 399 // Participate in Global Value Numbering, i.e. elimination of | 396 // Participate in Global Value Numbering, i.e. elimination of |
| 400 // unnecessary recomputations. If an instruction sets this flag, it must | 397 // unnecessary recomputations. If an instruction sets this flag, it must |
| 401 // implement DataEquals(), which will be used to determine if other | 398 // implement DataEquals(), which will be used to determine if other |
| (...skipping 6480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6882 bool IsDeletable() const override { return true; } | 6879 bool IsDeletable() const override { return true; } |
| 6883 }; | 6880 }; |
| 6884 | 6881 |
| 6885 #undef DECLARE_INSTRUCTION | 6882 #undef DECLARE_INSTRUCTION |
| 6886 #undef DECLARE_CONCRETE_INSTRUCTION | 6883 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6887 | 6884 |
| 6888 } // namespace internal | 6885 } // namespace internal |
| 6889 } // namespace v8 | 6886 } // namespace v8 |
| 6890 | 6887 |
| 6891 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6888 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |