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

Issue 923033003: Implement unions as members of structs. (Closed)

Created:
5 years, 10 months ago by azani
Modified:
5 years, 8 months ago
Reviewers:
yzshen1, viettrungluu
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 35

Patch Set 2 : #

Patch Set 3 : #

Total comments: 41

Patch Set 4 : #

Patch Set 5 : #

Total comments: 16

Patch Set 6 : #

Patch Set 7 : #

Total comments: 30

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 8

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+483 lines, -85 lines) Patch
M mojo/public/cpp/bindings/lib/array_internal.h View 1 2 3 4 5 6 3 chunks +18 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/array_serialization.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +52 lines, -8 lines 0 comments Download
M mojo/public/cpp/bindings/lib/bindings_internal.h View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/template_util.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/struct_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/union_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +265 lines, -21 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/interfaces/bindings/tests/test_unions.mojom View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl View 1 chunk +6 lines, -4 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 2 3 4 5 6 7 3 chunks +8 lines, -8 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/serialization_macros.tmpl View 1 2 3 4 5 6 7 1 chunk +0 lines, -7 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl View 1 2 3 4 5 6 7 4 chunks +13 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -0 lines 0 comments Download
A mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_declaration.tmpl View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -6 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_definition.tmpl View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -2 lines 0 comments Download
A mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +20 lines, -11 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_definition.tmpl View 1 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 2 4 chunks +6 lines, -2 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -6 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/pack.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (4 generated)
azani
https://codereview.chromium.org/923033003/diff/1/mojo/public/tools/bindings/mojom_bindings_generator.py File mojo/public/tools/bindings/mojom_bindings_generator.py (left): https://codereview.chromium.org/923033003/diff/1/mojo/public/tools/bindings/mojom_bindings_generator.py#oldcode197 mojo/public/tools/bindings/mojom_bindings_generator.py:197: metavar="GENERATORS", Please ignore. I will undo before landing.
5 years, 10 months ago (2015-02-13 23:07:25 UTC) #2
yzshen1
https://codereview.chromium.org/923033003/diff/1/mojo/public/cpp/bindings/tests/union_unittest.cc File mojo/public/cpp/bindings/tests/union_unittest.cc (right): https://codereview.chromium.org/923033003/diff/1/mojo/public/cpp/bindings/tests/union_unittest.cc#newcode289 mojo/public/cpp/bindings/tests/union_unittest.cc:289: SmallStructPtr small_struct(SmallStruct::New()); Why do we need this test and ...
5 years, 10 months ago (2015-02-17 19:34:36 UTC) #3
azani
ptal I left most of the comments regarding flags/size unanswered since we're still figuring that ...
5 years, 10 months ago (2015-02-18 00:27:58 UTC) #4
azani
ptal size isssue is fixed. I added support for arrays.
5 years, 10 months ago (2015-02-24 23:42:32 UTC) #5
yzshen1
https://codereview.chromium.org/923033003/diff/1/mojo/public/tools/bindings/generators/mojom_cpp_generator.py File mojo/public/tools/bindings/generators/mojom_cpp_generator.py (right): https://codereview.chromium.org/923033003/diff/1/mojo/public/tools/bindings/generators/mojom_cpp_generator.py#newcode70 mojo/public/tools/bindings/generators/mojom_cpp_generator.py:70: def GetCppType(kind): On 2015/02/18 00:27:58, azani wrote: > On ...
5 years, 10 months ago (2015-02-25 21:07:01 UTC) #6
azani
Hey James and Thrung, Is either of you able to review my change or suggest ...
5 years, 9 months ago (2015-03-03 00:44:16 UTC) #8
viettrungluu
OK, I haven't reviewed the .tmpl and the .py changes yet, but here are some ...
5 years, 9 months ago (2015-03-04 20:58:13 UTC) #9
azani
Thanks for the review. ptal https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h File mojo/public/cpp/bindings/lib/array_internal.h (right): https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h#newcode288 mojo/public/cpp/bindings/lib/array_internal.h:288: template <typename T, typename ...
5 years, 9 months ago (2015-03-05 23:59:25 UTC) #11
azani
friendly ping
5 years, 9 months ago (2015-03-16 18:13:41 UTC) #12
azani
friendly ping
5 years, 9 months ago (2015-03-16 18:13:45 UTC) #13
viettrungluu
Some ideas re: templates.... https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h File mojo/public/cpp/bindings/lib/array_internal.h (right): https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h#newcode288 mojo/public/cpp/bindings/lib/array_internal.h:288: template <typename T, typename Params, ...
5 years, 9 months ago (2015-03-17 20:08:03 UTC) #14
azani
ptal https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h File mojo/public/cpp/bindings/lib/array_internal.h (right): https://codereview.chromium.org/923033003/diff/80001/mojo/public/cpp/bindings/lib/array_internal.h#newcode288 mojo/public/cpp/bindings/lib/array_internal.h:288: template <typename T, typename Params, bool isUnion> On ...
5 years, 9 months ago (2015-03-18 01:04:39 UTC) #15
yzshen1
https://codereview.chromium.org/923033003/diff/40001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/40001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode29 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:29: if (input) { On 2015/03/03 00:44:16, azani wrote: > ...
5 years, 9 months ago (2015-03-26 07:30:15 UTC) #17
azani
ptal https://codereview.chromium.org/923033003/diff/40001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/40001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode29 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:29: if (input) { On 2015/03/26 07:30:14, yzshen1 wrote: ...
5 years, 9 months ago (2015-03-26 22:27:40 UTC) #18
yzshen1
https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode4 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:4: return size; On 2015/03/26 22:27:40, azani wrote: > On ...
5 years, 9 months ago (2015-03-27 16:26:33 UTC) #19
azani
ptal https://codereview.chromium.org/923033003/diff/180001/mojo/public/cpp/bindings/tests/struct_unittest.cc File mojo/public/cpp/bindings/tests/struct_unittest.cc (right): https://codereview.chromium.org/923033003/diff/180001/mojo/public/cpp/bindings/tests/struct_unittest.cc#newcode255 mojo/public/cpp/bindings/tests/struct_unittest.cc:255: // Serialization test of a struct with a ...
5 years, 9 months ago (2015-03-27 20:50:14 UTC) #20
yzshen1
https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode4 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:4: return size; On 2015/03/27 16:26:33, yzshen1 wrote: > On ...
5 years, 9 months ago (2015-03-27 21:52:42 UTC) #21
azani
sorry, last comment addressed and fixed. https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode4 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:4: return size; On ...
5 years, 8 months ago (2015-03-30 22:21:03 UTC) #22
yzshen1
LGTM with one last comment. Thanks! https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl File mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl (right): https://codereview.chromium.org/923033003/diff/120001/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl#newcode4 mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl:4: return size; On ...
5 years, 8 months ago (2015-03-30 22:55:19 UTC) #23
azani
5 years, 8 months ago (2015-03-31 00:23:40 UTC) #24
Message was sent while issue was closed.
Committed patchset #17 (id:320001) manually as
bb7095ab2314ef45e6350528c98b2504efbabc53 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698