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

Issue 19200002: Change resolving of instance methods to check early for name mismatch. (Closed)

Created:
7 years, 5 months ago by Florian Schneider
Modified:
7 years, 5 months ago
Reviewers:
regis, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org, regis
Visibility:
Public.

Description

Change resolving of instance methods to check early for name mismatch. The names of actual arguments are checked at resolving time for a mismatch instead of deferring this check to the function prologue (emitted as part of the CopyParameters() prologue). For example: class A { foo({a:42}) => null; } main() { var a = new A(); a.foo(b:123); // noSuchMethod: no named parameter named "b". } This enables e.g. fast noSuchMethod invocation in the case of a named argument mismatch. It also makes the function prologue for instance functions that use optional parameters shorter by omitting the check for a name mismatch there. R=regis@google.com Committed: https://code.google.com/p/dart/source/detail?r=25041

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -193 lines) Patch
M runtime/lib/invocation_mirror.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M runtime/lib/mirrors.cc View 1 1 chunk +5 lines, -6 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 4 chunks +12 lines, -19 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 7 chunks +25 lines, -16 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 4 chunks +12 lines, -11 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 3 chunks +33 lines, -22 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 3 chunks +32 lines, -21 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 3 chunks +32 lines, -21 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 3 chunks +32 lines, -21 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 3 chunks +13 lines, -10 lines 0 comments Download
M runtime/vm/object.h View 1 2 chunks +6 lines, -3 lines 0 comments Download
M runtime/vm/object.cc View 1 4 chunks +56 lines, -8 lines 0 comments Download
M runtime/vm/resolver.h View 1 4 chunks +5 lines, -6 lines 0 comments Download
M runtime/vm/resolver.cc View 1 5 chunks +8 lines, -14 lines 0 comments Download
M runtime/vm/resolver_test.cc View 1 2 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
https://codereview.chromium.org/19200002/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (left): https://codereview.chromium.org/19200002/diff/1/runtime/vm/dart_api_impl.cc#oldcode2965 runtime/vm/dart_api_impl.cc:2965: Resolver::kIsQualified)); This looks like a copy-paste mistake: enum is ...
7 years, 5 months ago (2013-07-15 14:22:40 UTC) #1
regis
LGTM (Srdjan is ooo today)
7 years, 5 months ago (2013-07-15 16:53:17 UTC) #2
Florian Schneider
On 2013/07/15 16:53:17, regis wrote: > LGTM > > (Srdjan is ooo today) Thanks for ...
7 years, 5 months ago (2013-07-16 08:53:14 UTC) #3
Florian Schneider
7 years, 5 months ago (2013-07-16 09:38:24 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 manually as r25041 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698