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

Issue 1417473002: Improves the representation of values in Mojom. (Closed)

Created:
5 years, 2 months ago by rudominer
Modified:
5 years, 2 months ago
Reviewers:
azani
CC:
mojo-reviews_chromium.org, gregsimon, 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

Improves the representation of values in Mojom. This CL updates the representation of values in Mojom based on a better understanding obtained by working on the Go version of the parser. The main change is that we now have value keys for enum values as well as user-defined constants. Additionally some terminology was modified. We were using the word "constant" in places where the word "value" makes more sense. - Replace map<string, DeclaredConstant> resolved_constants; with map<string, UserDefinedValue> resolved_values; in MojomFileGraph. - Add support for the "default" keyword as the default value of a struct field. - Replace |ConstantOccurrence| with |Value|. - Replace |ConstantValue| with |LiteralValue|. - Replace |ConstantReference| with |UserValueReference|. - Simplify representation of enum values. R=azani@chromium.org, azani Committed: https://chromium.googlesource.com/external/mojo/+/973941c0654a582fad653bc627ee5bd57ecd4c16

Patch Set 1 #

Patch Set 2 : Update comments: Describe values and remove mention of MojomDescriptor. #

Patch Set 3 : Gets rid of ConcreteValue and fixes mojom_translator. #

Total comments: 6

Patch Set 4 : Remove some TODOs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -161 lines) Patch
M mojo/public/interfaces/bindings/mojom_files.mojom View 1 1 chunk +4 lines, -4 lines 0 comments Download
M mojo/public/interfaces/bindings/mojom_types.mojom View 1 2 10 chunks +82 lines, -111 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py View 1 2 3 6 chunks +30 lines, -15 lines 0 comments Download
M mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator_unittests.py View 1 2 8 chunks +31 lines, -31 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
rudominer
Alex Zani: ptal. Alex Fandrianto: I don't think this change should affect your work but ...
5 years, 2 months ago (2015-10-19 16:41:29 UTC) #8
alexfandrianto
On 2015/10/19 16:41:29, rudominer wrote: > Alex Zani: ptal. > > Alex Fandrianto: I don't ...
5 years, 2 months ago (2015-10-19 18:03:46 UTC) #9
rudominer
Patchset two contains an update to the file comments that reflects the following: (1) We ...
5 years, 2 months ago (2015-10-19 19:40:22 UTC) #11
rudominer
azani: I fixed up mojom_translator. ptal. https://codereview.chromium.org/1417473002/diff/80001/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py File mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py (left): https://codereview.chromium.org/1417473002/diff/80001/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py#oldcode353 mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py:353: const: {mojom_types_mojom.ConstantValue} to ...
5 years, 2 months ago (2015-10-20 05:54:25 UTC) #14
azani
lgtm https://codereview.chromium.org/1417473002/diff/80001/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py File mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py (left): https://codereview.chromium.org/1417473002/diff/80001/mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py#oldcode353 mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator.py:353: const: {mojom_types_mojom.ConstantValue} to be evaluated. On 2015/10/20 05:54:25, ...
5 years, 2 months ago (2015-10-20 21:54:58 UTC) #15
rudominer
Committed patchset #4 (id:100001) manually as 973941c0654a582fad653bc627ee5bd57ecd4c16 (presubmit successful).
5 years, 2 months ago (2015-10-20 22:06:59 UTC) #16
azani
5 years, 2 months ago (2015-10-20 23:47:15 UTC) #17
Message was sent while issue was closed.
On 2015/10/20 22:06:59, rudominer wrote:
> Committed patchset #4 (id:100001) manually as
> 973941c0654a582fad653bc627ee5bd57ecd4c16 (presubmit successful).

Hey Mitch,

It looks like mojom_translator_unittest is broken after this CL got checked in.

Powered by Google App Engine
This is Rietveld 408576698