| 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 package com.google.dart.compiler; | 5 package com.google.dart.compiler; |
| 6 | 6 |
| 7 import com.google.common.base.Objects; | 7 import com.google.common.base.Objects; |
| 8 import com.google.common.collect.Maps; | 8 import com.google.common.collect.Maps; |
| 9 import com.google.common.collect.Sets; | 9 import com.google.common.collect.Sets; |
| 10 import com.google.common.collect.Sets.SetView; | 10 import com.google.common.collect.Sets.SetView; |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 return compilerMain(compilerOptions); | 1061 return compilerMain(compilerOptions); |
| 1062 } | 1062 } |
| 1063 }); | 1063 }); |
| 1064 } else { | 1064 } else { |
| 1065 result = compilerMain(topCompilerOptions); | 1065 result = compilerMain(topCompilerOptions); |
| 1066 } | 1066 } |
| 1067 } catch (Throwable t) { | 1067 } catch (Throwable t) { |
| 1068 t.printStackTrace(); | 1068 t.printStackTrace(); |
| 1069 crash(); | 1069 crash(); |
| 1070 } | 1070 } |
| 1071 System.exit(result.code); | 1071 // exit |
| 1072 { |
| 1073 int exitCode = result.code; |
| 1074 if (!topCompilerOptions.extendedExitCode()) { |
| 1075 if (exitCode == RESULT_ERRORS) { |
| 1076 exitCode = 1; |
| 1077 } else { |
| 1078 exitCode = 0; |
| 1079 } |
| 1080 } |
| 1081 System.exit(exitCode); |
| 1082 } |
| 1072 } | 1083 } |
| 1073 | 1084 |
| 1074 /** | 1085 /** |
| 1075 * Invoke the compiler to build single application. | 1086 * Invoke the compiler to build single application. |
| 1076 * | 1087 * |
| 1077 * @param compilerOptions parsed command line arguments | 1088 * @param compilerOptions parsed command line arguments |
| 1078 * @return the result as integer when <code>0</code> means clean; <code>1</cod
e> there were | 1089 * @return the result as integer when <code>0</code> means clean; <code>1</cod
e> there were |
| 1079 * warnings; <code>2</code> there were errors; <code>127</code> other
problems or | 1090 * warnings; <code>2</code> there were errors; <code>127</code> other
problems or |
| 1080 * exceptions. | 1091 * exceptions. |
| 1081 */ | 1092 */ |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 return br.readLine(); | 1450 return br.readLine(); |
| 1440 } finally { | 1451 } finally { |
| 1441 br.close(); | 1452 br.close(); |
| 1442 } | 1453 } |
| 1443 } | 1454 } |
| 1444 } catch (Throwable e) { | 1455 } catch (Throwable e) { |
| 1445 } | 1456 } |
| 1446 return null; | 1457 return null; |
| 1447 } | 1458 } |
| 1448 } | 1459 } |
| OLD | NEW |