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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1315083002: dart2js: Use the NoInline annotation on getInterceptor in the JS runtime. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 841e6d89d576e838ddaafa253f329979c6fdcf1f..f8d4e3a26365c60cc0ff899d119fff338cdb5752 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2819,6 +2819,8 @@ class Annotations {
ClassElement expectTrustTypeAnnotationsClass;
ClassElement expectAssumeDynamicClass;
+ JavaScriptBackend get backend => compiler.backend;
+
Annotations(this.compiler);
void onLibraryScanned(LibraryElement library) {
@@ -2839,8 +2841,11 @@ class Annotations {
/// Returns `true` if inlining is disabled for [element].
bool noInline(Element element) {
- // TODO(floitsch): restrict to test directory.
- return _hasAnnotation(element, expectNoInlineClass);
+ if (_hasAnnotation(element, expectNoInlineClass)) {
+ // TODO(floitsch): restrict to elements from the test directory.
+ return true;
+ }
+ return _hasAnnotation(element, backend.noInlineClass);
}
/// Returns `true` if parameter and returns types should be trusted for
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | sdk/lib/_internal/js_runtime/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698