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

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

Issue 1407913003: [turbofan] Remove obsolete JSTypeFeedbackSpecializer and JSTypeFeedbackLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@NamedAccess
Patch Set: REBASE Created 5 years, 2 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/ast-graph-builder.cc ('k') | src/compiler/js-type-feedback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-type-feedback.h
diff --git a/src/compiler/js-type-feedback.h b/src/compiler/js-type-feedback.h
deleted file mode 100644
index a5d6bee8a96aa350171ed4808f0392211d381130..0000000000000000000000000000000000000000
--- a/src/compiler/js-type-feedback.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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_H_
-#define V8_COMPILER_JS_TYPE_FEEDBACK_H_
-
-#include "src/utils.h"
-
-#include "src/compiler/graph-reducer.h"
-#include "src/compiler/js-graph.h"
-#include "src/compiler/node-aux-data.h"
-
-namespace v8 {
-namespace internal {
-
-class TypeFeedbackOracle;
-class SmallMapList;
-class CompilationDependencies;
-
-namespace compiler {
-
-// Stores type feedback information for nodes in the graph in a separate
-// data structure.
-class JSTypeFeedbackTable : public ZoneObject {
- public:
- explicit JSTypeFeedbackTable(Zone* zone);
-
- void Record(Node* node, TypeFeedbackId id);
- void Record(Node* node, FeedbackVectorSlot slot);
-
- private:
- friend class JSTypeFeedbackSpecializer;
- typedef std::map<NodeId, TypeFeedbackId, std::less<NodeId>,
- zone_allocator<TypeFeedbackId> > TypeFeedbackIdMap;
- typedef std::map<NodeId, FeedbackVectorSlot, std::less<NodeId>,
- zone_allocator<FeedbackVectorSlot> > FeedbackVectorSlotMap;
-
- TypeFeedbackIdMap type_feedback_id_map_;
- FeedbackVectorSlotMap feedback_vector_slot_map_;
-
- TypeFeedbackId FindTypeFeedbackId(Node* node) {
- TypeFeedbackIdMap::const_iterator it =
- type_feedback_id_map_.find(node->id());
- return it == type_feedback_id_map_.end() ? TypeFeedbackId::None()
- : it->second;
- }
-
- FeedbackVectorSlot FindFeedbackVectorSlot(Node* node) {
- FeedbackVectorSlotMap::const_iterator it =
- feedback_vector_slot_map_.find(node->id());
- return it == feedback_vector_slot_map_.end() ? FeedbackVectorSlot::Invalid()
- : it->second;
- }
-};
-
-
-// Specializes a graph to the type feedback recorded in the
-// {js_type_feedback} provided to the constructor.
-class JSTypeFeedbackSpecializer : public AdvancedReducer {
- public:
- enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled };
-
- JSTypeFeedbackSpecializer(Editor* editor, JSGraph* jsgraph,
- JSTypeFeedbackTable* js_type_feedback,
- TypeFeedbackOracle* oracle,
- Handle<GlobalObject> global_object,
- DeoptimizationMode mode,
- CompilationDependencies* dependencies)
- : AdvancedReducer(editor),
- jsgraph_(jsgraph),
- js_type_feedback_(js_type_feedback),
- oracle_(oracle),
- global_object_(global_object),
- mode_(mode),
- dependencies_(dependencies) {
- CHECK_NOT_NULL(js_type_feedback);
- }
-
- Reduction Reduce(Node* node) override;
-
- // Visible for unit testing.
- Reduction ReduceJSLoadGlobal(Node* node);
- Reduction ReduceJSLoadNamed(Node* node);
- Reduction ReduceJSLoadProperty(Node* node);
- Reduction ReduceJSStoreNamed(Node* node);
- Reduction ReduceJSStoreProperty(Node* node);
-
- private:
- JSGraph* jsgraph_;
- JSTypeFeedbackTable* js_type_feedback_;
- TypeFeedbackOracle* oracle_;
- Handle<GlobalObject> global_object_;
- DeoptimizationMode const mode_;
- CompilationDependencies* dependencies_;
-
- TypeFeedbackOracle* oracle() { return oracle_; }
- Graph* graph() { return jsgraph_->graph(); }
- JSGraph* jsgraph() { return jsgraph_; }
- CommonOperatorBuilder* common() { return jsgraph_->common(); }
- SimplifiedOperatorBuilder* simplified() { return jsgraph_->simplified(); }
- DeoptimizationMode mode() const { return mode_; }
-
- void BuildMapCheck(Node* receiver, Handle<Map> map, bool smi_check,
- Node* effect, Node* control, Node** success, Node** fail);
-
- Node* GetFrameStateBefore(Node* node);
-};
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
-
-#endif
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-type-feedback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698