| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_JS_TYPE_FEEDBACK_H_ | 5 #ifndef V8_COMPILER_JS_TYPE_FEEDBACK_H_ |
| 6 #define V8_COMPILER_JS_TYPE_FEEDBACK_H_ | 6 #define V8_COMPILER_JS_TYPE_FEEDBACK_H_ |
| 7 | 7 |
| 8 #include "src/utils.h" | 8 #include "src/utils.h" |
| 9 | 9 |
| 10 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 TypeFeedbackId find(Node* node) { | 41 TypeFeedbackId find(Node* node) { |
| 42 TypeFeedbackIdMap::const_iterator it = map_.find(node->id()); | 42 TypeFeedbackIdMap::const_iterator it = map_.find(node->id()); |
| 43 return it == map_.end() ? TypeFeedbackId::None() : it->second; | 43 return it == map_.end() ? TypeFeedbackId::None() : it->second; |
| 44 } | 44 } |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 | 47 |
| 48 // Specializes a graph to the type feedback recorded in the | 48 // Specializes a graph to the type feedback recorded in the |
| 49 // {js_type_feedback} provided to the constructor. | 49 // {js_type_feedback} provided to the constructor. |
| 50 class JSTypeFeedbackSpecializer : public Reducer { | 50 class JSTypeFeedbackSpecializer : public AdvancedReducer { |
| 51 public: | 51 public: |
| 52 JSTypeFeedbackSpecializer(JSGraph* jsgraph, | 52 JSTypeFeedbackSpecializer(Editor* editor, JSGraph* jsgraph, |
| 53 JSTypeFeedbackTable* js_type_feedback, | 53 JSTypeFeedbackTable* js_type_feedback, |
| 54 TypeFeedbackOracle* oracle, | 54 TypeFeedbackOracle* oracle, |
| 55 Handle<GlobalObject> global_object, | 55 Handle<GlobalObject> global_object, |
| 56 CompilationDependencies* dependencies) | 56 CompilationDependencies* dependencies) |
| 57 : jsgraph_(jsgraph), | 57 : AdvancedReducer(editor), |
| 58 jsgraph_(jsgraph), |
| 58 simplified_(jsgraph->graph()->zone()), | 59 simplified_(jsgraph->graph()->zone()), |
| 59 js_type_feedback_(js_type_feedback), | 60 js_type_feedback_(js_type_feedback), |
| 60 oracle_(oracle), | 61 oracle_(oracle), |
| 61 global_object_(global_object), | 62 global_object_(global_object), |
| 62 dependencies_(dependencies) { | 63 dependencies_(dependencies) { |
| 63 CHECK(js_type_feedback); | 64 CHECK(js_type_feedback); |
| 64 } | 65 } |
| 65 | 66 |
| 66 Reduction Reduce(Node* node) override; | 67 Reduction Reduce(Node* node) override; |
| 67 | 68 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 93 Handle<Name> property, SmallMapList* maps); | 94 Handle<Name> property, SmallMapList* maps); |
| 94 | 95 |
| 95 Node* GetFrameStateBefore(Node* node); | 96 Node* GetFrameStateBefore(Node* node); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace compiler | 99 } // namespace compiler |
| 99 } // namespace internal | 100 } // namespace internal |
| 100 } // namespace v8 | 101 } // namespace v8 |
| 101 | 102 |
| 102 #endif | 103 #endif |
| OLD | NEW |