Stephen Adams

Results 98 comments of Stephen Adams

My initial take is that this could be complicated change for dart2js. For dart2js, this is effectively a new feature - splitting dynamic calls from instance calls. Today, dart2js maintains...

I believe the intention of the current language is to permit optimizations that do not preserve identity of closures, but it would be nice to have this called out explicitly...

Perhaps use an [`Expando`](https://api.flutter.dev/flutter/dart-core/Expando-class.html) instead of a Map

dart2js has a structural problem that prevents it from generating nice code for examples like this. It will take significant significant effort to fix the problem, but I think we...

@johnniwinther Sink binding as late as possible. If the binding occurs in one place, is not actually tested (as here) and not needed in more than one path, sink it...

With the fix c6347389d2c6953ab5447e3daa2a725406f16a4d, the generated code for `pattern` is the same as `manual` and `promote` (other than names) ```js pattern$0() { var _0_0 = this._x; if (_0_0 != null)...

The issue causing the revert is addressed by https://dart-review.googlesource.com/c/sdk/+/352443 The branch condition in B4 is not controlling for the join at B12 ![image](https://github.com/dart-lang/sdk/assets/2108821/d5af6027-c47f-48d0-93fb-4dcb8c39772d)

> intl did not support engineering notation please add best funtions in dart please it save my lot of time Try `NumberFormat('###.##E+00')`. The three `#` before the `.` causes the...

@sneurlax I would suggest simply using [`double.parse` or `double.tryParse`](https://api.flutter.dev/flutter/dart-core/double/parse.html). This will handle most of the examples from this thread, and will parse, say, `12e+08` and `+1.2E9` as the same number....

Fixed via https://github.com/dart-lang/sdk/commit/20316bcc5bf1a801c0344eb01d90587a1c1f97f0, https://github.com/dart-lang/sdk/commit/b42bd24b782c6cc31672dc3e994a4faf53ce300d