Deduplicate the per-architecture cmplog/expression code (~2,800 lines)
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
- 45/100
Línea de trabajo
Read the architecture files under src/arch/ and the forwarding implementation in src/arch/mod.rs lines 524–698. Compare the repeated arithmetic, simplify, pair matching, and accessors, then inspect the proposed split between shared arithmetic and dispatch. Done means the duplicated code and identified dead code are addressed consistently across architectures; verify behavior with the project’s relevant tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Where
src/arch/{x86_64,x86,arm,aarch64,risc_v}.rs,src/arch/mod.rs524-698
Problem
The 196-line CmpExpr::Add table is byte-identical in all five arch files (all say "Cannot multiply" in the Add error). simplify is identical between arm/aarch64 and between x86/x86_64. The CmpValue pair match, trace_pc, new_unchecked and accessors are copied five times. mod.rs hand-forwards ~175 lines of trait methods (where the magic-3 dispatch bug lives). Dead: cpu_instrumentation_subscribe, CmpValue::Expr, CmpType::{Fp,FpMod,IntMod,Transform}; x86 cmp_type() always returns vec![].
Impact
Fixes land in one arch and not the others (several issues above).
Suggested fix
PR A: move arithmetic to impl CmpValue plus one shared cmp_pair(). PR B: replace the forwarding impl with a macro or enum_dispatch.
Status
Reported by static code review at 79972db; not yet re-verified line by line. Found by reading the code; not reproduced under SIMICS.
- Lenguaje dominante
- Rust
- Estrellas
- 335
- Forks
- 26
- Merge medio
- 1 d 50 min
- PR fusionados (30 d)
- 12
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un 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 intel/tsffs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
Todos los issues de intel/tsffs
Issues similares
-
bug UI
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
wardian-app/Wardian#1746 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
jlcodes99/cockpit-tools#3125 ·
Los mantenedores suelen responder en 2 días
-
bug user-sprint
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Vondor/KassenSturz#967 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
area:build bug effort:low P5 source:agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día