| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/compiler/js-operator.h" | 5 #include "src/compiler/js-operator.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/lazy-instance.h" | 9 #include "src/base/lazy-instance.h" |
| 10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
| 11 #include "src/compiler/operator.h" | 11 #include "src/compiler/operator.h" |
| 12 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! |
| 13 #include "src/type-feedback-vector-inl.h" |
| 12 | 14 |
| 13 namespace v8 { | 15 namespace v8 { |
| 14 namespace internal { | 16 namespace internal { |
| 15 namespace compiler { | 17 namespace compiler { |
| 16 | 18 |
| 19 int VectorSlotPair::index() const { |
| 20 Handle<TypeFeedbackVector> vector; |
| 21 return vector_.ToHandle(&vector) ? vector->GetIndex(slot_) : -1; |
| 22 } |
| 23 |
| 24 |
| 17 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) { | 25 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) { |
| 18 return lhs.slot() == rhs.slot() && lhs.vector() == rhs.vector(); | 26 return lhs.slot() == rhs.slot() && lhs.vector() == rhs.vector(); |
| 19 } | 27 } |
| 20 | 28 |
| 21 | 29 |
| 22 bool operator!=(VectorSlotPair const& lhs, VectorSlotPair const& rhs) { | 30 bool operator!=(VectorSlotPair const& lhs, VectorSlotPair const& rhs) { |
| 23 return !(lhs == rhs); | 31 return !(lhs == rhs); |
| 24 } | 32 } |
| 25 | 33 |
| 26 | 34 |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 Handle<String>::hash>( // -- | 737 Handle<String>::hash>( // -- |
| 730 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode | 738 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode |
| 731 "JSCreateCatchContext", // name | 739 "JSCreateCatchContext", // name |
| 732 2, 1, 1, 1, 1, 2, // counts | 740 2, 1, 1, 1, 1, 2, // counts |
| 733 name); // parameter | 741 name); // parameter |
| 734 } | 742 } |
| 735 | 743 |
| 736 } // namespace compiler | 744 } // namespace compiler |
| 737 } // namespace internal | 745 } // namespace internal |
| 738 } // namespace v8 | 746 } // namespace v8 |
| OLD | NEW |