| 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bool TypeCheckAsClassEquality(const AbstractType& type); | 67 bool TypeCheckAsClassEquality(const AbstractType& type); |
| 68 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 68 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
| 69 | 69 |
| 70 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); | 70 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); |
| 71 | 71 |
| 72 // Insert a check of 'to_check' determined by 'unary_checks'. If the | 72 // Insert a check of 'to_check' determined by 'unary_checks'. If the |
| 73 // check fails it will deoptimize to 'deopt_id' using the deoptimization | 73 // check fails it will deoptimize to 'deopt_id' using the deoptimization |
| 74 // environment 'deopt_environment'. The check is inserted immediately | 74 // environment 'deopt_environment'. The check is inserted immediately |
| 75 // before 'insert_before'. | 75 // before 'insert_before'. |
| 76 void AddCheckClass(Definition* to_check, | 76 void AddCheckClass(Definition* to_check, |
| 77 const ICData& unary_checks, | 77 const CallTargets& targets, |
| 78 intptr_t deopt_id, | 78 intptr_t deopt_id, |
| 79 Environment* deopt_environment, | 79 Environment* deopt_environment, |
| 80 Instruction* insert_before); | 80 Instruction* insert_before); |
| 81 Instruction* GetCheckClass(Definition* to_check, | |
| 82 const ICData& unary_checks, | |
| 83 intptr_t deopt_id, | |
| 84 TokenPosition token_pos); | |
| 85 | 81 |
| 86 // Insert a Smi check if needed. | 82 // Insert a Smi check if needed. |
| 87 void AddCheckSmi(Definition* to_check, | 83 void AddCheckSmi(Definition* to_check, |
| 88 intptr_t deopt_id, | 84 intptr_t deopt_id, |
| 89 Environment* deopt_environment, | 85 Environment* deopt_environment, |
| 90 Instruction* insert_before); | 86 Instruction* insert_before); |
| 91 | 87 |
| 92 // Add a class check for a call's first argument immediately before the | 88 // Add a class check for a call's first argument immediately before the |
| 93 // call, using the call's IC data to determine the check, and the call's | 89 // call, using the call's IC data to determine the check, and the call's |
| 94 // deopt ID and deoptimization environment if the check fails. | 90 // deopt ID and deoptimization environment if the check fails. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 124 | 120 |
| 125 FlowGraph* flow_graph_; | 121 FlowGraph* flow_graph_; |
| 126 | 122 |
| 127 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); | 123 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); |
| 128 }; | 124 }; |
| 129 | 125 |
| 130 | 126 |
| 131 } // namespace dart | 127 } // namespace dart |
| 132 | 128 |
| 133 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ | 129 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ |
| OLD | NEW |