| 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 #include "src/compiler/js-type-feedback-lowering.h" | 5 #include "src/compiler/js-type-feedback-lowering.h" |
| 6 | 6 |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! | 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! |
| 11 #include "src/type-feedback-vector.h" | 11 #include "src/type-feedback-vector.h" |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 namespace compiler { | 15 namespace compiler { |
| 16 | 16 |
| 17 JSTypeFeedbackLowering::JSTypeFeedbackLowering(Editor* editor, Flags flags, | 17 JSTypeFeedbackLowering::JSTypeFeedbackLowering(Editor* editor, Flags flags, |
| 18 JSGraph* jsgraph) | 18 JSGraph* jsgraph) |
| 19 : AdvancedReducer(editor), | 19 : AdvancedReducer(editor), flags_(flags), jsgraph_(jsgraph) {} |
| 20 flags_(flags), | |
| 21 jsgraph_(jsgraph), | |
| 22 simplified_(graph()->zone()) {} | |
| 23 | 20 |
| 24 | 21 |
| 25 Reduction JSTypeFeedbackLowering::Reduce(Node* node) { | 22 Reduction JSTypeFeedbackLowering::Reduce(Node* node) { |
| 26 switch (node->opcode()) { | 23 switch (node->opcode()) { |
| 27 case IrOpcode::kJSLoadNamed: | 24 case IrOpcode::kJSLoadNamed: |
| 28 return ReduceJSLoadNamed(node); | 25 return ReduceJSLoadNamed(node); |
| 29 default: | 26 default: |
| 30 break; | 27 break; |
| 31 } | 28 } |
| 32 return NoChange(); | 29 return NoChange(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 104 |
| 108 Isolate* JSTypeFeedbackLowering::isolate() const { | 105 Isolate* JSTypeFeedbackLowering::isolate() const { |
| 109 return jsgraph()->isolate(); | 106 return jsgraph()->isolate(); |
| 110 } | 107 } |
| 111 | 108 |
| 112 | 109 |
| 113 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const { | 110 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const { |
| 114 return jsgraph()->machine(); | 111 return jsgraph()->machine(); |
| 115 } | 112 } |
| 116 | 113 |
| 114 |
| 115 SimplifiedOperatorBuilder* JSTypeFeedbackLowering::simplified() const { |
| 116 return jsgraph()->simplified(); |
| 117 } |
| 118 |
| 117 } // namespace compiler | 119 } // namespace compiler |
| 118 } // namespace internal | 120 } // namespace internal |
| 119 } // namespace v8 | 121 } // namespace v8 |
| OLD | NEW |