Created
January 13, 2018 21:47
-
-
Save sunho/ee9933098a1963b32adbce8fb0822441 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| func (it *instructionTranslator) transferInstructionSets(sets []*bytecode.InstructionSet) []*instructionSet { | |
| iss := []*instructionSet{} | |
| for _, set := range sets { | |
| it.transferInstructionSet(iss, set) | |
| } | |
| return iss | |
| } | |
| func (it *instructionTranslator) transferInstructionSet(iss []*instructionSet, set *bytecode.InstructionSet) { | |
| is := &instructionSet{filename: it.filename} | |
| it.setMetadata(is, set) | |
| for _, i := range set.Instructions { | |
| it.transferInstruction(is, i) | |
| } | |
| is.paramTypes = set.ArgTypes() | |
| iss = append(iss, is) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this kind of structure is not awkward