wanted: smaller out-of-line structure-instance-allocation

Bug #656368 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Wishlist
Unassigned

Bug Description

Every structure constructor constain code like the following inline. This is OK for inlined constructors, but for out-of-line versions it would be better to call an out-of-line allocator instead, and do only initialization inline in the constructor.

; disassembly for (LAMBDA ())
; 002D89E4: 48892C2528081020 MOV [#x20100828], RBP ; no-arg-parsing entry point
; 9EC: 4C8B1C25802B1200 MOV R11, [#x122B80] ; boxed_region
; 9F4: 498D4B70 LEA RCX, [R11+112]
; 9F8: 48390C25882B1200 CMP [#x122B88], RCX ; boxed_region
; A00: 763B JBE L2
; A02: 48890C25802B1200 MOV [#x122B80], RCX ; boxed_region
; A0A: 498D4B01 LEA RCX, [R11+1]
; A0E: L0: 48C741FF5A0D0000 MOV QWORD PTR [RCX-1], 3418
; A16: 48312C2528081020 XOR [#x20100828], RBP
; A1E: 7403 JEQ L1
; A20: 0F0B09 BREAK 9 ; pending interrupt trap
; A23: L1: 488B1566FFFFFF MOV RDX, [RIP-154] ; #<SB-KERNEL:LAYOUT
                                                              ; for PACKAGE ..>
; A2A: 48895107 MOV [RCX+7], RDX
; A2E: 488BD1 MOV RDX, RCX
; A31: 488BE5 MOV RSP, RBP
; A34: F8 CLC
; A35: 5D POP RBP
; A36: C3 RET
; A37: 0F0B0A BREAK 10 ; error trap
; A3A: 02 BYTE #X02
; A3B: 18 BYTE #X18 ; INVALID-ARG-COUNT-ERROR
; A3C: 54 BYTE #X54 ; RCX
; A3D: L2: 6A70 PUSH 112
; A3F: 4C8D1C25904C1100 LEA R11, [#x114C90] ; alloc_tramp
; A47: 41FFD3 CALL R11
; A4A: 59 POP RCX
; A4B: 488D4901 LEA RCX, [RCX+1]
; A4F: EBBD JMP L0

tags: added: optimization
removed: performance
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.