| 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_CODE_GENERATOR_IA32_H_ | 5 #ifndef VM_CODE_GENERATOR_IA32_H_ |
| 6 #define VM_CODE_GENERATOR_IA32_H_ | 6 #define VM_CODE_GENERATOR_IA32_H_ |
| 7 | 7 |
| 8 #ifndef VM_CODE_GENERATOR_H_ | 8 #ifndef VM_CODE_GENERATOR_H_ |
| 9 #error Do not include code_generator_ia32.h directly; use code_generator.h. | 9 #error Do not include code_generator_ia32.h directly; use code_generator.h. |
| 10 #endif | 10 #endif |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void GenerateStoreIndexed(intptr_t node_id, | 104 void GenerateStoreIndexed(intptr_t node_id, |
| 105 intptr_t token_index, | 105 intptr_t token_index, |
| 106 bool preserve_value); | 106 bool preserve_value); |
| 107 | 107 |
| 108 void GenerateInstanceCall(intptr_t node_id, | 108 void GenerateInstanceCall(intptr_t node_id, |
| 109 intptr_t token_index, | 109 intptr_t token_index, |
| 110 const String& function_name, | 110 const String& function_name, |
| 111 int num_arguments, | 111 int num_arguments, |
| 112 const Array& optional_arguments_names); | 112 const Array& optional_arguments_names); |
| 113 | 113 |
| 114 void GenerateInstanceOf(intptr_t token_index, | 114 void GenerateInstanceOf(intptr_t node_id, |
| 115 intptr_t token_index, |
| 115 const Type& type, | 116 const Type& type, |
| 116 bool negate_result); | 117 bool negate_result); |
| 117 void GenerateAssertAssignable(intptr_t token_index, | 118 void GenerateAssertAssignable(intptr_t node_id, |
| 119 intptr_t token_index, |
| 118 const Type& dst_type, | 120 const Type& dst_type, |
| 119 const String& dst_name); | 121 const String& dst_name); |
| 120 void GenerateArgumentTypeChecks(); | 122 void GenerateArgumentTypeChecks(); |
| 121 void GenerateConditionTypeCheck(intptr_t token_index); | 123 void GenerateConditionTypeCheck(intptr_t node_id, intptr_t token_index); |
| 122 | 124 |
| 123 void GenerateInstantiatorTypeArguments(intptr_t token_index); | 125 void GenerateInstantiatorTypeArguments(intptr_t token_index); |
| 124 void GenerateTypeArguments(ConstructorCallNode* node, | 126 void GenerateTypeArguments(ConstructorCallNode* node, |
| 125 bool is_cls_parameterized); | 127 bool is_cls_parameterized); |
| 126 | 128 |
| 127 intptr_t locals_space_size() const { return locals_space_size_; } | 129 intptr_t locals_space_size() const { return locals_space_size_; } |
| 128 void set_locals_space_size(intptr_t value) { locals_space_size_ = value; } | 130 void set_locals_space_size(intptr_t value) { locals_space_size_ = value; } |
| 129 | 131 |
| 130 bool IsResultNeeded(AstNode* node) const; | 132 bool IsResultNeeded(AstNode* node) const; |
| 131 | 133 |
| 132 void GenerateCall(intptr_t token_index, const ExternalLabel* ext_label); | 134 void GenerateCall(intptr_t token_index, const ExternalLabel* ext_label); |
| 133 void GenerateCallRuntime(intptr_t token_index, const RuntimeEntry& entry); | 135 void GenerateCallRuntime(intptr_t node_id, |
| 136 intptr_t token_index, |
| 137 const RuntimeEntry& entry); |
| 134 | 138 |
| 135 void GenerateInlinedFinallyBlocks(SourceLabel* label); | 139 void GenerateInlinedFinallyBlocks(SourceLabel* label); |
| 136 | 140 |
| 137 void ErrorMsg(intptr_t token_index, const char* format, ...); | 141 void ErrorMsg(intptr_t token_index, const char* format, ...); |
| 138 | 142 |
| 139 int generate_next_try_index() { return try_index_ += 1; } | 143 int generate_next_try_index() { return try_index_ += 1; } |
| 140 | 144 |
| 141 void MarkDeoptPoint(intptr_t node_id, intptr_t token_index); | 145 void MarkDeoptPoint(intptr_t node_id, intptr_t token_index); |
| 142 void AddCurrentDescriptor(PcDescriptors::Kind kind, | 146 void AddCurrentDescriptor(PcDescriptors::Kind kind, |
| 143 intptr_t node_id, | 147 intptr_t node_id, |
| 144 intptr_t token_index); | 148 intptr_t token_index); |
| 145 | 149 |
| 146 Assembler* assembler_; | 150 Assembler* assembler_; |
| 147 const ParsedFunction& parsed_function_; | 151 const ParsedFunction& parsed_function_; |
| 148 intptr_t locals_space_size_; | 152 intptr_t locals_space_size_; |
| 149 CodeGeneratorState* state_; | 153 CodeGeneratorState* state_; |
| 150 DescriptorList* pc_descriptors_list_; | 154 DescriptorList* pc_descriptors_list_; |
| 151 HandlerList* exception_handlers_list_; | 155 HandlerList* exception_handlers_list_; |
| 152 int try_index_; | 156 int try_index_; |
| 153 | 157 |
| 154 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); | 158 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); |
| 155 }; | 159 }; |
| 156 | 160 |
| 157 | 161 |
| 158 } // namespace dart | 162 } // namespace dart |
| 159 | 163 |
| 160 #endif // VM_CODE_GENERATOR_IA32_H_ | 164 #endif // VM_CODE_GENERATOR_IA32_H_ |
| OLD | NEW |