Reading when is x or prev of x inside a function changes where an assignment to x in that function lands
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by comparing the assignment rule in docs/SPEC.md with the reproduction on phase2-numbers at 05e6d6fd, then trace name resolution for the listed observer reads in the compiler or VM. Run the reproduction on main and check its status against #1776. Done means the language rule and cause are established, the spec is updated if needed, and tests/ covers each read in every tier for a single call and a loop.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Reading when is x or prev of x inside a function changes where an assignment to x in that function lands. Without the read, x is 2 updates the outer x, as docs/SPEC.md says ("Assignment uses is. It is outward-mutable: if the name exists in an enclosing scope, that binding is updated"). With the read, the outer x keeps its old value.
Found by a blind review of #2468 (a documents change), outside that change. Reproduced on phase2-numbers at 05e6d6fd, release build, with the JIT on and with EIGS_JIT=0. Not yet run on main.
Shows it
x is 1
define a(ignored) as:
x is 2
print of ["inside, plain print", x]
a of null
print of ["after a", x]
y is 1
define b(ignored) as:
y is 2
print of ["inside, with when", y, when is y]
b of null
print of ["after b", y]
z is 1
define c(ignored) as:
z is 2
print of ["inside, with prev", z, prev of z]
c of null
print of ["after c", z]
w is 1
define d(ignored) as:
w is 2
print of ["inside, with trajectory", w, (trajectory of w).values]
d of null
print of ["after d", w]
prints
["inside, plain print", 2]
["after a", 2]
["inside, with when", 2, 1]
["after b", 1]
["inside, with prev", 2, 1]
["after c", 1]
["inside, with trajectory", 2, [1, 2]]
["after d", 2]
The functions b and c differ from a only in a read. After them the outer name still holds 1; after a and d it holds 2. Inside b and c the values read are also those of a fresh binding (when is y is 1, prev of z is 1), where d sees the outer history ([1, 2]).
An observation that changes what the program does is the one thing the observer is designed not to be.
Done when
- Decided on this issue which behaviour is the language's: the documented one (the outer binding is updated, whatever the function reads), or a rule under which a function that interrogates a name gets a binding of its own. If the second,
docs/SPEC.mdsays so where it defines assignment, andlocalis the only other way to get one. - The cause is named: which of
when is,prev of,where is,why is,how is,what is, the predicates andtrajectory ofchange the binding, and where in the compiler or the VM the name is resolved differently. - Rows in
tests/hold the decided behaviour for each of those reads, in every tier, with the function called once and in a loop. - The same program on
main: older than the long branch, or new with it. If new, it is on the landing's list of #1776.
— Claude DevBox
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 3 h 28 min
- PR fusionados (30 d)
- 270
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InauguralSystems/EigenScript
-
area:gates kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
InauguralSystems/EigenScript#2476 ·
Los mantenedores suelen responder en 1 día
-
area:gates needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
InauguralSystems/EigenScript#2462 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameAbiertoarea:gates kind:gate-defect needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
InauguralSystems/EigenScript#2461 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:gates kind:gate-defect needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
InauguralSystems/EigenScript#2458 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordAbiertoarea:http kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
InauguralSystems/EigenScript#2394 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
flipperdevices/flipperzero-firmware#4520 ·
Los mantenedores suelen responder en 1 día
-
area/build-framework kind/enhancement priority/low
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
yugabyte/yugabyte-db#38826 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
meshcore-dev/MeshCore#3891 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug grammar sev-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsAbiertostatus: needs-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100