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

Issue 2072903002: C bindings pt3: Type table definitions and barebones files to get generated code to compile. (Closed)

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

Description

C bindings pt3: Type table definitions and barebones files to get generated code to compile. With this checked in, mojoms in //mojo/public/interfaces/bindings/tests will be generated and compiled, but not yet used. Changes include: - Definitions of some structs that are used to construct type tables. - Definitions for MojomString, MojomArray, MojomMap, MojomStruct. I don't plan to test the type tables directly, but instead test the things that use them (New(), ComputeSerializedSize(), Encode..(), Decode..(), Validate..()). R=viettrungluu@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/c747b91aa53c244740e99d5b41994535cce2a658

Patch Set 1 #

Patch Set 2 : comments and remove dead code #

Patch Set 3 : oops, static assert didnt have a message #

Patch Set 4 : cflags_c = std=c11 #

Total comments: 22

Patch Set 5 : address comments: type table restructure, comments and renaming #

Patch Set 6 : unbreak build (generator sha1 hashes) #

Patch Set 7 : oops mojom.gni revert #

Patch Set 8 : oops. really now #

Patch Set 9 : tiny cleanup in the generator #

Total comments: 6

Patch Set 10 : Renamed MojomTypeTable* stuff. #

Total comments: 18

Patch Set 11 : type table -> type descriptor & address other CL comments #

Total comments: 6

Patch Set 12 : elem_table -> elem_descriptor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -54 lines) Patch
M build/config/compiler/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/c/bindings/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/array.h View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/interface.h View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/lib/type_descriptor.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +128 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/lib/type_descriptor.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/map.h View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
A mojo/public/c/bindings/string.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +27 lines, -0 lines 0 comments Download
M mojo/public/c/bindings/tests/BUILD.gn View 1 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/mojom_tool/bin/linux64/generators/c.sha1 View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/mojom_tool/bin/mac64/generators/c.sha1 View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M mojom/generators/c/cgen/header.go View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M mojom/generators/c/cgen/type_table.go View 1 2 3 4 5 6 7 8 9 10 14 chunks +19 lines, -30 lines 0 comments Download
M mojom/generators/c/cgen/type_translation.go View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -4 lines 0 comments Download
M mojom/generators/c/templates/header.tmpl.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M mojom/generators/c/templates/source.tmpl.go View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M mojom/generators/c/templates/type_table.tmpl.go View 1 2 3 4 5 6 7 8 9 10 2 chunks +24 lines, -15 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
vardhan
PTAL
4 years, 6 months ago (2016-06-17 20:08:04 UTC) #1
viettrungluu
https://codereview.chromium.org/2072903002/diff/60001/mojo/public/c/bindings/BUILD.gn File mojo/public/c/bindings/BUILD.gn (right): https://codereview.chromium.org/2072903002/diff/60001/mojo/public/c/bindings/BUILD.gn#newcode12 mojo/public/c/bindings/BUILD.gn:12: "lib/type_table.h", Being in the lib directory means that this ...
4 years, 6 months ago (2016-06-17 20:37:19 UTC) #2
vardhan
PTAL (adding azani@ to review the generator part) https://codereview.chromium.org/2072903002/diff/60001/mojo/public/c/bindings/BUILD.gn File mojo/public/c/bindings/BUILD.gn (right): https://codereview.chromium.org/2072903002/diff/60001/mojo/public/c/bindings/BUILD.gn#newcode12 mojo/public/c/bindings/BUILD.gn:12: "lib/type_table.h", ...
4 years, 6 months ago (2016-06-21 16:07:36 UTC) #4
viettrungluu
https://codereview.chromium.org/2072903002/diff/160001/mojo/public/c/bindings/lib/type_table.h File mojo/public/c/bindings/lib/type_table.h (right): https://codereview.chromium.org/2072903002/diff/160001/mojo/public/c/bindings/lib/type_table.h#newcode47 mojo/public/c/bindings/lib/type_table.h:47: // Structs and unions are described using this struct; ...
4 years, 6 months ago (2016-06-21 18:08:30 UTC) #5
vardhan
ptal https://codereview.chromium.org/2072903002/diff/160001/mojo/public/c/bindings/lib/type_table.h File mojo/public/c/bindings/lib/type_table.h (right): https://codereview.chromium.org/2072903002/diff/160001/mojo/public/c/bindings/lib/type_table.h#newcode47 mojo/public/c/bindings/lib/type_table.h:47: // Structs and unions are described using this ...
4 years, 6 months ago (2016-06-21 22:42:59 UTC) #6
viettrungluu
Getting close.... https://codereview.chromium.org/2072903002/diff/180001/mojo/public/c/bindings/lib/type_table.h File mojo/public/c/bindings/lib/type_table.h (right): https://codereview.chromium.org/2072903002/diff/180001/mojo/public/c/bindings/lib/type_table.h#newcode5 mojo/public/c/bindings/lib/type_table.h:5: // This file contains structs used for ...
4 years, 6 months ago (2016-06-21 23:06:53 UTC) #7
vardhan
PTAL https://codereview.chromium.org/2072903002/diff/180001/mojo/public/c/bindings/lib/type_table.h File mojo/public/c/bindings/lib/type_table.h (right): https://codereview.chromium.org/2072903002/diff/180001/mojo/public/c/bindings/lib/type_table.h#newcode5 mojo/public/c/bindings/lib/type_table.h:5: // This file contains structs used for constructing ...
4 years, 6 months ago (2016-06-22 15:18:48 UTC) #8
viettrungluu
lgtm w/one more renaming https://codereview.chromium.org/2072903002/diff/200001/mojo/public/c/bindings/lib/type_descriptor.h File mojo/public/c/bindings/lib/type_descriptor.h (right): https://codereview.chromium.org/2072903002/diff/200001/mojo/public/c/bindings/lib/type_descriptor.h#newcode77 mojo/public/c/bindings/lib/type_descriptor.h:77: const void* elem_table; Probably you ...
4 years, 6 months ago (2016-06-22 15:33:02 UTC) #9
vardhan
https://codereview.chromium.org/2072903002/diff/200001/mojo/public/c/bindings/lib/type_descriptor.h File mojo/public/c/bindings/lib/type_descriptor.h (right): https://codereview.chromium.org/2072903002/diff/200001/mojo/public/c/bindings/lib/type_descriptor.h#newcode77 mojo/public/c/bindings/lib/type_descriptor.h:77: const void* elem_table; On 2016/06/22 15:33:02, viettrungluu wrote: > ...
4 years, 6 months ago (2016-06-22 15:44:27 UTC) #10
vardhan
4 years, 6 months ago (2016-06-22 15:49:20 UTC) #12
Message was sent while issue was closed.
Committed patchset #12 (id:220001) manually as
c747b91aa53c244740e99d5b41994535cce2a658 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698