| 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_INTRINSIC_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
| 6 #define V8_COMPILER_JS_INTRINSIC_LOWERING_H_ | 6 #define V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
| 7 | 7 |
| 8 #include "src/base/compiler-specific.h" |
| 8 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
| 11 #include "src/globals.h" |
| 10 | 12 |
| 11 namespace v8 { | 13 namespace v8 { |
| 12 namespace internal { | 14 namespace internal { |
| 13 | 15 |
| 14 // Forward declarations. | 16 // Forward declarations. |
| 15 class Callable; | 17 class Callable; |
| 16 | 18 |
| 17 | 19 |
| 18 namespace compiler { | 20 namespace compiler { |
| 19 | 21 |
| 20 // Forward declarations. | 22 // Forward declarations. |
| 21 class CommonOperatorBuilder; | 23 class CommonOperatorBuilder; |
| 22 class JSOperatorBuilder; | 24 class JSOperatorBuilder; |
| 23 class JSGraph; | 25 class JSGraph; |
| 24 class SimplifiedOperatorBuilder; | 26 class SimplifiedOperatorBuilder; |
| 25 | 27 |
| 26 | 28 |
| 27 // Lowers certain JS-level runtime calls. | 29 // Lowers certain JS-level runtime calls. |
| 28 class JSIntrinsicLowering final : public AdvancedReducer { | 30 class V8_EXPORT_PRIVATE JSIntrinsicLowering final |
| 31 : public NON_EXPORTED_BASE(AdvancedReducer) { |
| 29 public: | 32 public: |
| 30 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; | 33 enum DeoptimizationMode { kDeoptimizationEnabled, kDeoptimizationDisabled }; |
| 31 | 34 |
| 32 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, | 35 JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, |
| 33 DeoptimizationMode mode); | 36 DeoptimizationMode mode); |
| 34 ~JSIntrinsicLowering() final {} | 37 ~JSIntrinsicLowering() final {} |
| 35 | 38 |
| 36 Reduction Reduce(Node* node) final; | 39 Reduction Reduce(Node* node) final; |
| 37 | 40 |
| 38 private: | 41 private: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 81 |
| 79 JSGraph* const jsgraph_; | 82 JSGraph* const jsgraph_; |
| 80 DeoptimizationMode const mode_; | 83 DeoptimizationMode const mode_; |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 } // namespace compiler | 86 } // namespace compiler |
| 84 } // namespace internal | 87 } // namespace internal |
| 85 } // namespace v8 | 88 } // namespace v8 |
| 86 | 89 |
| 87 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ | 90 #endif // V8_COMPILER_JS_INTRINSIC_LOWERING_H_ |
| OLD | NEW |