-
Notifications
You must be signed in to change notification settings - Fork 19
majit: stop inheriting a previous compile's target tokens #1287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3346933
b57d542
b7afbf1
e25c7a6
26cc903
2dcf744
56dfbe2
b846a96
7b912e6
857c0bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -397,13 +397,13 @@ impl OptRewrite { | |
| // ── Unary operations ── | ||
|
|
||
| /// Constant fold INT_IS_ZERO. | ||
| /// rewrite.py:512-513 `optimize_INT_IS_ZERO`: | ||
| /// rewrite.py:522-523 `optimize_INT_IS_ZERO`: | ||
| /// return self._optimize_nullness(op, op.getarg(0), False) | ||
| fn optimize_int_is_zero(&self, op: &Op, ctx: &mut OptContext) -> OptimizationResult { | ||
| self.optimize_nullness(op, op.arg(0).to_opref(), false, ctx) | ||
| } | ||
|
|
||
| /// rewrite.py:505-510 `optimize_INT_IS_TRUE`: | ||
| /// rewrite.py:515-520 `optimize_INT_IS_TRUE`: | ||
|
Comment on lines
+400
to
+406
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- repository root ---'
git rev-parse --show-toplevel
printf '%s\n' '--- relevant source excerpt ---'
sed -n '390,430p' majit/majit-metainterp/src/optimizeopt/rewrite.rs
printf '%s\n' '--- all optimize_INT_IS_TRUE references ---'
rg -n -C 2 'optimize_INT_IS_TRUE|rewrite\.py:50[5-9]|rewrite\.py:51[0-9]|rewrite\.py:52[0-9]' majit/majit-metainterp/src/optimizeopt/rewrite.rs
printf '%s\n' '--- candidate upstream/source files ---'
git ls-files | rg '(^|/)(rewrite\.py|rewrite\.rs)$|optimizeopt'Repository: youknowone/pyre Length of output: 7587 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- upstream handler definition and adjacent source ---'
rg -n -C 8 'def optimize_INT_IS_(TRUE|ZERO)' rpython/jit/metainterp/optimizeopt/rewrite.py
printf '%s\n' '--- upstream exact range ---'
sed -n '495,535p' rpython/jit/metainterp/optimizeopt/rewrite.pyRepository: youknowone/pyre Length of output: 2905 Correct the Use 🤖 Prompt for AI Agents |
||
| /// if (not self.is_raw_ptr(op.getarg(0)) and | ||
| /// self.getintbound(op.getarg(0)).is_bool()): | ||
| /// self.make_equal_to(op, op.getarg(0)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the
target_tokensreader description.Line 1307 says
Self::first_target_tokenis the only reader.Self::has_target_tokensalso readstarget_tokensat Lines 1560-1562. Documentfirst_target_tokenas the only descriptor-returning reader, or includehas_target_tokensin the reader list.Proposed comment correction
📝 Committable suggestion
🤖 Prompt for AI Agents