| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
| 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
| 7 | 7 |
| 8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
| 9 | 9 |
| 10 import 'flat_buffers.dart' as fb; | 10 import 'flat_buffers.dart' as fb; |
| 11 import 'idl.dart' as idl; | 11 import 'idl.dart' as idl; |
| 12 import 'dart:convert' as convert; | 12 import 'dart:convert' as convert; |
| 13 | 13 |
| 14 class _IndexElementKindReader extends fb.Reader<idl.IndexElementKind> { |
| 15 const _IndexElementKindReader() : super(); |
| 16 |
| 17 @override |
| 18 int get size => 1; |
| 19 |
| 20 @override |
| 21 idl.IndexElementKind read(fb.BufferPointer bp) { |
| 22 int index = const fb.Uint8Reader().read(bp); |
| 23 return idl.IndexElementKind.values[index]; |
| 24 } |
| 25 } |
| 26 |
| 14 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { | 27 class _IndexRelationKindReader extends fb.Reader<idl.IndexRelationKind> { |
| 15 const _IndexRelationKindReader() : super(); | 28 const _IndexRelationKindReader() : super(); |
| 16 | 29 |
| 17 @override | 30 @override |
| 18 int get size => 1; | 31 int get size => 1; |
| 19 | 32 |
| 20 @override | 33 @override |
| 21 idl.IndexRelationKind read(fb.BufferPointer bp) { | 34 idl.IndexRelationKind read(fb.BufferPointer bp) { |
| 22 int index = const fb.Uint8Reader().read(bp); | 35 int index = const fb.Uint8Reader().read(bp); |
| 23 return idl.IndexRelationKind.values[index]; | 36 return idl.IndexRelationKind.values[index]; |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 "unlinkedUnitUris": unlinkedUnitUris, | 1360 "unlinkedUnitUris": unlinkedUnitUris, |
| 1348 }; | 1361 }; |
| 1349 | 1362 |
| 1350 @override | 1363 @override |
| 1351 String toString() => convert.JSON.encode(toJson()); | 1364 String toString() => convert.JSON.encode(toJson()); |
| 1352 } | 1365 } |
| 1353 | 1366 |
| 1354 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { | 1367 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { |
| 1355 bool _finished = false; | 1368 bool _finished = false; |
| 1356 | 1369 |
| 1370 List<idl.IndexElementKind> _elementKinds; |
| 1357 List<int> _elementLibraryUris; | 1371 List<int> _elementLibraryUris; |
| 1358 List<int> _elementOffsets; | 1372 List<int> _elementOffsets; |
| 1359 List<int> _elementUnits; | 1373 List<int> _elementUnits; |
| 1360 List<int> _elementUnitUris; | 1374 List<int> _elementUnitUris; |
| 1361 List<UnitIndexBuilder> _units; | 1375 List<UnitIndexBuilder> _units; |
| 1362 List<String> _uris; | 1376 List<String> _uris; |
| 1363 | 1377 |
| 1364 @override | 1378 @override |
| 1379 List<idl.IndexElementKind> get elementKinds => _elementKinds ??= <idl.IndexEle
mentKind>[]; |
| 1380 |
| 1381 /** |
| 1382 * Each item of this list corresponds to a unique referenced element. It is |
| 1383 * the kind of the element. |
| 1384 */ |
| 1385 void set elementKinds(List<idl.IndexElementKind> _value) { |
| 1386 assert(!_finished); |
| 1387 _elementKinds = _value; |
| 1388 } |
| 1389 |
| 1390 @override |
| 1365 List<int> get elementLibraryUris => _elementLibraryUris ??= <int>[]; | 1391 List<int> get elementLibraryUris => _elementLibraryUris ??= <int>[]; |
| 1366 | 1392 |
| 1367 /** | 1393 /** |
| 1368 * Each item of this list corresponds to a unique library URI with an element | 1394 * Each item of this list corresponds to a unique library URI with an element |
| 1369 * referenced in the [PackageIndex]. It is an index into [uris] list. | 1395 * referenced in the [PackageIndex]. It is an index into [uris] list. |
| 1370 */ | 1396 */ |
| 1371 void set elementLibraryUris(List<int> _value) { | 1397 void set elementLibraryUris(List<int> _value) { |
| 1372 assert(!_finished); | 1398 assert(!_finished); |
| 1373 assert(_value == null || _value.every((e) => e >= 0)); | 1399 assert(_value == null || _value.every((e) => e >= 0)); |
| 1374 _elementLibraryUris = _value; | 1400 _elementLibraryUris = _value; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 List<String> get uris => _uris ??= <String>[]; | 1457 List<String> get uris => _uris ??= <String>[]; |
| 1432 | 1458 |
| 1433 /** | 1459 /** |
| 1434 * List of unique URIs used in this [PackageIndex]. | 1460 * List of unique URIs used in this [PackageIndex]. |
| 1435 */ | 1461 */ |
| 1436 void set uris(List<String> _value) { | 1462 void set uris(List<String> _value) { |
| 1437 assert(!_finished); | 1463 assert(!_finished); |
| 1438 _uris = _value; | 1464 _uris = _value; |
| 1439 } | 1465 } |
| 1440 | 1466 |
| 1441 PackageIndexBuilder({List<int> elementLibraryUris, List<int> elementOffsets, L
ist<int> elementUnits, List<int> elementUnitUris, List<UnitIndexBuilder> units,
List<String> uris}) | 1467 PackageIndexBuilder({List<idl.IndexElementKind> elementKinds, List<int> elemen
tLibraryUris, List<int> elementOffsets, List<int> elementUnits, List<int> elemen
tUnitUris, List<UnitIndexBuilder> units, List<String> uris}) |
| 1442 : _elementLibraryUris = elementLibraryUris, | 1468 : _elementKinds = elementKinds, |
| 1469 _elementLibraryUris = elementLibraryUris, |
| 1443 _elementOffsets = elementOffsets, | 1470 _elementOffsets = elementOffsets, |
| 1444 _elementUnits = elementUnits, | 1471 _elementUnits = elementUnits, |
| 1445 _elementUnitUris = elementUnitUris, | 1472 _elementUnitUris = elementUnitUris, |
| 1446 _units = units, | 1473 _units = units, |
| 1447 _uris = uris; | 1474 _uris = uris; |
| 1448 | 1475 |
| 1449 List<int> toBuffer() { | 1476 List<int> toBuffer() { |
| 1450 fb.Builder fbBuilder = new fb.Builder(); | 1477 fb.Builder fbBuilder = new fb.Builder(); |
| 1451 return fbBuilder.finish(finish(fbBuilder), "Indx"); | 1478 return fbBuilder.finish(finish(fbBuilder), "Indx"); |
| 1452 } | 1479 } |
| 1453 | 1480 |
| 1454 fb.Offset finish(fb.Builder fbBuilder) { | 1481 fb.Offset finish(fb.Builder fbBuilder) { |
| 1455 assert(!_finished); | 1482 assert(!_finished); |
| 1456 _finished = true; | 1483 _finished = true; |
| 1484 fb.Offset offset_elementKinds; |
| 1457 fb.Offset offset_elementLibraryUris; | 1485 fb.Offset offset_elementLibraryUris; |
| 1458 fb.Offset offset_elementOffsets; | 1486 fb.Offset offset_elementOffsets; |
| 1459 fb.Offset offset_elementUnits; | 1487 fb.Offset offset_elementUnits; |
| 1460 fb.Offset offset_elementUnitUris; | 1488 fb.Offset offset_elementUnitUris; |
| 1461 fb.Offset offset_units; | 1489 fb.Offset offset_units; |
| 1462 fb.Offset offset_uris; | 1490 fb.Offset offset_uris; |
| 1491 if (!(_elementKinds == null || _elementKinds.isEmpty)) { |
| 1492 offset_elementKinds = fbBuilder.writeListUint8(_elementKinds.map((b) => b.
index).toList()); |
| 1493 } |
| 1463 if (!(_elementLibraryUris == null || _elementLibraryUris.isEmpty)) { | 1494 if (!(_elementLibraryUris == null || _elementLibraryUris.isEmpty)) { |
| 1464 offset_elementLibraryUris = fbBuilder.writeListUint32(_elementLibraryUris)
; | 1495 offset_elementLibraryUris = fbBuilder.writeListUint32(_elementLibraryUris)
; |
| 1465 } | 1496 } |
| 1466 if (!(_elementOffsets == null || _elementOffsets.isEmpty)) { | 1497 if (!(_elementOffsets == null || _elementOffsets.isEmpty)) { |
| 1467 offset_elementOffsets = fbBuilder.writeListUint32(_elementOffsets); | 1498 offset_elementOffsets = fbBuilder.writeListUint32(_elementOffsets); |
| 1468 } | 1499 } |
| 1469 if (!(_elementUnits == null || _elementUnits.isEmpty)) { | 1500 if (!(_elementUnits == null || _elementUnits.isEmpty)) { |
| 1470 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); | 1501 offset_elementUnits = fbBuilder.writeListUint32(_elementUnits); |
| 1471 } | 1502 } |
| 1472 if (!(_elementUnitUris == null || _elementUnitUris.isEmpty)) { | 1503 if (!(_elementUnitUris == null || _elementUnitUris.isEmpty)) { |
| 1473 offset_elementUnitUris = fbBuilder.writeListUint32(_elementUnitUris); | 1504 offset_elementUnitUris = fbBuilder.writeListUint32(_elementUnitUris); |
| 1474 } | 1505 } |
| 1475 if (!(_units == null || _units.isEmpty)) { | 1506 if (!(_units == null || _units.isEmpty)) { |
| 1476 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); | 1507 offset_units = fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).
toList()); |
| 1477 } | 1508 } |
| 1478 if (!(_uris == null || _uris.isEmpty)) { | 1509 if (!(_uris == null || _uris.isEmpty)) { |
| 1479 offset_uris = fbBuilder.writeList(_uris.map((b) => fbBuilder.writeString(b
)).toList()); | 1510 offset_uris = fbBuilder.writeList(_uris.map((b) => fbBuilder.writeString(b
)).toList()); |
| 1480 } | 1511 } |
| 1481 fbBuilder.startTable(); | 1512 fbBuilder.startTable(); |
| 1513 if (offset_elementKinds != null) { |
| 1514 fbBuilder.addOffset(6, offset_elementKinds); |
| 1515 } |
| 1482 if (offset_elementLibraryUris != null) { | 1516 if (offset_elementLibraryUris != null) { |
| 1483 fbBuilder.addOffset(2, offset_elementLibraryUris); | 1517 fbBuilder.addOffset(2, offset_elementLibraryUris); |
| 1484 } | 1518 } |
| 1485 if (offset_elementOffsets != null) { | 1519 if (offset_elementOffsets != null) { |
| 1486 fbBuilder.addOffset(1, offset_elementOffsets); | 1520 fbBuilder.addOffset(1, offset_elementOffsets); |
| 1487 } | 1521 } |
| 1488 if (offset_elementUnits != null) { | 1522 if (offset_elementUnits != null) { |
| 1489 fbBuilder.addOffset(0, offset_elementUnits); | 1523 fbBuilder.addOffset(0, offset_elementUnits); |
| 1490 } | 1524 } |
| 1491 if (offset_elementUnitUris != null) { | 1525 if (offset_elementUnitUris != null) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1511 | 1545 |
| 1512 @override | 1546 @override |
| 1513 _PackageIndexImpl createObject(fb.BufferPointer bp) => new _PackageIndexImpl(b
p); | 1547 _PackageIndexImpl createObject(fb.BufferPointer bp) => new _PackageIndexImpl(b
p); |
| 1514 } | 1548 } |
| 1515 | 1549 |
| 1516 class _PackageIndexImpl extends Object with _PackageIndexMixin implements idl.Pa
ckageIndex { | 1550 class _PackageIndexImpl extends Object with _PackageIndexMixin implements idl.Pa
ckageIndex { |
| 1517 final fb.BufferPointer _bp; | 1551 final fb.BufferPointer _bp; |
| 1518 | 1552 |
| 1519 _PackageIndexImpl(this._bp); | 1553 _PackageIndexImpl(this._bp); |
| 1520 | 1554 |
| 1555 List<idl.IndexElementKind> _elementKinds; |
| 1521 List<int> _elementLibraryUris; | 1556 List<int> _elementLibraryUris; |
| 1522 List<int> _elementOffsets; | 1557 List<int> _elementOffsets; |
| 1523 List<int> _elementUnits; | 1558 List<int> _elementUnits; |
| 1524 List<int> _elementUnitUris; | 1559 List<int> _elementUnitUris; |
| 1525 List<idl.UnitIndex> _units; | 1560 List<idl.UnitIndex> _units; |
| 1526 List<String> _uris; | 1561 List<String> _uris; |
| 1527 | 1562 |
| 1528 @override | 1563 @override |
| 1564 List<idl.IndexElementKind> get elementKinds { |
| 1565 _elementKinds ??= const fb.ListReader<idl.IndexElementKind>(const _IndexElem
entKindReader()).vTableGet(_bp, 6, const <idl.IndexElementKind>[]); |
| 1566 return _elementKinds; |
| 1567 } |
| 1568 |
| 1569 @override |
| 1529 List<int> get elementLibraryUris { | 1570 List<int> get elementLibraryUris { |
| 1530 _elementLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const
<int>[]); | 1571 _elementLibraryUris ??= const fb.Uint32ListReader().vTableGet(_bp, 2, const
<int>[]); |
| 1531 return _elementLibraryUris; | 1572 return _elementLibraryUris; |
| 1532 } | 1573 } |
| 1533 | 1574 |
| 1534 @override | 1575 @override |
| 1535 List<int> get elementOffsets { | 1576 List<int> get elementOffsets { |
| 1536 _elementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int
>[]); | 1577 _elementOffsets ??= const fb.Uint32ListReader().vTableGet(_bp, 1, const <int
>[]); |
| 1537 return _elementOffsets; | 1578 return _elementOffsets; |
| 1538 } | 1579 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1559 List<String> get uris { | 1600 List<String> get uris { |
| 1560 _uris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bp
, 4, const <String>[]); | 1601 _uris ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_bp
, 4, const <String>[]); |
| 1561 return _uris; | 1602 return _uris; |
| 1562 } | 1603 } |
| 1563 } | 1604 } |
| 1564 | 1605 |
| 1565 abstract class _PackageIndexMixin implements idl.PackageIndex { | 1606 abstract class _PackageIndexMixin implements idl.PackageIndex { |
| 1566 @override | 1607 @override |
| 1567 Map<String, Object> toJson() { | 1608 Map<String, Object> toJson() { |
| 1568 Map<String, Object> _result = <String, Object>{}; | 1609 Map<String, Object> _result = <String, Object>{}; |
| 1610 if (elementKinds.isNotEmpty) _result["elementKinds"] = elementKinds.map((_va
lue) => _value.toString().split('.')[1]).toList(); |
| 1569 if (elementLibraryUris.isNotEmpty) _result["elementLibraryUris"] = elementLi
braryUris; | 1611 if (elementLibraryUris.isNotEmpty) _result["elementLibraryUris"] = elementLi
braryUris; |
| 1570 if (elementOffsets.isNotEmpty) _result["elementOffsets"] = elementOffsets; | 1612 if (elementOffsets.isNotEmpty) _result["elementOffsets"] = elementOffsets; |
| 1571 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; | 1613 if (elementUnits.isNotEmpty) _result["elementUnits"] = elementUnits; |
| 1572 if (elementUnitUris.isNotEmpty) _result["elementUnitUris"] = elementUnitUris
; | 1614 if (elementUnitUris.isNotEmpty) _result["elementUnitUris"] = elementUnitUris
; |
| 1573 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson
()).toList(); | 1615 if (units.isNotEmpty) _result["units"] = units.map((_value) => _value.toJson
()).toList(); |
| 1574 if (uris.isNotEmpty) _result["uris"] = uris; | 1616 if (uris.isNotEmpty) _result["uris"] = uris; |
| 1575 return _result; | 1617 return _result; |
| 1576 } | 1618 } |
| 1577 | 1619 |
| 1578 @override | 1620 @override |
| 1579 Map<String, Object> toMap() => { | 1621 Map<String, Object> toMap() => { |
| 1622 "elementKinds": elementKinds, |
| 1580 "elementLibraryUris": elementLibraryUris, | 1623 "elementLibraryUris": elementLibraryUris, |
| 1581 "elementOffsets": elementOffsets, | 1624 "elementOffsets": elementOffsets, |
| 1582 "elementUnits": elementUnits, | 1625 "elementUnits": elementUnits, |
| 1583 "elementUnitUris": elementUnitUris, | 1626 "elementUnitUris": elementUnitUris, |
| 1584 "units": units, | 1627 "units": units, |
| 1585 "uris": uris, | 1628 "uris": uris, |
| 1586 }; | 1629 }; |
| 1587 | 1630 |
| 1588 @override | 1631 @override |
| 1589 String toString() => convert.JSON.encode(toJson()); | 1632 String toString() => convert.JSON.encode(toJson()); |
| (...skipping 5370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6960 "propagatedTypeSlot": propagatedTypeSlot, | 7003 "propagatedTypeSlot": propagatedTypeSlot, |
| 6961 "type": type, | 7004 "type": type, |
| 6962 "visibleLength": visibleLength, | 7005 "visibleLength": visibleLength, |
| 6963 "visibleOffset": visibleOffset, | 7006 "visibleOffset": visibleOffset, |
| 6964 }; | 7007 }; |
| 6965 | 7008 |
| 6966 @override | 7009 @override |
| 6967 String toString() => convert.JSON.encode(toJson()); | 7010 String toString() => convert.JSON.encode(toJson()); |
| 6968 } | 7011 } |
| 6969 | 7012 |
| OLD | NEW |