|
Unifying compiler context
Changes in this CL:
- Updated CompilerContext:
- it now contains a ProcessedOptions object
- it no longer depends on CompilerCommandLine/CommandLine
- it delegates to ProcessedOptions.report so all error reporting
goes to one single place.
- use "withContext" term instead of "withGlobalOptions" to be
more clear about the intent
- Changes in public API
- added more options that correspond to flags in command-line
fasta tools
- default onError is different: we now use the
command_line_reporting report, which prints and throws
on fatal messages, but doesn't throw eagerly on all messages
as before.
- introduced "printMessages" option: make it easy to have
both onError + command_line_reporting (kernel-service.dart
is the main use case at this time, other ideas welcome!)
- renamed CompilationError to CompilationMessage
- Other changes
- set exit code is done on report, not on format
- fixed corner cases not covered in previous CL
- error reporting with missing-main needs to happen with
a context
- missing error cases when inferring .packages and input
URIs are not file:* URIs
Ideas for follow up after this CL:
- combine ProcessedOptions and CompilerContext into a single class
(or extend one from the other)
- switch onError to a stream
R=ahe@google.com
Committed: https://github.com/dart-lang/sdk/commit/1aa139bc9407735b772b27949a5308931a521104
Total comments: 60
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+511 lines, -353 lines) |
Patch |
|
M |
pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
|
View
|
1
2
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/tool/generate_kernel.dart
|
View
|
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
|
D |
pkg/front_end/lib/compilation_error.dart
|
View
|
|
1 chunk |
+0 lines, -28 lines |
0 comments
|
Download
|
|
A |
pkg/front_end/lib/compilation_message.dart
|
View
|
1
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/compiler_options.dart
|
View
|
1
|
3 chunks |
+43 lines, -8 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/front_end.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/kernel_generator.dart
|
View
|
|
2 chunks |
+12 lines, -8 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/base/processed_options.dart
|
View
|
1
|
11 chunks |
+144 lines, -42 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/command_line.dart
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/command_line_reporting.dart
|
View
|
1
|
3 chunks |
+17 lines, -10 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/compile_platform.dart
|
View
|
|
3 chunks |
+26 lines, -42 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/compiler_command_line.dart
|
View
|
1
|
6 chunks |
+52 lines, -53 lines |
1 comment
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/compiler_context.dart
|
View
|
1
|
4 chunks |
+39 lines, -14 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/fasta.dart
|
View
|
|
10 chunks |
+30 lines, -57 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
|
View
|
1
2
|
2 chunks |
+12 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/run.dart
|
View
|
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/source/source_loader.dart
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/fasta/testing/kernel_chain.dart
|
View
|
1
|
4 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/incremental/kernel_driver.dart
|
View
|
1
|
2 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/lib/src/kernel_generator_impl.dart
|
View
|
|
5 chunks |
+12 lines, -24 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/messages.yaml
|
View
|
1
2
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/test/fasta/shaker_test.dart
|
View
|
|
6 chunks |
+15 lines, -19 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/test/fasta/testing/suite.dart
|
View
|
1
|
3 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/test/kernel_generator_test.dart
|
View
|
1
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
pkg/front_end/tool/perf.dart
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js/dill_loader_test.dart
|
View
|
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
utils/kernel-service/kernel-service.dart
|
View
|
1
2
|
1 chunk |
+11 lines, -1 line |
0 comments
|
Download
|
Total messages: 23 (13 generated)
|