Commit Graph

4 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen fe7efd5606 Update documentation in dart:core.
Fix null safety issues and tweak documentation where it can be improved.

Change-Id: Ia8cc20274ae151c454662bf5f137913787365a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177960
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-12 13:06:41 +00:00
Jens Johansen c1d2c25ef1 [CFE] Add constant coverage in expect files
Change-Id: I0fc009708aa6e330366ad0689c4634a1df90d9c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175368
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-12-10 08:57:17 +00:00
Johnni Winther bc06a90a0e [cfe] Stop using DirectPropertyGet for enum encoding
DirectPropertyGet is a statically bound instance access used in the
VM mixin tranformation to encode fully resolved super access. The
access to `this.name` generated in `toString` of an enum is _not_
a statically bound instance access but just a regular instance access
whose runtime target happens to be known statically because the code
is generated. In JavaScript backend a statically bound instance access
requires a unique getter to avoid the dynamic lookup, and therefore,
though using DirectPropertyGet is an optimization
to the VM, it would be a regression to the JavaScript backends if
they didn't handle DirectPropertyGet as a PropertyGet.

This CL removes the misuse and thus enables JavaScript backends to
handle DirectPropertyGet with the intended semantics.

Change-Id: Ie41aefbf19e8c63244f10a1afda1ddbfdf7d3c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164085
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-02 20:21:30 +00:00
Johnni Winther 9d6ee9ec5a [cfe] Don't lower instance fields
Closes #42956

Change-Id: I3d27c8601d835ecafa50dadcebca1493f64588ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161700
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-08 08:11:24 +00:00