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

Issue 1297503006: Clarifies the status of implicit accessors; fixed several related bugs. (Closed)

Created:
5 years, 4 months ago by eernst
Modified:
5 years, 4 months ago
Reviewers:
sigurdm
CC:
eernst+reviews_google.com, reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/reflectable.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Clarified the status of implicit accessors; fixed several related bugs. Added a test 'implicit_getter_setter_test.dart' which explores the properties of implicit getters and setters for various kinds of instance and static variable declarations. Refactored the representation of mirrors in transformed code, in order to enable unusual things for this purpose: The parameter of an implicit setter has a special name, finding the owner of several of the relevant mirrors used to involve some circularities (that we couldn't see how to break with the old setup), Deleted several declarations which are not used because of the refactoring. Deleted code which used to create implicit accessor mirrors (actually it was dead code, which was one of the bugs, but now it's replaced by different code in a different location). Implemented `staticMembers` on `ClassMirrorImpl` in order to support static implicit accessors, and added various members earlier in the pipeline to support it (`_staticMemberCache` and others). Reclassified 'parameter_mirrors_test.dart' in .status: It is actually blocked by the same issue #8 as some other tests (moving code for the value of default arguments). R=sigurdm@google.com Committed: https://github.com/dart-lang/reflectable/commit/49c7a5647e460844a1407493573d8e24abd77616

Patch Set 1 #

Total comments: 8

Patch Set 2 : Review response. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -99 lines) Patch
M reflectable/lib/src/mirrors_unimpl.dart View 1 9 chunks +185 lines, -65 lines 0 comments Download
M reflectable/lib/src/transformer_implementation.dart View 1 12 chunks +95 lines, -30 lines 0 comments Download
M reflectable/test/mock_tests/check_literal_transform_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M test_reflectable/.status View 1 chunk +2 lines, -2 lines 0 comments Download
M test_reflectable/pubspec.yaml View 1 chunk +1 line, -0 lines 0 comments Download
A test_reflectable/test/implicit_getter_setter_test.dart View 1 chunk +208 lines, -0 lines 0 comments Download
M test_reflectable/test/parameter_test.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M tool/Makefile View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (1 generated)
eernst
Refactors representation of information about fields and associated implicit accessors, such that we can support ...
5 years, 4 months ago (2015-08-20 08:53:51 UTC) #2
sigurdm
LGTM https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors_unimpl.dart File reflectable/lib/src/mirrors_unimpl.dart (right): https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors_unimpl.dart#newcode547 reflectable/lib/src/mirrors_unimpl.dart:547: _unsupported(); Add comment describing what causes -1. Maybe ...
5 years, 4 months ago (2015-08-20 09:39:53 UTC) #3
eernst
Will land. Refactoring of the test that fails because of moving code (`const C()` not ...
5 years, 4 months ago (2015-08-20 10:43:25 UTC) #4
eernst
Committed patchset #2 (id:20001) manually as 49c7a5647e460844a1407493573d8e24abd77616 (presubmit successful).
5 years, 4 months ago (2015-08-20 10:44:17 UTC) #5
sigurdm
https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors_unimpl.dart File reflectable/lib/src/mirrors_unimpl.dart (right): https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors_unimpl.dart#newcode547 reflectable/lib/src/mirrors_unimpl.dart:547: _unsupported(); On 2015/08/20 09:39:52, sigurdm wrote: > Add comment ...
5 years, 4 months ago (2015-08-20 10:46:34 UTC) #6
eernst
5 years, 4 months ago (2015-08-20 12:55:11 UTC) #7
Message was sent while issue was closed.
Review response; future CL upcoming, containing things missing in here.

https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors...
File reflectable/lib/src/mirrors_unimpl.dart (right):

https://codereview.chromium.org/1297503006/diff/1/reflectable/lib/src/mirrors...
reflectable/lib/src/mirrors_unimpl.dart:547: _unsupported();
On 2015/08/20 10:46:34, sigurdm wrote:
> On 2015/08/20 09:39:52, sigurdm wrote:
> > Add comment describing what causes -1.
> > Maybe unsupported could take a string describing what exactly was
unsupported.
> 
> Did you overlook this?

Forgot it half-way through.

Looked into it again, added TODOs: (1) when that index is generated, it is a bug
if the corresponding class is not in `classes`, (2) at this point `-1` means
'without capability`, so we throw for that). Remaining issue: How do we
recognize that there is no support for function types, and how do we catch
`dynamic`? (3) Added that to the TODO, too.

Powered by Google App Engine
This is Rietveld 408576698