OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library runtime_configuration; | 5 library runtime_configuration; |
6 | 6 |
7 import 'compiler_configuration.dart' show CommandArtifact; | 7 import 'compiler_configuration.dart' show CommandArtifact; |
8 | 8 |
9 // TODO(ahe): Remove this import, we can precompute all the values required | 9 // TODO(ahe): Remove this import, we can precompute all the values required |
10 // from TestSuite once the refactoring is complete. | 10 // from TestSuite once the refactoring is complete. |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 CommandArtifact artifact, | 258 CommandArtifact artifact, |
259 List<String> arguments, | 259 List<String> arguments, |
260 Map<String, String> environmentOverrides) { | 260 Map<String, String> environmentOverrides) { |
261 String script = artifact.filename; | 261 String script = artifact.filename; |
262 String type = artifact.mimeType; | 262 String type = artifact.mimeType; |
263 if (script != null && type != 'application/dart-precompiled') { | 263 if (script != null && type != 'application/dart-precompiled') { |
264 throw "dart_precompiled cannot run files of type '$type'."; | 264 throw "dart_precompiled cannot run files of type '$type'."; |
265 } | 265 } |
266 | 266 |
267 var augmentedArgs = new List(); | 267 var augmentedArgs = new List(); |
268 augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}"); | 268 augmentedArgs.add("--run-full-snapshot=${artifact.filename}"); |
269 if (useBlobs) { | 269 if (useBlobs) { |
270 augmentedArgs.add("--use_blobs"); | 270 augmentedArgs.add("--use-blobs"); |
271 } | 271 } |
272 augmentedArgs.addAll(arguments); | 272 augmentedArgs.addAll(arguments); |
273 | 273 |
274 return <Command>[ | 274 return <Command>[ |
275 commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName, | 275 commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName, |
276 augmentedArgs, environmentOverrides) | 276 augmentedArgs, environmentOverrides) |
277 ]; | 277 ]; |
278 } | 278 } |
279 } | 279 } |
280 | 280 |
(...skipping 29 matching lines...) Expand all Loading... |
310 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 310 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
311 List<Command> computeRuntimeCommands( | 311 List<Command> computeRuntimeCommands( |
312 TestSuite suite, | 312 TestSuite suite, |
313 CommandBuilder commandBuilder, | 313 CommandBuilder commandBuilder, |
314 CommandArtifact artifact, | 314 CommandArtifact artifact, |
315 List<String> arguments, | 315 List<String> arguments, |
316 Map<String, String> environmentOverrides) { | 316 Map<String, String> environmentOverrides) { |
317 throw "Unimplemented runtime '$runtimeType'"; | 317 throw "Unimplemented runtime '$runtimeType'"; |
318 } | 318 } |
319 } | 319 } |
OLD | NEW |