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

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed)

Created:
8 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 1 month ago
CC:
reviews_dartlang.org, Ivan Posva, kasperl, Anton Muhin, Mads Ager (google), gram
Visibility:
Public.

Description

Change signature of noSuchMethod to take an InvocationMirror. Requires VM and dart2js/dart2dart changes to work. Committed: https://code.google.com/p/dart/source/detail?r=14198 Committed: https://code.google.com/p/dart/source/detail?r=14254 Committed: https://code.google.com/p/dart/source/detail?r=14324

Patch Set 1 #

Total comments: 11

Patch Set 2 : Merged dart2js changes into this CL. #

Total comments: 3

Patch Set 3 : Small fix #

Patch Set 4 : merge to tip of tree #

Patch Set 5 : Fix dart2js, update tests, expectations. #

Total comments: 4

Patch Set 6 : Addressed review comments. Merge to tip of tree. #

Patch Set 7 : Updated to tip of tree. #

Patch Set 8 : Fix more bugs in expectations. Known bug in VM static class. #

Patch Set 9 : Added more VM implementation. #

Patch Set 10 : One more test expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+384 lines, -162 lines) Patch
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M lib/compiler/implementation/compiler.dart View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -0 lines 0 comments Download
M lib/compiler/implementation/enqueue.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M lib/compiler/implementation/js_backend/emitter.dart View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -3 lines 0 comments Download
M lib/compiler/implementation/lib/core_patch.dart View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -2 lines 0 comments Download
M lib/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 5 chunks +62 lines, -4 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M lib/compiler/implementation/universe/universe.dart View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M lib/core/errors.dart View 1 2 3 4 5 2 chunks +33 lines, -16 lines 0 comments Download
M lib/core/object.dart View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 1 chunk +10 lines, -3 lines 0 comments Download
M lib/html/templates/html/impl/impl_Element.darttemplate View 1 2 3 4 5 6 7 1 chunk +10 lines, -3 lines 0 comments Download
M pkg/pkg.status View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M pkg/unittest/mock.dart View 1 2 3 4 5 6 1 chunk +10 lines, -3 lines 0 comments Download
M runtime/lib/invocation_mirror_patch.dart View 1 4 1 chunk +6 lines, -2 lines 0 comments Download
M runtime/lib/object.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/lib/object_patch.dart View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 4 5 6 1 chunk +30 lines, -10 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 6 7 8 1 chunk +44 lines, -14 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -1 line 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 8 4 chunks +36 lines, -11 lines 0 comments Download
M runtime/vm/stack_frame_test.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/symbols.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M tests/co19/co19-compiler.status View 1 2 3 4 5 6 3 chunks +0 lines, -11 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -8 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 8 6 chunks +9 lines, -10 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 3 4 5 6 7 8 4 chunks +3 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/dart_backend_test.dart View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
tests/compiler/dart2js_extra/dart2js_extra.status View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js_extra/no_such_method_test.dart View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M tests/compiler/dart2js_extra/optional_parameter_test.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js_native/native_no_such_method_exception3_frog_test.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js_native/native_no_such_method_exception4_frog_test.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js_native/native_no_such_method_exception5_frog_test.dart View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M tests/corelib/core_runtime_types_test.dart View 1 2 3 4 5 6 1 chunk +4 lines, -10 lines 0 comments Download
M tests/language/call_nonexistent_static_test.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -5 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M tests/language/no_such_method_test.dart View 1 2 3 4 1 chunk +7 lines, -9 lines 0 comments Download
M tests/language/overridden_no_such_method.dart View 1 4 1 chunk +3 lines, -2 lines 0 comments Download
M tests/language/super_call4_test.dart View 1 chunk +2 lines, -4 lines 0 comments Download
M tests/utils/dummy_compiler_test.dart View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M tests/utils/recursive_import_test.dart View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Lasse Reichstein Nielsen
Contacting VM/dart2* for compatibility CLs.
8 years, 2 months ago (2012-10-23 12:47:40 UTC) #1
Anton Muhin
dart:html changes lgtm
8 years, 2 months ago (2012-10-23 12:49:12 UTC) #2
floitsch
LGTM. added Gram (because of change to pkg/unittest). https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart#newcode68 lib/core/errors.dart:68: final ...
8 years, 2 months ago (2012-10-23 13:04:34 UTC) #3
Ivan Posva
+regis I am failing to see the actual implementation of the InvocationMirror class in this ...
8 years, 1 month ago (2012-10-24 22:17:20 UTC) #4
regis
https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart#newcode68 lib/core/errors.dart:68: final Map<String,Dynamic> _namedArguments; On 2012/10/23 13:04:35, floitsch wrote: > ...
8 years, 1 month ago (2012-10-25 02:27:56 UTC) #5
Lasse Reichstein Nielsen
https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart#newcode68 lib/core/errors.dart:68: final Map<String,Dynamic> _namedArguments; On 2012/10/23 13:04:35, floitsch wrote: > ...
8 years, 1 month ago (2012-10-25 06:17:35 UTC) #6
Lasse Reichstein Nielsen
> It is interesting that for obj of class X{bar(int x){} noSuchMethod(x){}}: > obj.bar(2,3) will ...
8 years, 1 month ago (2012-10-25 08:00:53 UTC) #7
Lasse Reichstein Nielsen
And as a side note, the behavior on static calls is not affected by this ...
8 years, 1 month ago (2012-10-25 09:04:39 UTC) #8
regis
LGTM https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart#newcode74 lib/core/errors.dart:74: * The first parameter is the receiver of ...
8 years, 1 month ago (2012-10-25 17:47:16 UTC) #9
regis
On 2012/10/25 08:00:53, Lasse Reichstein Nielsen wrote: > > It is interesting that for obj ...
8 years, 1 month ago (2012-10-25 20:37:39 UTC) #10
Ivan Posva
May I reiterate my question from earlier: Where is the InvocationMirror implementation class? Thanks, -Ivan ...
8 years, 1 month ago (2012-10-26 02:34:26 UTC) #11
Lasse Reichstein Nielsen
The implementation is in runtime/lib/invocation_mirror_patch.dart It is already committed, and isn't part of this CL.
8 years, 1 month ago (2012-10-26 11:33:18 UTC) #12
regis
https://codereview.chromium.org/11231074/diff/11001/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/11001/lib/core/errors.dart#newcode78 lib/core/errors.dart:78: final Map<String, dynamic> _namedArguments; Why not an InvocationMirror, instead ...
8 years, 1 month ago (2012-10-26 23:27:08 UTC) #13
Lasse Reichstein Nielsen
On 2012/10/25 20:37:39, regis wrote: > You mean, do *not* work the same, right? No, ...
8 years, 1 month ago (2012-10-27 21:13:47 UTC) #14
Lasse Reichstein Nielsen
On 2012/10/25 17:47:16, regis wrote: > LGTM > > https://codereview.chromium.org/11231074/diff/1/lib/core/errors.dart > File lib/core/errors.dart (right): > ...
8 years, 1 month ago (2012-10-27 21:52:38 UTC) #15
Lasse Reichstein Nielsen
https://codereview.chromium.org/11231074/diff/11001/lib/core/errors.dart File lib/core/errors.dart (right): https://codereview.chromium.org/11231074/diff/11001/lib/core/errors.dart#newcode78 lib/core/errors.dart:78: final Map<String, dynamic> _namedArguments; Two reasons. The first is ...
8 years, 1 month ago (2012-10-27 21:52:45 UTC) #16
Lasse Reichstein Nielsen
Johnni, please take a look at the dart2js changes.
8 years, 1 month ago (2012-10-29 11:01:45 UTC) #17
Johnni Winther
LGTM with comments. https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementation/lib/js_helper.dart File lib/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementation/lib/js_helper.dart#newcode377 lib/compiler/implementation/lib/js_helper.dart:377: if (_namedArgumentNames != null && _namedArgumentNames.length ...
8 years, 1 month ago (2012-10-29 12:05:55 UTC) #18
Johnni Winther
On 2012/10/29 12:05:55, Johnni Winther wrote: > LGTM with comments. > > https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementation/lib/js_helper.dart > File ...
8 years, 1 month ago (2012-10-29 12:19:01 UTC) #19
Lasse Reichstein Nielsen
8 years, 1 month ago (2012-10-30 10:03:31 UTC) #20
https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementati...
File lib/compiler/implementation/lib/js_helper.dart (right):

https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementati...
lib/compiler/implementation/lib/js_helper.dart:377: if (_namedArgumentNames !=
null && _namedArgumentNames.length > 0) {
Hmm, we could probably do it at that point instead. I'll try a rewrite.

https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementati...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://codereview.chromium.org/11231074/diff/20002/lib/compiler/implementati...
lib/compiler/implementation/ssa/codegen.dart:1518: // If [noSuchMethod] has been
overridden and [InvocationMirror.invokeOn]
On 2012/10/29 12:05:55, Johnni Winther wrote:
> Change to 'If [JSInvocationMirror.invokeOn] has been called ...'

Done.

Powered by Google App Engine
This is Rietveld 408576698