| 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_SIMPLIFIED_OPERATOR_REDUCER_H_ | 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
| 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ | 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
| 7 | 7 |
| 8 #include "src/compiler/graph-reducer.h" | 8 #include "src/compiler/graph-reducer.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 | 23 |
| 24 class SimplifiedOperatorReducer final : public Reducer { | 24 class SimplifiedOperatorReducer final : public Reducer { |
| 25 public: | 25 public: |
| 26 explicit SimplifiedOperatorReducer(JSGraph* jsgraph); | 26 explicit SimplifiedOperatorReducer(JSGraph* jsgraph); |
| 27 ~SimplifiedOperatorReducer() final; | 27 ~SimplifiedOperatorReducer() final; |
| 28 | 28 |
| 29 Reduction Reduce(Node* node) final; | 29 Reduction Reduce(Node* node) final; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 Reduction ReduceNumberFloor(Node* node); | |
| 33 Reduction ReduceReferenceEqual(Node* node); | 32 Reduction ReduceReferenceEqual(Node* node); |
| 34 | 33 |
| 35 Reduction Change(Node* node, const Operator* op, Node* a); | 34 Reduction Change(Node* node, const Operator* op, Node* a); |
| 36 Reduction ReplaceFloat64(double value); | 35 Reduction ReplaceFloat64(double value); |
| 37 Reduction ReplaceInt32(int32_t value); | 36 Reduction ReplaceInt32(int32_t value); |
| 38 Reduction ReplaceUint32(uint32_t value) { | 37 Reduction ReplaceUint32(uint32_t value) { |
| 39 return ReplaceInt32(bit_cast<int32_t>(value)); | 38 return ReplaceInt32(bit_cast<int32_t>(value)); |
| 40 } | 39 } |
| 41 Reduction ReplaceNumber(double value); | 40 Reduction ReplaceNumber(double value); |
| 42 Reduction ReplaceNumber(int32_t value); | 41 Reduction ReplaceNumber(int32_t value); |
| 43 | 42 |
| 44 Graph* graph() const; | 43 Graph* graph() const; |
| 45 JSGraph* jsgraph() const { return jsgraph_; } | 44 JSGraph* jsgraph() const { return jsgraph_; } |
| 46 MachineOperatorBuilder* machine() const; | 45 MachineOperatorBuilder* machine() const; |
| 47 SimplifiedOperatorBuilder* simplified() const; | 46 SimplifiedOperatorBuilder* simplified() const; |
| 48 | 47 |
| 49 JSGraph* const jsgraph_; | 48 JSGraph* const jsgraph_; |
| 50 TypeCache const& type_cache_; | 49 TypeCache const& type_cache_; |
| 51 | 50 |
| 52 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); | 51 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 } // namespace compiler | 54 } // namespace compiler |
| 56 } // namespace internal | 55 } // namespace internal |
| 57 } // namespace v8 | 56 } // namespace v8 |
| 58 | 57 |
| 59 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ | 58 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
| OLD | NEW |