Chromium Code Reviews| Index: src/compiler/js-operator.h |
| diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
| index 401f1f0b30e3e4629529c3d30de65d28c3b1c003..8f7c551469df064031d2cd846e3c8e8d3caa5163 100644 |
| --- a/src/compiler/js-operator.h |
| +++ b/src/compiler/js-operator.h |
| @@ -206,6 +206,32 @@ std::ostream& operator<<(std::ostream&, StoreNamedParameters const&); |
| const StoreNamedParameters& StoreNamedParametersOf(const Operator* op); |
| +// Defines shared information for the closure that should be created. This is |
| +// used as a parameter by JSCreateClosure operators. |
| +class CreateClosureParameters final { |
|
titzer
2015/04/27 08:38:48
Make me a struct?
|
| + public: |
| + CreateClosureParameters(Handle<SharedFunctionInfo> shared_info, |
| + PretenureFlag pretenure) |
| + : shared_info_(shared_info), pretenure_(pretenure) {} |
| + |
| + Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
| + PretenureFlag pretenure() const { return pretenure_; } |
| + |
| + private: |
| + const Handle<SharedFunctionInfo> shared_info_; |
| + const PretenureFlag pretenure_; |
| +}; |
| + |
| +bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); |
| +bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); |
| + |
| +size_t hash_value(CreateClosureParameters const&); |
| + |
| +std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
| + |
| +const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); |
| + |
| + |
| // Interface for building JavaScript-level operators, e.g. directly from the |
| // AST. Most operators have no parameters, thus can be globally shared for all |
| // graphs. |
| @@ -242,6 +268,8 @@ class JSOperatorBuilder final : public ZoneObject { |
| const Operator* Yield(); |
| const Operator* Create(); |
| + const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| + PretenureFlag pretenure); |
| const Operator* CallFunction(size_t arity, CallFunctionFlags flags); |
| const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |