| 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/base/compiler-specific.h" | 10 #include "src/base/compiler-specific.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 size_t hash_value(NumberOperationHint); | 238 size_t hash_value(NumberOperationHint); |
| 239 | 239 |
| 240 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, NumberOperationHint); | 240 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, NumberOperationHint); |
| 241 | 241 |
| 242 NumberOperationHint NumberOperationHintOf(const Operator* op) | 242 NumberOperationHint NumberOperationHintOf(const Operator* op) |
| 243 WARN_UNUSED_RESULT; | 243 WARN_UNUSED_RESULT; |
| 244 | 244 |
| 245 int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT; | 245 int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT; |
| 246 bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT; | 246 bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT; |
| 247 | 247 |
| 248 class AllocateParameters { |
| 249 public: |
| 250 AllocateParameters(Type* type, PretenureFlag pretenure) |
| 251 : type_(type), pretenure_(pretenure) {} |
| 252 |
| 253 Type* type() const { return type_; } |
| 254 PretenureFlag pretenure() const { return pretenure_; } |
| 255 |
| 256 private: |
| 257 Type* type_; |
| 258 PretenureFlag pretenure_; |
| 259 }; |
| 260 |
| 261 size_t hash_value(AllocateParameters); |
| 262 |
| 263 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, AllocateParameters); |
| 264 |
| 265 bool operator==(AllocateParameters const&, AllocateParameters const&); |
| 266 bool operator!=(AllocateParameters const&, AllocateParameters const&); |
| 267 |
| 248 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT; | 268 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT; |
| 249 | 269 |
| 270 Type* AllocateTypeOf(const Operator* op) WARN_UNUSED_RESULT; |
| 271 |
| 250 UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT; | 272 UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT; |
| 251 | 273 |
| 252 // Interface for building simplified operators, which represent the | 274 // Interface for building simplified operators, which represent the |
| 253 // medium-level operations of V8, including adding numbers, allocating objects, | 275 // medium-level operations of V8, including adding numbers, allocating objects, |
| 254 // indexing into objects and arrays, etc. | 276 // indexing into objects and arrays, etc. |
| 255 // All operators are typed but many are representation independent. | 277 // All operators are typed but many are representation independent. |
| 256 | 278 |
| 257 // Number values from JS can be in one of these representations: | 279 // Number values from JS can be in one of these representations: |
| 258 // - Tagged: word-sized integer that is either | 280 // - Tagged: word-sized integer that is either |
| 259 // - a signed small integer (31 or 32 bits plus a tag) | 281 // - a signed small integer (31 or 32 bits plus a tag) |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 457 |
| 436 // ensure-writable-fast-elements object, elements | 458 // ensure-writable-fast-elements object, elements |
| 437 const Operator* EnsureWritableFastElements(); | 459 const Operator* EnsureWritableFastElements(); |
| 438 | 460 |
| 439 // maybe-grow-fast-elements object, elements, index, length | 461 // maybe-grow-fast-elements object, elements, index, length |
| 440 const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags); | 462 const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags); |
| 441 | 463 |
| 442 // transition-elements-kind object, from-map, to-map | 464 // transition-elements-kind object, from-map, to-map |
| 443 const Operator* TransitionElementsKind(ElementsTransition transition); | 465 const Operator* TransitionElementsKind(ElementsTransition transition); |
| 444 | 466 |
| 445 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); | 467 const Operator* Allocate(Type* type, PretenureFlag pretenure = NOT_TENURED); |
| 446 | 468 |
| 447 const Operator* LoadField(FieldAccess const&); | 469 const Operator* LoadField(FieldAccess const&); |
| 448 const Operator* StoreField(FieldAccess const&); | 470 const Operator* StoreField(FieldAccess const&); |
| 449 | 471 |
| 450 // load-buffer buffer, offset, length | 472 // load-buffer buffer, offset, length |
| 451 const Operator* LoadBuffer(BufferAccess); | 473 const Operator* LoadBuffer(BufferAccess); |
| 452 | 474 |
| 453 // store-buffer buffer, offset, length, value | 475 // store-buffer buffer, offset, length, value |
| 454 const Operator* StoreBuffer(BufferAccess); | 476 const Operator* StoreBuffer(BufferAccess); |
| 455 | 477 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 472 Zone* const zone_; | 494 Zone* const zone_; |
| 473 | 495 |
| 474 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); | 496 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); |
| 475 }; | 497 }; |
| 476 | 498 |
| 477 } // namespace compiler | 499 } // namespace compiler |
| 478 } // namespace internal | 500 } // namespace internal |
| 479 } // namespace v8 | 501 } // namespace v8 |
| 480 | 502 |
| 481 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ | 503 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ |
| OLD | NEW |