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

Issue 2793033005: Keep types in signatures of function types properly instantiated as the function (Closed)

Created:
3 years, 8 months ago by regis
Modified:
3 years, 8 months ago
Reviewers:
rmacnak, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Keep types in signatures of function types properly instantiated as the function type itself gets instantiated. Until now, the signature was kept unchanged and the instantiation was reflected by the type arguments of the function type only. This delayed instantiation would complicate the implementation of generic functions. This cl actually removes type arguments for (non-typedef) function types. The function type is now fully represented by the signature. When the function type is instantiated, a new signature is allocated (instead of a new type argument vector) to hold instantiated result type and formal parameter types. The same applies in the case of typedef function types, however, the type arguments of the typedef are kept as before. This allows for better printing of typedef function types and for finalization of recursive type involving typedefs as type arguments. R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/5f5a698100be7b145168490dfb81cd436ce1b8ff

Patch Set 1 #

Total comments: 2

Patch Set 2 : added comment and sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -331 lines) Patch
M runtime/lib/mirrors.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M runtime/lib/mirrors_impl.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/class_finalizer.cc View 1 3 chunks +63 lines, -35 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M runtime/vm/object.h View 1 6 chunks +22 lines, -45 lines 0 comments Download
M runtime/vm/object.cc View 1 34 chunks +195 lines, -236 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
regis
This is one more cleanup/improvement that will simplify reification of generic functions.
3 years, 8 months ago (2017-04-04 17:19:46 UTC) #2
siva
lgtm https://codereview.chromium.org/2793033005/diff/1/runtime/vm/class_finalizer.cc File runtime/vm/class_finalizer.cc (right): https://codereview.chromium.org/2793033005/diff/1/runtime/vm/class_finalizer.cc#newcode1270 runtime/vm/class_finalizer.cc:1270: } ASSERT(signature.HasInstantiatedSignature()) here? or is it that if ...
3 years, 8 months ago (2017-04-06 19:08:33 UTC) #3
regis
Thanks! https://codereview.chromium.org/2793033005/diff/1/runtime/vm/class_finalizer.cc File runtime/vm/class_finalizer.cc (right): https://codereview.chromium.org/2793033005/diff/1/runtime/vm/class_finalizer.cc#newcode1270 runtime/vm/class_finalizer.cc:1270: } On 2017/04/06 19:08:33, siva wrote: > ASSERT(signature.HasInstantiatedSignature()) ...
3 years, 8 months ago (2017-04-06 19:28:38 UTC) #4
regis
3 years, 8 months ago (2017-04-06 19:28:59 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
5f5a698100be7b145168490dfb81cd436ce1b8ff (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698