| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_BUILTIN_REDUCER_H_ | 5 #ifndef V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
| 6 #define V8_COMPILER_JS_BUILTIN_REDUCER_H_ | 6 #define V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
| 7 | 7 |
| 8 #include "src/base/compiler-specific.h" | 8 #include "src/base/compiler-specific.h" |
| 9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
| 10 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 : public NON_EXPORTED_BASE(AdvancedReducer) { | 31 : public NON_EXPORTED_BASE(AdvancedReducer) { |
| 32 public: | 32 public: |
| 33 // Flags that control the mode of operation. | 33 // Flags that control the mode of operation. |
| 34 enum Flag { | 34 enum Flag { |
| 35 kNoFlags = 0u, | 35 kNoFlags = 0u, |
| 36 kDeoptimizationEnabled = 1u << 0, | 36 kDeoptimizationEnabled = 1u << 0, |
| 37 }; | 37 }; |
| 38 typedef base::Flags<Flag> Flags; | 38 typedef base::Flags<Flag> Flags; |
| 39 | 39 |
| 40 JSBuiltinReducer(Editor* editor, JSGraph* jsgraph, Flags flags, | 40 JSBuiltinReducer(Editor* editor, JSGraph* jsgraph, Flags flags, |
| 41 CompilationDependencies* dependencies); | 41 CompilationDependencies* dependencies, |
| 42 Handle<Context> native_context); |
| 42 ~JSBuiltinReducer() final {} | 43 ~JSBuiltinReducer() final {} |
| 43 | 44 |
| 44 Reduction Reduce(Node* node) final; | 45 Reduction Reduce(Node* node) final; |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 Reduction ReduceArrayPop(Node* node); | 48 Reduction ReduceArrayPop(Node* node); |
| 48 Reduction ReduceArrayPush(Node* node); | 49 Reduction ReduceArrayPush(Node* node); |
| 49 Reduction ReduceDateGetTime(Node* node); | 50 Reduction ReduceDateGetTime(Node* node); |
| 50 Reduction ReduceGlobalIsFinite(Node* node); | 51 Reduction ReduceGlobalIsFinite(Node* node); |
| 51 Reduction ReduceGlobalIsNaN(Node* node); | 52 Reduction ReduceGlobalIsNaN(Node* node); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 FieldAccess const& access); | 98 FieldAccess const& access); |
| 98 | 99 |
| 99 Node* ToNumber(Node* value); | 100 Node* ToNumber(Node* value); |
| 100 Node* ToUint32(Node* value); | 101 Node* ToUint32(Node* value); |
| 101 | 102 |
| 102 Flags flags() const { return flags_; } | 103 Flags flags() const { return flags_; } |
| 103 Graph* graph() const; | 104 Graph* graph() const; |
| 104 Factory* factory() const; | 105 Factory* factory() const; |
| 105 JSGraph* jsgraph() const { return jsgraph_; } | 106 JSGraph* jsgraph() const { return jsgraph_; } |
| 106 Isolate* isolate() const; | 107 Isolate* isolate() const; |
| 108 Handle<Context> native_context() const { return native_context_; } |
| 107 CommonOperatorBuilder* common() const; | 109 CommonOperatorBuilder* common() const; |
| 108 SimplifiedOperatorBuilder* simplified() const; | 110 SimplifiedOperatorBuilder* simplified() const; |
| 109 JSOperatorBuilder* javascript() const; | 111 JSOperatorBuilder* javascript() const; |
| 110 CompilationDependencies* dependencies() const { return dependencies_; } | 112 CompilationDependencies* dependencies() const { return dependencies_; } |
| 111 | 113 |
| 112 CompilationDependencies* const dependencies_; | 114 CompilationDependencies* const dependencies_; |
| 113 Flags const flags_; | 115 Flags const flags_; |
| 114 JSGraph* const jsgraph_; | 116 JSGraph* const jsgraph_; |
| 117 Handle<Context> const native_context_; |
| 115 TypeCache const& type_cache_; | 118 TypeCache const& type_cache_; |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 DEFINE_OPERATORS_FOR_FLAGS(JSBuiltinReducer::Flags) | 121 DEFINE_OPERATORS_FOR_FLAGS(JSBuiltinReducer::Flags) |
| 119 | 122 |
| 120 } // namespace compiler | 123 } // namespace compiler |
| 121 } // namespace internal | 124 } // namespace internal |
| 122 } // namespace v8 | 125 } // namespace v8 |
| 123 | 126 |
| 124 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ | 127 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
| OLD | NEW |