@@ -201,6 +201,18 @@ class Configuration {
201
201
return value as String ;
202
202
}
203
203
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
+
204
216
// Extract options from the name and map.
205
217
var architecture =
206
218
enumOption ("architecture" , Architecture .names, Architecture .find);
@@ -236,14 +248,13 @@ class Configuration {
236
248
var configuration = Configuration (
237
249
name, architecture, compiler, mode, runtime, system,
238
250
builderTag: stringOption ("builder-tag" ),
239
- vmOptions: stringOption ("vm-options" ),
251
+ vmOptions: stringListOption ("vm-options" ),
240
252
timeout: intOption ("timeout" ),
241
253
enableAsserts: boolOption ("enable-asserts" ),
242
254
isChecked: boolOption ("checked" ),
243
255
isCsp: boolOption ("csp" ),
244
256
isHostChecked: boolOption ("host-checked" ),
245
257
isMinified: boolOption ("minified" ),
246
- isStrong: boolOption ("strong" ),
247
258
previewDart2: boolOption ("preview-dart-2" ),
248
259
useBlobs: boolOption ("use-blobs" ),
249
260
useDart2JSWithKernel: boolOption ("dart2js-with-kernel" ),
@@ -273,12 +284,11 @@ class Configuration {
273
284
274
285
final System system;
275
286
276
- // TODO(rnystrom): Is this still needed?
277
287
final String builderTag;
278
288
279
- final String vmOptions;
289
+ final List < String > vmOptions;
280
290
281
- final int timeout;
291
+ int timeout;
282
292
283
293
final bool enableAsserts;
284
294
@@ -292,9 +302,6 @@ class Configuration {
292
302
293
303
final bool isMinified;
294
304
295
- // TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
296
- final bool isStrong;
297
-
298
305
// TODO(rnystrom): Remove this when Dart 1.0 is no longer supported.
299
306
final bool previewDart2;
300
307
@@ -315,14 +322,13 @@ class Configuration {
315
322
Configuration (this .name, this .architecture, this .compiler, this .mode,
316
323
this .runtime, this .system,
317
324
{String builderTag,
318
- String vmOptions,
325
+ List < String > vmOptions,
319
326
int timeout,
320
327
bool enableAsserts,
321
328
bool isChecked,
322
329
bool isCsp,
323
330
bool isHostChecked,
324
331
bool isMinified,
325
- bool isStrong,
326
332
bool previewDart2,
327
333
bool useBlobs,
328
334
bool useDart2JSWithKernel,
@@ -332,14 +338,13 @@ class Configuration {
332
338
bool useHotReloadRollback,
333
339
bool useSdk})
334
340
: builderTag = builderTag ?? "" ,
335
- vmOptions = vmOptions ?? "" ,
336
- timeout = timeout ?? 0 ,
341
+ vmOptions = vmOptions ?? < String > [] ,
342
+ timeout = timeout,
337
343
enableAsserts = enableAsserts ?? false ,
338
344
isChecked = isChecked ?? false ,
339
345
isCsp = isCsp ?? false ,
340
346
isHostChecked = isHostChecked ?? false ,
341
347
isMinified = isMinified ?? false ,
342
- isStrong = isStrong ?? false ,
343
348
previewDart2 = previewDart2 ?? true ,
344
349
useBlobs = useBlobs ?? false ,
345
350
useDart2JSWithKernel = useDart2JSWithKernel ?? false ,
@@ -365,7 +370,6 @@ class Configuration {
365
370
isCsp == other.isCsp &&
366
371
isHostChecked == other.isHostChecked &&
367
372
isMinified == other.isMinified &&
368
- isStrong == other.isStrong &&
369
373
previewDart2 == other.previewDart2 &&
370
374
useBlobs == other.useBlobs &&
371
375
useDart2JSWithKernel == other.useDart2JSWithKernel &&
@@ -393,15 +397,14 @@ class Configuration {
393
397
(isCsp ? 4 : 0 ) ^
394
398
(isHostChecked ? 8 : 0 ) ^
395
399
(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 );
405
408
406
409
String toString () {
407
410
var buffer = new StringBuffer ();
@@ -423,7 +426,6 @@ class Configuration {
423
426
if (isCsp) fields.add ("csp" );
424
427
if (isHostChecked) fields.add ("host-checked" );
425
428
if (isMinified) fields.add ("minified" );
426
- if (isStrong) fields.add ("strong" );
427
429
if (previewDart2) fields.add ("preview-dart-2" );
428
430
if (useBlobs) fields.add ("use-blobs" );
429
431
if (useDart2JSWithKernel) fields.add ("dart2js-with-kernel" );
0 commit comments