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

Issue 10979058: - Implement first class types in the VM. (Closed)

Created:
8 years, 2 months ago by Ivan Posva
Modified:
8 years, 2 months ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

- Implement first class types in the VM. - Make AbstractType a subclass of Instance and map it and its subclasses to private Dart classes in dart:core implementing the Type interface. - Avoid dispatching through statics in Object if not strictly needed. Committed: https://code.google.com/p/dart/source/detail?r=12981

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1251 lines, -1197 lines) Patch
M runtime/lib/lib_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/lib/object.cc View 1 chunk +13 lines, -0 lines 2 comments Download
M runtime/lib/object_patch.dart View 1 chunk +5 lines, -10 lines 0 comments Download
A runtime/lib/type_patch.dart View 1 chunk +18 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 4 chunks +287 lines, -291 lines 0 comments Download
M runtime/vm/object.cc View 8 chunks +846 lines, -829 lines 0 comments Download
M runtime/vm/object_store.h View 2 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 4 chunks +54 lines, -54 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M runtime/vm/symbols.h View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/first_class_types_test.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Ivan Posva
8 years, 2 months ago (2012-09-27 20:50:04 UTC) #1
regis
LGTM That was simpler than I expected. Very cool! https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc File runtime/lib/object.cc (right): https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc#newcode68 runtime/lib/object.cc:68: ...
8 years, 2 months ago (2012-09-27 21:12:40 UTC) #2
Ivan Posva
https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc File runtime/lib/object.cc (right): https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc#newcode68 runtime/lib/object.cc:68: return type.Name(); On 2012/09/27 21:12:40, regis wrote: > You ...
8 years, 2 months ago (2012-09-27 21:25:12 UTC) #3
regis
8 years, 2 months ago (2012-09-27 21:30:24 UTC) #4
On 2012/09/27 21:25:12, Ivan Posva wrote:
> https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc
> File runtime/lib/object.cc (right):
> 
>
https://codereview.chromium.org/10979058/diff/1/runtime/lib/object.cc#newcode68
> runtime/lib/object.cc:68: return type.Name();
> On 2012/09/27 21:12:40, regis wrote:
> > You may consider returning UserVisibleName() instead of Name().
> 
> I specifically chose Name and not UserVisibleName to avoid the confusion when
> for example "int" is not the same as "int" since we have two different actual
> int types.

As long as you are aware of the difference, I am fine with your chosen flavor.
Name() is definitely more accurate, since it does not map any type name, but may
be more confusing to the average user. I suppose that users who will use this
functionality understand that we have implementation types.

Powered by Google App Engine
This is Rietveld 408576698