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/handles.h" | 10 #include "src/handles.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 bool operator==(ElementAccess const&, ElementAccess const&); | 96 bool operator==(ElementAccess const&, ElementAccess const&); |
97 bool operator!=(ElementAccess const&, ElementAccess const&); | 97 bool operator!=(ElementAccess const&, ElementAccess const&); |
98 | 98 |
99 size_t hash_value(ElementAccess const&); | 99 size_t hash_value(ElementAccess const&); |
100 | 100 |
101 std::ostream& operator<<(std::ostream&, ElementAccess const&); | 101 std::ostream& operator<<(std::ostream&, ElementAccess const&); |
102 | 102 |
103 ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT; | 103 ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT; |
104 | 104 |
| 105 Type* TypeOf(const Operator* op) WARN_UNUSED_RESULT; |
105 | 106 |
106 // Interface for building simplified operators, which represent the | 107 // Interface for building simplified operators, which represent the |
107 // medium-level operations of V8, including adding numbers, allocating objects, | 108 // medium-level operations of V8, including adding numbers, allocating objects, |
108 // indexing into objects and arrays, etc. | 109 // indexing into objects and arrays, etc. |
109 // All operators are typed but many are representation independent. | 110 // All operators are typed but many are representation independent. |
110 | 111 |
111 // Number values from JS can be in one of these representations: | 112 // Number values from JS can be in one of these representations: |
112 // - Tagged: word-sized integer that is either | 113 // - Tagged: word-sized integer that is either |
113 // - a signed small integer (31 or 32 bits plus a tag) | 114 // - a signed small integer (31 or 32 bits plus a tag) |
114 // - a tagged pointer to a HeapNumber object that has a float64 field | 115 // - a tagged pointer to a HeapNumber object that has a float64 field |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 const Operator* ChangeBitToTagged(); | 176 const Operator* ChangeBitToTagged(); |
176 const Operator* TruncateTaggedToWord32(); | 177 const Operator* TruncateTaggedToWord32(); |
177 | 178 |
178 const Operator* ObjectIsCallable(); | 179 const Operator* ObjectIsCallable(); |
179 const Operator* ObjectIsNumber(); | 180 const Operator* ObjectIsNumber(); |
180 const Operator* ObjectIsReceiver(); | 181 const Operator* ObjectIsReceiver(); |
181 const Operator* ObjectIsSmi(); | 182 const Operator* ObjectIsSmi(); |
182 const Operator* ObjectIsString(); | 183 const Operator* ObjectIsString(); |
183 const Operator* ObjectIsUndetectable(); | 184 const Operator* ObjectIsUndetectable(); |
184 | 185 |
| 186 const Operator* TypeGuard(Type* type); |
| 187 |
185 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); | 188 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); |
186 | 189 |
187 const Operator* LoadField(FieldAccess const&); | 190 const Operator* LoadField(FieldAccess const&); |
188 const Operator* StoreField(FieldAccess const&); | 191 const Operator* StoreField(FieldAccess const&); |
189 | 192 |
190 // load-buffer buffer, offset, length | 193 // load-buffer buffer, offset, length |
191 const Operator* LoadBuffer(BufferAccess); | 194 const Operator* LoadBuffer(BufferAccess); |
192 | 195 |
193 // store-buffer buffer, offset, length, value | 196 // store-buffer buffer, offset, length, value |
194 const Operator* StoreBuffer(BufferAccess); | 197 const Operator* StoreBuffer(BufferAccess); |
(...skipping 11 matching lines...) Expand all Loading... |
206 Zone* const zone_; | 209 Zone* const zone_; |
207 | 210 |
208 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); | 211 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); |
209 }; | 212 }; |
210 | 213 |
211 } // namespace compiler | 214 } // namespace compiler |
212 } // namespace internal | 215 } // namespace internal |
213 } // namespace v8 | 216 } // namespace v8 |
214 | 217 |
215 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 218 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
OLD | NEW |