| 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_NATIVE_CONTEXT_SPECIALIZATION_H_ | 5 #ifndef V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
| 6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
| 10 #include "src/deoptimize-reason.h" | 10 #include "src/deoptimize-reason.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 // Forward declarations. | 15 // Forward declarations. |
| 16 class CompilationDependencies; | 16 class CompilationDependencies; |
| 17 class Factory; | 17 class Factory; |
| 18 class FeedbackNexus; | 18 class FeedbackNexus; |
| 19 class TypeCache; | |
| 20 | |
| 21 | 19 |
| 22 namespace compiler { | 20 namespace compiler { |
| 23 | 21 |
| 24 // Forward declarations. | 22 // Forward declarations. |
| 25 enum class AccessMode; | 23 enum class AccessMode; |
| 26 class CommonOperatorBuilder; | 24 class CommonOperatorBuilder; |
| 27 class ElementAccessInfo; | 25 class ElementAccessInfo; |
| 28 class JSGraph; | 26 class JSGraph; |
| 29 class JSOperatorBuilder; | 27 class JSOperatorBuilder; |
| 30 class MachineOperatorBuilder; | 28 class MachineOperatorBuilder; |
| 31 class PropertyAccessInfo; | 29 class PropertyAccessInfo; |
| 32 class SimplifiedOperatorBuilder; | 30 class SimplifiedOperatorBuilder; |
| 33 | 31 class TypeCache; |
| 34 | 32 |
| 35 // Specializes a given JSGraph to a given native context, potentially constant | 33 // Specializes a given JSGraph to a given native context, potentially constant |
| 36 // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal} | 34 // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal} |
| 37 // nodes. And also specializes {LoadNamed} and {StoreNamed} nodes according | 35 // nodes. And also specializes {LoadNamed} and {StoreNamed} nodes according |
| 38 // to type feedback (if available). | 36 // to type feedback (if available). |
| 39 class JSNativeContextSpecialization final : public AdvancedReducer { | 37 class JSNativeContextSpecialization final : public AdvancedReducer { |
| 40 public: | 38 public: |
| 41 // Flags that control the mode of operation. | 39 // Flags that control the mode of operation. |
| 42 enum Flag { | 40 enum Flag { |
| 43 kNoFlags = 0u, | 41 kNoFlags = 0u, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 172 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
| 175 }; | 173 }; |
| 176 | 174 |
| 177 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 175 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
| 178 | 176 |
| 179 } // namespace compiler | 177 } // namespace compiler |
| 180 } // namespace internal | 178 } // namespace internal |
| 181 } // namespace v8 | 179 } // namespace v8 |
| 182 | 180 |
| 183 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 181 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
| OLD | NEW |