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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 11416257: Revert "Add @JSName annotation for native fields and methods." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 7b046c9e48160576788e171478b5ff946933fceb..f10d3d72408a924c2bf51196010434ddaa2dc7e6 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -557,7 +557,7 @@ class Primitives {
if (end <= kMaxApply) {
subarray = array;
} else {
- subarray = JS('=List', r'array.slice(#, #)',
+ subarray = JS('List<int>', r'array.slice(#, #)',
i, i + kMaxApply < end ? i + kMaxApply : end);
}
result = JS('String', '# + String.fromCharCode.apply(#, #)',
@@ -1220,23 +1220,6 @@ class Returns {
}
/**
- * A metadata annotation placed on native methods and fields of native classes
- * to specify the JavaScript name.
- *
- * This example declares a Dart field + getter + setter called `$dom_title` that
- * corresponds to the JavaScript property `title`.
- *
- * class Docmument native "*Foo" {
- * @JSName('title')
- * String $dom_title;
- * }
- */
-class JSName {
- final String name;
- const JSName(this.name);
-}
-
-/**
* Represents the type of Null. The compiler treats this specially.
* TODO(lrn): Null should be defined in core. It's a class, like int.
* It just happens to act differently in assignability tests and,

Powered by Google App Engine
This is Rietveld 408576698