| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
| 6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler/type-hints.h" | 8 #include "src/compiler/type-hints.h" |
| 9 #include "src/runtime/runtime.h" | 9 #include "src/runtime/runtime.h" |
| 10 | 10 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 bool operator==(PropertyAccess const&, PropertyAccess const&); | 341 bool operator==(PropertyAccess const&, PropertyAccess const&); |
| 342 bool operator!=(PropertyAccess const&, PropertyAccess const&); | 342 bool operator!=(PropertyAccess const&, PropertyAccess const&); |
| 343 | 343 |
| 344 size_t hash_value(PropertyAccess const&); | 344 size_t hash_value(PropertyAccess const&); |
| 345 | 345 |
| 346 std::ostream& operator<<(std::ostream&, PropertyAccess const&); | 346 std::ostream& operator<<(std::ostream&, PropertyAccess const&); |
| 347 | 347 |
| 348 PropertyAccess const& PropertyAccessOf(const Operator* op); | 348 PropertyAccess const& PropertyAccessOf(const Operator* op); |
| 349 | 349 |
| 350 | 350 |
| 351 // Defines specifics about arguments object or rest parameter creation. This is | 351 // CreateArgumentsType is used as parameter to JSCreateArguments nodes. |
| 352 // used as a parameter by JSCreateArguments operators. | 352 CreateArgumentsType const& CreateArgumentsTypeOf(const Operator* op); |
| 353 class CreateArgumentsParameters final { | |
| 354 public: | |
| 355 enum Type { kMappedArguments, kUnmappedArguments, kRestArray }; | |
| 356 CreateArgumentsParameters(Type type, int start_index) | |
| 357 : type_(type), start_index_(start_index) {} | |
| 358 | |
| 359 Type type() const { return type_; } | |
| 360 int start_index() const { return start_index_; } | |
| 361 | |
| 362 private: | |
| 363 const Type type_; | |
| 364 const int start_index_; | |
| 365 }; | |
| 366 | |
| 367 bool operator==(CreateArgumentsParameters const&, | |
| 368 CreateArgumentsParameters const&); | |
| 369 bool operator!=(CreateArgumentsParameters const&, | |
| 370 CreateArgumentsParameters const&); | |
| 371 | |
| 372 size_t hash_value(CreateArgumentsParameters const&); | |
| 373 | |
| 374 std::ostream& operator<<(std::ostream&, CreateArgumentsParameters const&); | |
| 375 | |
| 376 const CreateArgumentsParameters& CreateArgumentsParametersOf( | |
| 377 const Operator* op); | |
| 378 | 353 |
| 379 | 354 |
| 380 // Defines shared information for the array that should be created. This is | 355 // Defines shared information for the array that should be created. This is |
| 381 // used as parameter by JSCreateArray operators. | 356 // used as parameter by JSCreateArray operators. |
| 382 class CreateArrayParameters final { | 357 class CreateArrayParameters final { |
| 383 public: | 358 public: |
| 384 explicit CreateArrayParameters(size_t arity, Handle<AllocationSite> site) | 359 explicit CreateArrayParameters(size_t arity, Handle<AllocationSite> site) |
| 385 : arity_(arity), site_(site) {} | 360 : arity_(arity), site_(site) {} |
| 386 | 361 |
| 387 size_t arity() const { return arity_; } | 362 size_t arity() const { return arity_; } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 BinaryOperationHints hints); | 469 BinaryOperationHints hints); |
| 495 | 470 |
| 496 const Operator* ToBoolean(ToBooleanHints hints); | 471 const Operator* ToBoolean(ToBooleanHints hints); |
| 497 const Operator* ToNumber(); | 472 const Operator* ToNumber(); |
| 498 const Operator* ToString(); | 473 const Operator* ToString(); |
| 499 const Operator* ToName(); | 474 const Operator* ToName(); |
| 500 const Operator* ToObject(); | 475 const Operator* ToObject(); |
| 501 const Operator* Yield(); | 476 const Operator* Yield(); |
| 502 | 477 |
| 503 const Operator* Create(); | 478 const Operator* Create(); |
| 504 const Operator* CreateArguments(CreateArgumentsParameters::Type type, | 479 const Operator* CreateArguments(CreateArgumentsType type); |
| 505 int start_index); | |
| 506 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); | 480 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
| 507 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 481 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| 508 PretenureFlag pretenure); | 482 PretenureFlag pretenure); |
| 509 const Operator* CreateIterResultObject(); | 483 const Operator* CreateIterResultObject(); |
| 510 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, | 484 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, |
| 511 int literal_flags, int literal_index); | 485 int literal_flags, int literal_index); |
| 512 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, | 486 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
| 513 int literal_flags, int literal_index); | 487 int literal_flags, int literal_index); |
| 514 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | 488 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
| 515 int literal_flags, int literal_index); | 489 int literal_flags, int literal_index); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 Zone* const zone_; | 554 Zone* const zone_; |
| 581 | 555 |
| 582 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 556 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
| 583 }; | 557 }; |
| 584 | 558 |
| 585 } // namespace compiler | 559 } // namespace compiler |
| 586 } // namespace internal | 560 } // namespace internal |
| 587 } // namespace v8 | 561 } // namespace v8 |
| 588 | 562 |
| 589 #endif // V8_COMPILER_JS_OPERATOR_H_ | 563 #endif // V8_COMPILER_JS_OPERATOR_H_ |
| OLD | NEW |