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

Unified Diff: src/compiler/js-type-feedback-lowering.h

Issue 1216593003: [turbofan] Optimize string "length" property access based on types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 5 years, 5 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-type-feedback-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-type-feedback-lowering.h
diff --git a/src/compiler/js-type-feedback-lowering.h b/src/compiler/js-type-feedback-lowering.h
new file mode 100644
index 0000000000000000000000000000000000000000..19f4df0ffa1845ede72d94c37ce1a3bf1d55e486
--- /dev/null
+++ b/src/compiler/js-type-feedback-lowering.h
@@ -0,0 +1,62 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_JS_TYPE_FEEDBACK_LOWERING_H_
+#define V8_COMPILER_JS_TYPE_FEEDBACK_LOWERING_H_
+
+#include "src/base/flags.h"
+#include "src/compiler/graph-reducer.h"
+#include "src/compiler/simplified-operator.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Forward declarations.
+class CommonOperatorBuilder;
+class JSGraph;
+class MachineOperatorBuilder;
+
+
+// Lowers JS-level operators to simplified operators based on type feedback.
+class JSTypeFeedbackLowering final : public AdvancedReducer {
+ public:
+ // Various configuration flags to control the operation of this lowering.
+ enum Flag {
+ kNoFlags = 0,
+ kDeoptimizationEnabled = 1 << 0,
+ };
+ typedef base::Flags<Flag> Flags;
+
+ JSTypeFeedbackLowering(Editor* editor, Flags flags, JSGraph* jsgraph);
+ ~JSTypeFeedbackLowering() final {}
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Reduction ReduceJSLoadNamed(Node* node);
+
+ Factory* factory() const;
+ Flags flags() const { return flags_; }
+ Graph* graph() const;
+ Isolate* isolate() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ CommonOperatorBuilder* common() const;
+ MachineOperatorBuilder* machine() const;
+ SimplifiedOperatorBuilder* simplified() { return &simplified_; }
+
+ Flags const flags_;
+ JSGraph* const jsgraph_;
+ SimplifiedOperatorBuilder simplified_;
+
+ DISALLOW_COPY_AND_ASSIGN(JSTypeFeedbackLowering);
+};
+
+DEFINE_OPERATORS_FOR_FLAGS(JSTypeFeedbackLowering::Flags)
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_JS_TYPE_FEEDBACK_LOWERING_H_
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-type-feedback-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698