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

Issue 12330072: Ensure that compile time types for comparisons are recomputed once comparison are specialized. (Closed)

Created:
7 years, 10 months ago by Vyacheslav Egorov (Google)
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Ensure that compile time types for comparisons are recomputed once comparison are specialized. Turn CompileType into a value object instead of zone object. Provide a transparent zone allocated wrapper for CompileType. This simplifies code paths that recompute and update type and reduces number of allocated zone objects. Split ComputeInitialType into ComputeInitialType and ComputeType. ComputeType returns values type as a value object. ComputeInitialType returns a pointer and by default it delegates to ComputeType. This split reflects differences between instructions: majority of them have their own type, but some can return the type of an input which should not be unwrapped and rewrapped again because this will destroy the connection between types. R=kmillikin@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=18895

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -137 lines) Patch
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 18 chunks +92 lines, -70 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/intermediate_language.h View 46 chunks +87 lines, -59 lines 4 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vyacheslav Egorov (Google)
7 years, 10 months ago (2013-02-22 13:41:23 UTC) #1
Kevin Millikin (Google)
While it's fairly ugly to have the distinction, it LGTM.
7 years, 10 months ago (2013-02-22 15:24:27 UTC) #2
Vyacheslav Egorov (Google)
Committed patchset #1 manually as r18895 (presubmit successful).
7 years, 10 months ago (2013-02-22 16:33:47 UTC) #3
srdjan
DBC and agree with Kevin. https://codereview.chromium.org/12330072/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://codereview.chromium.org/12330072/diff/1/runtime/vm/intermediate_language.h#newcode116 runtime/vm/intermediate_language.h:116: class CompileType { This ...
7 years, 10 months ago (2013-02-22 21:01:41 UTC) #4
Vyacheslav Egorov (Google)
7 years, 10 months ago (2013-02-22 22:22:33 UTC) #5
Message was sent while issue was closed.
I agree that wrapper is ugly. 

Unfortunately ZoneAllocated::~ZoneAllocated contains UNREACHABLE so I can't both
allocate CompileType on the stack and in the zone.

https://codereview.chromium.org/12330072/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language.h (right):

https://codereview.chromium.org/12330072/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.h:116: class CompileType {
On 2013/02/22 21:01:41, srdjan wrote:
> This should be subclass of ValueObject?

I can make it, but our ValueObject is a strange beast --- e.g. there is a
comment that suggests that we will enable DISALLOW_COPY_AND_ASSIGN for it which
will turn it into NotSoMuchValueObject.

I honestly don't see much of a value in extending ValueObject. All normal
structures *are* values already, by default.

https://codereview.chromium.org/12330072/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.h:186: bool IsEqualTo(CompileType* other) {
On 2013/02/22 21:01:41, srdjan wrote:
> make const CompileType& other, since other may not always be wrapped.

It'd like to do this, but I can't because ToNullableCid and ToAbstractType are
lazily initializing parts of CompileType (e.g. if type is there and cid is not
there, cid will be computed from type if CHA says that its a leaf type) thus
they are not const members and thus can't be used on a const reference.

Powered by Google App Engine
This is Rietveld 408576698