[Feature Request]: Emit expression tags for comparisons and their operands
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, testing-qa
Línea de trabajo
Start by reading the Bytecode DSL compiler code that creates expression tags and the PythonLanguage @ProvidedTags declaration. Trace how comparison operands and results are compiled, then run or add debugger coverage for the examples in the issue, including chained comparisons and is None conditions. Done means each specified operand and comparison result is reported once, with short-circuited operands omitted.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the feature
This request is to tag comparisons (==, <, in, is, chained comparisons, ...) and their operands with ExpressionTag. The tagged expressions should have their own source section.
Expected behavior
Stepping into expressions with SuspendAnchor.AFTER in
name = 'guest'
found = name in ('admin', 'guest')
should stop after each operand and after the comparison, with their source text and value:
| Source text | Value |
|---|---|
name |
'guest' |
('admin', 'guest') |
('admin', 'guest') |
name in ('admin', 'guest') |
True |
Other forms should behave like this:
- In a chained comparison such as
1 < len(name) < 10, the middle operand is evaluated and reported once. When the chain stops early, the remaining operands are not reported. - A comparison used as an operand, as in
(a == b) == c, is reported once. - For
not (a in b)andnot (a is b), only the comparison result of the wholenotexpression is reported. Like CPython, GraalPy compiles them asa not in banda is not b, soa in bis never evaluated on its own. is Noneandis not Nonecomparisons are reported as well, including inifandwhileconditions.
Additional context
PythonLanguage lists StandardTags.ExpressionTag in its @ProvidedTags, but the Bytecode DSL compiler doesn't seem to tag such nodes with it, so Truffle tools won't find them. For example, a debugger session which steps with SourceElement.EXPRESSION won't stop there, so you can't see either the value or operands of the comparisons.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 156
- Merge medio
- 8 h 31 min
- PR fusionados (30 d)
- 55
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 oracle/graalpython
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
oracle/graalpython#1213 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
oracle/graalpython#1105 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
oracle/graalpython#1102 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: incompatible (wrt CPython int's) processing of strings by int() constructor with spacesAbiertobug
Dificultad 3/5 Medio día Aptitud para principiantes 50/100
oracle/graalpython#1209 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: JVM crash (SIGSEGV in Py_REFCNT) on numpy.frombuffer(memoryview(java.nio.ByteBuffer))Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 44/100
oracle/graalpython#1198 ·
Los mantenedores suelen responder en 1 día
Todos los issues de oracle/graalpython
Issues similares
-
customer-reported question
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azure-sdk-for-python#49548 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
btclib-org/btclib-wallet#409 ·
Los mantenedores suelen responder en 1 día
-
Phase 2 PSA Capability & Career Profile
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fastmachinelearning/hls4ml#1582 ·
Los mantenedores suelen responder en 3 días
-
Sort modelsAbiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día