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 #include "src/shared/assert.h" | 5 #include "src/shared/assert.h" |
6 #include "src/shared/globals.h" | 6 #include "src/shared/globals.h" |
7 #include "src/shared/platform.h" | 7 #include "src/shared/platform.h" |
8 #include "src/shared/utils.h" | 8 #include "src/shared/utils.h" |
9 | 9 |
10 #include "src/vm/intrinsics.h" | 10 #include "src/vm/intrinsics.h" |
11 #include "src/vm/object_memory.h" | 11 #include "src/vm/object_memory.h" |
12 #include "src/vm/program.h" | 12 #include "src/vm/program.h" |
13 #include "src/vm/program_info_block.h" | 13 #include "src/vm/program_info_block.h" |
14 #include "src/vm/program_relocator.h" | 14 #include "src/vm/program_relocator.h" |
15 #include "src/vm/snapshot.h" | 15 #include "src/vm/snapshot.h" |
16 | 16 |
17 namespace fletch { | 17 namespace dartino { |
18 | 18 |
19 static void printUsage(char* name) { | 19 static void printUsage(char* name) { |
20 printf( | 20 printf( |
21 "Usage: %s [-i <intrinsic name>=<address>] <snapshot file> " | 21 "Usage: %s [-i <intrinsic name>=<address>] <snapshot file> " |
22 "<base address> <program heap file>\n", | 22 "<base address> <program heap file>\n", |
23 name); | 23 name); |
24 } | 24 } |
25 | 25 |
26 static int Main(int argc, char** argv) { | 26 static int Main(int argc, char** argv) { |
27 IntrinsicsTable* table = new IntrinsicsTable(); | 27 IntrinsicsTable* table = new IntrinsicsTable(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 List<uint8> result = List<uint8>::New(size); | 76 List<uint8> result = List<uint8>::New(size); |
77 ProgramHeapRelocator relocator(program, result.data(), basevalue, table); | 77 ProgramHeapRelocator relocator(program, result.data(), basevalue, table); |
78 relocator.Relocate(); | 78 relocator.Relocate(); |
79 | 79 |
80 Platform::StoreFile(argp[2], result); | 80 Platform::StoreFile(argp[2], result); |
81 | 81 |
82 result.Delete(); | 82 result.Delete(); |
83 return 0; | 83 return 0; |
84 } | 84 } |
85 | 85 |
86 } // namespace fletch | 86 } // namespace dartino |
87 | 87 |
88 // Forward main calls to fletch::Main. | 88 // Forward main calls to dartino::Main. |
89 int main(int argc, char** argv) { return fletch::Main(argc, argv); } | 89 int main(int argc, char** argv) { return dartino::Main(argc, argv); } |
OLD | NEW |