| ... | @@ -20,9 +20,9 @@ pub fn deinit(self: *InternalObject, allocator: Allocator) void { | ... | @@ -20,9 +20,9 @@ pub fn deinit(self: *InternalObject, allocator: Allocator) void { |
| 20 | } | 20 | } |
| 21 | | 21 | |
| 22 | pub fn addSymbol(self: *InternalObject, name: [:0]const u8, macho_file: *MachO) !Symbol.Index { | 22 | pub fn addSymbol(self: *InternalObject, name: [:0]const u8, macho_file: *MachO) !Symbol.Index { |
| 23 | const gpa = macho_file.base.allocator; | 23 | const gpa = macho_file.base.comp.gpa; |
| 24 | try self.symbols.ensureUnusedCapacity(gpa, 1); | 24 | try self.symbols.ensureUnusedCapacity(gpa, 1); |
| 25 | const off = try macho_file.string_intern.insert(gpa, name); | 25 | const off = try macho_file.strings.insert(gpa, name); |
| 26 | const gop = try macho_file.getOrCreateGlobal(off); | 26 | const gop = try macho_file.getOrCreateGlobal(off); |
| 27 | self.symbols.addOneAssumeCapacity().* = gop.index; | 27 | self.symbols.addOneAssumeCapacity().* = gop.index; |
| 28 | const sym = macho_file.getSymbol(gop.index); | 28 | const sym = macho_file.getSymbol(gop.index); |
| ... | @@ -37,7 +37,7 @@ pub fn addObjcMsgsendSections(self: *InternalObject, sym_name: []const u8, macho | ... | @@ -37,7 +37,7 @@ pub fn addObjcMsgsendSections(self: *InternalObject, sym_name: []const u8, macho |
| 37 | } | 37 | } |
| 38 | | 38 | |
| 39 | fn addObjcMethnameSection(self: *InternalObject, methname: []const u8, macho_file: *MachO) !Atom.Index { | 39 | fn addObjcMethnameSection(self: *InternalObject, methname: []const u8, macho_file: *MachO) !Atom.Index { |
| 40 | const gpa = macho_file.base.allocator; | 40 | const gpa = macho_file.base.comp.gpa; |
| 41 | const atom_index = try macho_file.addAtom(); | 41 | const atom_index = try macho_file.addAtom(); |
| 42 | try self.atoms.append(gpa, atom_index); | 42 | try self.atoms.append(gpa, atom_index); |
| 43 | | 43 | |
| ... | @@ -45,7 +45,7 @@ fn addObjcMethnameSection(self: *InternalObject, methname: []const u8, macho_fil | ... | @@ -45,7 +45,7 @@ fn addObjcMethnameSection(self: *InternalObject, methname: []const u8, macho_fil |
| 45 | defer gpa.free(name); | 45 | defer gpa.free(name); |
| 46 | const atom = macho_file.getAtom(atom_index).?; | 46 | const atom = macho_file.getAtom(atom_index).?; |
| 47 | atom.atom_index = atom_index; | 47 | atom.atom_index = atom_index; |
| 48 | atom.name = try macho_file.string_intern.insert(gpa, name); | 48 | atom.name = try macho_file.strings.insert(gpa, name); |
| 49 | atom.file = self.index; | 49 | atom.file = self.index; |
| 50 | atom.size = methname.len + 1; | 50 | atom.size = methname.len + 1; |
| 51 | atom.alignment = 0; | 51 | atom.alignment = 0; |
| ... | @@ -71,7 +71,7 @@ fn addObjcSelrefsSection( | ... | @@ -71,7 +71,7 @@ fn addObjcSelrefsSection( |
| 71 | methname_atom_index: Atom.Index, | 71 | methname_atom_index: Atom.Index, |
| 72 | macho_file: *MachO, | 72 | macho_file: *MachO, |
| 73 | ) !Atom.Index { | 73 | ) !Atom.Index { |
| 74 | const gpa = macho_file.base.allocator; | 74 | const gpa = macho_file.base.comp.gpa; |
| 75 | const atom_index = try macho_file.addAtom(); | 75 | const atom_index = try macho_file.addAtom(); |
| 76 | try self.atoms.append(gpa, atom_index); | 76 | try self.atoms.append(gpa, atom_index); |
| 77 | | 77 | |
| ... | @@ -79,7 +79,7 @@ fn addObjcSelrefsSection( | ... | @@ -79,7 +79,7 @@ fn addObjcSelrefsSection( |
| 79 | defer gpa.free(name); | 79 | defer gpa.free(name); |
| 80 | const atom = macho_file.getAtom(atom_index).?; | 80 | const atom = macho_file.getAtom(atom_index).?; |
| 81 | atom.atom_index = atom_index; | 81 | atom.atom_index = atom_index; |
| 82 | atom.name = try macho_file.string_intern.insert(gpa, name); | 82 | atom.name = try macho_file.strings.insert(gpa, name); |
| 83 | atom.file = self.index; | 83 | atom.file = self.index; |
| 84 | atom.size = @sizeOf(u64); | 84 | atom.size = @sizeOf(u64); |
| 85 | atom.alignment = 3; | 85 | atom.alignment = 3; |