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

Issue 23020025: Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}. (Closed)

Created:
7 years, 4 months ago by Michael Lippautz (Google)
Modified:
7 years, 3 months ago
Reviewers:
ahe, rmacnak, gbracha, siva, hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}. Fixes issue 12196 and partially addresses issue 12430. BUG= R=ahe@google.com, asiva@google.com, gbracha@google.com Committed: https://code.google.com/p/dart/source/detail?r=26730

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 9

Patch Set 7 : #

Total comments: 15

Patch Set 8 : Addressed comments + rebase #

Total comments: 1

Patch Set 9 : Addressed further comments. #

Total comments: 5

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+302 lines, -126 lines) Patch
M runtime/lib/mirrors.cc View 1 2 3 4 5 6 7 8 13 chunks +111 lines, -99 lines 0 comments Download
M runtime/lib/mirrors_impl.dart View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -9 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
M sdk/lib/mirrors/mirrors.dart View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
M tests/lib/lib.status View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A + tests/lib/mirrors/parameter_dart2js_test.dart View 1 2 3 4 5 6 7 8 9 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/lib/mirrors/parameter_test.dart View 1 2 3 4 5 6 7 8 9 2 chunks +104 lines, -10 lines 0 comments Download
M tests/lib/mirrors/stringify.dart View 1 2 3 4 3 chunks +15 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Michael Lippautz (Google)
Right now we don't have the required information stored somewhere, so we reparse the function ...
7 years, 4 months ago (2013-08-21 20:37:36 UTC) #1
gbracha
API lgtm
7 years, 4 months ago (2013-08-21 23:02:11 UTC) #2
rmacnak
https://codereview.chromium.org/23020025/diff/10001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/23020025/diff/10001/runtime/lib/mirrors.cc#newcode192 runtime/lib/mirrors.cc:192: args.SetAt(6, is_final.value() ? Bool::True() : Bool::False()); is_final is already ...
7 years, 4 months ago (2013-08-23 23:15:27 UTC) #3
Michael Lippautz (Google)
https://codereview.chromium.org/23020025/diff/10001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/23020025/diff/10001/runtime/lib/mirrors.cc#newcode192 runtime/lib/mirrors.cc:192: args.SetAt(6, is_final.value() ? Bool::True() : Bool::False()); On 2013/08/23 23:15:27, ...
7 years, 4 months ago (2013-08-24 00:17:20 UTC) #4
siva
https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc#newcode82 runtime/lib/mirrors.cc:82: } What about args 3 and 4, you should ...
7 years, 3 months ago (2013-08-26 05:05:42 UTC) #5
hausner
https://codereview.chromium.org/23020025/diff/18001/runtime/vm/parser.h File runtime/vm/parser.h (right): https://codereview.chromium.org/23020025/diff/18001/runtime/vm/parser.h#newcode147 runtime/vm/parser.h:147: static RawObject* ParseFunctionParameters(const Function& func); Please add a comment ...
7 years, 3 months ago (2013-08-26 15:40:51 UTC) #6
Michael Lippautz (Google)
https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc#newcode82 runtime/lib/mirrors.cc:82: } On 2013/08/26 05:05:43, siva wrote: > What about ...
7 years, 3 months ago (2013-08-26 19:45:56 UTC) #7
siva
LGTM with one comment. https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://codereview.chromium.org/23020025/diff/18001/runtime/lib/mirrors.cc#newcode177 runtime/lib/mirrors.cc:177: const Array& param_descriptor = Array::Cast(result); ...
7 years, 3 months ago (2013-08-27 00:31:01 UTC) #8
ahe
Provided you don't reduce test coverage of dart2js, all the Dart code LGTM! https://codereview.chromium.org/23020025/diff/31001/runtime/lib/mirrors_impl.dart File ...
7 years, 3 months ago (2013-08-27 16:48:38 UTC) #9
Michael Lippautz (Google)
https://codereview.chromium.org/23020025/diff/31001/runtime/lib/mirrors_impl.dart File runtime/lib/mirrors_impl.dart (right): https://codereview.chromium.org/23020025/diff/31001/runtime/lib/mirrors_impl.dart#newcode1107 runtime/lib/mirrors_impl.dart:1107: InstanceMirror _defaultValue = null; On 2013/08/27 16:48:38, ahe wrote: ...
7 years, 3 months ago (2013-08-27 17:30:15 UTC) #10
Michael Lippautz (Google)
Committed patchset #10 manually as r26730 (presubmit successful).
7 years, 3 months ago (2013-08-27 17:31:37 UTC) #11
ahe
7 years, 3 months ago (2013-08-27 17:33:06 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/23020025/diff/31001/tests/lib/lib.status
File tests/lib/lib.status (right):

https://codereview.chromium.org/23020025/diff/31001/tests/lib/lib.status#newc...
tests/lib/lib.status:26: mirrors/parameter_dart_test: Fail # Issue 6490
On 2013/08/27 17:30:15, Michael Lippautz wrote:
> On 2013/08/27 16:48:38, ahe wrote:
> > This means dart2js gets less test coverage. Please either create a new test,
> or
> > add a bool like isDart2js in mirrors_test.dart.
> 
> As discussed "offline", renaming files appropriately. dart2js still gets the
> same coverage as before, since tests are spread across 2 files:
> * tests/lib/mirrors/param_test.dart (full version)
> * tests/lib/mirrors/param_dart2js_test.dart (trimmed down version for dart2js)

Thank you. I had overlooked that the test was a copy.

Powered by Google App Engine
This is Rietveld 408576698