Merge pull request #546 from nspcc-dev/write-optimizations

Write optimizations
This commit is contained in:
Roman Khimov 2019-12-06 19:40:38 +03:00 committed by GitHub
commit e4d821f32d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 59 additions and 50 deletions

View file

@ -19,7 +19,7 @@ func emit(w *io.BinWriter, instr opcode.Opcode, b []byte) {
// emitOpcode emits a single VM Instruction the given buffer.
func emitOpcode(w *io.BinWriter, instr opcode.Opcode) {
w.WriteLE(byte(instr))
w.WriteBytes([]byte{byte(instr)})
}
// emitBool emits a bool type the given buffer.