Skip to content

Fix variable evaluation on 'evaluate-stream'#367

Closed
Affonso-Gui wants to merge 1 commit intoeuslisp:cl-compatiblefrom
Affonso-Gui:toplevel-var-eval
Closed

Fix variable evaluation on 'evaluate-stream'#367
Affonso-Gui wants to merge 1 commit intoeuslisp:cl-compatiblefrom
Affonso-Gui:toplevel-var-eval

Conversation

@Affonso-Gui
Copy link
Member

Splitting from #362

Targeting cl-compatible since this needs some testing before practical use.

Below is copy of the description.

Added commit to solve the following problems in toplevel variable evaluation:

  • Cannot evaluate a symbol that is also fbound
  • Evaluation of unbound symbols leads to unclear response: 32512

With this changes:

1.eus$ 10
10
2.eus$ *
10
3.eus$ * 2 2
4
4.eus$ ls
c               Makefile.Cygwin    Makefile.IRIX5      Makefile.LinuxSH4.2    Makefile.SunOS5.X11R6.1
comp            Makefile.Cygwin32  Makefile.IRIX6      Makefile.Linux.thread  opengl
geo             Makefile.Cygwin64  Makefile.Linux      Makefile.rgc           README
image           Makefile.Darwin    Makefile.Linux64    Makefile.SunOS4        README.rgc
l               Makefile.generic1  Makefile.LinuxARM   Makefile.SunOS4.sub    tool
Makefile        Makefile.generic2  Makefile.Linux.ppc  Makefile.SunOS5        xwindow
Makefile.Alpha  Makefile.IRIX      Makefile.LinuxSH4   Makefile.SunOS5.i386
0
5.eus$ guiga
sh: 1: guiga: not found
Call Stack (max depth: 20):
  0: at #<compiled-code #X52d7e80>
eus 0 error: unbound variable guiga in #<compiled-code #X52d7e80>
6.E1-eus$ 

Note that

  1. * is symbol-evaluated when there are no trailing arguments and function-evaluated otherwise
  2. unbound variable errors are appropriately raised on evaluation of unbound symbols
  3. unix evaluation remains the same for valid commands

@Affonso-Gui
Copy link
Member Author

Maybe in some later releases (too dangerous for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant