[Feature Request]: Emit expression tags for comparisons and their operands
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend, testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 156
- Merge medio
- 8h 31m
- PR unite (30g)
- 55
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di oracle/graalpython
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
oracle/graalpython#1213 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
oracle/graalpython#1105 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
oracle/graalpython#1102 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: incompatible (wrt CPython int's) processing of strings by int() constructor with spacesApertabug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 50/100
oracle/graalpython#1209 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
oracle/graalpython#1198 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di oracle/graalpython
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
[Bug]: Importing weave changes the process-wide localeForse già presa @himanshu748 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
UX
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
mediajunkie/piper-morgan-product#2008 · 2 commenti ·