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

Issue 11826024: Clean up uses of X::CheckedHandle where X::Cast or X::Handle is sufficient. (Closed)

Created:
7 years, 11 months ago by Florian Schneider
Modified:
7 years, 11 months ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Cleanup uses of X::CheckedHandle where X::Cast or X::Handle is sufficient. The only places where CheckedHandle is appropiate is with arguments to runtime functions and values from Dart API functions. For other places in the VM either normal Handle and ^=, or Cast is sufficient. T::Cast is used when the value is guaranteed to be of type T (and never Object::null()). Otherwise, the operator^= is used for casting. Also fix a style issue where a Raw* should be used as return type. Committed: https://code.google.com/p/dart/source/detail?r=17013

Patch Set 1 #

Patch Set 2 : updated with corrent handling of null #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -31 lines) Patch
M runtime/vm/disassembler_ia32.cc View 1 2 3 chunks +9 lines, -7 lines 0 comments Download
M runtime/vm/disassembler_x64.cc View 1 2 3 chunks +9 lines, -7 lines 0 comments Download
M runtime/vm/object.h View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.cc View 1 6 chunks +13 lines, -9 lines 0 comments Download
M runtime/vm/parser.cc View 3 chunks +6 lines, -7 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
7 years, 11 months ago (2013-01-09 12:02:05 UTC) #1
Florian Schneider
On 2013/01/09 12:02:05, Florian Schneider wrote: Please disregard it for now. I need to treat ...
7 years, 11 months ago (2013-01-09 15:05:29 UTC) #2
Florian Schneider
New patch set uploaded. Please have a look: * Use ^= to cast where Object::null() ...
7 years, 11 months ago (2013-01-10 09:58:30 UTC) #3
Ivan Posva
LGTMwC. -Ivan https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_ia32.cc File runtime/vm/disassembler_ia32.cc (right): https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_ia32.cc#newcode435 runtime/vm/disassembler_ia32.cc:435: arr ^= obj.raw(); const Array& arr = ...
7 years, 11 months ago (2013-01-11 23:13:33 UTC) #4
Florian Schneider
7 years, 11 months ago (2013-01-14 09:43:57 UTC) #5
Thanks. Landing.

https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_ia...
File runtime/vm/disassembler_ia32.cc (right):

https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_ia...
runtime/vm/disassembler_ia32.cc:435: arr ^= obj.raw();
On 2013/01/11 23:13:33, Ivan Posva wrote:
> const Array& arr = Array::Cast(obj);

Done.

https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_x6...
File runtime/vm/disassembler_x64.cc (right):

https://codereview.chromium.org/11826024/diff/6001/runtime/vm/disassembler_x6...
runtime/vm/disassembler_x64.cc:814: Array& arr = Array::Handle();
On 2013/01/11 23:13:33, Ivan Posva wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698