Unverified Commit 2a40c2dd authored by Ryan Macnak's avatar Ryan Macnak Committed by GitHub

Pass -Ddart.developer.causal_async_stacks=true to frontend_server invocations. (#42354)

Bytecode generation will otherwise omit prologue code, causing --causal-async-stacks passed to the VM to behave inconsistently.
parent 812e0387
...@@ -96,6 +96,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler { ...@@ -96,6 +96,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler {
bool linkPlatformKernelIn = false, bool linkPlatformKernelIn = false,
bool aot = false, bool aot = false,
bool enableAsserts = false, bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation, bool trackWidgetCreation,
List<String> extraFrontEndOptions, List<String> extraFrontEndOptions,
bool targetProductVm = false, bool targetProductVm = false,
...@@ -133,6 +134,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler { ...@@ -133,6 +134,7 @@ class CodeGeneratingKernelCompiler implements KernelCompiler {
linkPlatformKernelIn: linkPlatformKernelIn, linkPlatformKernelIn: linkPlatformKernelIn,
aot: aot, aot: aot,
enableAsserts: enableAsserts, enableAsserts: enableAsserts,
causalAsyncStacks: causalAsyncStacks,
trackWidgetCreation: trackWidgetCreation, trackWidgetCreation: trackWidgetCreation,
extraFrontEndOptions: extraFrontEndOptions, extraFrontEndOptions: extraFrontEndOptions,
targetProductVm: targetProductVm, targetProductVm: targetProductVm,
......
...@@ -250,6 +250,7 @@ class KernelCompiler { ...@@ -250,6 +250,7 @@ class KernelCompiler {
bool linkPlatformKernelIn = false, bool linkPlatformKernelIn = false,
bool aot = false, bool aot = false,
bool enableAsserts = false, bool enableAsserts = false,
bool causalAsyncStacks = true,
@required bool trackWidgetCreation, @required bool trackWidgetCreation,
List<String> extraFrontEndOptions, List<String> extraFrontEndOptions,
String packagesPath, String packagesPath,
...@@ -286,6 +287,7 @@ class KernelCompiler { ...@@ -286,6 +287,7 @@ class KernelCompiler {
sdkRoot, sdkRoot,
'--strong', '--strong',
'--target=$targetModel', '--target=$targetModel',
'-Ddart.developer.causal_async_stacks=$causalAsyncStacks',
if (enableAsserts) '--enable-asserts', if (enableAsserts) '--enable-asserts',
if (trackWidgetCreation) '--track-widget-creation', if (trackWidgetCreation) '--track-widget-creation',
if (!linkPlatformKernelIn) '--no-link-platform', if (!linkPlatformKernelIn) '--no-link-platform',
...@@ -428,6 +430,7 @@ class ResidentCompiler { ...@@ -428,6 +430,7 @@ class ResidentCompiler {
ResidentCompiler( ResidentCompiler(
this._sdkRoot, { this._sdkRoot, {
bool enableAsserts = false, bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation = false, bool trackWidgetCreation = false,
String packagesPath, String packagesPath,
List<String> fileSystemRoots, List<String> fileSystemRoots,
...@@ -439,6 +442,7 @@ class ResidentCompiler { ...@@ -439,6 +442,7 @@ class ResidentCompiler {
List<String> experimentalFlags, List<String> experimentalFlags,
}) : assert(_sdkRoot != null), }) : assert(_sdkRoot != null),
_enableAsserts = enableAsserts, _enableAsserts = enableAsserts,
_causalAsyncStacks = causalAsyncStacks,
_trackWidgetCreation = trackWidgetCreation, _trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath, _packagesPath = packagesPath,
_fileSystemRoots = fileSystemRoots, _fileSystemRoots = fileSystemRoots,
...@@ -456,6 +460,7 @@ class ResidentCompiler { ...@@ -456,6 +460,7 @@ class ResidentCompiler {
} }
final bool _enableAsserts; final bool _enableAsserts;
final bool _causalAsyncStacks;
final bool _trackWidgetCreation; final bool _trackWidgetCreation;
final String _packagesPath; final String _packagesPath;
final TargetModel _targetModel; final TargetModel _targetModel;
...@@ -569,6 +574,7 @@ class ResidentCompiler { ...@@ -569,6 +574,7 @@ class ResidentCompiler {
'--incremental', '--incremental',
'--strong', '--strong',
'--target=$_targetModel', '--target=$_targetModel',
'-Ddart.developer.causal_async_stacks=$_causalAsyncStacks',
if (outputPath != null) ...<String>[ if (outputPath != null) ...<String>[
'--output-dill', '--output-dill',
outputPath, outputPath,
......
...@@ -392,6 +392,7 @@ class FakeKernelCompiler implements KernelCompiler { ...@@ -392,6 +392,7 @@ class FakeKernelCompiler implements KernelCompiler {
bool linkPlatformKernelIn = false, bool linkPlatformKernelIn = false,
bool aot = false, bool aot = false,
bool enableAsserts = false, bool enableAsserts = false,
bool causalAsyncStacks = true,
bool trackWidgetCreation, bool trackWidgetCreation,
List<String> extraFrontEndOptions, List<String> extraFrontEndOptions,
String packagesPath, String packagesPath,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment