| Index: src/compiler/js-call-reducer.h
|
| diff --git a/src/compiler/js-call-reducer.h b/src/compiler/js-call-reducer.h
|
| index 04fc8b0c5ca6c43cc4072580d80eccd93839564c..cc909f882cc3bbebcfbe3b861047b6c2298be72d 100644
|
| --- a/src/compiler/js-call-reducer.h
|
| +++ b/src/compiler/js-call-reducer.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef V8_COMPILER_JS_CALL_REDUCER_H_
|
| #define V8_COMPILER_JS_CALL_REDUCER_H_
|
|
|
| +#include "src/base/flags.h"
|
| #include "src/compiler/graph-reducer.h"
|
|
|
| namespace v8 {
|
| @@ -12,30 +13,47 @@ namespace internal {
|
| namespace compiler {
|
|
|
| // Forward declarations.
|
| +class CommonOperatorBuilder;
|
| class JSGraph;
|
| class JSOperatorBuilder;
|
| +class SimplifiedOperatorBuilder;
|
|
|
|
|
| // Performs strength reduction on {JSCallFunction} nodes, which might allow
|
| // inlining or other optimizations to be performed afterwards.
|
| class JSCallReducer final : public Reducer {
|
| public:
|
| - explicit JSCallReducer(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
|
| + // Flags that control the mode of operation.
|
| + enum Flag {
|
| + kNoFlags = 0u,
|
| + kDeoptimizationEnabled = 1u << 0,
|
| + };
|
| + typedef base::Flags<Flag> Flags;
|
| +
|
| + JSCallReducer(JSGraph* jsgraph, Flags flags)
|
| + : jsgraph_(jsgraph), flags_(flags) {}
|
|
|
| Reduction Reduce(Node* node) final;
|
|
|
| private:
|
| Reduction ReduceFunctionPrototypeApply(Node* node);
|
| Reduction ReduceFunctionPrototypeCall(Node* node);
|
| + Reduction ReduceJSCallFunction(Node* node);
|
|
|
| Graph* graph() const;
|
| + Flags flags() const { return flags_; }
|
| JSGraph* jsgraph() const { return jsgraph_; }
|
| Isolate* isolate() const;
|
| + CommonOperatorBuilder* common() const;
|
| JSOperatorBuilder* javascript() const;
|
| + SimplifiedOperatorBuilder* simplified() const;
|
|
|
| JSGraph* const jsgraph_;
|
| + Flags const flags_;
|
| };
|
|
|
| +DEFINE_OPERATORS_FOR_FLAGS(JSCallReducer::Flags)
|
| +
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|