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

Side by Side Diff: pkg/compiler/lib/src/js_backend/annotations.dart

Issue 2814453005: Merge CommonElements and BackendHelpers! (Closed)
Patch Set: comments and re-merge, take two Created 3 years, 8 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 library js_backend.backend.annotations; 5 library js_backend.backend.annotations;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 } 43 }
44 } 44 }
45 45
46 /// Returns `true` if inlining is disabled for [element]. 46 /// Returns `true` if inlining is disabled for [element].
47 bool noInline(Element element) { 47 bool noInline(Element element) {
48 if (_hasAnnotation(element, expectNoInlineClass)) { 48 if (_hasAnnotation(element, expectNoInlineClass)) {
49 // TODO(floitsch): restrict to elements from the test directory. 49 // TODO(floitsch): restrict to elements from the test directory.
50 return true; 50 return true;
51 } 51 }
52 return _hasAnnotation(element, backend.helpers.noInlineClass); 52 return _hasAnnotation(element, compiler.commonElements.noInlineClass);
53 } 53 }
54 54
55 /// Returns `true` if parameter and returns types should be trusted for 55 /// Returns `true` if parameter and returns types should be trusted for
56 /// [element]. 56 /// [element].
57 bool trustTypeAnnotations(Element element) { 57 bool trustTypeAnnotations(Element element) {
58 return _hasAnnotation(element, expectTrustTypeAnnotationsClass); 58 return _hasAnnotation(element, expectTrustTypeAnnotationsClass);
59 } 59 }
60 60
61 /// Returns `true` if inference of parameter types is disabled for [element]. 61 /// Returns `true` if inference of parameter types is disabled for [element].
62 bool assumeDynamic(Element element) { 62 bool assumeDynamic(Element element) {
(...skipping 13 matching lines...) Expand all
76 ConstructedConstantValue constructedConstant = value; 76 ConstructedConstantValue constructedConstant = value;
77 if (constructedConstant.type.element == annotationClass) { 77 if (constructedConstant.type.element == annotationClass) {
78 return true; 78 return true;
79 } 79 }
80 } 80 }
81 } 81 }
82 return false; 82 return false;
83 }); 83 });
84 } 84 }
85 } 85 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/map_tracer.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698