| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_COMPILER_CHANGE_LOWERING_H_ | |
| 6 #define V8_COMPILER_CHANGE_LOWERING_H_ | |
| 7 | |
| 8 #include "src/compiler/graph-reducer.h" | |
| 9 | |
| 10 namespace v8 { | |
| 11 namespace internal { | |
| 12 namespace compiler { | |
| 13 | |
| 14 // Forward declarations. | |
| 15 class CommonOperatorBuilder; | |
| 16 struct ElementAccess; | |
| 17 class JSGraph; | |
| 18 class Linkage; | |
| 19 class MachineOperatorBuilder; | |
| 20 class Operator; | |
| 21 | |
| 22 class ChangeLowering final : public AdvancedReducer { | |
| 23 public: | |
| 24 ChangeLowering(Editor* editor, JSGraph* jsgraph) | |
| 25 : AdvancedReducer(editor), jsgraph_(jsgraph) {} | |
| 26 ~ChangeLowering() final; | |
| 27 | |
| 28 Reduction Reduce(Node* node) final; | |
| 29 | |
| 30 private: | |
| 31 Reduction ReduceLoadField(Node* node); | |
| 32 Reduction ReduceStoreField(Node* node); | |
| 33 Reduction ReduceLoadElement(Node* node); | |
| 34 Reduction ReduceStoreElement(Node* node); | |
| 35 Reduction ReduceAllocate(Node* node); | |
| 36 | |
| 37 Node* ComputeIndex(const ElementAccess& access, Node* const key); | |
| 38 Graph* graph() const; | |
| 39 Isolate* isolate() const; | |
| 40 JSGraph* jsgraph() const { return jsgraph_; } | |
| 41 CommonOperatorBuilder* common() const; | |
| 42 MachineOperatorBuilder* machine() const; | |
| 43 | |
| 44 JSGraph* const jsgraph_; | |
| 45 SetOncePointer<const Operator> allocate_operator_; | |
| 46 }; | |
| 47 | |
| 48 } // namespace compiler | |
| 49 } // namespace internal | |
| 50 } // namespace v8 | |
| 51 | |
| 52 #endif // V8_COMPILER_CHANGE_LOWERING_H_ | |
| OLD | NEW |