e3dac4b11c
Fields getters and setters should be implicit whenever possible to ensure JS compilers can easily control how they are generated. However, it is still useful to be able to take control of the getter or setter in the IR. We should just refrain from doing so for common cases, where it can have significant code size impact in JS. We can use this to insert checked setters for fields that override a setter with an incompatible type, or whose type references a type variable. There are two changes to facilitate this: - Fields have two flags indicating if the implicit getter and/or setter should be generated. If not set, there can be an explicit getter/setter for it in the same class. - Interface targets that reference a field now go through one level of indirection. This lets us update interface targets in the IR, which is necessary for redirecting calls to an explicit getter or setter. BUG= R=kmillikin@google.com Review URL: https://chromereviews.googleplex.com/504357013 .
Conversion to a textual format.
The text format is currently very ad-hoc and there is no conversion back, but it's a pleasant way to view the IR.