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

Unified Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2703373003: Streamline field symbol names (Closed)
Patch Set: Created 3 years, 10 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/dev_compiler/lib/js/legacy/dart_sdk.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index ef79b3684f65c40a311273fa5f7cdf4f96d1454c..ce58c459435ee80d60c3ac3612d8dce61750db8d 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -832,7 +832,7 @@ class CodeGenerator extends GeneralizingAstVisitor
_emitClassTypeTests(classElem, className, body);
_defineNamedConstructors(ctors, body, className, isCallableTransitive);
- _emitVirtualFieldSymbols(className, body);
+ _emitVirtualFieldSymbols(classElem, body);
_emitClassSignature(
methods, allFields, classElem, ctors, extensions, className, body);
_defineExtensionMembers(extensions, className, body);
@@ -1090,10 +1090,10 @@ class CodeGenerator extends GeneralizingAstVisitor
}
void _emitVirtualFieldSymbols(
- JS.Expression className, List<JS.Statement> body) {
+ ClassElement classElement, List<JS.Statement> body) {
_classProperties.virtualFields.forEach((field, virtualField) {
- body.add(js.statement('const # = Symbol(#.name + "." + #.toString());',
- [virtualField, className, _declareMemberName(field.getter)]));
+ body.add(js.statement('const # = Symbol(#);',
+ [virtualField, js.string('${classElement.name}.${field.name}')]));
});
}
« no previous file with comments | « pkg/dev_compiler/lib/js/legacy/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698