Chromium Code Reviews| 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..5f794badff9926c46c33968b94244aee3f05625c 100644 |
| --- a/pkg/compiler/lib/src/js_backend/backend.dart |
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart |
| @@ -48,7 +48,16 @@ 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 |
|
floitsch
2015/03/10 17:42:27
missing ".".
herhut
2015/03/11 14:01:56
Done.
|
| + if (element is ConstructorBodyElement) { |
| + ConstructorBodyElement body = element; |
| + decision = _cachedDecisions[body.constructor]; |
| + print("checked for $element as $decision via ${body.constructor}"); |
|
floitsch
2015/03/10 17:42:27
remove print.
herhut
2015/03/11 14:01:56
Done.
|
| + } |
| + if (decision == null) { |
| + decision = _unknown; |
| + } |
| } |
| if (insideLoop) { |
| @@ -2433,7 +2442,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); |
| } |