OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <signal.h> | 6 #include <signal.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "include/libplatform/libplatform.h" | 9 #include "include/libplatform/libplatform.h" |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 exit(1); | 129 exit(1); |
130 } | 130 } |
131 i += read; | 131 i += read; |
132 } | 132 } |
133 fclose(file); | 133 fclose(file); |
134 return chars; | 134 return chars; |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 int main(int argc, char** argv) { | 138 int main(int argc, char** argv) { |
139 // By default, log code create information in the snapshot. | |
140 i::FLAG_log_code = true; | |
141 i::FLAG_logfile_per_isolate = false; | |
142 // Make mksnapshot runs predictable to create reproducible snapshots. | 139 // Make mksnapshot runs predictable to create reproducible snapshots. |
143 i::FLAG_predictable = true; | 140 i::FLAG_predictable = true; |
| 141 |
144 // Print the usage if an error occurs when parsing the command line | 142 // Print the usage if an error occurs when parsing the command line |
145 // flags or if the help flag is set. | 143 // flags or if the help flag is set. |
146 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 144 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
147 if (result > 0 || (argc > 3) || i::FLAG_help) { | 145 if (result > 0 || (argc > 3) || i::FLAG_help) { |
148 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n", | 146 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n", |
149 argv[0]); | 147 argv[0]); |
150 i::FlagList::PrintHelp(); | 148 i::FlagList::PrintHelp(); |
151 return !i::FLAG_help; | 149 return !i::FLAG_help; |
152 } | 150 } |
153 | 151 |
(...skipping 23 matching lines...) Expand all Loading... |
177 CHECK(blob.data); | 175 CHECK(blob.data); |
178 writer.WriteSnapshot(blob); | 176 writer.WriteSnapshot(blob); |
179 delete[] blob.data; | 177 delete[] blob.data; |
180 } | 178 } |
181 | 179 |
182 V8::Dispose(); | 180 V8::Dispose(); |
183 V8::ShutdownPlatform(); | 181 V8::ShutdownPlatform(); |
184 delete platform; | 182 delete platform; |
185 return 0; | 183 return 0; |
186 } | 184 } |
OLD | NEW |