| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 VM_OPT_CODE_GENERATOR_IA32_H_ | 5 #ifndef VM_OPT_CODE_GENERATOR_IA32_H_ |
| 6 #define VM_OPT_CODE_GENERATOR_IA32_H_ | 6 #define VM_OPT_CODE_GENERATOR_IA32_H_ |
| 7 | 7 |
| 8 #ifndef VM_OPT_CODE_GENERATOR_H_ | 8 #ifndef VM_OPT_CODE_GENERATOR_H_ |
| 9 #error Do not include opt_code_generator_ia32.h; use opt_code_generator.h. | 9 #error Do not include opt_code_generator_ia32.h; use opt_code_generator.h. |
| 10 #endif | 10 #endif |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual void VisitIfNode(IfNode* node); | 42 virtual void VisitIfNode(IfNode* node); |
| 43 virtual void VisitInstanceCallNode(InstanceCallNode* node); | 43 virtual void VisitInstanceCallNode(InstanceCallNode* node); |
| 44 virtual void VisitStaticCallNode(StaticCallNode* node); | 44 virtual void VisitStaticCallNode(StaticCallNode* node); |
| 45 virtual void VisitReturnNode(ReturnNode* node); | 45 virtual void VisitReturnNode(ReturnNode* node); |
| 46 virtual void VisitSequenceNode(SequenceNode* node_sequence); | 46 virtual void VisitSequenceNode(SequenceNode* node_sequence); |
| 47 virtual void VisitStoreInstanceFieldNode(StoreInstanceFieldNode* node); | 47 virtual void VisitStoreInstanceFieldNode(StoreInstanceFieldNode* node); |
| 48 virtual void VisitCatchClauseNode(CatchClauseNode* node); | 48 virtual void VisitCatchClauseNode(CatchClauseNode* node); |
| 49 virtual void VisitTryCatchNode(TryCatchNode* node); | 49 virtual void VisitTryCatchNode(TryCatchNode* node); |
| 50 virtual void VisitUnaryOpNode(UnaryOpNode* node); | 50 virtual void VisitUnaryOpNode(UnaryOpNode* node); |
| 51 | 51 |
| 52 // Return true if intrinsification succeeded and no more code is needed. | |
| 53 // Returns false if either no intrinsification occured or if intrinsified | |
| 54 // code needs the rest for slow case execution. | |
| 55 virtual bool TryIntrinsify(); | |
| 56 virtual void GeneratePreEntryCode(); | 52 virtual void GeneratePreEntryCode(); |
| 57 virtual bool IsOptimizing() const { return true; } | 53 virtual bool IsOptimizing() const { return true; } |
| 58 | 54 |
| 59 virtual void GenerateDeferredCode(); | 55 virtual void GenerateDeferredCode(); |
| 60 | 56 |
| 61 private: | 57 private: |
| 62 friend class DeoptimizationBlob; | 58 friend class DeoptimizationBlob; |
| 63 | 59 |
| 64 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, | 60 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, |
| 65 DeoptReasonId reason_id); | 61 DeoptReasonId reason_id); |
| 66 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, | 62 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, |
| 67 Register reg1, | 63 Register reg1, |
| 68 DeoptReasonId reason_id); | 64 DeoptReasonId reason_id); |
| 69 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, | 65 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, |
| 70 Register reg1, | 66 Register reg1, |
| 71 Register reg2, | 67 Register reg2, |
| 72 DeoptReasonId reason_id); | 68 DeoptReasonId reason_id); |
| 73 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, | 69 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, |
| 74 Register reg1, | 70 Register reg1, |
| 75 Register reg2, | 71 Register reg2, |
| 76 Register reg3, | 72 Register reg3, |
| 77 DeoptReasonId reason_id); | 73 DeoptReasonId reason_id); |
| 78 | 74 |
| 79 void IntrinsifyGetter(); | |
| 80 void IntrinsifySetter(); | |
| 81 | |
| 82 void InlineInstanceGettersWithSameTarget(AstNode* node, | 75 void InlineInstanceGettersWithSameTarget(AstNode* node, |
| 83 intptr_t id, | 76 intptr_t id, |
| 84 AstNode* receiver, | 77 AstNode* receiver, |
| 85 const String& field_name, | 78 const String& field_name, |
| 86 Register recv_reg); | 79 Register recv_reg); |
| 87 | 80 |
| 88 // Helper method to load a value quickly into register instead of pushing | 81 // Helper method to load a value quickly into register instead of pushing |
| 89 // and popping it. | 82 // and popping it. |
| 90 void VisitLoadOne(AstNode* node, Register reg); | 83 void VisitLoadOne(AstNode* node, Register reg); |
| 91 void VisitLoadTwo(AstNode* left, | 84 void VisitLoadTwo(AstNode* left, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 const Class& smi_class_; | 158 const Class& smi_class_; |
| 166 const Class& double_class_; | 159 const Class& double_class_; |
| 167 | 160 |
| 168 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator); | 161 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator); |
| 169 }; | 162 }; |
| 170 | 163 |
| 171 } // namespace dart | 164 } // namespace dart |
| 172 | 165 |
| 173 | 166 |
| 174 #endif // VM_OPT_CODE_GENERATOR_IA32_H_ | 167 #endif // VM_OPT_CODE_GENERATOR_IA32_H_ |
| OLD | NEW |