Optimize object literals
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
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, javascript
- Área
- compilers, performance
Línea de trabajo
Start by tracing how the shown {x, y, z} literal is compiled into object and define_field bytecode, then read how object layouts and JSShape updates are handled. The issue gives no file or test names, so locate the compiler and bytecode tests before changing anything. Done means literals with known properties can use an object template and the generated bytecode and layout behavior are verified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
function o(x,y,z){ return {x,y,z} }
Produces bytecode that sets the fields 1-by-1:
;; function o(x, y, z) { return {x, y, z} }
object
get_arg0 0 ; x
define_field x
get_arg1 1 ; y
define_field y
get_arg2 2 ; z
define_field z
return
It should be more efficient to use an "object template" that describes what properties the object has:
;; function o(x, y, z) { return {x, y, z} }
get_arg0 0 ; x
get_arg1 1 ; y
get_arg2 2 ; z
define_object <id> ; ( x y z -- o )
return
Benefits:
- reduces bytecode size
- object layout is known upfront, don't have to update JSShape repeatedly
- Lenguaje dominante
- C
- Estrellas
- 3.9k
- Forks
- 389
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 18
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 quickjs-ng/quickjs
-
JS_SetPropertyInternal2 loses the value when a lazy property on the prototype runs out of memoryAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quickjs-ng/quickjs#1852 ·
Los mantenedores suelen responder en 1 día
-
Array.prototype.find frees an element twice when interrupted between iterationsPosiblemente ocupada @josefguenther la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
quickjs-ng/quickjs#1792 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Object.prototype.propertyIsEnumerable converts `this` before the property keyPosiblemente ocupada @SomSamantray la tomó hace 22 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
quickjs-ng/quickjs#1772 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
quickjs-ng/quickjs#1865 ·
Los mantenedores suelen responder en 1 día
-
Bring back JS_READ_OBJ_ROM_DATAAbiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
quickjs-ng/quickjs#1864 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de quickjs-ng/quickjs
Issues similares
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdictPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodocumentation severity: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
luainkernel/lunatik#2231 ·
Los mantenedores suelen responder en 1 día
-
aspect ratio 16:10Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Revivedx/SavageWindRecomp#402 ·
Los mantenedores suelen responder en 1 día
-
cleanup help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ESPresense/ESPresense#2602 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/arrow-swift#209 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
libretiny-eu/libretiny#435 ·
Los mantenedores suelen responder en 4 días