[dart/fuzzer] Exclude Platform from API table

Rationale:
Using Platform strings and other features is
too subject to divergences between the different
execution modes. Nothing useful is tested here.
Change-Id: Icb96b0a6891d1b45b831fb17fa1d9d2cd7b77b6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98948
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This commit is contained in:
Aart Bik 2019-04-10 01:07:51 +00:00 committed by commit-bot@chromium.org
parent 919461badd
commit b76694386a
3 changed files with 5 additions and 16 deletions

View file

@ -13,7 +13,7 @@ import 'dartfuzz_api_table.dart';
// Version of DartFuzz. Increase this each time changes are made
// to preserve the property that a given version of DartFuzz yields
// the same fuzzed program for a deterministic random seed.
const String version = '1.6';
const String version = '1.7';
// Restriction on statement and expression depths.
const int stmtDepth = 2;

View file

@ -50,12 +50,6 @@ class DartLib {
DartLib('FileSystemEntity.isFileSync', 'VS'),
DartLib('FileSystemEntity.isDirectorySync', 'VS'),
DartLib('FileSystemEntity.isWatchSupported', 'Vv'),
DartLib('Platform.isLinux', 'Vv'),
DartLib('Platform.isMacOS', 'Vv'),
DartLib('Platform.isWindows', 'Vv'),
DartLib('Platform.isAndroid', 'Vv'),
DartLib('Platform.isIOS', 'Vv'),
DartLib('Platform.isFuchsia', 'Vv'),
DartLib('SecurityContext.alpnSupported', 'Vv'),
DartLib('NetworkInterface.listSupported', 'Vv'),
];
@ -176,7 +170,6 @@ class DartLib {
DartLib('FileSystemEvent.MOVE', 'Vv'),
DartLib('FileSystemEvent.all', 'Vv'),
DartLib('FileSystemEvent.ALL', 'Vv'),
DartLib('Platform.numberOfProcessors', 'Vv'),
DartLib('exitCode', 'Vv'),
DartLib('pid', 'Vv'),
DartLib('ProcessInfo.currentRss', 'Vv'),
@ -798,14 +791,6 @@ class DartLib {
DartLib('Uri.encodeFull', 'VS'),
DartLib('Uri.decodeFull', 'VS'),
DartLib('FileSystemEntity.parentOf', 'VS'),
DartLib('Platform.pathSeparator', 'Vv'),
DartLib('Platform.localeName', 'Vv'),
DartLib('Platform.operatingSystem', 'Vv'),
DartLib('Platform.operatingSystemVersion', 'Vv'),
DartLib('Platform.localHostname', 'Vv'),
DartLib('Platform.packageRoot', 'Vv'),
DartLib('Platform.packageConfig', 'Vv'),
DartLib('Platform.version', 'Vv'),
];
static const listLibs = [
DartLib('List.filled', 'VII'),

View file

@ -127,6 +127,10 @@ visitCompilationUnit(CompilationUnitElement unit) {
}
void visitClass(ClassElement classElement) {
// Platform operations cause too many divergences.
if (classElement.name == 'Platform') {
return;
}
// Every class element contains elements for the members, viz. `methods` visits
// methods, `fields` visits fields, `accessors` visits getters and setters, etc.
// There are also accessors to get the superclass, mixins, interfaces, type