| 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 |
| 11 | 11 |
| 12 #include "vm/code_generator.h" | 12 #include "vm/code_generator.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 // Forward declarations. | 16 // Forward declarations. |
| 17 class ClassesForLocals; | 17 class ClassesForLocals; |
| 18 class DeoptimizationBlob; | 18 class DeoptimizationBlob; |
| 19 struct InstanceSetterArgs; |
| 19 | 20 |
| 20 // Temporary hierarchy, until optimized code generator implemented. | 21 // Temporary hierarchy, until optimized code generator implemented. |
| 21 // The optimizing compiler does not run if type checks are enabled. | 22 // The optimizing compiler does not run if type checks are enabled. |
| 22 class OptimizingCodeGenerator : public CodeGenerator { | 23 class OptimizingCodeGenerator : public CodeGenerator { |
| 23 public: | 24 public: |
| 24 OptimizingCodeGenerator(Assembler* assembler, | 25 OptimizingCodeGenerator(Assembler* assembler, |
| 25 const ParsedFunction& parsed_function); | 26 const ParsedFunction& parsed_function); |
| 26 | 27 |
| 27 virtual void VisitBinaryOpNode(BinaryOpNode* node); | 28 virtual void VisitBinaryOpNode(BinaryOpNode* node); |
| 28 virtual void VisitIncrOpLocalNode(IncrOpLocalNode* node); | 29 virtual void VisitIncrOpLocalNode(IncrOpLocalNode* node); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 DeoptReasonId reason_id); | 77 DeoptReasonId reason_id); |
| 77 | 78 |
| 78 void IntrinsifyGetter(); | 79 void IntrinsifyGetter(); |
| 79 void IntrinsifySetter(); | 80 void IntrinsifySetter(); |
| 80 | 81 |
| 81 void InlineInstanceGettersWithSameTarget(AstNode* node, | 82 void InlineInstanceGettersWithSameTarget(AstNode* node, |
| 82 intptr_t id, | 83 intptr_t id, |
| 83 AstNode* receiver, | 84 AstNode* receiver, |
| 84 const String& field_name, | 85 const String& field_name, |
| 85 Register recv_reg); | 86 Register recv_reg); |
| 86 void InlineInstanceSettersWithSameTarget(AstNode* node, | |
| 87 intptr_t id, | |
| 88 AstNode* receiver, | |
| 89 const String& field_name, | |
| 90 Register recv_reg, | |
| 91 Register value_reg); | |
| 92 | 87 |
| 93 // Helper method to load a value quickly into register instead of pushing | 88 // Helper method to load a value quickly into register instead of pushing |
| 94 // and popping it. | 89 // and popping it. |
| 95 void VisitLoadOne(AstNode* node, Register reg); | 90 void VisitLoadOne(AstNode* node, Register reg); |
| 96 void VisitLoadTwo(AstNode* left, | 91 void VisitLoadTwo(AstNode* left, |
| 97 AstNode* right, | 92 AstNode* right, |
| 98 Register left_reg, | 93 Register left_reg, |
| 99 Register right_reg); | 94 Register right_reg); |
| 100 | 95 |
| 101 void InlineInstanceGetter(AstNode* node, | 96 void InlineInstanceGetter(AstNode* node, |
| 102 intptr_t id, | 97 intptr_t id, |
| 103 AstNode* receiver, | 98 AstNode* receiver, |
| 104 const String& field_name, | 99 const String& field_name, |
| 105 Register recv_reg); | 100 Register recv_reg); |
| 101 |
| 102 void GenerateInstanceSetter(const InstanceSetterArgs& args); |
| 106 void InlineInstanceSetter(AstNode* node, | 103 void InlineInstanceSetter(AstNode* node, |
| 107 intptr_t id, | 104 intptr_t id, |
| 108 AstNode* receiver, | 105 AstNode* receiver, |
| 109 const String& field_name, | 106 const String& field_name, |
| 110 Register recv_reg, | 107 Register recv_reg, |
| 111 Register value_reg); | 108 Register value_reg); |
| 112 | 109 |
| 113 void CallDeoptimize(intptr_t node_id, intptr_t token_index); | 110 void CallDeoptimize(intptr_t node_id, intptr_t token_index); |
| 114 | 111 |
| 115 void GenerateSmiBinaryOp(BinaryOpNode* node); | 112 void GenerateSmiBinaryOp(BinaryOpNode* node); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 const Class& smi_class_; | 159 const Class& smi_class_; |
| 163 const Class& double_class_; | 160 const Class& double_class_; |
| 164 | 161 |
| 165 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator); | 162 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator); |
| 166 }; | 163 }; |
| 167 | 164 |
| 168 } // namespace dart | 165 } // namespace dart |
| 169 | 166 |
| 170 | 167 |
| 171 #endif // VM_OPT_CODE_GENERATOR_IA32_H_ | 168 #endif // VM_OPT_CODE_GENERATOR_IA32_H_ |
| OLD | NEW |