all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using the correct terms LAP vs ELisp Bytecode or something else
@ 2017-12-21  0:44 Rocky Bernstein
  2017-12-21  1:50 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Rocky Bernstein @ 2017-12-21  0:44 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

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. Bytecode however generally refers to a more binary
representation, but I guess often it includes the mnemonics for the code.

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?

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

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

Please advise. Thanks.

[-- Attachment #2: Type: text/html, Size: 743 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using the correct terms LAP vs ELisp Bytecode or something else
  2017-12-21  0:44 Rocky Bernstein
@ 2017-12-21  1:50 ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2017-12-21  1:50 UTC (permalink / raw)
  To: emacs-devel

> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using the correct terms LAP vs ELisp Bytecode or something else
@ 2017-12-21 16:56 Rocky Bernstein
  2017-12-21 18:56 ` [SUSPECTED SPAM] " Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Rocky Bernstein @ 2017-12-21 16:56 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

Thanks for the information...

On Wed, 20 Dec 2017 20:50:28 -0500 Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

>
> > 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.
>

This is the first I am hearing about LAP code being something that is
accessible from Lisp. Where are packages that work with LAP?

[-- Attachment #2: Type: text/html, Size: 1285 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [SUSPECTED SPAM] Re: Using the correct terms LAP vs ELisp Bytecode or something else
  2017-12-21 16:56 Using the correct terms LAP vs ELisp Bytecode or something else Rocky Bernstein
@ 2017-12-21 18:56 ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2017-12-21 18:56 UTC (permalink / raw)
  To: Rocky Bernstein; +Cc: emacs-devel

> This is the first I am hearing about LAP code being something that is
> accessible from Lisp.  Where are packages that work with LAP?

bytecomp.el, byte-opt.el, and disass.el.  Probably not much more than that.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-21 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 16:56 Using the correct terms LAP vs ELisp Bytecode or something else Rocky Bernstein
2017-12-21 18:56 ` [SUSPECTED SPAM] " Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2017-12-21  0:44 Rocky Bernstein
2017-12-21  1:50 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.