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

Side by Side Diff: test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart

Issue 1153003003: fixes #40, extension methods for primitive types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of _js_helper; 5 part of _js_helper;
6 6
7 /// Tells the optimizing compiler that the annotated method has no 7 /// Tells the optimizing compiler that the annotated method has no
8 /// side-effects. 8 /// side-effects.
9 /// Requires @NoInline() to function correctly. 9 /// Requires @NoInline() to function correctly.
10 class NoSideEffects { 10 class NoSideEffects {
(...skipping 16 matching lines...) Expand all
27 class IrRepresentation { 27 class IrRepresentation {
28 final bool value; 28 final bool value;
29 const IrRepresentation(this.value); 29 const IrRepresentation(this.value);
30 } 30 }
31 31
32 /// Marks a class as native and defines its JavaScript name(s). 32 /// Marks a class as native and defines its JavaScript name(s).
33 class Native { 33 class Native {
34 final String name; 34 final String name;
35 const Native(this.name); 35 const Native(this.name);
36 } 36 }
37
38 // TODO(jmesserly): move these somewhere else, e.g. package:js or dart:js
39
40 class JsName {
41 /// The JavaScript name.
42 /// Used for classes and libraries.
43 /// Note that this could be an expression, e.g. `lib.TypeName` in JS, but it
44 /// should be kept simple, as it will be generated directly into the code.
45 final String name;
46 const JsName({this.name});
47 }
48
49 class JsPeerInterface {
50 /// The JavaScript type that we should match the API of.
51 /// Used for classes where Dart subclasses should be callable from JavaScript
52 /// matching the JavaScript calling conventions.
53 final String name;
54 const JsPeerInterface({this.name});
55 }
56
57 /// A Dart interface may only be implemented by a native JavaScript object
58 /// if it is marked with this annotation.
59 class SupportJsExtensionMethod {
60 const SupportJsExtensionMethod();
61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698