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 1148333003: No dynamic at runtime (Closed)

Created:
5 years, 7 months ago by Leaf
Modified:
5 years, 7 months ago
Reviewers:
vsm
CC:
dev-compiler+reviews_dartlang.org, Jennifer Messerly
Base URL:
git@github.com:dart-lang/dev_compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

No dynamic at runtime. Reify dynamic as bottom or Object as appropriate in the generated code. For general function types, dynamic parameters become bottom, and all other uses of dynamic become Object. For concrete function types (the rtti attached to function objects) dynamic parameters also become Object. BUG= R=vsm@google.com Committed: https://github.com/dart-lang/dev_compiler/commit/cb4ac2a65c306b170a98479bd40bbeaa9677db19

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+737 lines, -709 lines) Patch
M lib/runtime/dart/_foreign_helper.js View 3 chunks +7 lines, -7 lines 0 comments Download
M lib/runtime/dart/_interceptors.js View 1 6 chunks +11 lines, -11 lines 0 comments Download
M lib/runtime/dart/_internal.js View 1 18 chunks +61 lines, -61 lines 0 comments Download
M lib/runtime/dart/_isolate_helper.js View 1 17 chunks +68 lines, -68 lines 0 comments Download
M lib/runtime/dart/_js_helper.js View 1 62 chunks +145 lines, -145 lines 0 comments Download
M lib/runtime/dart/_js_names.js View 2 chunks +3 lines, -3 lines 0 comments Download
M lib/runtime/dart/_native_typed_data.js View 1 14 chunks +34 lines, -34 lines 0 comments Download
M lib/runtime/dart/async.js View 1 89 chunks +178 lines, -178 lines 0 comments Download
M lib/runtime/dart/collection.js View 1 38 chunks +93 lines, -93 lines 0 comments Download
M lib/runtime/dart/convert.js View 1 22 chunks +45 lines, -45 lines 0 comments Download
M lib/runtime/dart/core.js View 1 14 chunks +25 lines, -25 lines 0 comments Download
M lib/runtime/dart/isolate.js View 1 4 chunks +5 lines, -5 lines 0 comments Download
M lib/runtime/dart/math.js View 1 1 chunk +2 lines, -2 lines 0 comments Download
M lib/runtime/dart_runtime.js View 1 2 chunks +11 lines, -2 lines 3 comments Download
M lib/src/codegen/js_codegen.dart View 1 3 chunks +34 lines, -15 lines 0 comments Download
M test/codegen/expect/BenchmarkBase.js View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/codegen/expect/DeltaBlue.js View 1 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/cascade.js View 1 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/covariance.js View 1 2 chunks +3 lines, -3 lines 0 comments Download
M test/codegen/expect/fieldtest.js View 1 2 chunks +3 lines, -3 lines 0 comments Download
M test/codegen/expect/methods.js View 1 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/misc.js View 1 chunk +1 line, -1 line 0 comments Download
M test/codegen/expect/names.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/codegen/expect/sunflower/sunflower.js View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (1 generated)
Leaf
5 years, 7 months ago (2015-05-20 22:09:34 UTC) #2
vsm
lgtm https://codereview.chromium.org/1148333003/diff/1/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1148333003/diff/1/lib/runtime/dart_runtime.js#newcode574 lib/runtime/dart_runtime.js:574: t = build(); yikes ... perhaps we should ...
5 years, 7 months ago (2015-05-20 23:03:10 UTC) #3
Leaf
https://codereview.chromium.org/1148333003/diff/1/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1148333003/diff/1/lib/runtime/dart_runtime.js#newcode574 lib/runtime/dart_runtime.js:574: t = build(); On 2015/05/20 23:03:10, vsm wrote: > ...
5 years, 7 months ago (2015-05-20 23:35:29 UTC) #4
Leaf
Committed patchset #2 (id:20001) manually as cb4ac2a65c306b170a98479bd40bbeaa9677db19 (presubmit successful).
5 years, 7 months ago (2015-05-20 23:36:30 UTC) #5
vsm
Just a followup comment https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtime.js#newcode969 lib/runtime/dart_runtime.js:969: // which is too late. ...
5 years, 7 months ago (2015-05-21 20:08:48 UTC) #6
Leaf
https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtime.js File lib/runtime/dart_runtime.js (right): https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtime.js#newcode969 lib/runtime/dart_runtime.js:969: // which is too late. On 2015/05/21 20:08:47, vsm ...
5 years, 7 months ago (2015-05-21 22:47:34 UTC) #7
vsm
5 years, 7 months ago (2015-05-22 15:52:04 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtim...
File lib/runtime/dart_runtime.js (right):

https://codereview.chromium.org/1148333003/diff/20001/lib/runtime/dart_runtim...
lib/runtime/dart_runtime.js:969: // which is too late.
On 2015/05/21 22:47:34, Leaf wrote:
> On 2015/05/21 20:08:47, vsm wrote:
> > John and I were just discussing this.  I *think* this should only be
> core.Object
> > for class types.  For typedef (which also use this function), it should
> probably
> > stay as dynamic.
> > 
> > E.g., in
> > typedef T Foo<T>(T t);
> > 
> > Plain Foo should be dynamic->dynamic (effectively, bottom->top).
> 
> It either needs to stay as dynamic, or get canonicalized appropriately,
> depending on whether we want to be reifying dynamic into Object and bottom, or
> whether we want to keep it around.

Ah, I was thinking that the reified type of any obj/function is never a typedef
- so it shouldn't matter.  But that's not quite true.  It can contain a typedef.
 Damn higher order types.  :-)

And, of course, if we use this same utility for generic methods....

So, it looks we'll need something more sophisticated?

Powered by Google App Engine
This is Rietveld 408576698