| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 for (int i = 0; i < options.count(); i++) { | 192 for (int i = 0; i < options.count(); i++) { |
| 193 if (strcmp(options.GetArgument(i), "--compile_all") == 0) { | 193 if (strcmp(options.GetArgument(i), "--compile_all") == 0) { |
| 194 return true; | 194 return true; |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 return false; | 197 return false; |
| 198 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 static void PrintObject(FILE* out, Dart_Handle object) { | 201 static void PrintObject(FILE* out, Dart_Handle object) { |
| 202 Dart_Handle result = Dart_ObjectToString(object); | 202 Dart_Handle result = Dart_ToString(object); |
| 203 if (Dart_IsValid(result)) { | 203 if (Dart_IsValid(result)) { |
| 204 PrintString(out, result); | 204 PrintString(out, result); |
| 205 } else { | 205 } else { |
| 206 fprintf(out, "%s\n", Dart_GetError(result)); | 206 fprintf(out, "%s\n", Dart_GetError(result)); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 int main(int argc, char** argv) { | 211 int main(int argc, char** argv) { |
| 212 char* script_name; | 212 char* script_name; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |