Index: src/compiler/js-builtin-reducer.h |
diff --git a/src/compiler/js-builtin-reducer.h b/src/compiler/js-builtin-reducer.h |
index 57c235455b093cb01607bded29dcee6d6294d093..7d7226993ec19988abe7a37014c5b76190cbbedd 100644 |
--- a/src/compiler/js-builtin-reducer.h |
+++ b/src/compiler/js-builtin-reducer.h |
@@ -5,12 +5,15 @@ |
#ifndef V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
#define V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
+#include "src/base/flags.h" |
#include "src/compiler/graph-reducer.h" |
namespace v8 { |
namespace internal { |
// Forward declarations. |
+class CompilationDependencies; |
+class Factory; |
class TypeCache; |
namespace compiler { |
@@ -24,12 +27,21 @@ class SimplifiedOperatorBuilder; |
class JSBuiltinReducer final : public AdvancedReducer { |
public: |
- explicit JSBuiltinReducer(Editor* editor, JSGraph* jsgraph); |
+ // Flags that control the mode of operation. |
+ enum Flag { |
+ kNoFlags = 0u, |
+ kDeoptimizationEnabled = 1u << 0, |
+ }; |
+ typedef base::Flags<Flag> Flags; |
+ |
+ JSBuiltinReducer(Editor* editor, JSGraph* jsgraph, Flags flags, |
+ CompilationDependencies* dependencies); |
~JSBuiltinReducer() final {} |
Reduction Reduce(Node* node) final; |
private: |
+ Reduction ReduceArrayPop(Node* node); |
Reduction ReduceMathAbs(Node* node); |
Reduction ReduceMathAcos(Node* node); |
Reduction ReduceMathAcosh(Node* node); |
@@ -74,16 +86,23 @@ class JSBuiltinReducer final : public AdvancedReducer { |
Node* ToNumber(Node* value); |
Node* ToUint32(Node* value); |
+ Flags flags() const { return flags_; } |
Graph* graph() const; |
+ Factory* factory() const; |
JSGraph* jsgraph() const { return jsgraph_; } |
Isolate* isolate() const; |
CommonOperatorBuilder* common() const; |
SimplifiedOperatorBuilder* simplified() const; |
+ CompilationDependencies* dependencies() const { return dependencies_; } |
+ CompilationDependencies* const dependencies_; |
+ Flags const flags_; |
JSGraph* const jsgraph_; |
TypeCache const& type_cache_; |
}; |
+DEFINE_OPERATORS_FOR_FLAGS(JSBuiltinReducer::Flags) |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |