@@ -201,6 +201,18 @@ class Configuration {
201201 return value as String ;
202202 }
203203
204+ List <String > stringListOption (String option) {
205+ if (! optionsCopy.containsKey (option)) return null ;
206+
207+ var value = optionsCopy.remove (option);
208+ if (value == null ) throw FormatException ('Option "$option " was null.' );
209+ if (value is ! List ) {
210+ throw FormatException ('Option "$option " had value "$value ", which is '
211+ 'not a List.' );
212+ }
213+ return new List <String >.from (value);
214+ }
215+
204216 // Extract options from the name and map.
205217 var architecture =
206218 enumOption ("architecture" , Architecture .names, Architecture .find);
@@ -236,14 +248,13 @@ class Configuration {
236248 var configuration = Configuration (
237249 name, architecture, compiler, mode, runtime, system,
238250 builderTag: stringOption ("builder-tag" ),
239- vmOptions: stringOption ("vm-options" ),
251+ vmOptions: stringListOption ("vm-options" ),
240252 timeout: intOption ("timeout" ),
241253 enableAsserts: boolOption ("enable-asserts" ),
242254 isChecked: boolOption ("checked" ),
243255 isCsp: boolOption ("csp" ),
244256 isHostChecked: boolOption ("host-checked" ),
245257 isMinified: boolOption ("minified" ),
246- isStrong: boolOption ("strong" ),
247258 previewDart2: boolOption ("preview-dart-2" ),
248259 useBlobs: boolOption ("use-blobs" ),
249260 useDart2JSWithKernel: boolOption ("dart2js-with-kernel" ),
@@ -273,12 +284,11 @@ class Configuration {
273284
274285 final System system;
275286
276- // TODO(rnystrom): Is this still needed?
277287 final String builderTag;
278288
279- final String vmOptions;
289+ final List < String > vmOptions;
280290
281- final int timeout;
291+ int timeout;
282292
283293 final bool enableAsserts;
284294
@@ -292,9 +302,6 @@ class Configuration {
292302
293303 final bool isMinified;
294304
295- // TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
296- final bool isStrong;
297-
298305 // TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
299306 final bool previewDart2;
300307
@@ -315,14 +322,13 @@ class Configuration {
315322 Configuration (this .name, this .architecture, this .compiler, this .mode,
316323 this .runtime, this .system,
317324 {String builderTag,
318- String vmOptions,
325+ List < String > vmOptions,
319326 int timeout,
320327 bool enableAsserts,
321328 bool isChecked,
322329 bool isCsp,
323330 bool isHostChecked,
324331 bool isMinified,
325- bool isStrong,
326332 bool previewDart2,
327333 bool useBlobs,
328334 bool useDart2JSWithKernel,
@@ -332,14 +338,13 @@ class Configuration {
332338 bool useHotReloadRollback,
333339 bool useSdk})
334340 : builderTag = builderTag ?? "" ,
335- vmOptions = vmOptions ?? "" ,
336- timeout = timeout ?? 0 ,
341+ vmOptions = vmOptions ?? < String > [] ,
342+ timeout = timeout,
337343 enableAsserts = enableAsserts ?? false ,
338344 isChecked = isChecked ?? false ,
339345 isCsp = isCsp ?? false ,
340346 isHostChecked = isHostChecked ?? false ,
341347 isMinified = isMinified ?? false ,
342- isStrong = isStrong ?? false ,
343348 previewDart2 = previewDart2 ?? true ,
344349 useBlobs = useBlobs ?? false ,
345350 useDart2JSWithKernel = useDart2JSWithKernel ?? false ,
@@ -365,7 +370,6 @@ class Configuration {
365370 isCsp == other.isCsp &&
366371 isHostChecked == other.isHostChecked &&
367372 isMinified == other.isMinified &&
368- isStrong == other.isStrong &&
369373 previewDart2 == other.previewDart2 &&
370374 useBlobs == other.useBlobs &&
371375 useDart2JSWithKernel == other.useDart2JSWithKernel &&
@@ -393,15 +397,14 @@ class Configuration {
393397 (isCsp ? 4 : 0 ) ^
394398 (isHostChecked ? 8 : 0 ) ^
395399 (isMinified ? 16 : 0 ) ^
396- (isStrong ? 32 : 0 ) ^
397- (previewDart2 ? 64 : 0 ) ^
398- (useBlobs ? 128 : 0 ) ^
399- (useDart2JSWithKernel ? 256 : 0 ) ^
400- (useDart2JSOldFrontEnd ? 512 : 0 ) ^
401- (useFastStartup ? 1024 : 0 ) ^
402- (useHotReload ? 2048 : 0 ) ^
403- (useHotReloadRollback ? 4096 : 0 ) ^
404- (useSdk ? 8192 : 0 );
400+ (previewDart2 ? 32 : 0 ) ^
401+ (useBlobs ? 64 : 0 ) ^
402+ (useDart2JSWithKernel ? 128 : 0 ) ^
403+ (useDart2JSOldFrontEnd ? 256 : 0 ) ^
404+ (useFastStartup ? 512 : 0 ) ^
405+ (useHotReload ? 1024 : 0 ) ^
406+ (useHotReloadRollback ? 2048 : 0 ) ^
407+ (useSdk ? 4096 : 0 );
405408
406409 String toString () {
407410 var buffer = new StringBuffer ();
@@ -423,7 +426,6 @@ class Configuration {
423426 if (isCsp) fields.add ("csp" );
424427 if (isHostChecked) fields.add ("host-checked" );
425428 if (isMinified) fields.add ("minified" );
426- if (isStrong) fields.add ("strong" );
427429 if (previewDart2) fields.add ("preview-dart-2" );
428430 if (useBlobs) fields.add ("use-blobs" );
429431 if (useDart2JSWithKernel) fields.add ("dart2js-with-kernel" );
0 commit comments