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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart

Issue 1183273004: Revert "Cleanup TypedSelector.appliesUnnamed" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | pkg/compiler/lib/src/types/type_mask.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
index 1fdda0c998ac7ae872c0fc968988eacdb232764d..0de9dc06539097f9ba7530f7ae6a52d056531c8c 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart
@@ -482,16 +482,11 @@ class ClassEmitter extends CodeEmitterHelper {
|| compiler.codegenWorld.hasInvokedSetter(field, compiler.world));
}
+ // We never access a field in a closure (a captured variable) without knowing
+ // that it is there. Therefore we don't need to use a getter (that will throw
+ // if the getter method is missing), but can always access the field directly.
static bool fieldAccessNeverThrows(VariableElement field) {
- return
- // Exceptions for missing static and top level fields are generated at
- // compile time.
- field.isStatic || field.isTopLevel ||
- // We never access a field in a closure (a captured variable) without
- // knowing that it is there. Therefore we don't need to use a getter
- // (that will throw if the getter method is missing), but can always
- // access the field directly.
- field is ClosureFieldElement;
+ return field is ClosureFieldElement;
}
bool canAvoidGeneratedCheckedSetter(VariableElement member) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/types/type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698