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

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

Issue 3006653003: Adding JRecord and boxing mechanics (Closed)
Patch Set: rename 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') | tests/language_2/language_2_dart2js.status » ('j') | 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..08f1c0545af0b97a4a4b7692bb7b32f37ce8cf40 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -22,6 +22,7 @@ import '../constants/values.dart';
import '../elements/types.dart';
import '../elements/elements.dart' show Element;
import '../elements/entities.dart';
+import '../js_model/closure.dart';
import '../util/util.dart' show Hashing;
import '../world.dart' show World;
import 'call_structure.dart' show CallStructure;
@@ -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 JRecordField,
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 JRecordField,
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') | tests/language_2/language_2_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698