commit | 36f52dd43f1111cbc5b51796ab51d8136bac6b9f | [log] [tgz] |
---|---|---|
author | Stephen Adams <sra@google.com> | Fri Aug 05 16:13:03 2016 -0700 |
committer | Stephen Adams <sra@google.com> | Fri Aug 05 16:13:03 2016 -0700 |
tree | 368bc876479740bbc5bf57e9375aff38708f7e33 | |
parent | e82a20b1801da638061c946026e3654aeccfa588 [diff] |
Avoid modifying the set returned by getInterceptorsOn() The returned set is shared. This program generates a broken short-circuit interceptor ($n -> $din) due to modifying the cached shared set {n} to {d,i,n} -------- J.toInt$0$n = function(receiver) { return J.getInterceptor$din(receiver).toInt$0(receiver); }; -------- import 'package:expect/expect.dart'; @NoInline() @AssumeDynamic() confuse(x) => x; @NoInline() foo(x) { print(x.toInt()); bar(x); } @NoInline() bar(x) { print(x.toInt()); print(x.runtimeType); } main() { int i = confuse(1); foo(i); double d = confuse(2.3); foo(d); } -------- TBR=sigmund@google.com Review URL: https://codereview.chromium.org/2215133003 .
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
Learn how to get the source and prepare your machine to build the SDK.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
See LICENSE.