Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
e5e34217
Commit
e5e34217
authored
May 13, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove no-longer-needed index field from schema.capnp.
parent
252b516e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
schema.capnp
c++/src/capnproto/schema.capnp
+0
-5
WireFormat.hs
compiler/src/WireFormat.hs
+5
-7
No files found.
c++/src/capnproto/schema.capnp
View file @
e5e34217
...
...
@@ -198,11 +198,6 @@ struct StructNode {
ordinal @1 :UInt16;
index @7 :UInt16;
# The index of this member within the containing struct or union's member list. This is
# redundant information, but it can be useful for the dynamic API which has methods that take
# a Member pointer to specify on which member to act.
codeOrder @2 :UInt16;
# Indicates where this member appeared in the code, relative to other members.
# Code ordering may have semantic relevance -- programmers tend to place related fields
...
...
compiler/src/WireFormat.hs
View file @
e5e34217
...
...
@@ -591,7 +591,7 @@ encodeSchema requestedFiles allFiles = (encRoot, nodesForEmbedding) where
,
(
16
,
encUInt16
$
structPointerCount
desc
)
,
(
32
,
encUInt16
(
fieldSizeEnum
preferredListEncoding
::
Word16
))
]
ptrValues
=
[
(
0
,
encStructList
memberSize
$
zipWith
encMember
[
0
::
Word16
..
]
$
ptrValues
=
[
(
0
,
encStructList
memberSize
$
map
encMember
$
sortMembers
$
structMembers
desc
)
]
preferredListEncoding
=
case
(
structDataSize
desc
,
structPointerCount
desc
)
of
...
...
@@ -613,11 +613,10 @@ encodeSchema requestedFiles allFiles = (encRoot, nodesForEmbedding) where
selectFieldOrUnion
_
=
Nothing
memberSize
=
(
DataSectionWords
1
,
3
)
encMember
index
(
codeOrder
,
(
_
,
DescField
field
))
=
(
dataValues2
,
ptrValues2
)
where
encMember
(
codeOrder
,
(
_
,
DescField
field
))
=
(
dataValues2
,
ptrValues2
)
where
dataValues2
=
[
(
0
,
encUInt16
$
fieldNumber
field
)
,
(
16
,
encUInt16
codeOrder
)
,
(
32
,
encUInt16
(
0
::
Word16
))
-- discriminant
,
(
48
,
encUInt16
index
)
]
ptrValues2
=
[
(
0
,
encText
$
fieldName
field
)
,
(
1
,
encAnnotationList
$
fieldAnnotations
field
)
...
...
@@ -637,11 +636,10 @@ encodeSchema requestedFiles allFiles = (encRoot, nodesForEmbedding) where
offsetToInt
(
InlineCompositeOffset
{})
=
error
"Inline types not currently supported by codegen plugins."
encMember
index
(
codeOrder
,
(
_
,
DescUnion
union
))
=
(
dataValues2
,
ptrValues2
)
where
encMember
(
codeOrder
,
(
_
,
DescUnion
union
))
=
(
dataValues2
,
ptrValues2
)
where
dataValues2
=
[
(
0
,
encUInt16
$
unionNumber
union
)
,
(
16
,
encUInt16
codeOrder
)
,
(
32
,
encUInt16
(
1
::
Word16
))
-- discriminant
,
(
48
,
encUInt16
index
)
]
ptrValues2
=
[
(
0
,
encText
$
unionName
union
)
,
(
1
,
encAnnotationList
$
unionAnnotations
union
)
...
...
@@ -650,9 +648,9 @@ encodeSchema requestedFiles allFiles = (encRoot, nodesForEmbedding) where
-- StructNode.Union
dataValues3
=
[
(
0
,
encUInt32
$
unionTagOffset
union
)
]
ptrValues3
=
[
(
0
,
encStructList
memberSize
$
zipWith
encMember
[
0
..
]
$
sortMembers
$
ptrValues3
=
[
(
0
,
encStructList
memberSize
$
map
encMember
$
sortMembers
$
unionMembers
union
)
]
encMember
_
_
=
error
"Not a field or union?"
encMember
_
=
error
"Not a field or union?"
enumNodeSize
=
(
DataSectionWords
0
,
1
)
encEnumNode
desc
=
(
dataValues
,
ptrValues
)
where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment