[Feature Request]: Emit expression tags for comparisons and their operands
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 54/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- backend, testing-qa
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 156
- 平均マージ
- 8時間 31分
- マージ済み PR(30日)
- 55
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oracle/graalpython のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
oracle/graalpython#1213 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
oracle/graalpython#1105 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
oracle/graalpython#1102 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 半日 初心者へのやさしさ 50/100
oracle/graalpython#1209 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 44/100
oracle/graalpython#1198 ·
メンテナーはふだん 1 日以内に返信
oracle/graalpython の issue をすべて見る
似ている issue
-
customer-reported question
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Azure/azure-sdk-for-python#49548 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
btclib-org/btclib-wallet#409 ·
メンテナーはふだん 1 日以内に返信
-
Phase 2 PSA Capability & Career Profile
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fastmachinelearning/hls4ml#1582 ·
メンテナーはふだん 3 日以内に返信
-
Sort modelsオープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信