Improved assembler performance
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// Finalize generates the final machine code.
|
||||
func Finalize(a asm.Assembler, dlls dll.List) ([]byte, []byte) {
|
||||
func Finalize(a *asm.Assembler, dlls dll.List) ([]byte, []byte) {
|
||||
data, dataLabels := a.Data.Finalize()
|
||||
|
||||
if config.TargetOS == config.Windows && len(data) == 0 {
|
||||
@ -15,6 +15,7 @@ func Finalize(a asm.Assembler, dlls dll.List) ([]byte, []byte) {
|
||||
}
|
||||
|
||||
c := compiler{
|
||||
assembler: a,
|
||||
code: make([]byte, 0, len(a.Instructions)*8),
|
||||
codeLabels: make(map[string]Address, 32),
|
||||
codePointers: make([]*pointer, 0, len(a.Instructions)*8),
|
||||
|
Reference in New Issue
Block a user