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

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

Issue 1577663002: Remove BuilderContext from summary builders. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/tool/summary/build_sdk_summary.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 25be01743850acb39e0c1d5d3eefff507a413988..5d412e4bfde5907b0e813a1efaea0e002b5baf13 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -13,11 +13,9 @@
* - A "builder" class which can be used to generate serialized summary data.
* This class has write-only semantics.
*
- * Each of the "builder" classes has a single `finish` method which finalizes
- * the entity being built and returns it as an [Object]. This object should
- * only be passed to other builders (or to [BuilderContext.getBuffer]);
- * otherwise the client should treat it as opaque, since it exposes
- * implementation details of the underlying summary infrastructure.
+ * Each of the "builder" classes has a single `finish` method which writes
+ * the entity being built into the given FlatBuffer and returns the `Offset`
+ * reference to it.
*/
library analyzer.tool.summary.generate;
@@ -309,7 +307,7 @@ class _CodeGenerator {
}
// Generate constructor.
out();
- out('$builderName(base.BuilderContext context);');
+ out('$builderName();');
// Generate setters.
for (idlModel.FieldDeclaration field in cls.fields) {
String fieldName = field.name;
@@ -431,9 +429,9 @@ class _CodeGenerator {
idlModel.ClassDeclaration cls, List<String> builderParams) {
String className = cls.name;
String builderName = className + 'Builder';
- out('$builderName encode$className(base.BuilderContext builderContext, {${builderParams.join(', ')}}) {');
+ out('$builderName encode$className({${builderParams.join(', ')}}) {');
indent(() {
- out('$builderName builder = new $builderName(builderContext);');
+ out('$builderName builder = new $builderName();');
for (idlModel.FieldDeclaration field in cls.fields) {
String fieldName = field.name;
out('builder.$fieldName = $fieldName;');
« no previous file with comments | « pkg/analyzer/tool/summary/build_sdk_summary.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698