| 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_ARM_H_ | 5 #ifndef VM_CODE_GENERATOR_ARM_H_ |
| 6 #define VM_CODE_GENERATOR_ARM_H_ | 6 #define VM_CODE_GENERATOR_ARM_H_ |
| 7 | 7 |
| 8 #ifndef VM_CODE_GENERATOR_H_ | 8 #ifndef VM_CODE_GENERATOR_H_ |
| 9 #error Do not include code_generator_arm.h directly; use assembler.h instead. | 9 #error Do not include code_generator_arm.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include "vm/allocation.h" | 12 #include "vm/allocation.h" |
| 13 #include "vm/ast.h" | 13 #include "vm/ast.h" |
| 14 #include "vm/growable_array.h" | 14 #include "vm/growable_array.h" |
| 15 | 15 |
| 16 namespace dart { | 16 namespace dart { |
| 17 | 17 |
| 18 // Forward declarations. | 18 // Forward declarations. |
| 19 class Assembler; | 19 class Assembler; |
| 20 class AstNode; | 20 class AstNode; |
| 21 class ParsedFunction; | 21 class ParsedFunction; |
| 22 | 22 |
| 23 class CodeGenerator : public AstNodeVisitor { | 23 class CodeGenerator : public AstNodeVisitor { |
| 24 public: | 24 public: |
| 25 CodeGenerator(Assembler* assembler, const ParsedFunction& parsed_function) { } | 25 CodeGenerator(Assembler* assembler, const ParsedFunction& parsed_function) |
| 26 : pc_descriptors_list_(NULL) { } |
| 26 virtual ~CodeGenerator() { } | 27 virtual ~CodeGenerator() { } |
| 27 | 28 |
| 28 bool GenerateCode() { | 29 bool GenerateCode() { |
| 29 return false; | 30 return false; |
| 30 } | 31 } |
| 31 | 32 |
| 32 // Add exception handler table to code. | 33 // Add exception handler table to code. |
| 33 void FinalizeExceptionHandlers(const Code& code) { UNIMPLEMENTED(); } | 34 void FinalizeExceptionHandlers(const Code& code) { UNIMPLEMENTED(); } |
| 34 | 35 |
| 35 // Add pc descriptors to code. | 36 // Add pc descriptors to code. |
| 36 void FinalizePcDescriptors(const Code& code) { UNIMPLEMENTED(); } | 37 void FinalizePcDescriptors(const Code& code) { UNIMPLEMENTED(); } |
| 37 | 38 |
| 38 // Add local variable descriptors to code. | 39 // Add local variable descriptors to code. |
| 39 void FinalizeVarDescriptors(const Code& code) { UNIMPLEMENTED(); } | 40 void FinalizeVarDescriptors(const Code& code) { UNIMPLEMENTED(); } |
| 40 | 41 |
| 41 // Allocate and return an arguments descriptor. | 42 // Allocate and return an arguments descriptor. |
| 42 // Let 'num_names' be the length of 'optional_arguments_names'. | 43 // Let 'num_names' be the length of 'optional_arguments_names'. |
| 43 // Treat the first 'num_arguments - num_names' arguments as positional and | 44 // Treat the first 'num_arguments - num_names' arguments as positional and |
| 44 // treat the following 'num_names' arguments as named optional arguments. | 45 // treat the following 'num_names' arguments as named optional arguments. |
| 45 static const Array& ArgumentsDescriptor( | 46 static const Array& ArgumentsDescriptor( |
| 46 int num_arguments, | 47 int num_arguments, |
| 47 const Array& optional_arguments_names); | 48 const Array& optional_arguments_names); |
| 48 | 49 |
| 49 private: | 50 private: |
| 51 // Forward declarations. |
| 52 class DescriptorList; |
| 53 |
| 54 DescriptorList* pc_descriptors_list_; |
| 50 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); | 55 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeGenerator); |
| 51 }; | 56 }; |
| 52 | 57 |
| 53 } // namespace dart | 58 } // namespace dart |
| 54 | 59 |
| 55 #endif // VM_CODE_GENERATOR_ARM_H_ | 60 #endif // VM_CODE_GENERATOR_ARM_H_ |
| OLD | NEW |