Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: dart/runtime/bin/main.cc

Issue 302703002: Version 1.4.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.4/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 while (i < argc) { 384 while (i < argc) {
385 if (ProcessMainOptions(argv[i])) { 385 if (ProcessMainOptions(argv[i])) {
386 i++; 386 i++;
387 } else { 387 } else {
388 // Check if this flag is a potentially valid VM flag. 388 // Check if this flag is a potentially valid VM flag.
389 const char* kChecked = "-c"; 389 const char* kChecked = "-c";
390 const char* kPackageRoot = "-p"; 390 const char* kPackageRoot = "-p";
391 if (strncmp(argv[i], kPackageRoot, strlen(kPackageRoot)) == 0) { 391 if (strncmp(argv[i], kPackageRoot, strlen(kPackageRoot)) == 0) {
392 if (!ProcessPackageRootOption(argv[i] + strlen(kPackageRoot))) { 392 if (!ProcessPackageRootOption(argv[i] + strlen(kPackageRoot))) {
393 i++; 393 i++;
394 if (!ProcessPackageRootOption(argv[i])) { 394 if ((argv[i] == NULL) || !ProcessPackageRootOption(argv[i])) {
395 Log::PrintErr("Invalid option specification : '%s'\n", argv[i - 1]); 395 Log::PrintErr("Invalid option specification : '%s'\n", argv[i - 1]);
396 i++; 396 i++;
397 break; 397 break;
398 } 398 }
399 } 399 }
400 } else if (strncmp(argv[i], kChecked, strlen(kChecked)) == 0) { 400 } else if (strncmp(argv[i], kChecked, strlen(kChecked)) == 0) {
401 vm_options->AddArgument("--checked"); 401 vm_options->AddArgument("--checked");
402 } else if (!IsValidFlag(argv[i], kPrefix, kPrefixLen)) { 402 } else if (!IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
403 break; 403 break;
404 } 404 }
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 exit(Process::GlobalExitCode()); 1132 exit(Process::GlobalExitCode());
1133 } 1133 }
1134 1134
1135 } // namespace bin 1135 } // namespace bin
1136 } // namespace dart 1136 } // namespace dart
1137 1137
1138 int main(int argc, char** argv) { 1138 int main(int argc, char** argv) {
1139 dart::bin::main(argc, argv); 1139 dart::bin::main(argc, argv);
1140 UNREACHABLE(); 1140 UNREACHABLE();
1141 } 1141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698