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 MaybeHandle<Name> name; // debugging only. | 41 Handle<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 | |
53 | 48 |
54 enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck }; | 49 enum BoundsCheckMode { kNoBoundsCheck, kTypedArrayBoundsCheck }; |
55 | 50 |
56 std::ostream& operator<<(std::ostream&, BoundsCheckMode); | 51 std::ostream& operator<<(std::ostream&, BoundsCheckMode); |
57 | 52 |
58 | 53 |
59 // An access descriptor for loads/stores of indexed structures like characters | 54 // An access descriptor for loads/stores of indexed structures like characters |
60 // in strings or off-heap backing stores. Accesses from either tagged or | 55 // in strings or off-heap backing stores. Accesses from either tagged or |
61 // untagged base pointers are supported; untagging is done automatically during | 56 // untagged base pointers are supported; untagging is done automatically during |
62 // lowering. | 57 // lowering. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 Zone* const zone_; | 151 Zone* const zone_; |
157 | 152 |
158 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); | 153 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); |
159 }; | 154 }; |
160 | 155 |
161 } // namespace compiler | 156 } // namespace compiler |
162 } // namespace internal | 157 } // namespace internal |
163 } // namespace v8 | 158 } // namespace v8 |
164 | 159 |
165 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 160 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
OLD | NEW |