| 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 1ed077da32f754dbdefa76b2a66c7b3bbd76fb52..08fa0a74db29be482239a6f7e62b6111c4bfc36d 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -48,7 +48,15 @@ class FunctionInlineCache {
|
| int decision = _cachedDecisions[element];
|
|
|
| if (decision == null) {
|
| - decision = _unknown;
|
| + // These synthetic elements are not yet present when we initially compute
|
| + // this cache from metadata annotations, so look for their parent.
|
| + if (element is ConstructorBodyElement) {
|
| + ConstructorBodyElement body = element;
|
| + decision = _cachedDecisions[body.constructor];
|
| + }
|
| + if (decision == null) {
|
| + decision = _unknown;
|
| + }
|
| }
|
|
|
| if (insideLoop) {
|
| @@ -2433,7 +2441,8 @@ class JavaScriptBackend extends Backend {
|
| }
|
|
|
| void onElementResolved(Element element, TreeElements elements) {
|
| - if (element.isFunction && annotations.noInline(element)) {
|
| + if ((element.isFunction || element.isGenerativeConstructor) &&
|
| + annotations.noInline(element)) {
|
| inlineCache.markAsNonInlinable(element);
|
| }
|
|
|
|
|