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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart

Issue 2748333002: [kernel] offsets on direct property get/set (Closed)
Patch Set: Created 3 years, 9 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/front_end/lib/src/fasta/kernel/builder_accessors.dart ('k') | pkg/kernel/binary.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart b/pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart
index 4a93680141f02d7e50d4242801668cc6d365f7f8..71f99b8e7045b57c2e0d201938c2f135fab32831 100644
--- a/pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart
@@ -225,23 +225,25 @@ class NullAwarePropertyAccessor extends Accessor {
class SuperPropertyAccessor extends Accessor {
Name name;
Member getter, setter;
+ final int charOffset;
- SuperPropertyAccessor(this.name, this.getter, this.setter);
+ SuperPropertyAccessor(this.name, this.getter, this.setter, this.charOffset);
_makeRead() {
if (getter == null) return makeInvalidRead();
// TODO(ahe): Use [DirectPropertyGet] when possible.
- Expression result = new DirectPropertyGet(new ThisExpression(), getter);
- result = new SuperPropertyGet(name, getter);
+ Expression result = new DirectPropertyGet(new ThisExpression(), getter)
+ ..fileOffset = charOffset;
+ result = new SuperPropertyGet(name, getter)..fileOffset = charOffset;
return result;
}
_makeWrite(Expression value, bool voidContext) {
if (setter == null) return makeInvalidWrite(value);
// TODO(ahe): Use [DirectPropertySet] when possible.
- Expression result =
- new DirectPropertySet(new ThisExpression(), setter, value);
- result = new SuperPropertySet(name, value, setter);
+ Expression result = new DirectPropertySet(
+ new ThisExpression(), setter, value)..fileOffset = charOffset;
+ result = new SuperPropertySet(name, value, setter)..fileOffset = charOffset;
return result;
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart ('k') | pkg/kernel/binary.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698