Skip to content

Instantly share code, notes, and snippets.

@sunho
Created January 13, 2018 21:47
Show Gist options
  • Select an option

  • Save sunho/ee9933098a1963b32adbce8fb0822441 to your computer and use it in GitHub Desktop.

Select an option

Save sunho/ee9933098a1963b32adbce8fb0822441 to your computer and use it in GitHub Desktop.
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)
}
@sunho
Copy link
Author

sunho commented Jan 13, 2018

this kind of structure is not awkward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment