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

Issue 10945020: Add virtual method to Object to ease dictionary code (Closed)

Created:
8 years, 3 months ago by hausner
Modified:
8 years, 3 months ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add virtual method to Object to ease dictionary code Add a virtual method at the root of the object hierarchy that returns the name of the object that is used in the namespace dictionary. Only object types that are kept in the dictionary need to overwrite the default implementation. Committed: https://code.google.com/p/dart/source/detail?r=12577

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -37 lines) Patch
M runtime/vm/object.h View 1 2 5 chunks +13 lines, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 4 chunks +12 lines, -36 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
hausner
A small step towards better namespace implementation.
8 years, 3 months ago (2012-09-19 00:05:39 UTC) #1
regis
LGTM, but why not reuse the existing name() and Name() methods of the different objects ...
8 years, 3 months ago (2012-09-19 01:22:57 UTC) #2
hausner
Thanks for the review. We used Name() in some classes and name() in others. So ...
8 years, 3 months ago (2012-09-19 18:02:22 UTC) #3
regis
8 years, 3 months ago (2012-09-19 18:59:42 UTC) #4
On 2012/09/19 18:02:22, hausner wrote:
> Thanks for the review. We used Name() in some classes and name() in others. So
I
> introduced a new function that can pick whichever name is appropriate as
> dictionary key.

By "picking a common name", I meant we could rename "name()" to "Name()" and
make it virtual. You would then use it instead of the one you introduced.

Powered by Google App Engine
This is Rietveld 408576698