Commit 96c4e4c
[dart2wasm] Use field type instead of global type for static field type.
The calls to 'getGlobalForStaticField' eagerly generate the initializer constant for the associated field. In both these cases we don't need that just to get the type of the field. Instead we can use 'translateTypeOfField' directly (same as 'getGlobalForStaticField').
This also removes unnecessary nullness from the type when the field is lazily instantiated. The global type may be nullable even if the field type isn't.
Change-Id: Id369e07335fc5350524a1b8b6c04f19dd94f8b8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401280
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Nate Biggs <[email protected]>1 parent e3e7ca8 commit 96c4e4c
2 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2001 | 2001 | | |
2002 | 2002 | | |
2003 | 2003 | | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
2007 | 2008 | | |
2008 | 2009 | | |
2009 | 2010 | | |
| |||
2012 | 2013 | | |
2013 | 2014 | | |
2014 | 2015 | | |
2015 | | - | |
| 2016 | + | |
2016 | 2017 | | |
2017 | 2018 | | |
2018 | 2019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
| 481 | + | |
483 | 482 | | |
484 | | - | |
| 483 | + | |
485 | 484 | | |
486 | | - | |
| 485 | + | |
487 | 486 | | |
488 | 487 | | |
489 | 488 | | |
| |||
0 commit comments