Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: tools/testing/dart/compiler_configuration.dart

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Adjusted the status of two tests and the logic of one test, to make them work with --enable-asserts Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 compiler_configuration; 5 library compiler_configuration;
6 6
7 import 'dart:io' show Platform; 7 import 'dart:io' show Platform;
8 8
9 import 'runtime_configuration.dart' show RuntimeConfiguration; 9 import 'runtime_configuration.dart' show RuntimeConfiguration;
10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; 10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool isChecked = configuration['checked']; 60 bool isChecked = configuration['checked'];
61 bool isStrong = configuration['strong']; 61 bool isStrong = configuration['strong'];
62 bool isHostChecked = configuration['host_checked']; 62 bool isHostChecked = configuration['host_checked'];
63 bool useSdk = configuration['use_sdk']; 63 bool useSdk = configuration['use_sdk'];
64 bool isCsp = configuration['csp']; 64 bool isCsp = configuration['csp'];
65 bool useCps = configuration['cps_ir']; 65 bool useCps = configuration['cps_ir'];
66 bool useBlobs = configuration['use_blobs']; 66 bool useBlobs = configuration['use_blobs'];
67 bool hotReload = configuration['hot_reload']; 67 bool hotReload = configuration['hot_reload'];
68 bool hotReloadRollback = configuration['hot_reload_rollback']; 68 bool hotReloadRollback = configuration['hot_reload_rollback'];
69 bool useFastStartup = configuration['fast_startup']; 69 bool useFastStartup = configuration['fast_startup'];
70 bool useEnableAsserts = configuration['enable_asserts'];
70 bool useKernelInDart2js = configuration['dart2js_with_kernel']; 71 bool useKernelInDart2js = configuration['dart2js_with_kernel'];
71 72
72 switch (compiler) { 73 switch (compiler) {
73 case 'dart2analyzer': 74 case 'dart2analyzer':
74 return new AnalyzerCompilerConfiguration( 75 return new AnalyzerCompilerConfiguration(
75 isDebug: isDebug, 76 isDebug: isDebug,
76 isChecked: isChecked, 77 isChecked: isChecked,
77 isStrong: isStrong, 78 isStrong: isStrong,
78 isHostChecked: isHostChecked, 79 isHostChecked: isHostChecked,
79 useSdk: useSdk); 80 useSdk: useSdk);
80 case 'dart2js': 81 case 'dart2js':
81 return new Dart2jsCompilerConfiguration( 82 return new Dart2jsCompilerConfiguration(
82 isDebug: isDebug, 83 isDebug: isDebug,
83 isChecked: isChecked, 84 isChecked: isChecked,
84 isHostChecked: isHostChecked, 85 isHostChecked: isHostChecked,
85 useCps: useCps, 86 useCps: useCps,
86 useSdk: useSdk, 87 useSdk: useSdk,
87 isCsp: isCsp, 88 isCsp: isCsp,
88 useFastStartup: useFastStartup, 89 useFastStartup: useFastStartup,
90 useEnableAsserts: useEnableAsserts,
89 useKernel: useKernelInDart2js, 91 useKernel: useKernelInDart2js,
90 extraDart2jsOptions: 92 extraDart2jsOptions:
91 TestUtils.getExtraOptions(configuration, 'dart2js_options')); 93 TestUtils.getExtraOptions(configuration, 'dart2js_options'));
92 case 'app_jit': 94 case 'app_jit':
93 return new AppJitCompilerConfiguration( 95 return new AppJitCompilerConfiguration(
94 isDebug: isDebug, isChecked: isChecked); 96 isDebug: isDebug, isChecked: isChecked);
95 case 'precompiler': 97 case 'precompiler':
96 return new PrecompilerCompilerConfiguration( 98 return new PrecompilerCompilerConfiguration(
97 isDebug: isDebug, 99 isDebug: isDebug,
98 isChecked: isChecked, 100 isChecked: isChecked,
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot') 534 .resolve('dart-sdk/bin/snapshots/dart2js.dart.snapshot')
533 ]); 535 ]);
534 } 536 }
535 } 537 }
536 538
537 /// Configuration for dart2js compiler. 539 /// Configuration for dart2js compiler.
538 class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration { 540 class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
539 final bool isCsp; 541 final bool isCsp;
540 final bool useCps; 542 final bool useCps;
541 final bool useFastStartup; 543 final bool useFastStartup;
544 final bool useEnableAsserts;
542 final bool useKernel; 545 final bool useKernel;
543 final List<String> extraDart2jsOptions; 546 final List<String> extraDart2jsOptions;
544 // We cache the extended environment to save memory. 547 // We cache the extended environment to save memory.
545 static Map<String, String> cpsFlagCache; 548 static Map<String, String> cpsFlagCache;
546 static Map<String, String> environmentOverridesCacheObject; 549 static Map<String, String> environmentOverridesCacheObject;
547 550
548 Dart2jsCompilerConfiguration( 551 Dart2jsCompilerConfiguration(
549 {bool isDebug, 552 {bool isDebug,
550 bool isChecked, 553 bool isChecked,
551 bool isHostChecked, 554 bool isHostChecked,
552 bool useSdk, 555 bool useSdk,
553 bool this.useCps, 556 bool this.useCps,
554 bool this.isCsp, 557 bool this.isCsp,
555 bool this.useFastStartup, 558 bool this.useFastStartup,
559 bool this.useEnableAsserts,
556 this.useKernel, 560 this.useKernel,
557 this.extraDart2jsOptions}) 561 this.extraDart2jsOptions})
558 : super('dart2js', 562 : super('dart2js',
559 isDebug: isDebug, 563 isDebug: isDebug,
560 isChecked: isChecked, 564 isChecked: isChecked,
561 isHostChecked: isHostChecked, 565 isHostChecked: isHostChecked,
562 useSdk: useSdk); 566 useSdk: useSdk);
563 567
564 int computeTimeoutMultiplier() { 568 int computeTimeoutMultiplier() {
565 int multiplier = 1; 569 int multiplier = 1;
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 RuntimeConfiguration runtimeConfiguration, 961 RuntimeConfiguration runtimeConfiguration,
958 String buildDir, 962 String buildDir,
959 TestInformation info, 963 TestInformation info,
960 List<String> vmOptions, 964 List<String> vmOptions,
961 List<String> sharedOptions, 965 List<String> sharedOptions,
962 List<String> originalArguments, 966 List<String> originalArguments,
963 CommandArtifact artifact) { 967 CommandArtifact artifact) {
964 return <String>[]; 968 return <String>[];
965 } 969 }
966 } 970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698