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

Issue 61163005: Fix a bug in the type inferrer. (Closed)

Created:
7 years, 1 month ago by ngeoffray
Modified:
7 years, 1 month ago
Reviewers:
lukas, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix a bug in the type inferrer. The optimization for non-final fields initialized in a generative constructor did not take into account whether the super constructor call escapes 'this', or uses an un-initialized field. The fix is to ensure we analyze the super constructor first before analyzing a constructor. R=lry@google.com Committed: https://code.google.com/p/dart/source/detail?r=30408

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -48 lines) Patch
M sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart View 1 8 chunks +34 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart View 5 chunks +53 lines, -43 lines 0 comments Download
A tests/language/inferrer_constructor4_test.dart View 1 chunk +26 lines, -0 lines 0 comments Download
A tests/language/inferrer_constructor5_test.dart View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
7 years, 1 month ago (2013-11-19 09:35:49 UTC) #1
lukas
lgtm https://codereview.chromium.org/61163005/diff/30001/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart File sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart (right): https://codereview.chromium.org/61163005/diff/30001/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart#newcode612 sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart:612: return (element.getEnclosingClass() == cls) element.getEnclosingClass() -> enclosing
7 years, 1 month ago (2013-11-19 11:49:56 UTC) #2
ngeoffray
Thanks Lukas. https://codereview.chromium.org/61163005/diff/30001/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart File sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart (right): https://codereview.chromium.org/61163005/diff/30001/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart#newcode612 sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart:612: return (element.getEnclosingClass() == cls) On 2013/11/19 11:49:56, ...
7 years, 1 month ago (2013-11-19 12:49:38 UTC) #3
ngeoffray
7 years, 1 month ago (2013-11-19 12:57:03 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 manually as r30408 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698