Chromium Code Reviews| Index: src/compiler/js-operator.h |
| diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
| index 4776a8fe30b88778cc7bde565088919d6ab6a430..98a26298289ad0d60213add4acfd392e803a8c9a 100644 |
| --- a/src/compiler/js-operator.h |
| +++ b/src/compiler/js-operator.h |
| @@ -407,6 +407,32 @@ std::ostream& operator<<(std::ostream&, StorePropertyParameters const&); |
| const StorePropertyParameters& StorePropertyParametersOf(const Operator* op); |
| +// Defines specifics about arguments object or rest parameter creation. This is |
| +// used as a parameter by JSCreateArguments operators. |
| +class CreateArgumentsParameters final { |
| + public: |
| + enum Type { MAPPED_ARGUMENTS, UNMAPPED_ARGUMENTS, REST_ARRAY }; |
|
Benedikt Meurer
2015/09/15 04:35:50
Style guide nit: use kMappedArguments, kUnmappedAr
Michael Starzinger
2015/09/15 07:39:27
Done.
|
| + CreateArgumentsParameters(Type type, int start_index) |
| + : type_(type), start_index_(start_index) {} |
| + |
| + Type type() const { return type_; } |
| + int start_index() const { return start_index_; } |
| + |
| + private: |
| + const Type type_; |
| + const int start_index_; |
| +}; |
| + |
| +bool operator==(CreateArgumentsParameters const&, |
| + CreateArgumentsParameters const&); |
| +bool operator!=(CreateArgumentsParameters const&, |
| + CreateArgumentsParameters const&); |
| + |
| +size_t hash_value(CreateArgumentsParameters const&); |
| + |
| +std::ostream& operator<<(std::ostream&, CreateArgumentsParameters const&); |
| + |
| + |
| // Defines shared information for the closure that should be created. This is |
| // used as a parameter by JSCreateClosure operators. |
| class CreateClosureParameters final { |
| @@ -469,6 +495,8 @@ class JSOperatorBuilder final : public ZoneObject { |
| const Operator* Yield(); |
| const Operator* Create(); |
| + const Operator* CreateArguments(CreateArgumentsParameters::Type type, |
| + int start_index); |
| const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| PretenureFlag pretenure); |
| const Operator* CreateLiteralArray(int literal_flags); |