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

Issue 9207021: Transfer the C++03 move-only type emulation into base/move.h and also make ScopedVector move-only. (Closed)

Created:
8 years, 11 months ago by awong
Modified:
8 years, 11 months ago
CC:
brettw-cc_chromium.org
Visibility:
Public.

Description

Transfer the C++03 move-only type emulation into base/move.h and also make ScopedVector move-only. Also: * Add a lot of documentation explaining what this macro does. * Change the implementation of RValue so it cannot be instantiated. The change to always use RValue& makes for more efficent code in debug builds. Looking at the disassembly for a simple use case (calling a function with one parameter), it removes the creation of one temporary. BUG=96118 TEST=new unittests. exist code still compiles. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=118388

Patch Set 1 #

Patch Set 2 : helps to actually add the file. #

Patch Set 3 : proof the comment #

Patch Set 4 : maybe we don't actually generate strict aliasing warnings?? #

Patch Set 5 : rebased #

Patch Set 6 : rebased #

Patch Set 7 : errr...make ScopedVector *actually* work. #

Total comments: 2

Patch Set 8 : fix comment #

Patch Set 9 : Fixed nit and ran through spell check. #

Total comments: 5

Patch Set 10 : fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+291 lines, -49 lines) Patch
M base/base.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/scoped_ptr.h View 1 2 3 4 5 6 7 8 9 14 chunks +35 lines, -47 lines 0 comments Download
M base/memory/scoped_vector.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -2 lines 0 comments Download
M base/memory/scoped_vector_unittest.cc View 1 2 3 4 5 6 1 chunk +35 lines, -0 lines 0 comments Download
A base/move.h View 1 2 3 4 5 6 7 8 9 1 chunk +211 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
awong
8 years, 11 months ago (2012-01-18 02:00:55 UTC) #1
kim.grasman
Comment nit. http://codereview.chromium.org/9207021/diff/16001/base/move.h File base/move.h (right): http://codereview.chromium.org/9207021/diff/16001/base/move.h#newcode98 base/move.h:98: // IMPLEMENTATION SUBTLTIES WITH RValue Nice spelling, ...
8 years, 11 months ago (2012-01-18 08:27:19 UTC) #2
awong
Also ran through spell check. :) http://codereview.chromium.org/9207021/diff/16001/base/move.h File base/move.h (right): http://codereview.chromium.org/9207021/diff/16001/base/move.h#newcode98 base/move.h:98: // IMPLEMENTATION SUBTLTIES ...
8 years, 11 months ago (2012-01-18 23:21:04 UTC) #3
darin (slow to review)
Sorry for the slow reply. http://codereview.chromium.org/9207021/diff/13009/base/memory/scoped_vector.h File base/memory/scoped_vector.h (right): http://codereview.chromium.org/9207021/diff/13009/base/memory/scoped_vector.h#newcode19 base/memory/scoped_vector.h:19: MOVE_ONLY_TYPE_FOR_CPP_03(ScopedVector); I think it ...
8 years, 11 months ago (2012-01-19 05:17:30 UTC) #4
awong
Fixed and submitting. Thanks for the rush review! http://codereview.chromium.org/9207021/diff/13009/base/move.h File base/move.h (right): http://codereview.chromium.org/9207021/diff/13009/base/move.h#newcode13 base/move.h:13: // ...
8 years, 11 months ago (2012-01-19 20:13:12 UTC) #5
commit-bot: I haz the power
No LGTM from any valid reviewer yet. Even if a LGTM may have been provided, ...
8 years, 11 months ago (2012-01-19 20:14:49 UTC) #6
awong
Bah. I got an "LGTM w/ those nits picked" from darin over e-mail, but apparently ...
8 years, 11 months ago (2012-01-19 20:17:52 UTC) #7
darin (slow to review)
LGTM for realz
8 years, 11 months ago (2012-01-19 21:23:41 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajwong@chromium.org/9207021/14003
8 years, 11 months ago (2012-01-19 21:24:42 UTC) #9
commit-bot: I haz the power
8 years, 11 months ago (2012-01-19 23:22:41 UTC) #10
Try job failure for 9207021-14003 (retry) on mac_rel for step "browser_tests".
It's a second try, previously, step "browser_tests" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu...

Powered by Google App Engine
This is Rietveld 408576698