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 compiler_configuration; | 5 import 'dart:io'; |
6 | 6 |
7 import 'dart:io' show Platform; | 7 import 'configuration.dart'; |
8 | 8 import 'runtime_configuration.dart'; |
9 import 'runtime_configuration.dart' show RuntimeConfiguration; | 9 import 'test_runner.dart'; |
10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; | 10 import 'test_suite.dart'; |
11 import 'test_runner.dart' show Command, CommandBuilder, CompilationCommand; | |
12 import 'test_suite.dart' show TestInformation, TestUtils; | |
13 | 11 |
14 List<String> replaceDartFileWith(List<String> list, String replacement) { | 12 List<String> replaceDartFileWith(List<String> list, String replacement) { |
15 var copy = new List<String>.from(list); | 13 var copy = new List<String>.from(list); |
16 for (var i = 0; i < copy.length; i++) { | 14 for (var i = 0; i < copy.length; i++) { |
17 if (copy[i].endsWith(".dart")) { | 15 if (copy[i].endsWith(".dart")) { |
18 copy[i] = replacement; | 16 copy[i] = replacement; |
19 } | 17 } |
20 } | 18 } |
21 return copy; | 19 return copy; |
22 } | 20 } |
(...skipping 23 matching lines...) Expand all Loading... |
46 final bool isStrong; | 44 final bool isStrong; |
47 final bool isHostChecked; | 45 final bool isHostChecked; |
48 final bool useSdk; | 46 final bool useSdk; |
49 | 47 |
50 /// Only some subclasses support this check, but we statically allow calling | 48 /// Only some subclasses support this check, but we statically allow calling |
51 /// it on [CompilerConfiguration]. | 49 /// it on [CompilerConfiguration]. |
52 bool get useDfe { | 50 bool get useDfe { |
53 throw new UnsupportedError("This compiler does not support DFE."); | 51 throw new UnsupportedError("This compiler does not support DFE."); |
54 } | 52 } |
55 | 53 |
56 // TODO(ahe): Remove this constructor and move the switch to | 54 factory CompilerConfiguration(Configuration configuration) { |
57 // test_options.dart. We probably want to store an instance of | 55 switch (configuration.compiler) { |
58 // [CompilerConfiguration] in [configuration] there. | 56 case Compiler.dart2analyzer: |
59 factory CompilerConfiguration(Map<String, dynamic> configuration) { | 57 return new AnalyzerCompilerConfiguration( |
60 var compiler = configuration['compiler'] as String; | 58 isDebug: configuration.mode.isDebug, |
| 59 isChecked: configuration.isChecked, |
| 60 isStrong: configuration.isStrong, |
| 61 isHostChecked: configuration.isHostChecked, |
| 62 useSdk: configuration.useSdk); |
61 | 63 |
62 // TODO(ahe): Move these booleans into a struction configuration object | 64 case Compiler.dart2js: |
63 // which can eventually completely replace the Map-based configuration | 65 return new Dart2jsCompilerConfiguration( |
64 // object. | 66 isDebug: configuration.mode.isDebug, |
65 var isDebug = (configuration['mode'] as String) == 'debug'; | 67 isChecked: configuration.isChecked, |
66 var isChecked = configuration['checked'] as bool; | 68 isHostChecked: configuration.isHostChecked, |
67 var isStrong = configuration['strong'] as bool; | 69 useSdk: configuration.useSdk, |
68 var isHostChecked = configuration['host_checked'] as bool; | 70 isCsp: configuration.isCsp, |
69 var useSdk = configuration['use_sdk'] as bool; | 71 useFastStartup: configuration.useFastStartup, |
70 var isCsp = configuration['csp'] as bool; | 72 useKernel: configuration.useDart2JSWithKernel, |
71 var useBlobs = configuration['use_blobs'] as bool; | 73 extraDart2jsOptions: configuration.dart2jsOptions); |
72 var hotReload = configuration['hot_reload'] as bool; | |
73 var hotReloadRollback = configuration['hot_reload_rollback'] as bool; | |
74 var useFastStartup = configuration['fast_startup'] as bool; | |
75 var useKernelInDart2js = configuration['dart2js_with_kernel'] as bool; | |
76 | 74 |
77 switch (compiler) { | 75 case Compiler.appJit: |
78 case 'dart2analyzer': | |
79 return new AnalyzerCompilerConfiguration( | |
80 isDebug: isDebug, | |
81 isChecked: isChecked, | |
82 isStrong: isStrong, | |
83 isHostChecked: isHostChecked, | |
84 useSdk: useSdk); | |
85 case 'dart2js': | |
86 return new Dart2jsCompilerConfiguration( | |
87 isDebug: isDebug, | |
88 isChecked: isChecked, | |
89 isHostChecked: isHostChecked, | |
90 useSdk: useSdk, | |
91 isCsp: isCsp, | |
92 useFastStartup: useFastStartup, | |
93 useKernel: useKernelInDart2js, | |
94 extraDart2jsOptions: | |
95 TestUtils.getExtraOptions(configuration, 'dart2js_options')); | |
96 case 'app_jit': | |
97 return new AppJitCompilerConfiguration( | 76 return new AppJitCompilerConfiguration( |
98 isDebug: isDebug, isChecked: isChecked); | 77 isDebug: configuration.mode.isDebug, |
99 case 'precompiler': | 78 isChecked: configuration.isChecked); |
| 79 |
| 80 case Compiler.precompiler: |
100 return new PrecompilerCompilerConfiguration( | 81 return new PrecompilerCompilerConfiguration( |
101 isDebug: isDebug, | 82 isDebug: configuration.mode.isDebug, |
102 isChecked: isChecked, | 83 isChecked: configuration.isChecked, |
103 arch: configuration['arch'] as String, | 84 arch: configuration.architecture, |
104 useBlobs: useBlobs, | 85 useBlobs: configuration.useBlobs, |
105 isAndroid: configuration['system'] == 'android'); | 86 isAndroid: configuration.system == System.android); |
106 case 'dartk': | 87 |
| 88 case Compiler.dartk: |
107 return new NoneCompilerConfiguration( | 89 return new NoneCompilerConfiguration( |
108 isDebug: isDebug, | 90 isDebug: configuration.mode.isDebug, |
109 isChecked: isChecked, | 91 isChecked: configuration.isChecked, |
110 isHostChecked: isHostChecked, | 92 isHostChecked: configuration.isHostChecked, |
111 useSdk: useSdk, | 93 useSdk: configuration.useSdk, |
112 hotReload: hotReload, | 94 hotReload: configuration.hotReload, |
113 hotReloadRollback: hotReloadRollback, | 95 hotReloadRollback: configuration.hotReloadRollback, |
114 useDfe: true); | 96 useDfe: true); |
115 case 'dartkp': | 97 |
| 98 case Compiler.dartkp: |
116 return new PrecompilerCompilerConfiguration( | 99 return new PrecompilerCompilerConfiguration( |
117 isDebug: isDebug, | 100 isDebug: configuration.mode.isDebug, |
118 isChecked: isChecked, | 101 isChecked: configuration.isChecked, |
119 arch: configuration['arch'] as String, | 102 arch: configuration.architecture, |
120 useBlobs: useBlobs, | 103 useBlobs: configuration.useBlobs, |
121 isAndroid: configuration['system'] == 'android', | 104 isAndroid: configuration.system == System.android, |
122 useDfe: true); | 105 useDfe: true); |
123 case 'none': | 106 |
| 107 case Compiler.none: |
124 return new NoneCompilerConfiguration( | 108 return new NoneCompilerConfiguration( |
125 isDebug: isDebug, | 109 isDebug: configuration.mode.isDebug, |
126 isChecked: isChecked, | 110 isChecked: configuration.isChecked, |
127 isHostChecked: isHostChecked, | 111 isHostChecked: configuration.isHostChecked, |
128 useSdk: useSdk, | 112 useSdk: configuration.useSdk, |
129 hotReload: hotReload, | 113 hotReload: configuration.hotReload, |
130 hotReloadRollback: hotReloadRollback); | 114 hotReloadRollback: configuration.hotReloadRollback); |
131 default: | |
132 throw "Unknown compiler '$compiler'"; | |
133 } | 115 } |
| 116 |
| 117 throw "unreachable"; |
134 } | 118 } |
135 | 119 |
136 CompilerConfiguration._subclass( | 120 CompilerConfiguration._subclass( |
137 {this.isDebug: false, | 121 {this.isDebug: false, |
138 this.isChecked: false, | 122 this.isChecked: false, |
139 this.isStrong: false, | 123 this.isStrong: false, |
140 this.isHostChecked: false, | 124 this.isHostChecked: false, |
141 this.useSdk: false}); | 125 this.useSdk: false}); |
142 | 126 |
143 /// Return a multiplier used to give tests longer time to run. | 127 /// A multiplier used to give tests longer time to run. |
144 // TODO(ahe): Convert to getter! | 128 int get timeoutMultiplier => 1; |
145 int computeTimeoutMultiplier() { | |
146 return 1; | |
147 } | |
148 | 129 |
149 // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these | 130 // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these |
150 // functions. It is fixed for a given configuration. | 131 // functions. It is fixed for a given configuration. |
151 String computeCompilerPath(String buildDir) { | 132 String computeCompilerPath(String buildDir) { |
152 throw "Unknown compiler for: $runtimeType"; | 133 throw "Unknown compiler for: $runtimeType"; |
153 } | 134 } |
154 | 135 |
155 bool get hasCompiler => true; | 136 bool get hasCompiler => true; |
156 | 137 |
157 String get executableScriptSuffix => Platform.isWindows ? '.bat' : ''; | 138 String get executableScriptSuffix => Platform.isWindows ? '.bat' : ''; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 info, | 404 info, |
424 vmOptions, | 405 vmOptions, |
425 sharedOptions, | 406 sharedOptions, |
426 originalArguments, | 407 originalArguments, |
427 artifact); | 408 artifact); |
428 } | 409 } |
429 | 410 |
430 static ComposedCompilerConfiguration createDartKPConfiguration( | 411 static ComposedCompilerConfiguration createDartKPConfiguration( |
431 {bool isChecked, | 412 {bool isChecked, |
432 bool isHostChecked, | 413 bool isHostChecked, |
433 String arch, | 414 Architecture arch, |
434 bool useBlobs, | 415 bool useBlobs, |
435 bool isAndroid, | 416 bool isAndroid, |
436 bool useSdk, | 417 bool useSdk, |
437 bool verify, | 418 bool verify, |
438 bool strong, | 419 bool strong, |
439 bool treeShake}) { | 420 bool treeShake}) { |
440 return new ComposedCompilerConfiguration([ | 421 return new ComposedCompilerConfiguration([ |
441 // Compile with dartk. | 422 // Compile with dartk. |
442 new PipelineCommand.runWithGlobalArguments(new DartKCompilerConfiguration( | 423 new PipelineCommand.runWithGlobalArguments(new DartKCompilerConfiguration( |
443 isChecked: isChecked, | 424 isChecked: isChecked, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 bool this.isCsp, | 534 bool this.isCsp, |
554 bool this.useFastStartup, | 535 bool this.useFastStartup, |
555 this.useKernel, | 536 this.useKernel, |
556 this.extraDart2jsOptions}) | 537 this.extraDart2jsOptions}) |
557 : super('dart2js', | 538 : super('dart2js', |
558 isDebug: isDebug, | 539 isDebug: isDebug, |
559 isChecked: isChecked, | 540 isChecked: isChecked, |
560 isHostChecked: isHostChecked, | 541 isHostChecked: isHostChecked, |
561 useSdk: useSdk); | 542 useSdk: useSdk); |
562 | 543 |
563 int computeTimeoutMultiplier() { | 544 int get timeoutMultiplier { |
564 int multiplier = 1; | 545 var multiplier = 1; |
565 if (isDebug) multiplier *= 4; | 546 if (isDebug) multiplier *= 4; |
566 if (isChecked) multiplier *= 2; | 547 if (isChecked) multiplier *= 2; |
567 if (isHostChecked) multiplier *= 16; | 548 if (isHostChecked) multiplier *= 16; |
568 return multiplier; | 549 return multiplier; |
569 } | 550 } |
570 | 551 |
571 CommandArtifact computeCompilationArtifact( | 552 CommandArtifact computeCompilationArtifact( |
572 String buildDir, | 553 String buildDir, |
573 String tempDir, | 554 String tempDir, |
574 CommandBuilder commandBuilder, | 555 CommandBuilder commandBuilder, |
(...skipping 18 matching lines...) Expand all Loading... |
593 ? nativeDirectoryToUri(buildDir).resolve('dart-sdk/') | 574 ? nativeDirectoryToUri(buildDir).resolve('dart-sdk/') |
594 : nativeDirectoryToUri(TestUtils.dartDir.toNativePath()) | 575 : nativeDirectoryToUri(TestUtils.dartDir.toNativePath()) |
595 .resolve('sdk/'); | 576 .resolve('sdk/'); |
596 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/'); | 577 Uri preambleDir = sdk.resolve('lib/_internal/js_runtime/lib/preambles/'); |
597 return runtimeConfiguration.dart2jsPreambles(preambleDir) | 578 return runtimeConfiguration.dart2jsPreambles(preambleDir) |
598 ..add(artifact.filename); | 579 ..add(artifact.filename); |
599 } | 580 } |
600 } | 581 } |
601 | 582 |
602 class PrecompilerCompilerConfiguration extends CompilerConfiguration { | 583 class PrecompilerCompilerConfiguration extends CompilerConfiguration { |
603 final String arch; | 584 final Architecture arch; |
604 final bool useBlobs; | 585 final bool useBlobs; |
605 final bool isAndroid; | 586 final bool isAndroid; |
606 final bool useDfe; | 587 final bool useDfe; |
607 | 588 |
608 PrecompilerCompilerConfiguration( | 589 PrecompilerCompilerConfiguration( |
609 {bool isDebug, | 590 {bool isDebug, |
610 bool isChecked, | 591 bool isChecked, |
611 this.arch, | 592 this.arch, |
612 this.useBlobs, | 593 this.useBlobs, |
613 this.isAndroid, | 594 this.isAndroid, |
614 this.useDfe: false}) | 595 this.useDfe: false}) |
615 : super._subclass(isDebug: isDebug, isChecked: isChecked); | 596 : super._subclass(isDebug: isDebug, isChecked: isChecked); |
616 | 597 |
617 int computeTimeoutMultiplier() { | 598 int get timeoutMultiplier { |
618 int multiplier = 2; | 599 var multiplier = 2; |
619 if (isDebug) multiplier *= 4; | 600 if (isDebug) multiplier *= 4; |
620 if (isChecked) multiplier *= 2; | 601 if (isChecked) multiplier *= 2; |
621 return multiplier; | 602 return multiplier; |
622 } | 603 } |
623 | 604 |
624 CommandArtifact computeCompilationArtifact( | 605 CommandArtifact computeCompilationArtifact( |
625 String buildDir, | 606 String buildDir, |
626 String tempDir, | 607 String tempDir, |
627 CommandBuilder commandBuilder, | 608 CommandBuilder commandBuilder, |
628 List<String> arguments, | 609 List<String> arguments, |
(...skipping 12 matching lines...) Expand all Loading... |
641 } | 622 } |
642 | 623 |
643 CompilationCommand computeCompilationCommand( | 624 CompilationCommand computeCompilationCommand( |
644 String tempDir, | 625 String tempDir, |
645 String buildDir, | 626 String buildDir, |
646 CommandBuilder commandBuilder, | 627 CommandBuilder commandBuilder, |
647 List<String> arguments, | 628 List<String> arguments, |
648 Map<String, String> environmentOverrides) { | 629 Map<String, String> environmentOverrides) { |
649 String exec; | 630 String exec; |
650 if (isAndroid) { | 631 if (isAndroid) { |
651 if (arch == "arm") { | 632 if (arch == Architecture.arm) { |
652 exec = "$buildDir/clang_x86/dart_bootstrap"; | 633 exec = "$buildDir/clang_x86/dart_bootstrap"; |
653 } else if (arch == "arm64") { | 634 } else if (arch == Architecture.arm64) { |
654 exec = "$buildDir/clang_x64/dart_bootstrap"; | 635 exec = "$buildDir/clang_x64/dart_bootstrap"; |
655 } | 636 } |
656 } else { | 637 } else { |
657 exec = "$buildDir/dart_bootstrap"; | 638 exec = "$buildDir/dart_bootstrap"; |
658 } | 639 } |
659 var args = <String>[]; | 640 var args = <String>[]; |
660 if (useDfe) { | 641 if (useDfe) { |
661 args.add('--dfe=utils/kernel-service/kernel-service.dart'); | 642 args.add('--dfe=utils/kernel-service/kernel-service.dart'); |
662 args.add('--platform=${buildDir}/patched_sdk/platform.dill'); | 643 args.add('--platform=${buildDir}/patched_sdk/platform.dill'); |
663 } | 644 } |
664 args.add("--snapshot-kind=app-aot"); | 645 args.add("--snapshot-kind=app-aot"); |
665 if (useBlobs) { | 646 if (useBlobs) { |
666 args.add("--snapshot=$tempDir/out.aotsnapshot"); | 647 args.add("--snapshot=$tempDir/out.aotsnapshot"); |
667 args.add("--use-blobs"); | 648 args.add("--use-blobs"); |
668 } else { | 649 } else { |
669 args.add("--snapshot=$tempDir/out.S"); | 650 args.add("--snapshot=$tempDir/out.S"); |
670 } | 651 } |
671 if (isAndroid && arch == 'arm') { | 652 if (isAndroid && arch == Architecture.arm) { |
672 args.add('--no-sim-use-hardfp'); | 653 args.add('--no-sim-use-hardfp'); |
673 } | 654 } |
674 args.addAll(arguments); | 655 args.addAll(arguments); |
675 | 656 |
676 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk, | 657 return commandBuilder.getCompilationCommand('precompiler', tempDir, !useSdk, |
677 bootstrapDependencies(buildDir), exec, args, environmentOverrides); | 658 bootstrapDependencies(buildDir), exec, args, environmentOverrides); |
678 } | 659 } |
679 | 660 |
680 CompilationCommand computeAssembleCommand( | 661 CompilationCommand computeAssembleCommand( |
681 String tempDir, | 662 String tempDir, |
682 String buildDir, | 663 String buildDir, |
683 CommandBuilder commandBuilder, | 664 CommandBuilder commandBuilder, |
684 List arguments, | 665 List arguments, |
685 Map<String, String> environmentOverrides) { | 666 Map<String, String> environmentOverrides) { |
686 String cc, shared, ld_flags; | 667 String cc, shared, ldFlags; |
687 if (isAndroid) { | 668 if (isAndroid) { |
688 var ndk = "third_party/android_tools/ndk"; | 669 var ndk = "third_party/android_tools/ndk"; |
689 String triple; | 670 String triple; |
690 if (arch == "arm") { | 671 if (arch == Architecture.arm) { |
691 triple = "arm-linux-androideabi"; | 672 triple = "arm-linux-androideabi"; |
692 } else if (arch == "arm64") { | 673 } else if (arch == Architecture.arm64) { |
693 triple = "aarch64-linux-android"; | 674 triple = "aarch64-linux-android"; |
694 } | 675 } |
695 String host; | 676 String host; |
696 if (Platform.isLinux) { | 677 if (Platform.isLinux) { |
697 host = "linux"; | 678 host = "linux"; |
698 } else if (Platform.isMacOS) { | 679 } else if (Platform.isMacOS) { |
699 host = "darwin"; | 680 host = "darwin"; |
700 } | 681 } |
701 cc = "$ndk/toolchains/$triple-4.9/prebuilt/$host-x86_64/bin/$triple-gcc"; | 682 cc = "$ndk/toolchains/$triple-4.9/prebuilt/$host-x86_64/bin/$triple-gcc"; |
702 shared = '-shared'; | 683 shared = '-shared'; |
703 } else if (Platform.isLinux) { | 684 } else if (Platform.isLinux) { |
704 cc = 'gcc'; | 685 cc = 'gcc'; |
705 shared = '-shared'; | 686 shared = '-shared'; |
706 } else if (Platform.isMacOS) { | 687 } else if (Platform.isMacOS) { |
707 cc = 'clang'; | 688 cc = 'clang'; |
708 shared = '-dynamiclib'; | 689 shared = '-dynamiclib'; |
709 // Tell Mac linker to give up generating eh_frame from dwarf. | 690 // Tell Mac linker to give up generating eh_frame from dwarf. |
710 ld_flags = '-Wl,-no_compact_unwind'; | 691 ldFlags = '-Wl,-no_compact_unwind'; |
711 } else { | 692 } else { |
712 throw "Platform not supported: ${Platform.operatingSystem}"; | 693 throw "Platform not supported: ${Platform.operatingSystem}"; |
713 } | 694 } |
714 | 695 |
715 String cc_flags; | 696 String ccFlags; |
716 if (arch == 'x64') { | 697 switch (arch) { |
717 cc_flags = "-m64"; | 698 case Architecture.x64: |
718 } else if (arch == 'simarm64') { | 699 case Architecture.simarm64: |
719 cc_flags = "-m64"; | 700 ccFlags = "-m64"; |
720 } else if (arch == 'ia32') { | 701 break; |
721 cc_flags = "-m32"; | 702 case Architecture.ia32: |
722 } else if (arch == 'simarm') { | 703 case Architecture.simarm: |
723 cc_flags = "-m32"; | 704 case Architecture.simmips: |
724 } else if (arch == 'simmips') { | 705 ccFlags = "-m32"; |
725 cc_flags = "-m32"; | 706 break; |
726 } else if (arch == 'arm') { | 707 case Architecture.arm: |
727 cc_flags = null; | 708 case Architecture.arm64: |
728 } else if (arch == 'arm64') { | 709 ccFlags = null; |
729 cc_flags = null; | 710 break; |
730 } else if (arch == 'mips') { | 711 case Architecture.mips: |
731 cc_flags = "-EL"; | 712 ccFlags = "-EL"; |
732 } else { | 713 break; |
733 throw "Architecture not supported: $arch"; | 714 default: |
| 715 throw "Architecture not supported: ${arch.name}"; |
734 } | 716 } |
735 | 717 |
736 var exec = cc; | 718 var exec = cc; |
737 var args = <String>[]; | 719 var args = <String>[]; |
738 if (cc_flags != null) args.add(cc_flags); | 720 if (ccFlags != null) args.add(ccFlags); |
739 if (ld_flags != null) args.add(ld_flags); | 721 if (ldFlags != null) args.add(ldFlags); |
740 args.add(shared); | 722 args.add(shared); |
741 args.add('-nostdlib'); | 723 args.add('-nostdlib'); |
742 args.add('-o'); | 724 args.add('-o'); |
743 args.add('$tempDir/out.aotsnapshot'); | 725 args.add('$tempDir/out.aotsnapshot'); |
744 args.add('$tempDir/out.S'); | 726 args.add('$tempDir/out.S'); |
745 | 727 |
746 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk, | 728 return commandBuilder.getCompilationCommand('assemble', tempDir, !useSdk, |
747 bootstrapDependencies(buildDir), exec, args, environmentOverrides); | 729 bootstrapDependencies(buildDir), exec, args, environmentOverrides); |
748 } | 730 } |
749 | 731 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 ..addAll(vmOptions) | 799 ..addAll(vmOptions) |
818 ..addAll(sharedOptions) | 800 ..addAll(sharedOptions) |
819 ..addAll(originalArguments); | 801 ..addAll(originalArguments); |
820 } | 802 } |
821 } | 803 } |
822 | 804 |
823 class AppJitCompilerConfiguration extends CompilerConfiguration { | 805 class AppJitCompilerConfiguration extends CompilerConfiguration { |
824 AppJitCompilerConfiguration({bool isDebug, bool isChecked}) | 806 AppJitCompilerConfiguration({bool isDebug, bool isChecked}) |
825 : super._subclass(isDebug: isDebug, isChecked: isChecked); | 807 : super._subclass(isDebug: isDebug, isChecked: isChecked); |
826 | 808 |
827 int computeTimeoutMultiplier() { | 809 int get timeoutMultiplier { |
828 int multiplier = 1; | 810 var multiplier = 1; |
829 if (isDebug) multiplier *= 2; | 811 if (isDebug) multiplier *= 2; |
830 if (isChecked) multiplier *= 2; | 812 if (isChecked) multiplier *= 2; |
831 return multiplier; | 813 return multiplier; |
832 } | 814 } |
833 | 815 |
834 CommandArtifact computeCompilationArtifact( | 816 CommandArtifact computeCompilationArtifact( |
835 String buildDir, | 817 String buildDir, |
836 String tempDir, | 818 String tempDir, |
837 CommandBuilder commandBuilder, | 819 CommandBuilder commandBuilder, |
838 List<String> arguments, | 820 List<String> arguments, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 bool isStrong, | 884 bool isStrong, |
903 bool isHostChecked, | 885 bool isHostChecked, |
904 bool useSdk}) | 886 bool useSdk}) |
905 : super._subclass( | 887 : super._subclass( |
906 isDebug: isDebug, | 888 isDebug: isDebug, |
907 isChecked: isChecked, | 889 isChecked: isChecked, |
908 isStrong: isStrong, | 890 isStrong: isStrong, |
909 isHostChecked: isHostChecked, | 891 isHostChecked: isHostChecked, |
910 useSdk: useSdk); | 892 useSdk: useSdk); |
911 | 893 |
912 int computeTimeoutMultiplier() { | 894 int get timeoutMultiplier => 4; |
913 return 4; | |
914 } | |
915 | 895 |
916 String computeCompilerPath(String buildDir) { | 896 String computeCompilerPath(String buildDir) { |
917 var prefix = 'sdk/bin'; | 897 var prefix = 'sdk/bin'; |
918 String suffix = executableScriptSuffix; | 898 String suffix = executableScriptSuffix; |
919 if (isHostChecked) { | 899 if (isHostChecked) { |
920 if (useSdk) { | 900 if (useSdk) { |
921 throw "--host-checked and --use-sdk cannot be used together"; | 901 throw "--host-checked and --use-sdk cannot be used together"; |
922 } | 902 } |
923 // The script dartanalyzer_developer is not included in the | 903 // The script dartanalyzer_developer is not included in the |
924 // shipped SDK, that is the script is not installed in | 904 // shipped SDK, that is the script is not installed in |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 RuntimeConfiguration runtimeConfiguration, | 936 RuntimeConfiguration runtimeConfiguration, |
957 String buildDir, | 937 String buildDir, |
958 TestInformation info, | 938 TestInformation info, |
959 List<String> vmOptions, | 939 List<String> vmOptions, |
960 List<String> sharedOptions, | 940 List<String> sharedOptions, |
961 List<String> originalArguments, | 941 List<String> originalArguments, |
962 CommandArtifact artifact) { | 942 CommandArtifact artifact) { |
963 return <String>[]; | 943 return <String>[]; |
964 } | 944 } |
965 } | 945 } |
OLD | NEW |