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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 139 // By default, log code create information in the snapshot. |
140 i::FLAG_log_code = true; | 140 i::FLAG_log_code = true; |
141 i::FLAG_logfile_per_isolate = false; | 141 i::FLAG_logfile_per_isolate = false; |
142 | 142 // Make mksnapshot runs predictable to create reproducible snapshots. |
| 143 i::FLAG_predictable = true; |
143 // Print the usage if an error occurs when parsing the command line | 144 // Print the usage if an error occurs when parsing the command line |
144 // flags or if the help flag is set. | 145 // flags or if the help flag is set. |
145 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 146 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
146 if (result > 0 || (argc > 3) || i::FLAG_help) { | 147 if (result > 0 || (argc > 3) || i::FLAG_help) { |
147 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n", | 148 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n", |
148 argv[0]); | 149 argv[0]); |
149 i::FlagList::PrintHelp(); | 150 i::FlagList::PrintHelp(); |
150 return !i::FLAG_help; | 151 return !i::FLAG_help; |
151 } | 152 } |
152 | 153 |
(...skipping 23 matching lines...) Expand all Loading... |
176 CHECK(blob.data); | 177 CHECK(blob.data); |
177 writer.WriteSnapshot(blob); | 178 writer.WriteSnapshot(blob); |
178 delete[] blob.data; | 179 delete[] blob.data; |
179 } | 180 } |
180 | 181 |
181 V8::Dispose(); | 182 V8::Dispose(); |
182 V8::ShutdownPlatform(); | 183 V8::ShutdownPlatform(); |
183 delete platform; | 184 delete platform; |
184 return 0; | 185 return 0; |
185 } | 186 } |
OLD | NEW |