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

Issue 15689012: More cleanup to avoid creation of redundant handles (Closed)

Created:
7 years, 6 months ago by siva
Modified:
7 years, 6 months ago
Reviewers:
hausner, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

More cleanup to avoid creation of redundant handles - create read only handles for null object and sentinel smi value - add a RawCast function to allow direct casting of Raw pointers without the need to create a Handle for it - use Smi::Value where possible - hoist out handle creation from some loops R=hausner@google.com Committed: https://code.google.com/p/dart/source/detail?r=23502

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -108 lines) Patch
M runtime/vm/class_finalizer.cc View 1 2 3 4 5 8 chunks +16 lines, -14 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 chunks +19 lines, -1 line 1 comment Download
M runtime/vm/object.cc View 1 2 3 4 5 38 chunks +60 lines, -81 lines 2 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 7 chunks +13 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
siva
7 years, 6 months ago (2013-05-31 00:55:31 UTC) #1
hausner
LGTM iff I'm wrong about the handle allocation bug in RawCast. :-) https://codereview.chromium.org/15689012/diff/8003/runtime/vm/object.h File runtime/vm/object.h ...
7 years, 6 months ago (2013-05-31 16:40:25 UTC) #2
siva
https://codereview.chromium.org/15689012/diff/8003/runtime/vm/object.h File runtime/vm/object.h (right): https://codereview.chromium.org/15689012/diff/8003/runtime/vm/object.h#newcode114 runtime/vm/object.h:114: ASSERT(Object::Handle(raw).Is##object()); \ A handle creation can not lead to ...
7 years, 6 months ago (2013-05-31 22:35:47 UTC) #3
siva
Committed patchset #6 manually as r23502 (presubmit successful).
7 years, 6 months ago (2013-05-31 22:55:34 UTC) #4
Ivan Posva
We should address the bad null handles here. Probably by creating a null handle for ...
7 years, 6 months ago (2013-06-01 00:34:40 UTC) #5
siva
7 years, 6 months ago (2013-06-03 21:24:33 UTC) #6
Message was sent while issue was closed.
On 2013/06/01 00:34:40, Ivan Posva wrote:
> We should address the bad null handles here. Probably by creating a null
handle
> for each particular handle type.
> 
> -Ivan
> 
> https://codereview.chromium.org/15689012/diff/15006/runtime/vm/object.cc
> File runtime/vm/object.cc (right):
> 
>
https://codereview.chromium.org/15689012/diff/15006/runtime/vm/object.cc#newc...
> runtime/vm/object.cc:1066: cls.set_super_type(Type::null_object());
> There is a big difference here: On the left set_super_type is called with a
> handle that has the vtable set to Type, while on the right the vtable is from
> Object even though it masquerades as Type here.
> 
>
https://codereview.chromium.org/15689012/diff/15006/runtime/vm/object.cc#newc...
> runtime/vm/object.cc:4880: result.set_value(Instance::null_object());
> ditto, here and below.
> 
> https://codereview.chromium.org/15689012/diff/15006/runtime/vm/object.h
> File runtime/vm/object.h (right):
> 
>
https://codereview.chromium.org/15689012/diff/15006/runtime/vm/object.h#newco...
> runtime/vm/object.h:121: return reinterpret_cast<const
> object&>(Object::null_object());             \
> This will not have the correct vtable setup.

Addressed this comment in https://codereview.chromium.org/16336021/

Powered by Google App Engine
This is Rietveld 408576698