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

Unified Diff: lib/src/compiler/js_field_storage.dart

Issue 1966763004: always emit lazy field if overriding static (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 | « lib/src/compiler/code_generator.dart ('k') | tool/input_sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/js_field_storage.dart
diff --git a/lib/src/compiler/js_field_storage.dart b/lib/src/compiler/js_field_storage.dart
index b66d41c6cc214c9c6474caa038ba93acf75c5d35..decef3b8a894079cfeb42230d98dde66e47e9e2f 100644
--- a/lib/src/compiler/js_field_storage.dart
+++ b/lib/src/compiler/js_field_storage.dart
@@ -7,8 +7,6 @@ import 'dart:collection' show HashSet;
import 'package:analyzer/dart/ast/ast.dart' show Identifier;
import 'package:analyzer/dart/element/element.dart';
-import 'extension_types.dart';
-
class PropertyOverrideResult {
final bool foundGetter;
final bool foundSetter;
@@ -16,22 +14,15 @@ class PropertyOverrideResult {
PropertyOverrideResult(this.foundGetter, this.foundSetter);
}
-PropertyOverrideResult checkForPropertyOverride(FieldElement field,
- List<ClassElement> superclasses, ExtensionTypeSet extensionTypes) {
+PropertyOverrideResult checkForPropertyOverride(
+ FieldElement field, List<ClassElement> superclasses) {
bool foundGetter = false;
bool foundSetter = false;
for (var superclass in superclasses) {
- // Stop if we reach a native type.
- if (extensionTypes.isNativeClass(superclass)) break;
-
var superprop = getProperty(superclass, field.library, field.name);
if (superprop == null) continue;
- // Static fields can override superclass static fields. However, we need to
- // handle the case where they override a getter or setter.
- if (field.isStatic && !superprop.isSynthetic) continue;
-
var getter = superprop.getter;
bool hasGetter = getter != null && !getter.isAbstract;
if (hasGetter) foundGetter = true;
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | tool/input_sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698