| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #ifndef SRC_VM_GENERATOR_H_ | 5 #ifndef SRC_VM_GENERATOR_H_ |
| 6 #define SRC_VM_GENERATOR_H_ | 6 #define SRC_VM_GENERATOR_H_ |
| 7 | 7 |
| 8 namespace fletch { | 8 namespace dartino { |
| 9 | 9 |
| 10 class Assembler; | 10 class Assembler; |
| 11 | 11 |
| 12 #define GENERATE(p, n) \ | 12 #define GENERATE(p, n) \ |
| 13 static void Generate##p##n(Assembler* assembler); \ | 13 static void Generate##p##n(Assembler* assembler); \ |
| 14 static const Generator kRegister##p##n(Generate##p##n, #p #n); \ | 14 static const Generator kRegister##p##n(Generate##p##n, #p #n); \ |
| 15 static void Generate##p##n(Assembler* assembler) | 15 static void Generate##p##n(Assembler* assembler) |
| 16 | 16 |
| 17 #define GENERATE_NATIVE(n) GENERATE(Native_, n) | 17 #define GENERATE_NATIVE(n) GENERATE(Native_, n) |
| 18 | 18 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 static Generator* first_; | 31 static Generator* first_; |
| 32 static Generator* current_; | 32 static Generator* current_; |
| 33 Generator* next_; | 33 Generator* next_; |
| 34 | 34 |
| 35 Function* const function_; | 35 Function* const function_; |
| 36 const char* name_; | 36 const char* name_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(Generator); | 38 DISALLOW_COPY_AND_ASSIGN(Generator); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace fletch | 41 } // namespace dartino |
| 42 | 42 |
| 43 #endif // SRC_VM_GENERATOR_H_ | 43 #endif // SRC_VM_GENERATOR_H_ |
| OLD | NEW |