bbca76a5e2df6c5adf0ee9327f3a7af21fb1c19a
Inline more unsafe operator calls, and insert more checks accordingly.
When "num" is the only receiver that does not respond with NSM, insert
a check and use the builtin operator. Previously we only did this when
the receiver was a number or null. For example:
if (typeof x !== "number") return x.$lt();
result = x < 4;
When the argument might have the wrong type, insert an argument check
and use the builtin operator. Previously we never did this if the
argument might have the wrong type. For example:
if (typeof x !== "number") return H.iae(x);
result = 4 < x;
If both receiver and argument need checks, we join the two checks and
use a one-shot interceptor to throw the error:
if (typeof x !== "number" || typeof y !== "number")
return J.$lt(x, y);
result = x < y;
NullCheck has been generalized to a ReceiverCheck instruction to
support "x.$lt()" above, that throws even if x is a non-null value.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1668913002 .
Dart
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Using Dart
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.
Building Dart
Learn how to get the source and prepare your machine to build the SDK.
There are more documents on our wiki.
Contributing to Dart
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
License
See LICENSE.
Description
Languages
Dart
84.6%
C++
13%
Python
0.7%
JavaScript
0.5%
HTML
0.4%
Other
0.5%