-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codec: clean up, improved symbol handling and numeric overflow support
Binc Handling and Symbols codec: remove AsSymbols from EncodeOption, and allow a modified version for binc only Currently, encDriver defines an EncodeSymbol function, that is only called when writing struct fields or map keys of string type. If we take out the differentiation, this can easily be handled by a specific handle, as it can track what the current containerState is. Instead, we remove all vestiges of Symbol support from encode.go and have it be something unique to binc. This also reduces the work that is done for all handles. codec: remove overflow checking from Handles - manage it at the framework This means the following: - change decDriver DecodeUint and DecodeInt to just DecodeUint64 and DecodeInt64 - add overflow check logic into checkOverflow type - use the overflow check logic in one-line statements across codebase codec: fast-path: hoist conditional check out of loop Misc cleanup - clean up panic calls - clean up some comments - clean up error messages - optimize tracking TypeInfos by reusing same array if possible
- Loading branch information
Showing
20 changed files
with
5,812 additions
and
4,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.