Przeglądaj źródła

String literals make fresh copies of themselves every time they are evaluated.

master
Ian Piumarta 10 miesięcy temu
rodzic
commit
1bf9944ff1
1 zmienionych plików z 6 dodań i 3 usunięć
  1. +6
    -3
      minproto.leg

+ 6
- 3
minproto.leg Wyświetl plik

@ -1,9 +1,9 @@
# minproto.leg -- minimal prototype langauge for semantic experiments
#
# last edited: 2024-07-04 10:07:00 by piumarta on zora
# last edited: 2024-07-05 17:16:16 by piumarta on zora-1034.local
%{
;
;
//#define YY_DEBUG 1
#ifndef GC
@ -3907,7 +3907,10 @@ oop eval(oop exp, oop env)
# if PRIMCLOSURE
if (Lambda == type) return newClosure(exp, env);
# endif
if (Object != type) return exp;
if (Object != type) {
if (String == type) return newStringLen(_get(exp, String,value), _get(exp, String,length));
return exp;
}
if (!opt_O) {
Object_push(trace, exp);
if (opt_d && opt_v) {

Ładowanie…
Anuluj
Zapisz