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

Issue 101823004: We inline List allocations in dart2js to get the right behavior when the passed length is null. Thi… (Closed)

Created:
7 years ago by ngeoffray
Modified:
7 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

We inline List allocations in dart2js to get the right behavior when the passed length is null. This CL fixes the constructor when invoked through mirrors. R=johnniwinther@google.com Committed: https://code.google.com/p/dart/source/detail?r=31010

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -3 lines) Patch
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 1 chunk +4 lines, -1 line 2 comments Download
M sdk/lib/_internal/lib/core_patch.dart View 1 chunk +7 lines, -2 lines 0 comments Download
M tests/lib/lib.status View 1 chunk +1 line, -0 lines 0 comments Download
A tests/lib/mirrors/list_constructor_test.dart View 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ngeoffray
7 years ago (2013-12-09 12:01:50 UTC) #1
Johnni Winther
https://codereview.chromium.org/101823004/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/101823004/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode322 sdk/lib/_internal/compiler/implementation/resolution/members.dart:322: if (originParameterName != patchParameterName) { With this change, we ...
7 years ago (2013-12-09 12:11:01 UTC) #2
ngeoffray
PTAL. https://codereview.chromium.org/101823004/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/101823004/diff/1/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode322 sdk/lib/_internal/compiler/implementation/resolution/members.dart:322: if (originParameterName != patchParameterName) { On 2013/12/09 12:11:01, ...
7 years ago (2013-12-09 15:24:16 UTC) #3
Johnni Winther
lgtm
7 years ago (2013-12-09 20:05:33 UTC) #4
ngeoffray
Committed patchset #2 manually as r31010 (presubmit successful).
7 years ago (2013-12-10 09:27:18 UTC) #5
ahe
https://codereview.chromium.org/101823004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/101823004/diff/20001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode330 sdk/lib/_internal/compiler/implementation/resolution/members.dart:330: && origin != compiler.unnamedListConstructor) { Why is a special ...
7 years ago (2013-12-10 18:57:44 UTC) #6
ngeoffray
7 years ago (2013-12-10 22:08:31 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/101823004/diff/20001/sdk/lib/_internal/compil...
File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right):

https://codereview.chromium.org/101823004/diff/20001/sdk/lib/_internal/compil...
sdk/lib/_internal/compiler/implementation/resolution/members.dart:330: && origin
!= compiler.unnamedListConstructor) {
On 2013/12/10 18:57:44, ahe wrote:
> Why is a special case needed?
> 
> Why can't the public code and the patch file agree?

The patch code says:
factory List([int length = const _Internal()])

The public code says:
factory List([int length]).

Powered by Google App Engine
This is Rietveld 408576698