[Feature Request]: Emit expression tags for comparisons and their operands
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 54/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Domaine
- backend, testing-qa
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 1.7k
- Forks
- 156
- Merge moyen
- 8 h 31 min
- PR mergées (30 j)
- 55
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de oracle/graalpython
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
oracle/graalpython#1213 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
oracle/graalpython#1105 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
oracle/graalpython#1102 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: incompatible (wrt CPython int's) processing of strings by int() constructor with spacesOuvertebug
Difficulté 3/5 Une demi-journée Accessibilité débutants 50/100
oracle/graalpython#1209 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: JVM crash (SIGSEGV in Py_REFCNT) on numpy.frombuffer(memoryview(java.nio.ByteBuffer))Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 44/100
oracle/graalpython#1198 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de oracle/graalpython
Issues similaires
-
vis.image() reports "Unsupported number of image channels: 224" for an HxWxC imagePeut-être pris @piyush182004 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
fossasia/visdom#1997 · 3 commentaires ·
Les mainteneurs répondent en général sous 6 jours
-
Byse new domainOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Gujal00/ResolveURL#1525 ·
Les mainteneurs répondent en général sous 1 jour
-
Serialisation fails with pydantic 2.14: wrap serialisers pass SerializationInfo as index_keyPeut-être pris @hugohills-regnosys l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
finos/rune-python-runtime#45 ·
-
[Bug]: LangGraph Store sync put bypasses namespace validationPeut-être pris @ktz03 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
volcengine/OpenViking#6050 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
hummingbot/condor#283 ·
Les mainteneurs répondent en général sous 1 jour