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

Issue 1823563002: Mojom frontend: Implement computeFieldOffsets(). (Closed)

Created:
4 years, 9 months ago by rudominer
Modified:
4 years, 9 months ago
Reviewers:
vardhan, 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
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Mojom frontend: Implement computeFieldOffsets(). We compute and serialize the |offset| and |bit| fields of StructField and the |num_bytes| field of StructVersion. In a nutshell we have ported the field packing logic from pack.py in the backend to the frontend. This is part 2 of the work initiated in https://codereview.chromium.org/1805743003/. We do not yet consume the data in the backend. - We moved ComputeVersionInfo() out of user_defined_types.go into computed_data.go because we intend for computed_data.go to encapsulate all of the final data computation. - In computed_data.go we implement computeFieldOffsets. - We added the methods SerializationSize() and SerializationAlignment() to the interfaces TypeRef and UserDefinedType. BUG=#713 R=azani@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/0bbfd71ec4b7dbc48d3673b25b513082b17792c3

Patch Set 1 #

Total comments: 8

Patch Set 2 : Responds to code review and adds more test cases. #

Patch Set 3 : Another comment and more tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+970 lines, -114 lines) Patch
M mojom/mojom_parser/mojom/computed_data.go View 1 2 3 chunks +187 lines, -10 lines 0 comments Download
M mojom/mojom_parser/mojom/types.go View 7 chunks +92 lines, -0 lines 0 comments Download
M mojom/mojom_parser/mojom/user_defined_types.go View 7 chunks +42 lines, -78 lines 0 comments Download
M mojom/mojom_parser/serialization/serialization_test.go View 1 2 8 chunks +639 lines, -23 lines 0 comments Download
A + mojom/mojom_parser/utils/math_utils.go View 1 chunk +6 lines, -3 lines 0 comments Download
M mojom/mojom_parser/utils/sort_utils.go View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
rudominer
Alex, Vardhan ptal. Vardhan I'm including you since you will be consuming this data soon ...
4 years, 9 months ago (2016-03-21 17:01:26 UTC) #4
azani
https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go File mojom/mojom_parser/mojom/computed_data.go (right): https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go#newcode47 mojom/mojom_parser/mojom/computed_data.go:47: // computeFieldOffsets is invoked by ComputeFinalData after the Can ...
4 years, 9 months ago (2016-03-21 20:13:04 UTC) #5
rudominer
Hi Alex, ptal. https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go File mojom/mojom_parser/mojom/computed_data.go (right): https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go#newcode47 mojom/mojom_parser/mojom/computed_data.go:47: // computeFieldOffsets is invoked by ComputeFinalData ...
4 years, 9 months ago (2016-03-21 22:35:12 UTC) #7
azani
lgtm but for a nit https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go File mojom/mojom_parser/mojom/computed_data.go (right): https://codereview.chromium.org/1823563002/diff/20001/mojom/mojom_parser/mojom/computed_data.go#newcode124 mojom/mojom_parser/mojom/computed_data.go:124: func (s *MojomStruct) computeVersionInfo() ...
4 years, 9 months ago (2016-03-21 23:05:39 UTC) #8
rudominer
Vardhan, I haven't heard from you all day and I gather you may be sick ...
4 years, 9 months ago (2016-03-21 23:39:24 UTC) #9
rudominer
4 years, 9 months ago (2016-03-21 23:41:11 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (id:80001) manually as
0bbfd71ec4b7dbc48d3673b25b513082b17792c3 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698