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

Issue 10829041: Fix Function::NumberOfImplicitParameters() for closure functions. (Closed)

Created:
8 years, 5 months ago by regis
Modified:
8 years, 5 months ago
Reviewers:
rmacnak, srdjan, siva, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix Function::NumberOfImplicitParameters() for closure functions. Related to cl 10831021. Committed: https://code.google.com/p/dart/source/detail?r=9957

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M runtime/tests/vm/vm.status View 1 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
8 years, 5 months ago (2012-07-26 18:24:26 UTC) #1
Ivan Posva
LGTM with comment about comments. -Ivan https://chromiumcodereview.appspot.com/10829041/diff/1/runtime/vm/object.cc File runtime/vm/object.cc (right): https://chromiumcodereview.appspot.com/10829041/diff/1/runtime/vm/object.cc#newcode3799 runtime/vm/object.cc:3799: if (!is_static()) { ...
8 years, 5 months ago (2012-07-26 18:30:54 UTC) #2
regis
8 years, 5 months ago (2012-07-26 18:43:19 UTC) #3
Thanks

https://chromiumcodereview.appspot.com/10829041/diff/1/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://chromiumcodereview.appspot.com/10829041/diff/1/runtime/vm/object.cc#n...
runtime/vm/object.cc:3799: if (!is_static()) {
On 2012/07/26 18:30:55, Ivan Posva wrote:
> How about
> 
> if (!is_static() && (kind() != RawFunction::kClosureFunction) {
> 
> then you return 0 below with the correct comment: "No implicit parameters."
> 
> The way it is written now is kind of magic. At least adding a comment in the
> added code would help understanding.

Done.

Powered by Google App Engine
This is Rietveld 408576698