| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library dartino_compiler.worker.developer; | 5 library dartino_compiler.worker.developer; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Future, | 8 Future, |
| 9 TimeoutException; | 9 TimeoutException; |
| 10 | 10 |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 // TODO(ahe): Need to continue to unwind stack. | 711 // TODO(ahe): Need to continue to unwind stack. |
| 712 break; | 712 break; |
| 713 case VmCommandCode.ProcessCompileTimeError: | 713 case VmCommandCode.ProcessCompileTimeError: |
| 714 state.log("Compile-time error"); | 714 state.log("Compile-time error"); |
| 715 exitCode = exit_codes.DART_VM_EXITCODE_COMPILE_TIME_ERROR; | 715 exitCode = exit_codes.DART_VM_EXITCODE_COMPILE_TIME_ERROR; |
| 716 await printTrace(); | 716 await printTrace(); |
| 717 // TODO(ahe): Continue to unwind stack? | 717 // TODO(ahe): Continue to unwind stack? |
| 718 break; | 718 break; |
| 719 | 719 |
| 720 case VmCommandCode.ProcessTerminated: | 720 case VmCommandCode.ProcessTerminated: |
| 721 await vmContext.terminate(); |
| 721 exitCode = 0; | 722 exitCode = 0; |
| 722 break; | 723 break; |
| 723 | 724 |
| 724 case VmCommandCode.ConnectionError: | 725 case VmCommandCode.ConnectionError: |
| 725 state.log("Error on connection to Dartino VM: ${command.error}"); | 726 state.log("Error on connection to Dartino VM: ${command.error}"); |
| 726 exitCode = exit_codes.COMPILER_EXITCODE_CONNECTION_ERROR; | 727 exitCode = exit_codes.COMPILER_EXITCODE_CONNECTION_ERROR; |
| 727 break; | 728 break; |
| 728 | 729 |
| 729 default: | 730 default: |
| 730 throwInternalError("Unexpected result from Dartino VM: '$command'"); | 731 throwInternalError("Unexpected result from Dartino VM: '$command'"); |
| (...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2141 addIfNotNull("open_ocd_board", open_ocd_board); | 2142 addIfNotNull("open_ocd_board", open_ocd_board); |
| 2142 return result; | 2143 return result; |
| 2143 } | 2144 } |
| 2144 } | 2145 } |
| 2145 | 2146 |
| 2146 Uri defaultSnapshotLocation(Uri script) { | 2147 Uri defaultSnapshotLocation(Uri script) { |
| 2147 // TODO(sgjesse): Use a temp directory for the snapshot. | 2148 // TODO(sgjesse): Use a temp directory for the snapshot. |
| 2148 String snapshotName = basenameWithoutExtension(script.path) + '.snapshot'; | 2149 String snapshotName = basenameWithoutExtension(script.path) + '.snapshot'; |
| 2149 return script.resolve(snapshotName); | 2150 return script.resolve(snapshotName); |
| 2150 } | 2151 } |
| OLD | NEW |