Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5311)

Unified Diff: runtime/lib/identical.cc

Issue 1690903003: Remove support for Javascript warnings in the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | runtime/lib/integers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/identical.cc
diff --git a/runtime/lib/identical.cc b/runtime/lib/identical.cc
index 644072684ffa606fedd083a90411fe70455dfa39..4b24219ab76ab2cac2cdc03935e75259f0cdf9ac 100644
--- a/runtime/lib/identical.cc
+++ b/runtime/lib/identical.cc
@@ -9,45 +9,10 @@
namespace dart {
-DECLARE_FLAG(bool, warn_on_javascript_compatibility);
-
DEFINE_NATIVE_ENTRY(Identical_comparison, 2) {
GET_NATIVE_ARGUMENT(Instance, a, arguments->NativeArgAt(0));
GET_NATIVE_ARGUMENT(Instance, b, arguments->NativeArgAt(1));
const bool is_identical = a.IsIdenticalTo(b);
- if (FLAG_warn_on_javascript_compatibility) {
- if (!is_identical) {
- if (a.IsString()) {
- if (String::Cast(a).Equals(b)) {
- Report::JSWarningFromNative(
- true, // Identical_comparison is static.
- "strings that are equal are also identical");
- }
- } else if (a.IsInteger()) {
- if (b.IsDouble()) {
- const int64_t a_value = Integer::Cast(a).AsInt64Value();
- const double b_value = Double::Cast(b).value();
- if (a_value == floor(b_value)) {
- Report::JSWarningFromNative(
- true, // Identical_comparison is static.
- "integer value and integral double value that are equal "
- "are also identical");
- }
- }
- } else if (a.IsDouble()) {
- if (b.IsInteger()) {
- const double a_value = Double::Cast(a).value();
- const int64_t b_value = Integer::Cast(b).AsInt64Value();
- if (floor(a_value) == b_value) {
- Report::JSWarningFromNative(
- true, // Identical_comparison is static.
- "integral double value and integer value that are equal "
- "are also identical");
- }
- }
- }
- }
- }
return Bool::Get(is_identical).raw();
}
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | runtime/lib/integers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698