emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the correct terms LAP vs ELisp Bytecode or something else


From: Stefan Monnier
Subject: Re: Using the correct terms LAP vs ELisp Bytecode or something else
Date: Wed, 20 Dec 2017 20:50:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> What's the difference between LAP and Elisp Bytecode (if that is the right
> term)?
> LAP stands for Lisp Assembly Program, so I imagine that refers  to the text
> representation.

IIRC, LAP code is represented as a list (or is it a vector?) where each
instruction is represented by a symbol with some arguments.  So it's not
a textual representation, but it's a "symbolic" representation that's
fairly easy to manipulate and with many similarities to traditional
assembly: use of labels instead of actual addresses, use of
pseudo-instructions (e.g. labels), and things like that.

> Bytecode however generally refers to a more binary
> representation, but I guess often it includes the mnemonics for the code.

Elisp bytecode is represented as a unibyte string (i.e. an array of
bytes), so yes, it's a lot more binary.  It's the "garbage" that used to
show up in backtraces.

> If I want to describe the the assembly instructions, should I refer to it
> as LAP instructions or Elisp bytecode instructions or Emacs Lisp bytecode
> instructions?

I think you can talk about the "bytecode instruction" and have that
include both the LAP representation of that instruction and its actual
bytecode representation: either the difference doesn't matter, or the
context should make it clear which is meant.

> And is it "bytecode' or "byte code"?

No opinion on that.

> Or maybe there aren't any conventions and none of this matters so I can
> just use whatever I feel like.

Pretty much, yes.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]