| OLD | NEW |
| 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_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
| 6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/runtime/runtime.h" | 8 #include "src/runtime/runtime.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 namespace compiler { | 12 namespace compiler { |
| 13 | 13 |
| 14 // Forward declarations. | 14 // Forward declarations. |
| 15 class Operator; | 15 class Operator; |
| 16 struct JSOperatorGlobalCache; | 16 struct JSOperatorGlobalCache; |
| 17 | 17 |
| 18 | 18 |
| 19 // Defines a pair of {TypeFeedbackVector} and {TypeFeedbackVectorICSlot}, which | 19 // Defines a pair of {TypeFeedbackVector} and {TypeFeedbackVectorSlot}, which |
| 20 // is used to access the type feedback for a certain {Node}. | 20 // is used to access the type feedback for a certain {Node}. |
| 21 class VectorSlotPair { | 21 class VectorSlotPair { |
| 22 public: | 22 public: |
| 23 VectorSlotPair(); | 23 VectorSlotPair(); |
| 24 VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorICSlot slot) | 24 VectorSlotPair(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 25 : vector_(vector), slot_(slot) {} | 25 : vector_(vector), slot_(slot) {} |
| 26 | 26 |
| 27 bool IsValid() const { return !vector_.is_null(); } | 27 bool IsValid() const { return !vector_.is_null(); } |
| 28 | 28 |
| 29 Handle<TypeFeedbackVector> vector() const { return vector_; } | 29 Handle<TypeFeedbackVector> vector() const { return vector_; } |
| 30 FeedbackVectorICSlot slot() const { return slot_; } | 30 FeedbackVectorSlot slot() const { return slot_; } |
| 31 | 31 |
| 32 int index() const; | 32 int index() const; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 const Handle<TypeFeedbackVector> vector_; | 35 const Handle<TypeFeedbackVector> vector_; |
| 36 const FeedbackVectorICSlot slot_; | 36 const FeedbackVectorSlot slot_; |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 bool operator==(VectorSlotPair const&, VectorSlotPair const&); | 39 bool operator==(VectorSlotPair const&, VectorSlotPair const&); |
| 40 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); | 40 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); |
| 41 | 41 |
| 42 size_t hash_value(VectorSlotPair const&); | 42 size_t hash_value(VectorSlotPair const&); |
| 43 | 43 |
| 44 enum TailCallMode { NO_TAIL_CALLS, ALLOW_TAIL_CALLS }; | 44 enum TailCallMode { NO_TAIL_CALLS, ALLOW_TAIL_CALLS }; |
| 45 | 45 |
| 46 // Defines the arity and the call flags for a JavaScript function call. This is | 46 // Defines the arity and the call flags for a JavaScript function call. This is |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 Zone* const zone_; | 573 Zone* const zone_; |
| 574 | 574 |
| 575 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 575 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
| 576 }; | 576 }; |
| 577 | 577 |
| 578 } // namespace compiler | 578 } // namespace compiler |
| 579 } // namespace internal | 579 } // namespace internal |
| 580 } // namespace v8 | 580 } // namespace v8 |
| 581 | 581 |
| 582 #endif // V8_COMPILER_JS_OPERATOR_H_ | 582 #endif // V8_COMPILER_JS_OPERATOR_H_ |
| OLD | NEW |