-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Description
Based on the converstation with Flutter users it seems that Flutter code it is common to guard large chunks of code behind runtime checks that boil down to:
if (Platform.isAndroid) {
// ...
}
(actual flutter code might be using a layer on top: see https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/foundation/platform.dart)
Here's a list of subtasks:
- Make
flutter build
/dart compile exe
/ ... tell VM's global analysis pass which operating system we compile for #50472 - Add mechanism to instruct VM's global analysis pass to try to const evaluate certain parts of a program before global analysis runs. #50473
- Make APIs in
package:platform
that wrapdart:io
/dart:html
and are amenable to tree shaking by compilers #50474 - Eventually we may add annotation of platform-specific code + warning mechanism if not guarded by platform checks to Dart language tools (CFE, Analyzer)
- Investigate whether above tree shaking mechanisms are sufficient for flutter plugin code.
Signez, apaatsio, vitusortner, Sacchid, pinyin and 44 more
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.