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

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

Issue 8372094: Renaming Array -> List in the VM API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 9 years, 1 month 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
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 dart_options->AddArgument(argv[i]); 85 dart_options->AddArgument(argv[i]);
86 i += 1; 86 i += 1;
87 } 87 }
88 88
89 return 0; 89 return 0;
90 } 90 }
91 91
92 92
93 static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options) { 93 static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options) {
94 int options_count = options->count(); 94 int options_count = options->count();
95 Dart_Handle dart_arguments = Dart_NewArray(options_count); 95 Dart_Handle dart_arguments = Dart_NewList(options_count);
96 if (!Dart_IsValid(dart_arguments)) { 96 if (!Dart_IsValid(dart_arguments)) {
97 return dart_arguments; 97 return dart_arguments;
98 } 98 }
99 for (int i = 0; i < options_count; i++) { 99 for (int i = 0; i < options_count; i++) {
100 Dart_Handle argument_value = Dart_NewString(options->GetArgument(i)); 100 Dart_Handle argument_value = Dart_NewString(options->GetArgument(i));
101 if (!Dart_IsValid(argument_value)) { 101 if (!Dart_IsValid(argument_value)) {
102 return argument_value; 102 return argument_value;
103 } 103 }
104 Dart_Handle result = Dart_ArraySetAt(dart_arguments, i, argument_value); 104 Dart_Handle result = Dart_ListSetAt(dart_arguments, i, argument_value);
105 if (!Dart_IsValid(result)) { 105 if (!Dart_IsValid(result)) {
106 return result; 106 return result;
107 } 107 }
108 } 108 }
109 Dart_Handle core_lib_url = Dart_NewString("dart:coreimpl"); 109 Dart_Handle core_lib_url = Dart_NewString("dart:coreimpl");
110 if (!Dart_IsValid(core_lib_url)) { 110 if (!Dart_IsValid(core_lib_url)) {
111 return core_lib_url; 111 return core_lib_url;
112 } 112 }
113 Dart_Handle core_lib = Dart_LookupLibrary(core_lib_url); 113 Dart_Handle core_lib = Dart_LookupLibrary(core_lib_url);
114 if (!Dart_IsValid(core_lib)) { 114 if (!Dart_IsValid(core_lib)) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 return 255; // Indicates we encountered an error. 313 return 255; // Indicates we encountered an error.
314 } 314 }
315 free(canonical_script_name); 315 free(canonical_script_name);
316 Dart_ExitScope(); 316 Dart_ExitScope();
317 // Dump symbol information for the profiler. 317 // Dump symbol information for the profiler.
318 DumpPprofSymbolInfo(); 318 DumpPprofSymbolInfo();
319 // Shutdown the isolate. 319 // Shutdown the isolate.
320 Dart_ShutdownIsolate(); 320 Dart_ShutdownIsolate();
321 return 0; 321 return 0;
322 } 322 }
OLDNEW
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698