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