OLD | NEW |
1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_PROGRAM_H_ | 5 #ifndef SRC_VM_PROGRAM_H_ |
6 #define SRC_VM_PROGRAM_H_ | 6 #define SRC_VM_PROGRAM_H_ |
7 | 7 |
8 #include "src/shared/globals.h" | 8 #include "src/shared/globals.h" |
9 #include "src/shared/random.h" | 9 #include "src/shared/random.h" |
10 #include "src/vm/heap.h" | 10 #include "src/vm/heap.h" |
11 #include "src/vm/lookup_cache.h" | 11 #include "src/vm/lookup_cache.h" |
12 #include "src/vm/links.h" | 12 #include "src/vm/links.h" |
13 #include "src/vm/program_folder.h" | 13 #include "src/vm/program_folder.h" |
14 | 14 |
15 namespace fletch { | 15 namespace dartino { |
16 | 16 |
17 typedef void (*ProgramExitListener)(Program*, int exitcode, void* data); | 17 typedef void (*ProgramExitListener)(Program*, int exitcode, void* data); |
18 | 18 |
19 class Class; | 19 class Class; |
20 class Function; | 20 class Function; |
21 class Method; | 21 class Method; |
22 class Process; | 22 class Process; |
23 class ProcessVisitor; | 23 class ProcessVisitor; |
24 class ProgramTableRewriter; | 24 class ProgramTableRewriter; |
25 class Scheduler; | 25 class Scheduler; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // If we have one heap per process, then this is the same as VisitProcesses, | 237 // If we have one heap per process, then this is the same as VisitProcesses, |
238 // otherwise it is just called once on one of the processes. | 238 // otherwise it is just called once on one of the processes. |
239 void VisitProcessHeaps(ProcessVisitor* visitor); | 239 void VisitProcessHeaps(ProcessVisitor* visitor); |
240 | 240 |
241 Object* CreateArray(int capacity) { | 241 Object* CreateArray(int capacity) { |
242 return CreateArrayWith(capacity, null_object()); | 242 return CreateArrayWith(capacity, null_object()); |
243 } | 243 } |
244 Object* CreateArrayWith(int capacity, Object* initial_value); | 244 Object* CreateArrayWith(int capacity, Object* initial_value); |
245 Object* CreateByteArray(int capacity); | 245 Object* CreateByteArray(int capacity); |
246 Object* CreateClass(int fields); | 246 Object* CreateClass(int fields); |
247 Object* CreateDouble(fletch_double value); | 247 Object* CreateDouble(dartino_double value); |
248 Object* CreateFunction(int arity, List<uint8> bytes, int number_of_literals); | 248 Object* CreateFunction(int arity, List<uint8> bytes, int number_of_literals); |
249 Object* CreateInteger(int64 value); | 249 Object* CreateInteger(int64 value); |
250 Object* CreateLargeInteger(int64 value); | 250 Object* CreateLargeInteger(int64 value); |
251 Object* CreateStringFromAscii(List<const char> str); | 251 Object* CreateStringFromAscii(List<const char> str); |
252 Object* CreateOneByteString(List<uint8> str); | 252 Object* CreateOneByteString(List<uint8> str); |
253 Object* CreateTwoByteString(List<uint16> str); | 253 Object* CreateTwoByteString(List<uint16> str); |
254 Object* CreateInstance(Class* klass); | 254 Object* CreateInstance(Class* klass); |
255 Object* CreateInitializer(Function* function); | 255 Object* CreateInitializer(Function* function); |
256 Object* CreateDispatchTableEntry(); | 256 Object* CreateDispatchTableEntry(); |
257 | 257 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // Tag used to identified snapshot program when profiling. | 368 // Tag used to identified snapshot program when profiling. |
369 int hashtag_; | 369 int hashtag_; |
370 | 370 |
371 // Used during GC and debugging to traverse the stacks. | 371 // Used during GC and debugging to traverse the stacks. |
372 Stack* stack_chain_; | 372 Stack* stack_chain_; |
373 List<List<int>> cooked_stack_deltas_; | 373 List<List<int>> cooked_stack_deltas_; |
374 | 374 |
375 LookupCache* cache_; | 375 LookupCache* cache_; |
376 }; | 376 }; |
377 | 377 |
378 } // namespace fletch | 378 } // namespace dartino |
379 | 379 |
380 #endif // SRC_VM_PROGRAM_H_ | 380 #endif // SRC_VM_PROGRAM_H_ |
OLD | NEW |