| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2483 } | 2483 } |
| 2484 | 2484 |
| 2485 @override | 2485 @override |
| 2486 void onElementResolved(Element element) { | 2486 void onElementResolved(Element element) { |
| 2487 if (element.isMalformed) { | 2487 if (element.isMalformed) { |
| 2488 // Elements that are marker as malformed during parsing or resolution | 2488 // Elements that are marker as malformed during parsing or resolution |
| 2489 // might be registered here. These should just be ignored. | 2489 // might be registered here. These should just be ignored. |
| 2490 return; | 2490 return; |
| 2491 } | 2491 } |
| 2492 | 2492 |
| 2493 if ((element.isFunction || element.isConstructor) && | 2493 Element implementation = element.implementation; |
| 2494 annotations.noInline(element)) { | 2494 if (element.isFunction || element.isConstructor) { |
| 2495 inlineCache.markAsNonInlinable(element); | 2495 if (annotations.noInline(implementation)) { |
| 2496 inlineCache.markAsNonInlinable(implementation); |
| 2497 } |
| 2496 } | 2498 } |
| 2497 | 2499 |
| 2498 LibraryElement library = element.library; | 2500 LibraryElement library = element.library; |
| 2499 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return; | 2501 if (!library.isPlatformLibrary && !canLibraryUseNative(library)) return; |
| 2500 bool hasNoInline = false; | 2502 bool hasNoInline = false; |
| 2501 bool hasForceInline = false; | 2503 bool hasForceInline = false; |
| 2502 bool hasNoThrows = false; | 2504 bool hasNoThrows = false; |
| 2503 bool hasNoSideEffects = false; | 2505 bool hasNoSideEffects = false; |
| 2504 for (MetadataAnnotation metadata in element.implementation.metadata) { | 2506 for (MetadataAnnotation metadata in element.implementation.metadata) { |
| 2505 metadata.ensureResolved(resolution); | 2507 metadata.ensureResolved(resolution); |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3285 ClassElement get mapImplementation => helpers.mapLiteralClass; | 3287 ClassElement get mapImplementation => helpers.mapLiteralClass; |
| 3286 ClassElement get constMapImplementation => helpers.constMapLiteralClass; | 3288 ClassElement get constMapImplementation => helpers.constMapLiteralClass; |
| 3287 ClassElement get typeImplementation => helpers.typeLiteralClass; | 3289 ClassElement get typeImplementation => helpers.typeLiteralClass; |
| 3288 ClassElement get boolImplementation => helpers.jsBoolClass; | 3290 ClassElement get boolImplementation => helpers.jsBoolClass; |
| 3289 ClassElement get nullImplementation => helpers.jsNullClass; | 3291 ClassElement get nullImplementation => helpers.jsNullClass; |
| 3290 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable; | 3292 ClassElement get syncStarIterableImplementation => helpers.syncStarIterable; |
| 3291 ClassElement get asyncFutureImplementation => helpers.futureImplementation; | 3293 ClassElement get asyncFutureImplementation => helpers.futureImplementation; |
| 3292 ClassElement get asyncStarStreamImplementation => helpers.controllerStream; | 3294 ClassElement get asyncStarStreamImplementation => helpers.controllerStream; |
| 3293 ClassElement get functionImplementation => helpers.coreClasses.functionClass; | 3295 ClassElement get functionImplementation => helpers.coreClasses.functionClass; |
| 3294 } | 3296 } |
| OLD | NEW |