Skip to content

Commit cfa03ed

Browse files
rmacnak-googleCommit Queue
authored and
Commit Queue
committed
[dartfuzz] Don't try to instantiate Record.
Regenerate API and type tables. Change-Id: I3fe630764edf774059c24cff645041452768a5db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321745 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Siva Annamalai <[email protected]>
1 parent a0ebfb9 commit cfa03ed

File tree

4 files changed

+7
-136
lines changed

4 files changed

+7
-136
lines changed

runtime/tools/dartfuzz/dartfuzz.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'dartfuzz_type_table.dart';
1414
// Version of DartFuzz. Increase this each time changes are made
1515
// to preserve the property that a given version of DartFuzz yields
1616
// the same fuzzed program for a deterministic random seed.
17-
const String version = '1.99';
17+
const String version = '1.100';
1818

1919
// Restriction on statements and expressions.
2020
const int stmtDepth = 1;

runtime/tools/dartfuzz/dartfuzz_api_table.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum Restriction { none, small }
1313

1414
/// Class that represents Dart library methods.
1515
///
16-
/// The invididual lists are organized by return type.
16+
/// The individual lists are organized by return type.
1717
/// Proto is a list of DartTypes whose first element is the type of the
1818
/// DartType of the receiver (DartType.VOID if none). The remaining elements are
1919
/// DartTypes of the parameters. The second element is DartType.VOID if there
@@ -86,6 +86,7 @@ class DartLib {
8686
DartType.UINT8CLAMPEDLIST_NULLABLE: uint8ClampedListLibsNullable,
8787
DartType.UINT8LIST: uint8ListLibs,
8888
DartType.UINT8LIST_NULLABLE: uint8ListLibsNullable,
89+
DartType.VOID: voidLibs,
8990
DartType.VOID_NULLABLE: voidLibsNullable,
9091
};
9192
static const typedDataFloatTypes = [
@@ -104,6 +105,7 @@ class DartLib {
104105
DartLib('add', [DartType.SET_INT, DartType.INT], true),
105106
DartLib('bool.fromEnvironment', [DartType.VOID, DartType.STRING], true),
106107
DartLib('bool.hasEnvironment', [DartType.VOID, DartType.STRING], true),
108+
DartLib('bool.parse', [DartType.VOID, DartType.STRING], true),
107109
DartLib('endsWith', [DartType.STRING, DartType.STRING], true),
108110
DartLib('flagW', [DartType.INT32X4, DartType.VOID], false),
109111
DartLib('flagX', [DartType.INT32X4, DartType.VOID], false),
@@ -137,6 +139,8 @@ class DartLib {
137139
DartLib('add', [DartType.SET_INT, DartType.INT], true),
138140
DartLib('bool.fromEnvironment', [DartType.VOID, DartType.STRING], true),
139141
DartLib('bool.hasEnvironment', [DartType.VOID, DartType.STRING], true),
142+
DartLib('bool.parse', [DartType.VOID, DartType.STRING], true),
143+
DartLib('bool.tryParse', [DartType.VOID, DartType.STRING], true),
140144
DartLib('endsWith', [DartType.STRING, DartType.STRING], true),
141145
DartLib('flagW', [DartType.INT32X4, DartType.VOID], false),
142146
DartLib('flagX', [DartType.INT32X4, DartType.VOID], false),

runtime/tools/dartfuzz/dartfuzz_type_table.dart

Lines changed: 0 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ class DartType {
293293
static const NULL_NULLABLE = DartType._withName('Null', true);
294294
static const NUM = DartType._withName('num', false);
295295
static const NUM_NULLABLE = DartType._withName('num', true);
296-
static const RECORD = DartType._withName('Record', false);
297-
static const RECORD_NULLABLE = DartType._withName('Record', true);
298296
static const REGEXP = DartType._withName('RegExp', false);
299297
static const REGEXP_NULLABLE = DartType._withName('RegExp', true);
300298
static const STRING = DartType._withName('String', false);
@@ -23024,10 +23022,6 @@ class DartType {
2302423022
DartType._withName('__COMPARABLE_STRING', false);
2302523023
static const COMPARABLE_STRING_NULLABLE =
2302623024
DartType._withName('__COMPARABLE_STRING', true);
23027-
static const BIDIRECTIONALITERATOR_INT =
23028-
DartType._withName('__BIDIRECTIONALITERATOR_INT', false);
23029-
static const BIDIRECTIONALITERATOR_INT_NULLABLE =
23030-
DartType._withName('__BIDIRECTIONALITERATOR_INT', true);
2303123025
static const ITERATOR_INT = DartType._withName('__ITERATOR_INT', false);
2303223026
static const ITERATOR_INT_NULLABLE =
2303323027
DartType._withName('__ITERATOR_INT', true);
@@ -23322,8 +23316,6 @@ class DartType {
2332223316
NULL_NULLABLE,
2332323317
NUM,
2332423318
NUM_NULLABLE,
23325-
RECORD,
23326-
RECORD_NULLABLE,
2332723319
REGEXP,
2332823320
REGEXP_NULLABLE,
2332923321
STRING,
@@ -79982,9 +79974,6 @@ class DartType {
7998279974
INDEXERROR,
7998379975
RANGEERROR,
7998479976
},
79985-
BIDIRECTIONALITERATOR_INT: {
79986-
RUNEITERATOR,
79987-
},
7998879977
COMPARABLE_DURATION: {
7998979978
DURATION,
7999079979
},
@@ -85369,7 +85358,6 @@ class DartType {
8536985358
NULL,
8537085359
NUM,
8537185360
RANGEERROR,
85372-
RECORD,
8537385361
REGEXP,
8537485362
RUNEITERATOR,
8537585363
RUNES,
@@ -85553,14 +85541,6 @@ class DartType {
8555385541
INT,
8555485542
],
8555585543
},
85556-
BOOL: {
85557-
'fromEnvironment': [
85558-
STRING,
85559-
],
85560-
'hasEnvironment': [
85561-
STRING,
85562-
],
85563-
},
8556485544
BYTEDATA: {
8556585545
'': [
8556685546
INT,
@@ -100426,9 +100406,6 @@ class DartType {
100426100406
STRING,
100427100407
],
100428100408
},
100429-
RECORD: {
100430-
'': [],
100431-
},
100432100409
REGEXP: {
100433100410
'': [
100434100411
STRING,
@@ -177093,21 +177070,6 @@ class DartType {
177093177070
RANGEERROR_NULLABLE,
177094177071
},
177095177072
},
177096-
RECORD: {
177097-
'=': {
177098-
RECORD,
177099-
},
177100-
},
177101-
RECORD_NULLABLE: {
177102-
'=': {
177103-
RECORD,
177104-
RECORD_NULLABLE,
177105-
},
177106-
'??=': {
177107-
RECORD,
177108-
RECORD_NULLABLE,
177109-
},
177110-
},
177111177073
REGEXP: {
177112177074
'=': {
177113177075
REGEXP,
@@ -179013,8 +178975,6 @@ class DartTypeNoFp extends DartType {
179013178975
DartType.NULL_NULLABLE,
179014178976
DartType.NUM,
179015178977
DartType.NUM_NULLABLE,
179016-
DartType.RECORD,
179017-
DartType.RECORD_NULLABLE,
179018178978
DartType.REGEXP,
179019178979
DartType.REGEXP_NULLABLE,
179020178980
DartType.STRING,
@@ -196411,9 +196371,6 @@ class DartTypeNoFp extends DartType {
196411196371
DartType.INDEXERROR,
196412196372
DartType.RANGEERROR,
196413196373
},
196414-
DartType.BIDIRECTIONALITERATOR_INT: {
196415-
DartType.RUNEITERATOR,
196416-
},
196417196374
DartType.COMPARABLE_DURATION: {
196418196375
DartType.DURATION,
196419196376
},
@@ -198731,7 +198688,6 @@ class DartTypeNoFp extends DartType {
198731198688
DartType.NULL,
198732198689
DartType.NUM,
198733198690
DartType.RANGEERROR,
198734-
DartType.RECORD,
198735198691
DartType.REGEXP,
198736198692
DartType.RUNEITERATOR,
198737198693
DartType.RUNES,
@@ -198871,14 +198827,6 @@ class DartTypeNoFp extends DartType {
198871198827
DartType.INT,
198872198828
],
198873198829
},
198874-
DartType.BOOL: {
198875-
'fromEnvironment': [
198876-
DartType.STRING,
198877-
],
198878-
'hasEnvironment': [
198879-
DartType.STRING,
198880-
],
198881-
},
198882198830
DartType.BYTEDATA: {
198883198831
'': [
198884198832
DartType.INT,
@@ -204980,9 +204928,6 @@ class DartTypeNoFp extends DartType {
204980204928
DartType.STRING,
204981204929
],
204982204930
},
204983-
DartType.RECORD: {
204984-
'': [],
204985-
},
204986204931
DartType.REGEXP: {
204987204932
'': [
204988204933
DartType.STRING,
@@ -260616,21 +260561,6 @@ class DartTypeNoFp extends DartType {
260616260561
DartType.RANGEERROR_NULLABLE,
260617260562
},
260618260563
},
260619-
DartType.RECORD: {
260620-
'=': {
260621-
DartType.RECORD,
260622-
},
260623-
},
260624-
DartType.RECORD_NULLABLE: {
260625-
'=': {
260626-
DartType.RECORD,
260627-
DartType.RECORD_NULLABLE,
260628-
},
260629-
'??=': {
260630-
DartType.RECORD,
260631-
DartType.RECORD_NULLABLE,
260632-
},
260633-
},
260634260564
DartType.REGEXP: {
260635260565
'=': {
260636260566
DartType.REGEXP,
@@ -262298,8 +262228,6 @@ class DartTypeFlatTp extends DartType {
262298262228
DartType.NULL_NULLABLE,
262299262229
DartType.NUM,
262300262230
DartType.NUM_NULLABLE,
262301-
DartType.RECORD,
262302-
DartType.RECORD_NULLABLE,
262303262231
DartType.REGEXP,
262304262232
DartType.REGEXP_NULLABLE,
262305262233
DartType.STRING,
@@ -263021,9 +262949,6 @@ class DartTypeFlatTp extends DartType {
263021262949
DartType.INDEXERROR,
263022262950
DartType.RANGEERROR,
263023262951
},
263024-
DartType.BIDIRECTIONALITERATOR_INT: {
263025-
DartType.RUNEITERATOR,
263026-
},
263027262952
DartType.COMPARABLE_DURATION: {
263028262953
DartType.DURATION,
263029262954
},
@@ -263236,7 +263161,6 @@ class DartTypeFlatTp extends DartType {
263236263161
DartType.NULL,
263237263162
DartType.NUM,
263238263163
DartType.RANGEERROR,
263239-
DartType.RECORD,
263240263164
DartType.REGEXP,
263241263165
DartType.RUNEITERATOR,
263242263166
DartType.RUNES,
@@ -263334,14 +263258,6 @@ class DartTypeFlatTp extends DartType {
263334263258
DartType.INT,
263335263259
],
263336263260
},
263337-
DartType.BOOL: {
263338-
'fromEnvironment': [
263339-
DartType.STRING,
263340-
],
263341-
'hasEnvironment': [
263342-
DartType.STRING,
263343-
],
263344-
},
263345263261
DartType.BYTEDATA: {
263346263262
'': [
263347263263
DartType.INT,
@@ -263639,9 +263555,6 @@ class DartTypeFlatTp extends DartType {
263639263555
DartType.STRING,
263640263556
],
263641263557
},
263642-
DartType.RECORD: {
263643-
'': [],
263644-
},
263645263558
DartType.REGEXP: {
263646263559
'': [
263647263560
DartType.STRING,
@@ -304949,21 +304862,6 @@ class DartTypeFlatTp extends DartType {
304949304862
DartType.RANGEERROR_NULLABLE,
304950304863
},
304951304864
},
304952-
DartType.RECORD: {
304953-
'=': {
304954-
DartType.RECORD,
304955-
},
304956-
},
304957-
DartType.RECORD_NULLABLE: {
304958-
'=': {
304959-
DartType.RECORD,
304960-
DartType.RECORD_NULLABLE,
304961-
},
304962-
'??=': {
304963-
DartType.RECORD,
304964-
DartType.RECORD_NULLABLE,
304965-
},
304966-
},
304967304865
DartType.REGEXP: {
304968304866
'=': {
304969304867
DartType.REGEXP,
@@ -306267,8 +306165,6 @@ class DartTypeNoFpFlatTp extends DartType {
306267306165
DartType.NULL_NULLABLE,
306268306166
DartType.NUM,
306269306167
DartType.NUM_NULLABLE,
306270-
DartType.RECORD,
306271-
DartType.RECORD_NULLABLE,
306272306168
DartType.REGEXP,
306273306169
DartType.REGEXP_NULLABLE,
306274306170
DartType.STRING,
@@ -306772,9 +306668,6 @@ class DartTypeNoFpFlatTp extends DartType {
306772306668
DartType.INDEXERROR,
306773306669
DartType.RANGEERROR,
306774306670
},
306775-
DartType.BIDIRECTIONALITERATOR_INT: {
306776-
DartType.RUNEITERATOR,
306777-
},
306778306671
DartType.COMPARABLE_DURATION: {
306779306672
DartType.DURATION,
306780306673
},
@@ -306926,7 +306819,6 @@ class DartTypeNoFpFlatTp extends DartType {
306926306819
DartType.NULL,
306927306820
DartType.NUM,
306928306821
DartType.RANGEERROR,
306929-
DartType.RECORD,
306930306822
DartType.REGEXP,
306931306823
DartType.RUNEITERATOR,
306932306824
DartType.RUNES,
@@ -307014,14 +306906,6 @@ class DartTypeNoFpFlatTp extends DartType {
307014306906
DartType.INT,
307015306907
],
307016306908
},
307017-
DartType.BOOL: {
307018-
'fromEnvironment': [
307019-
DartType.STRING,
307020-
],
307021-
'hasEnvironment': [
307022-
DartType.STRING,
307023-
],
307024-
},
307025306909
DartType.BYTEDATA: {
307026306910
'': [
307027306911
DartType.INT,
@@ -307215,9 +307099,6 @@ class DartTypeNoFpFlatTp extends DartType {
307215307099
DartType.STRING,
307216307100
],
307217307101
},
307218-
DartType.RECORD: {
307219-
'': [],
307220-
},
307221307102
DartType.REGEXP: {
307222307103
'': [
307223307104
DartType.STRING,
@@ -348184,21 +348065,6 @@ class DartTypeNoFpFlatTp extends DartType {
348184348065
DartType.RANGEERROR_NULLABLE,
348185348066
},
348186348067
},
348187-
DartType.RECORD: {
348188-
'=': {
348189-
DartType.RECORD,
348190-
},
348191-
},
348192-
DartType.RECORD_NULLABLE: {
348193-
'=': {
348194-
DartType.RECORD,
348195-
DartType.RECORD_NULLABLE,
348196-
},
348197-
'??=': {
348198-
DartType.RECORD,
348199-
DartType.RECORD_NULLABLE,
348200-
},
348201-
},
348202348068
DartType.REGEXP: {
348203348069
'=': {
348204348070
DartType.REGEXP,

runtime/tools/dartfuzz/gen_type_table.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,7 @@ void visitCompilationUnit(
13981398
(classElement.name == 'Stopwatch') ||
13991399
(classElement.name == 'Finalizer') ||
14001400
(classElement.name == 'Enum') ||
1401+
(classElement.name == 'Record') ||
14011402
(classElement.name == 'OutOfMemoryError')) {
14021403
continue;
14031404
}

0 commit comments

Comments
 (0)