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

Issue 23486007: Change the field and constructor parameter types of NoSuchMethodError to Symbol. (Closed)

Created:
7 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 3 months ago
Reviewers:
ahe, floitsch, regis, ngeoffray
CC:
reviews_dartlang.org, vm-dev_dartlang.org, ahe, rmacnak
Visibility:
Public.

Description

Change the field and constructor parameter types of NoSuchMethodError to Symbol. The NSME uses strings for names. It should use symbols. This change modifies the VM libraries only enough to make the signature change not crash. It will probably need cleanup to ensure that symbols are passed to the internal constructor directly, instead of strings that have to be converted. (Also fixes a type error in Map.fromIterable that was hit by the code). BUG= http://dartbug.com/11190 R=ahe@google.com, regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=26985

Patch Set 1 #

Total comments: 2

Patch Set 2 : Handle named arguments better in js_mirror #

Total comments: 12

Patch Set 3 : Address review comments. #

Total comments: 6

Patch Set 4 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -86 lines) Patch
M pkg/unittest/test/matchers_minified_test.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/unittest/test/matchers_unminified_test.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/lib/errors_patch.dart View 6 chunks +33 lines, -18 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/lib/core_patch.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/lib/interceptors.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/lib/js_mirrors.dart View 1 2 3 12 chunks +16 lines, -23 lines 0 comments Download
M sdk/lib/collection/hash_map.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/collection/linked_hash_map.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/core/errors.dart View 1 2 3 1 chunk +27 lines, -13 lines 0 comments Download
M sdk/lib/core/map.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/js/dartium/js_dartium.dart View 1 chunk +2 lines, -1 line 0 comments Download
M tests/co19/co19-co19.status View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M tests/corelib/linked_hash_map_from_iterable_test.dart View 1 chunk +8 lines, -3 lines 0 comments Download
M tests/corelib/map_from_iterable_test.dart View 7 chunks +16 lines, -15 lines 0 comments Download
M tests/language/call_nonexistent_static_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Lasse Reichstein Nielsen
7 years, 3 months ago (2013-08-29 15:11:28 UTC) #1
regis
LGTM Cc'ing Ryan who is currently working in that area with mirrors.
7 years, 3 months ago (2013-08-29 23:42:42 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/23486007/diff/1/sdk/lib/_internal/lib/js_mirrors.dart File sdk/lib/_internal/lib/js_mirrors.dart (right): https://codereview.chromium.org/23486007/diff/1/sdk/lib/_internal/lib/js_mirrors.dart#newcode512 sdk/lib/_internal/lib/js_mirrors.dart:512: // TODO(ahe): Pass namedArguments when NoSuchMethodError has Just noticed ...
7 years, 3 months ago (2013-08-30 05:49:09 UTC) #3
ahe
sdk/... and tests/... LGTM (assuming you rename the method "a"). https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart File sdk/lib/_internal/lib/js_mirrors.dart (right): https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart#newcode381 ...
7 years, 3 months ago (2013-08-30 06:46:35 UTC) #4
ngeoffray
DBC https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart File sdk/lib/_internal/lib/js_mirrors.dart (right): https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart#newcode256 sdk/lib/_internal/lib/js_mirrors.dart:256: throw new NoSuchMethodError(this, filedName, [], null); filedName ? ...
7 years, 3 months ago (2013-08-30 06:51:11 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart File sdk/lib/_internal/lib/js_mirrors.dart (right): https://codereview.chromium.org/23486007/diff/5001/sdk/lib/_internal/lib/js_mirrors.dart#newcode256 sdk/lib/_internal/lib/js_mirrors.dart:256: throw new NoSuchMethodError(this, filedName, [], null); On 2013/08/30 06:51:12, ...
7 years, 3 months ago (2013-08-30 14:06:02 UTC) #6
floitsch
DBC. https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart File sdk/lib/core/errors.dart (right): https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart#newcode172 sdk/lib/core/errors.dart:172: * That is, the object on which the ...
7 years, 3 months ago (2013-08-30 15:36:44 UTC) #7
Lasse Reichstein Nielsen
Committed patchset #4 manually as r26985 (presubmit successful).
7 years, 3 months ago (2013-09-02 05:58:17 UTC) #8
Lasse Reichstein Nielsen
7 years, 3 months ago (2013-09-02 09:36:28 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart
File sdk/lib/core/errors.dart (right):

https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart#...
sdk/lib/core/errors.dart:172: * That is, the object on which the method was
attempted called.
I think the original sounds more correct, "attempted to be called" doesn't sound
right.

https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart#...
sdk/lib/core/errors.dart:173: * If this is `null`, it is interpreted as a call
to a top-level function
As a rule of thumb, I try to avoid "it" as well. It too easily becomes
ambiguous, and since I know what it means, it's hard to see. Change to "If the
receiver is `null`,"

https://codereview.chromium.org/23486007/diff/14001/sdk/lib/core/errors.dart#...
sdk/lib/core/errors.dart:176: * The [memberNamed] is a [Symbol] representing the
name of the called method
On 2013/08/30 15:36:44, floitsch wrote:
> memberName

Done.

Powered by Google App Engine
This is Rietveld 408576698