| 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 "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 139 // By default, log code create information in the snapshot. |
| 140 i::FLAG_log_code = true; | 140 i::FLAG_log_code = true; |
| 141 | |
| 142 // Omit from the snapshot natives for features that can be turned off | |
| 143 // at runtime. | |
| 144 i::FLAG_harmony_shipping = false; | |
| 145 | |
| 146 i::FLAG_logfile_per_isolate = false; | 141 i::FLAG_logfile_per_isolate = false; |
| 147 | 142 |
| 148 // Print the usage if an error occurs when parsing the command line | 143 // Print the usage if an error occurs when parsing the command line |
| 149 // flags or if the help flag is set. | 144 // flags or if the help flag is set. |
| 150 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 145 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
| 151 if (result > 0 || (argc != 2 && argc != 3) || i::FLAG_help) { | 146 if (result > 0 || (argc != 2 && argc != 3) || i::FLAG_help) { |
| 152 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); | 147 ::printf("Usage: %s [flag] ... outfile\n", argv[0]); |
| 153 i::FlagList::PrintHelp(); | 148 i::FlagList::PrintHelp(); |
| 154 return !i::FLAG_help; | 149 return !i::FLAG_help; |
| 155 } | 150 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 169 writer.WriteSnapshot(blob); | 164 writer.WriteSnapshot(blob); |
| 170 delete[] extra_code; | 165 delete[] extra_code; |
| 171 delete[] blob.data; | 166 delete[] blob.data; |
| 172 } | 167 } |
| 173 | 168 |
| 174 V8::Dispose(); | 169 V8::Dispose(); |
| 175 V8::ShutdownPlatform(); | 170 V8::ShutdownPlatform(); |
| 176 delete platform; | 171 delete platform; |
| 177 return 0; | 172 return 0; |
| 178 } | 173 } |
| OLD | NEW |