~nikodemus/sbcl/master

Viewing all changes in revision 6469.

  • Committer: Lutz Euler
  • Date: 2013-06-06 14:26:30 UTC
  • Revision ID: git-v1:51bc001b7a98af096af782a672389e51004af068
Simplify getting the contents of assembler segments.

Extend FINALIZE-SEGMENT to compact the segment's buffer and provide an
exported function to get at this buffer. This resolves an old KLUDGE
noted at ON-SEGMENT-CONTENTS-VECTORLY, making this function unnecessary.

There are several benefits to this change: First, the consumers of
assembler segment's contents, like WRITE-SEGMENT-CONTENTS which is used
for example during FASL dumping, or MAKE-CORE-COMPONENT, now call
WRITE-SEQUENCE respectively COPY-BYTE-VECTOR-TO-SYSTEM-AREA only once
per segment and not once per the pieces of the segment's contents that
ON-SEGMENT-CONTENTS-VECTORLY provided, which makes for less overhead.

Second, this allows to greatly simplify the whole operation of
DISASSEMBLE-ASSEM-SEGMENT, in the course deleting several helpers of it.
So far this repartitioned the pieces of the segment's contents from
ON-SEGMENT-CONTENTS-VECTORLY, while caring not to split the contents
inside instructions, which needed a sizable amount of code. Now the
segment's contents are simply disassembled as a whole. Also, the old
code (specifically SEGMENT-OVERFLOW) didn't take prefix instructions
into account correctly which surfaced as the bug in lp#1085729.

Fixes lp#1085729.

Also, fix an unrelated typo in NEWS.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: