mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:03:19 +00:00
Added flag --suppress_cfe_warnings to suppress warnings generated by the common front end. Fixes issue #31552.
Bug: Change-Id: Ia025fa2feaec20cbada1596fb022b70e69501ede Reviewed-on: https://dart-review.googlesource.com/30385 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
12086506f8
commit
c8ae685d0c
|
@ -185,6 +185,8 @@ Future _processLoadRequest(request) async {
|
|||
final bool strong = request[5];
|
||||
final int isolateId = request[6];
|
||||
final List sourceFiles = request[7];
|
||||
// TODO(bkonyi): this still needs to be hooked in.
|
||||
// final bool suppressWarnings = request[8];
|
||||
|
||||
Compiler compiler;
|
||||
// TODO(aam): There should be no need to have an option to choose
|
||||
|
@ -284,7 +286,8 @@ train(String scriptUri, String platformKernel) {
|
|||
false /* incremental */,
|
||||
false /* strong */,
|
||||
1 /* isolateId chosen randomly */,
|
||||
null /* source files */
|
||||
null /* source files */,
|
||||
false /* suppress warnings */,
|
||||
];
|
||||
_processLoadRequest(request);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,10 @@ DEFINE_FLAG(bool,
|
|||
show_kernel_isolate,
|
||||
false,
|
||||
"Show Kernel service isolate as normal isolate.");
|
||||
DEFINE_FLAG(bool,
|
||||
suppress_fe_warnings,
|
||||
false,
|
||||
"Suppress warnings from the FE.");
|
||||
|
||||
const char* KernelIsolate::kName = DART_KERNEL_ISOLATE_NAME;
|
||||
Dart_IsolateCreateCallback KernelIsolate::create_callback_ = NULL;
|
||||
|
@ -361,6 +365,11 @@ class KernelCompilationRequest : public ValueObject {
|
|||
} else {
|
||||
files.type = Dart_CObject_kNull;
|
||||
}
|
||||
|
||||
Dart_CObject suppress_warnings;
|
||||
suppress_warnings.type = Dart_CObject_kBool;
|
||||
suppress_warnings.value.as_bool = FLAG_suppress_fe_warnings;
|
||||
|
||||
Dart_CObject* message_arr[] = {&tag,
|
||||
&send_port,
|
||||
&uri,
|
||||
|
@ -368,7 +377,8 @@ class KernelCompilationRequest : public ValueObject {
|
|||
&dart_incremental,
|
||||
&dart_strong,
|
||||
&isolate_id,
|
||||
&files};
|
||||
&files,
|
||||
&suppress_warnings};
|
||||
message.value.as_array.values = message_arr;
|
||||
message.value.as_array.length = ARRAY_SIZE(message_arr);
|
||||
// Send the message.
|
||||
|
|
Loading…
Reference in a new issue