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

Unified Diff: lib/compiler/implementation/ssa/optimize.dart

Issue 10855026: Don't rely on the existence of an element in field gets. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 80 chars. Created 8 years, 4 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/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index ef7273adb755e001b8be7f22cdfdd358386d5dac..e84c0e907ebf24ccdc52c1f2bb6dbe09596fc028 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -1209,13 +1209,15 @@ class BaseRecompilationVisitor extends HBaseVisitor {
void visitFieldGet(HFieldGet node) {
if (!node.element.isInstanceMember()) return;
Element field = node.element;
- HType type = backend.optimisticFieldTypeAfterConstruction(field);
- if (!type.isUnknown()) {
- // Allow handling even if we haven't seen any types for this
- // field yet. There might still be only one setter in an
- // initializer list or constructor body and recompilation
- // can therefore pay off.
- handleFieldGet(node, type);
+ if (field != null) {
+ HType type = backend.optimisticFieldTypeAfterConstruction(field);
+ if (!type.isUnknown()) {
+ // Allow handling even if we haven't seen any types for this
+ // field yet. There might still be only one setter in an
+ // initializer list or constructor body and recompilation
+ // can therefore pay off.
+ handleFieldGet(node, type);
+ }
}
}
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698