| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_VM_JIT_OPTIMIZER_H_ | 5 #ifndef RUNTIME_VM_JIT_OPTIMIZER_H_ |
| 6 #define RUNTIME_VM_JIT_OPTIMIZER_H_ | 6 #define RUNTIME_VM_JIT_OPTIMIZER_H_ |
| 7 | 7 |
| 8 #include "vm/flow_graph.h" |
| 8 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 9 #include "vm/flow_graph.h" | |
| 10 | 10 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 class CSEInstructionMap; | 13 class CSEInstructionMap; |
| 14 template <typename T> | 14 template <typename T> |
| 15 class GrowableArray; | 15 class GrowableArray; |
| 16 class ParsedFunction; | 16 class ParsedFunction; |
| 17 | 17 |
| 18 class JitOptimizer : public FlowGraphVisitor { | 18 class JitOptimizer : public FlowGraphVisitor { |
| 19 public: | 19 public: |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 Definition* instr, | 92 Definition* instr, |
| 93 int argument_number); | 93 int argument_number); |
| 94 | 94 |
| 95 // Add a class check for the call's first argument (receiver). | 95 // Add a class check for the call's first argument (receiver). |
| 96 void AddReceiverCheck(InstanceCallInstr* call) { | 96 void AddReceiverCheck(InstanceCallInstr* call) { |
| 97 AddChecksForArgNr(call, call->ArgumentAt(0), /* argument_number = */ 0); | 97 AddChecksForArgNr(call, call->ArgumentAt(0), /* argument_number = */ 0); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void ReplaceCall(Definition* call, Definition* replacement); | 100 void ReplaceCall(Definition* call, Definition* replacement); |
| 101 | 101 |
| 102 | |
| 103 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call, | 102 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call, |
| 104 RawFunction::Kind kind) const; | 103 RawFunction::Kind kind) const; |
| 105 | 104 |
| 106 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); | 105 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 107 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); | 106 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 108 bool InlineFloat64x2BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); | 107 bool InlineFloat64x2BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 109 bool InlineImplicitInstanceGetter(InstanceCallInstr* call); | 108 bool InlineImplicitInstanceGetter(InstanceCallInstr* call); |
| 110 | 109 |
| 111 RawBool* InstanceOfAsBool(const ICData& ic_data, | 110 RawBool* InstanceOfAsBool(const ICData& ic_data, |
| 112 const AbstractType& type, | 111 const AbstractType& type, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 123 Isolate* isolate() const { return flow_graph_->isolate(); } | 122 Isolate* isolate() const { return flow_graph_->isolate(); } |
| 124 Zone* zone() const { return flow_graph_->zone(); } | 123 Zone* zone() const { return flow_graph_->zone(); } |
| 125 | 124 |
| 126 const Function& function() const { return flow_graph_->function(); } | 125 const Function& function() const { return flow_graph_->function(); } |
| 127 | 126 |
| 128 FlowGraph* flow_graph_; | 127 FlowGraph* flow_graph_; |
| 129 | 128 |
| 130 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); | 129 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); |
| 131 }; | 130 }; |
| 132 | 131 |
| 133 | |
| 134 } // namespace dart | 132 } // namespace dart |
| 135 | 133 |
| 136 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ | 134 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ |
| OLD | NEW |