| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 | 1836 |
| 1837 | 1837 |
| 1838 void main(int argc, char** argv) { | 1838 void main(int argc, char** argv) { |
| 1839 char* script_name; | 1839 char* script_name; |
| 1840 const int EXTRA_VM_ARGUMENTS = 8; | 1840 const int EXTRA_VM_ARGUMENTS = 8; |
| 1841 CommandLineOptions vm_options(argc + EXTRA_VM_ARGUMENTS); | 1841 CommandLineOptions vm_options(argc + EXTRA_VM_ARGUMENTS); |
| 1842 CommandLineOptions dart_options(argc); | 1842 CommandLineOptions dart_options(argc); |
| 1843 bool print_flags_seen = false; | 1843 bool print_flags_seen = false; |
| 1844 bool verbose_debug_seen = false; | 1844 bool verbose_debug_seen = false; |
| 1845 | 1845 |
| 1846 vm_options.AddArgument("--no_write_protect_code"); | |
| 1847 // Perform platform specific initialization. | 1846 // Perform platform specific initialization. |
| 1848 if (!Platform::Initialize()) { | 1847 if (!Platform::Initialize()) { |
| 1849 Log::PrintErr("Initialization failed\n"); | 1848 Log::PrintErr("Initialization failed\n"); |
| 1850 } | 1849 } |
| 1851 | 1850 |
| 1852 // On Windows, the argv strings are code page encoded and not | 1851 // On Windows, the argv strings are code page encoded and not |
| 1853 // utf8. We need to convert them to utf8. | 1852 // utf8. We need to convert them to utf8. |
| 1854 bool argv_converted = ShellUtils::GetUtf8Argv(argc, argv); | 1853 bool argv_converted = ShellUtils::GetUtf8Argv(argc, argv); |
| 1855 | 1854 |
| 1856 // Parse command line arguments. | 1855 // Parse command line arguments. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 Platform::Exit(Process::GlobalExitCode()); | 1985 Platform::Exit(Process::GlobalExitCode()); |
| 1987 } | 1986 } |
| 1988 | 1987 |
| 1989 } // namespace bin | 1988 } // namespace bin |
| 1990 } // namespace dart | 1989 } // namespace dart |
| 1991 | 1990 |
| 1992 int main(int argc, char** argv) { | 1991 int main(int argc, char** argv) { |
| 1993 dart::bin::main(argc, argv); | 1992 dart::bin::main(argc, argv); |
| 1994 UNREACHABLE(); | 1993 UNREACHABLE(); |
| 1995 } | 1994 } |
| OLD | NEW |