OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of vmservice_io; | 5 part of vmservice_io; |
6 | 6 |
7 _log(msg) { | 7 _log(msg) { |
8 print("% $msg"); | 8 print("% $msg"); |
9 } | 9 } |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // p q r s t u v w | 125 // p q r s t u v w |
126 false, false, false, false, false, false, false, false, | 126 false, false, false, false, false, false, false, false, |
127 // x y z { | } ~ DEL | 127 // x y z { | } ~ DEL |
128 false, false, false, true , true , true , false, true | 128 false, false, false, true , true , true , false, true |
129 ]; | 129 ]; |
130 | 130 |
131 _parsePackagesFile(SendPort sp, | 131 _parsePackagesFile(SendPort sp, |
132 bool traceLoading, | 132 bool traceLoading, |
133 Uri packagesFile, | 133 Uri packagesFile, |
134 List<int> data) { | 134 List<int> data) { |
135 var result = []; | 135 // The first entry contains the location of the identified .packages file |
| 136 // instead of a mapping. |
| 137 var result = [packagesFile.toString(), null]; |
136 var index = 0; | 138 var index = 0; |
137 var len = data.length; | 139 var len = data.length; |
138 while (index < len) { | 140 while (index < len) { |
139 var start = index; | 141 var start = index; |
140 var char = data[index]; | 142 var char = data[index]; |
141 if ((char == _CR) || (char == _LF)) { | 143 if ((char == _CR) || (char == _LF)) { |
142 // Skipping empty lines. | 144 // Skipping empty lines. |
143 index++; | 145 index++; |
144 continue; | 146 continue; |
145 } | 147 } |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 assert(id != null); | 428 assert(id != null); |
427 String resource = request[3]; | 429 String resource = request[3]; |
428 assert(resource != null); | 430 assert(resource != null); |
429 var uri = Uri.parse(resource); | 431 var uri = Uri.parse(resource); |
430 if (id >= 0) { | 432 if (id >= 0) { |
431 _handleResourceRequest(sp, traceLoading, id, uri); | 433 _handleResourceRequest(sp, traceLoading, id, uri); |
432 } else { | 434 } else { |
433 _handlePackagesRequest(sp, traceLoading, id, uri); | 435 _handlePackagesRequest(sp, traceLoading, id, uri); |
434 } | 436 } |
435 } | 437 } |
OLD | NEW |