Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: pkg/analyzer/tool/summary/generate.dart

Issue 2110693002: Remove "_finished" assertion checks from summary codegen. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/generate.dart
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index 4f9018e545f7fbd49f26b473bcdec22f742f02c9..869b38de43abbfc5f4b37d5460a53deffc194010 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -544,9 +544,7 @@ class _CodeGenerator {
out('class $builderName extends Object with $mixinName '
'implements ${idlPrefix(name)} {');
indent(() {
- out('bool _finished = false;');
// Generate fields.
- out();
for (idlModel.FieldDeclaration field in cls.fields) {
String fieldName = field.name;
idlModel.FieldType type = field.type;
@@ -572,7 +570,6 @@ class _CodeGenerator {
out('void set $fieldName($typeStr _value) {');
indent(() {
String stateFieldName = '_' + fieldName;
- out('assert(!_finished);');
// Validate that int(s) are non-negative.
if (fieldType.typeName == 'int') {
if (!fieldType.isList) {
@@ -637,8 +634,6 @@ class _CodeGenerator {
out();
out('fb.Offset finish(fb.Builder fbBuilder) {');
indent(() {
- out('assert(!_finished);');
- out('_finished = true;');
// Write objects and remember Offset(s).
for (idlModel.FieldDeclaration field in cls.fields) {
idlModel.FieldType fieldType = field.type;
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698