Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1175)

Unified Diff: src/compiler/js-builtin-reducer.h

Issue 2239703002: [turbofan] Add inlined Array.prototype.pop support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only convert hole to undefined for holey elements Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698