Chromium Code Reviews| 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/operator.h" | 10 #include "src/compiler/operator.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 | 178 |
| 179 size_t hash_value(NumberOperationHint); | 179 size_t hash_value(NumberOperationHint); |
| 180 | 180 |
| 181 std::ostream& operator<<(std::ostream&, NumberOperationHint); | 181 std::ostream& operator<<(std::ostream&, NumberOperationHint); |
| 182 | 182 |
| 183 NumberOperationHint NumberOperationHintOf(const Operator* op) | 183 NumberOperationHint NumberOperationHintOf(const Operator* op) |
| 184 WARN_UNUSED_RESULT; | 184 WARN_UNUSED_RESULT; |
| 185 | 185 |
| 186 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT; | 186 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT; |
| 187 | 187 |
| 188 enum class StringOperationHint : uint8_t { | |
|
Benedikt Meurer
2016/09/29 13:04:27
Please remove this optimization from this CL. Let'
| |
| 189 kAny, // No restrictions on String input type | |
| 190 kSeqStringOrExternalString, // SeqString or ExternalString only | |
| 191 }; | |
| 192 | |
| 193 StringOperationHint StringOperationHintOf(const Operator*) WARN_UNUSED_RESULT; | |
| 194 UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT; | |
| 195 | |
| 188 // Interface for building simplified operators, which represent the | 196 // Interface for building simplified operators, which represent the |
| 189 // medium-level operations of V8, including adding numbers, allocating objects, | 197 // medium-level operations of V8, including adding numbers, allocating objects, |
| 190 // indexing into objects and arrays, etc. | 198 // indexing into objects and arrays, etc. |
| 191 // All operators are typed but many are representation independent. | 199 // All operators are typed but many are representation independent. |
| 192 | 200 |
| 193 // Number values from JS can be in one of these representations: | 201 // Number values from JS can be in one of these representations: |
| 194 // - Tagged: word-sized integer that is either | 202 // - Tagged: word-sized integer that is either |
| 195 // - a signed small integer (31 or 32 bits plus a tag) | 203 // - a signed small integer (31 or 32 bits plus a tag) |
| 196 // - a tagged pointer to a HeapNumber object that has a float64 field | 204 // - a tagged pointer to a HeapNumber object that has a float64 field |
| 197 // - Int32: an untagged signed 32-bit integer | 205 // - Int32: an untagged signed 32-bit integer |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 | 288 |
| 281 const Operator* SpeculativeNumberLessThan(NumberOperationHint hint); | 289 const Operator* SpeculativeNumberLessThan(NumberOperationHint hint); |
| 282 const Operator* SpeculativeNumberLessThanOrEqual(NumberOperationHint hint); | 290 const Operator* SpeculativeNumberLessThanOrEqual(NumberOperationHint hint); |
| 283 const Operator* SpeculativeNumberEqual(NumberOperationHint hint); | 291 const Operator* SpeculativeNumberEqual(NumberOperationHint hint); |
| 284 | 292 |
| 285 const Operator* ReferenceEqual(); | 293 const Operator* ReferenceEqual(); |
| 286 | 294 |
| 287 const Operator* StringEqual(); | 295 const Operator* StringEqual(); |
| 288 const Operator* StringLessThan(); | 296 const Operator* StringLessThan(); |
| 289 const Operator* StringLessThanOrEqual(); | 297 const Operator* StringLessThanOrEqual(); |
| 290 const Operator* StringCharCodeAt(); | 298 const Operator* StringCharCodeAt( |
| 299 StringOperationHint hint = StringOperationHint::kAny); | |
| 291 const Operator* StringFromCharCode(); | 300 const Operator* StringFromCharCode(); |
| 301 const Operator* StringFromCodePoint(UnicodeEncoding encoding); | |
| 292 | 302 |
| 293 const Operator* PlainPrimitiveToNumber(); | 303 const Operator* PlainPrimitiveToNumber(); |
| 294 const Operator* PlainPrimitiveToWord32(); | 304 const Operator* PlainPrimitiveToWord32(); |
| 295 const Operator* PlainPrimitiveToFloat64(); | 305 const Operator* PlainPrimitiveToFloat64(); |
| 296 | 306 |
| 297 const Operator* ChangeTaggedSignedToInt32(); | 307 const Operator* ChangeTaggedSignedToInt32(); |
| 298 const Operator* ChangeTaggedToInt32(); | 308 const Operator* ChangeTaggedToInt32(); |
| 299 const Operator* ChangeTaggedToUint32(); | 309 const Operator* ChangeTaggedToUint32(); |
| 300 const Operator* ChangeTaggedToFloat64(); | 310 const Operator* ChangeTaggedToFloat64(); |
| 301 const Operator* ChangeInt31ToTaggedSigned(); | 311 const Operator* ChangeInt31ToTaggedSigned(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 Zone* const zone_; | 397 Zone* const zone_; |
| 388 | 398 |
| 389 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); | 399 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); |
| 390 }; | 400 }; |
| 391 | 401 |
| 392 } // namespace compiler | 402 } // namespace compiler |
| 393 } // namespace internal | 403 } // namespace internal |
| 394 } // namespace v8 | 404 } // namespace v8 |
| 395 | 405 |
| 396 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 406 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
| OLD | NEW |