OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 part of _js_helper; | |
6 | |
7 /// Tells the optimizing compiler that the annotated method has no | |
8 /// side-effects. Allocations don't count as side-effects, since they can be | |
9 /// dropped without changing the semantics of the program. | |
10 /// | |
11 /// Requires @NoInline() to function correctly. | |
12 class NoSideEffects { | |
13 const NoSideEffects(); | |
14 } | |
15 | |
16 /// Tells the optimizing compiler that the annotated method cannot throw. | |
17 /// Requires @NoInline() to function correctly. | |
18 class NoThrows { | |
19 const NoThrows(); | |
20 } | |
21 | |
22 /// Tells the optimizing compiler to not inline the annotated method. | |
23 class NoInline { | |
24 const NoInline(); | |
25 } | |
26 | |
27 /// Tells the optimizing compiler to always inline the annotated method. | |
28 class ForceInline { | |
29 const ForceInline(); | |
30 } | |
31 | |
32 // Ensures that the annotated method is represented internally using | |
33 // IR nodes ([:value == true:]) or AST nodes ([:value == false:]). | |
34 class IrRepresentation { | |
35 final bool value; | |
36 const IrRepresentation(this.value); | |
37 } | |
38 | |
39 /// Marks a class as native and defines its JavaScript name(s). | |
40 class Native { | |
41 final String name; | |
42 const Native(this.name); | |
43 } | |
44 | |
45 class _Patch { | |
46 final String version; | |
47 | |
48 const _Patch(this.version); | |
49 } | |
50 | |
51 /// Annotation that marks the declaration as a patch. | |
52 const _Patch patch = const _Patch(null); | |
53 | |
54 /// Annotation that marks the declaration as a patch for the old emitter. | |
55 const _Patch patch_old = const _Patch('old'); | |
56 | |
57 /// Annotation that marks the declaration as a patch for the new emitter. | |
58 const _Patch patch_new = const _Patch('new'); | |
OLD | NEW |