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

Issue 2608373002: Move Null type to the Bottom in the VM (fixes #28025). (Closed)

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

Description

Move Null type to the Bottom in the VM (fixes #28025). Fix wrong comments. R=asiva@google.com Committed: https://github.com/dart-lang/sdk/commit/dc0605012fd65f63d9b4443119c66cc32bbe2c73

Patch Set 1 #

Patch Set 2 : work in progress #

Total comments: 2

Patch Set 3 : address comments and sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -79 lines) Patch
M runtime/lib/object.cc View 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/aot_optimizer.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 2 3 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm64.cc View 1 2 3 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 3 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/jit_optimizer.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 chunks +15 lines, -8 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M tests/corelib/corelib.status View 1 chunk +0 lines, -3 lines 0 comments Download
M tests/language/language.status View 1 2 3 chunks +0 lines, -22 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
regis
Ryan, all the mirror tests passes, but, when you are back, I'd like you to ...
3 years, 11 months ago (2017-01-03 22:27:58 UTC) #2
siva
lgtm with one comment. https://codereview.chromium.org/2608373002/diff/20001/runtime/vm/flow_graph_compiler_mips.cc File runtime/vm/flow_graph_compiler_mips.cc (right): https://codereview.chromium.org/2608373002/diff/20001/runtime/vm/flow_graph_compiler_mips.cc#newcode555 runtime/vm/flow_graph_compiler_mips.cc:555: ASSERT(!type.IsObjectType() && !type.IsDynamicType()); Why didn't ...
3 years, 11 months ago (2017-01-05 01:51:04 UTC) #3
regis
Thanks! https://codereview.chromium.org/2608373002/diff/20001/runtime/vm/flow_graph_compiler_mips.cc File runtime/vm/flow_graph_compiler_mips.cc (right): https://codereview.chromium.org/2608373002/diff/20001/runtime/vm/flow_graph_compiler_mips.cc#newcode555 runtime/vm/flow_graph_compiler_mips.cc:555: ASSERT(!type.IsObjectType() && !type.IsDynamicType()); On 2017/01/05 01:51:04, siva wrote: ...
3 years, 11 months ago (2017-01-05 18:02:01 UTC) #4
regis
Committed patchset #3 (id:40001) manually as dc0605012fd65f63d9b4443119c66cc32bbe2c73 (presubmit successful).
3 years, 11 months ago (2017-01-05 18:05:37 UTC) #6
rmacnak
On 2017/01/03 22:27:58, regis wrote: > Ryan, all the mirror tests passes, but, when you ...
3 years, 11 months ago (2017-01-05 18:22:22 UTC) #7
regis
On 2017/01/05 18:22:22, rmacnak wrote: > On 2017/01/03 22:27:58, regis wrote: > > Ryan, all ...
3 years, 11 months ago (2017-01-05 19:23:08 UTC) #8
regis
3 years, 11 months ago (2017-01-05 20:26:25 UTC) #9
Message was sent while issue was closed.
On 2017/01/05 19:23:08, regis wrote:
> On 2017/01/05 18:22:22, rmacnak wrote:
> > On 2017/01/03 22:27:58, regis wrote:
> > > Ryan, all the mirror tests passes, but, when you are back, I'd like you to
> > check
> > > that mirrors are not using NullType or NullClass in a IsSubtypeOf test in
> > order
> > > to test a null instance in an instanceOf test. Indeed, from now on, the
Null
> > > type is at Bottom, but not the null instance. See comments in the cl.
> Thanks!
> > 
> > I think mirrors do not use a test like that that would need to be updated.
> They
> > do, however, expose TypeMirror.isAssignableTo and TypeMirror.isSubtypeOf. So
> > could you add some cases with the Null type to
> > tests/lib/mirrors/relation_assignable_test.dart and
> relation_subtype_test.dart?
> 
> OK, will do.
> Do I understand correctly that TypeMirror.isAssignableTo, although applied to
a
> TypeMirror, reflects the behavior of instances of the mirrored type beeing
> assigned? In contrast, TypeMirror.isSubtypeOf reflects the behavior of types
and
> not instances, correct?

[Answering my own questions]
Not quite. The difference is that TypeMirror.isAssignableTo is checking the <=>
relation of the spec and TypeMirror.isSubtypeOf the <: of the spec. Both are
applied to types, not instances of that type. Cl adding tests on its way.

Powered by Google App Engine
This is Rietveld 408576698