Skip to content

Commit

Permalink
[dartfuzz] Don't try to instantiate Record.
Browse files Browse the repository at this point in the history
Regenerate API and type tables.

Change-Id: I3fe630764edf774059c24cff645041452768a5db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321745
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
  • Loading branch information
rmacnak-google authored and Commit Queue committed Aug 18, 2023
1 parent a0ebfb9 commit cfa03ed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 136 deletions.
2 changes: 1 addition & 1 deletion runtime/tools/dartfuzz/dartfuzz.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'dartfuzz_type_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.99';
const String version = '1.100';

// Restriction on statements and expressions.
const int stmtDepth = 1;
Expand Down
6 changes: 5 additions & 1 deletion runtime/tools/dartfuzz/dartfuzz_api_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum Restriction { none, small }

/// Class that represents Dart library methods.
///
/// The invididual lists are organized by return type.
/// The individual lists are organized by return type.
/// Proto is a list of DartTypes whose first element is the type of the
/// DartType of the receiver (DartType.VOID if none). The remaining elements are
/// DartTypes of the parameters. The second element is DartType.VOID if there
Expand Down Expand Up @@ -86,6 +86,7 @@ class DartLib {
DartType.UINT8CLAMPEDLIST_NULLABLE: uint8ClampedListLibsNullable,
DartType.UINT8LIST: uint8ListLibs,
DartType.UINT8LIST_NULLABLE: uint8ListLibsNullable,
DartType.VOID: voidLibs,
DartType.VOID_NULLABLE: voidLibsNullable,
};
static const typedDataFloatTypes = [
Expand All @@ -104,6 +105,7 @@ class DartLib {
DartLib('add', [DartType.SET_INT, DartType.INT], true),
DartLib('bool.fromEnvironment', [DartType.VOID, DartType.STRING], true),
DartLib('bool.hasEnvironment', [DartType.VOID, DartType.STRING], true),
DartLib('bool.parse', [DartType.VOID, DartType.STRING], true),
DartLib('endsWith', [DartType.STRING, DartType.STRING], true),
DartLib('flagW', [DartType.INT32X4, DartType.VOID], false),
DartLib('flagX', [DartType.INT32X4, DartType.VOID], false),
Expand Down Expand Up @@ -137,6 +139,8 @@ class DartLib {
DartLib('add', [DartType.SET_INT, DartType.INT], true),
DartLib('bool.fromEnvironment', [DartType.VOID, DartType.STRING], true),
DartLib('bool.hasEnvironment', [DartType.VOID, DartType.STRING], true),
DartLib('bool.parse', [DartType.VOID, DartType.STRING], true),
DartLib('bool.tryParse', [DartType.VOID, DartType.STRING], true),
DartLib('endsWith', [DartType.STRING, DartType.STRING], true),
DartLib('flagW', [DartType.INT32X4, DartType.VOID], false),
DartLib('flagX', [DartType.INT32X4, DartType.VOID], false),
Expand Down
134 changes: 0 additions & 134 deletions runtime/tools/dartfuzz/dartfuzz_type_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ class DartType {
static const NULL_NULLABLE = DartType._withName('Null', true);
static const NUM = DartType._withName('num', false);
static const NUM_NULLABLE = DartType._withName('num', true);
static const RECORD = DartType._withName('Record', false);
static const RECORD_NULLABLE = DartType._withName('Record', true);
static const REGEXP = DartType._withName('RegExp', false);
static const REGEXP_NULLABLE = DartType._withName('RegExp', true);
static const STRING = DartType._withName('String', false);
Expand Down Expand Up @@ -23024,10 +23022,6 @@ class DartType {
DartType._withName('__COMPARABLE_STRING', false);
static const COMPARABLE_STRING_NULLABLE =
DartType._withName('__COMPARABLE_STRING', true);
static const BIDIRECTIONALITERATOR_INT =
DartType._withName('__BIDIRECTIONALITERATOR_INT', false);
static const BIDIRECTIONALITERATOR_INT_NULLABLE =
DartType._withName('__BIDIRECTIONALITERATOR_INT', true);
static const ITERATOR_INT = DartType._withName('__ITERATOR_INT', false);
static const ITERATOR_INT_NULLABLE =
DartType._withName('__ITERATOR_INT', true);
Expand Down Expand Up @@ -23322,8 +23316,6 @@ class DartType {
NULL_NULLABLE,
NUM,
NUM_NULLABLE,
RECORD,
RECORD_NULLABLE,
REGEXP,
REGEXP_NULLABLE,
STRING,
Expand Down Expand Up @@ -79982,9 +79974,6 @@ class DartType {
INDEXERROR,
RANGEERROR,
},
BIDIRECTIONALITERATOR_INT: {
RUNEITERATOR,
},
COMPARABLE_DURATION: {
DURATION,
},
Expand Down Expand Up @@ -85369,7 +85358,6 @@ class DartType {
NULL,
NUM,
RANGEERROR,
RECORD,
REGEXP,
RUNEITERATOR,
RUNES,
Expand Down Expand Up @@ -85553,14 +85541,6 @@ class DartType {
INT,
],
},
BOOL: {
'fromEnvironment': [
STRING,
],
'hasEnvironment': [
STRING,
],
},
BYTEDATA: {
'': [
INT,
Expand Down Expand Up @@ -100426,9 +100406,6 @@ class DartType {
STRING,
],
},
RECORD: {
'': [],
},
REGEXP: {
'': [
STRING,
Expand Down Expand Up @@ -177093,21 +177070,6 @@ class DartType {
RANGEERROR_NULLABLE,
},
},
RECORD: {
'=': {
RECORD,
},
},
RECORD_NULLABLE: {
'=': {
RECORD,
RECORD_NULLABLE,
},
'??=': {
RECORD,
RECORD_NULLABLE,
},
},
REGEXP: {
'=': {
REGEXP,
Expand Down Expand Up @@ -179013,8 +178975,6 @@ class DartTypeNoFp extends DartType {
DartType.NULL_NULLABLE,
DartType.NUM,
DartType.NUM_NULLABLE,
DartType.RECORD,
DartType.RECORD_NULLABLE,
DartType.REGEXP,
DartType.REGEXP_NULLABLE,
DartType.STRING,
Expand Down Expand Up @@ -196411,9 +196371,6 @@ class DartTypeNoFp extends DartType {
DartType.INDEXERROR,
DartType.RANGEERROR,
},
DartType.BIDIRECTIONALITERATOR_INT: {
DartType.RUNEITERATOR,
},
DartType.COMPARABLE_DURATION: {
DartType.DURATION,
},
Expand Down Expand Up @@ -198731,7 +198688,6 @@ class DartTypeNoFp extends DartType {
DartType.NULL,
DartType.NUM,
DartType.RANGEERROR,
DartType.RECORD,
DartType.REGEXP,
DartType.RUNEITERATOR,
DartType.RUNES,
Expand Down Expand Up @@ -198871,14 +198827,6 @@ class DartTypeNoFp extends DartType {
DartType.INT,
],
},
DartType.BOOL: {
'fromEnvironment': [
DartType.STRING,
],
'hasEnvironment': [
DartType.STRING,
],
},
DartType.BYTEDATA: {
'': [
DartType.INT,
Expand Down Expand Up @@ -204980,9 +204928,6 @@ class DartTypeNoFp extends DartType {
DartType.STRING,
],
},
DartType.RECORD: {
'': [],
},
DartType.REGEXP: {
'': [
DartType.STRING,
Expand Down Expand Up @@ -260616,21 +260561,6 @@ class DartTypeNoFp extends DartType {
DartType.RANGEERROR_NULLABLE,
},
},
DartType.RECORD: {
'=': {
DartType.RECORD,
},
},
DartType.RECORD_NULLABLE: {
'=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
'??=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
},
DartType.REGEXP: {
'=': {
DartType.REGEXP,
Expand Down Expand Up @@ -262298,8 +262228,6 @@ class DartTypeFlatTp extends DartType {
DartType.NULL_NULLABLE,
DartType.NUM,
DartType.NUM_NULLABLE,
DartType.RECORD,
DartType.RECORD_NULLABLE,
DartType.REGEXP,
DartType.REGEXP_NULLABLE,
DartType.STRING,
Expand Down Expand Up @@ -263021,9 +262949,6 @@ class DartTypeFlatTp extends DartType {
DartType.INDEXERROR,
DartType.RANGEERROR,
},
DartType.BIDIRECTIONALITERATOR_INT: {
DartType.RUNEITERATOR,
},
DartType.COMPARABLE_DURATION: {
DartType.DURATION,
},
Expand Down Expand Up @@ -263236,7 +263161,6 @@ class DartTypeFlatTp extends DartType {
DartType.NULL,
DartType.NUM,
DartType.RANGEERROR,
DartType.RECORD,
DartType.REGEXP,
DartType.RUNEITERATOR,
DartType.RUNES,
Expand Down Expand Up @@ -263334,14 +263258,6 @@ class DartTypeFlatTp extends DartType {
DartType.INT,
],
},
DartType.BOOL: {
'fromEnvironment': [
DartType.STRING,
],
'hasEnvironment': [
DartType.STRING,
],
},
DartType.BYTEDATA: {
'': [
DartType.INT,
Expand Down Expand Up @@ -263639,9 +263555,6 @@ class DartTypeFlatTp extends DartType {
DartType.STRING,
],
},
DartType.RECORD: {
'': [],
},
DartType.REGEXP: {
'': [
DartType.STRING,
Expand Down Expand Up @@ -304949,21 +304862,6 @@ class DartTypeFlatTp extends DartType {
DartType.RANGEERROR_NULLABLE,
},
},
DartType.RECORD: {
'=': {
DartType.RECORD,
},
},
DartType.RECORD_NULLABLE: {
'=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
'??=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
},
DartType.REGEXP: {
'=': {
DartType.REGEXP,
Expand Down Expand Up @@ -306267,8 +306165,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.NULL_NULLABLE,
DartType.NUM,
DartType.NUM_NULLABLE,
DartType.RECORD,
DartType.RECORD_NULLABLE,
DartType.REGEXP,
DartType.REGEXP_NULLABLE,
DartType.STRING,
Expand Down Expand Up @@ -306772,9 +306668,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.INDEXERROR,
DartType.RANGEERROR,
},
DartType.BIDIRECTIONALITERATOR_INT: {
DartType.RUNEITERATOR,
},
DartType.COMPARABLE_DURATION: {
DartType.DURATION,
},
Expand Down Expand Up @@ -306926,7 +306819,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.NULL,
DartType.NUM,
DartType.RANGEERROR,
DartType.RECORD,
DartType.REGEXP,
DartType.RUNEITERATOR,
DartType.RUNES,
Expand Down Expand Up @@ -307014,14 +306906,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.INT,
],
},
DartType.BOOL: {
'fromEnvironment': [
DartType.STRING,
],
'hasEnvironment': [
DartType.STRING,
],
},
DartType.BYTEDATA: {
'': [
DartType.INT,
Expand Down Expand Up @@ -307215,9 +307099,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.STRING,
],
},
DartType.RECORD: {
'': [],
},
DartType.REGEXP: {
'': [
DartType.STRING,
Expand Down Expand Up @@ -348184,21 +348065,6 @@ class DartTypeNoFpFlatTp extends DartType {
DartType.RANGEERROR_NULLABLE,
},
},
DartType.RECORD: {
'=': {
DartType.RECORD,
},
},
DartType.RECORD_NULLABLE: {
'=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
'??=': {
DartType.RECORD,
DartType.RECORD_NULLABLE,
},
},
DartType.REGEXP: {
'=': {
DartType.REGEXP,
Expand Down
1 change: 1 addition & 0 deletions runtime/tools/dartfuzz/gen_type_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,7 @@ void visitCompilationUnit(
(classElement.name == 'Stopwatch') ||
(classElement.name == 'Finalizer') ||
(classElement.name == 'Enum') ||
(classElement.name == 'Record') ||
(classElement.name == 'OutOfMemoryError')) {
continue;
}
Expand Down

0 comments on commit cfa03ed

Please sign in to comment.