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

Unified Diff: pkg/compiler/lib/src/universe/use.dart

Issue 2994353002: Fix the locals lookup of variables and partial implementation of boxing of variables.
Patch Set: Created 3 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 | « pkg/compiler/lib/src/ssa/locals_handler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/use.dart
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 124f1815194b36a462133e030d03a1267355952b..1c5898d824015c6adfb76c51f7fef375c04f966a 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -20,6 +20,7 @@ import '../closure.dart' show BoxFieldElement;
import '../common.dart';
import '../constants/values.dart';
import '../elements/types.dart';
+import '../js_model/closure.dart' show JRecord;
import '../elements/elements.dart' show Element;
import '../elements/entities.dart';
import '../util/util.dart' show Hashing;
@@ -358,7 +359,9 @@ class StaticUse {
/// Read access of an instance field or boxed field [element].
factory StaticUse.fieldGet(FieldEntity element) {
assert(
- element.isInstanceMember || element is BoxFieldElement,
+ element.isInstanceMember ||
+ element is BoxFieldElement ||
+ element is JRecord,
failedAt(element,
"Field init element $element must be an instance or boxed field."));
return new StaticUse.internal(element, StaticUseKind.FIELD_GET);
@@ -367,7 +370,9 @@ class StaticUse {
/// Write access of an instance field or boxed field [element].
factory StaticUse.fieldSet(FieldEntity element) {
assert(
- element.isInstanceMember || element is BoxFieldElement,
+ element.isInstanceMember ||
+ element is BoxFieldElement ||
+ element is JRecord,
failedAt(element,
"Field init element $element must be an instance or boxed field."));
return new StaticUse.internal(element, StaticUseKind.FIELD_SET);
« no previous file with comments | « pkg/compiler/lib/src/ssa/locals_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698