| 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 f10d3d72408a924c2bf51196010434ddaa2dc7e6..7b046c9e48160576788e171478b5ff946933fceb 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<int>', r'array.slice(#, #)',
|
| + subarray = JS('=List', r'array.slice(#, #)',
|
| i, i + kMaxApply < end ? i + kMaxApply : end);
|
| }
|
| result = JS('String', '# + String.fromCharCode.apply(#, #)',
|
| @@ -1220,6 +1220,23 @@ 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,
|
|
|