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 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/compiler/machine-type.h" | 10 #include "src/compiler/machine-type.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 enum BaseTaggedness { kUntaggedBase, kTaggedBase }; | 31 enum BaseTaggedness { kUntaggedBase, kTaggedBase }; |
32 | 32 |
33 std::ostream& operator<<(std::ostream&, BaseTaggedness); | 33 std::ostream& operator<<(std::ostream&, BaseTaggedness); |
34 | 34 |
35 // An access descriptor for loads/stores of fixed structures like field | 35 // An access descriptor for loads/stores of fixed structures like field |
36 // accesses of heap objects. Accesses from either tagged or untagged base | 36 // accesses of heap objects. Accesses from either tagged or untagged base |
37 // pointers are supported; untagging is done automatically during lowering. | 37 // pointers are supported; untagging is done automatically during lowering. |
38 struct FieldAccess { | 38 struct FieldAccess { |
39 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. | 39 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. |
40 int offset; // offset of the field, without tag. | 40 int offset; // offset of the field, without tag. |
41 Handle<Name> name; // debugging only. | 41 MaybeHandle<Name> name; // debugging only. |
42 Type* type; // type of the field. | 42 Type* type; // type of the field. |
43 MachineType machine_type; // machine type of the field. | 43 MachineType machine_type; // machine type of the field. |
44 | 44 |
45 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } | 45 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } |
46 }; | 46 }; |
47 | 47 |
| 48 bool operator==(FieldAccess const& lhs, FieldAccess const& rhs); |
| 49 bool operator!=(FieldAccess const& lhs, FieldAccess const& rhs); |
| 50 |
| 51 std::ostream& operator<<(std::ostream&, FieldAccess const&); |
| 52 |
48 | 53 |
49 enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck }; | 54 enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck }; |
50 | 55 |
51 std::ostream& operator<<(std::ostream&, BoundsCheckMode); | 56 std::ostream& operator<<(std::ostream&, BoundsCheckMode); |
52 | 57 |
53 | 58 |
54 // An access descriptor for loads/stores of indexed structures like characters | 59 // An access descriptor for loads/stores of indexed structures like characters |
55 // in strings or off-heap backing stores. Accesses from either tagged or | 60 // in strings or off-heap backing stores. Accesses from either tagged or |
56 // untagged base pointers are supported; untagging is done automatically during | 61 // untagged base pointers are supported; untagging is done automatically during |
57 // lowering. | 62 // lowering. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 Zone* const zone_; | 156 Zone* const zone_; |
152 | 157 |
153 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); | 158 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); |
154 }; | 159 }; |
155 | 160 |
156 } // namespace compiler | 161 } // namespace compiler |
157 } // namespace internal | 162 } // namespace internal |
158 } // namespace v8 | 163 } // namespace v8 |
159 | 164 |
160 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 165 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
OLD | NEW |