OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_COMPILER_JS_INLINING_HEURISTIC_H_ |
| 6 #define V8_COMPILER_JS_INLINING_HEURISTIC_H_ |
| 7 |
| 8 #include "src/compiler/js-inlining.h" |
| 9 |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 namespace compiler { |
| 13 |
| 14 class JSInliningHeuristic final : public AdvancedReducer { |
| 15 public: |
| 16 enum Mode { kRestrictedInlining, kGeneralInlining }; |
| 17 JSInliningHeuristic(Editor* editor, Mode mode, Zone* local_zone, |
| 18 CompilationInfo* info, JSGraph* jsgraph) |
| 19 : AdvancedReducer(editor), |
| 20 mode_(mode), |
| 21 inliner_(editor, local_zone, info, jsgraph) {} |
| 22 |
| 23 Reduction Reduce(Node* node) final; |
| 24 |
| 25 private: |
| 26 Mode const mode_; |
| 27 JSInliner inliner_; |
| 28 }; |
| 29 |
| 30 } // namespace compiler |
| 31 } // namespace internal |
| 32 } // namespace v8 |
| 33 |
| 34 #endif // V8_COMPILER_JS_INLINING_HEURISTIC_H_ |
OLD | NEW |