diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-23 23:56:36 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-23 23:56:36 -0800 |
commit | 4d6585290955613b23e5ade89794fb465cb7ec3a (patch) | |
tree | 20fde20a4e44244ae706cf5bda77af8957954f73 /src/upb_decoder.h | |
parent | 3a758132b402e2c4a346d1feb45d00300fed16e7 (diff) |
Rearrange structs to put arrays at the end, for smaller offsets.
Diffstat (limited to 'src/upb_decoder.h')
-rw-r--r-- | src/upb_decoder.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/upb_decoder.h b/src/upb_decoder.h index d0848f8..6a9f7cc 100644 --- a/src/upb_decoder.h +++ b/src/upb_decoder.h @@ -39,13 +39,11 @@ struct _upb_decoder { upb_src src; upb_dispatcher dispatcher; upb_bytesrc *bytesrc; - upb_msgdef *toplevel_msgdef; - upb_decoder_frame stack[UPB_MAX_NESTING]; // Mutable state of the decoder. - // Where we will store any errors that occur. - upb_status *status; + // Msgdef for the current level. + upb_msgdef *msgdef; // Stack entries store the offset where the submsg ends (for groups, 0). upb_decoder_frame *top, *limit; @@ -68,10 +66,10 @@ struct _upb_decoder { // End of this submessage, relative to *ptr. const char *submsg_end; - // Msgdef for the current level. - upb_msgdef *msgdef; + // Where we will store any errors that occur. + upb_status *status; - size_t bytes_parsed_fast, bytes_parsed_slow; + upb_decoder_frame stack[UPB_MAX_NESTING]; }; // A upb_decoder decodes the binary protocol buffer format, writing the data it |