Optimize object literals
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c, javascript
- 領域
- compilers, performance
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 3.9k
- フォーク
- 389
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quickjs-ng/quickjs のほかの issue
-
Array.prototype.find frees an element twice when interrupted between iterations対応中かも @josefguenther が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
quickjs-ng/quickjs#1792 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Object.prototype.propertyIsEnumerable converts `this` before the property key対応中かも @SomSamantray が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
quickjs-ng/quickjs#1772 ·
メンテナーはふだん 2 日以内に返信
-
Deserialization corrupts data or returns `undefined` when a RegExp precedes a shared object reference対応中かも @Sree24-ui が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quickjs-ng/quickjs#1771 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
Crash in js_map_finalizer when a WeakMap value is the symbol key of the next entry対応中かも @wleeaf が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
quickjs-ng/quickjs#1835 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
quickjs-ng/quickjs#1833 ·
メンテナーはふだん 2 日以内に返信
quickjs-ng/quickjs の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
Lakr233/vphone-cli#743 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
libsdl-org/SDL#16584 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
FriendsofECCE/ECCE#519 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
containers/crun#2415 ·
メンテナーはふだん 1 日以内に返信