FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Comparing mruby:master...dearblue:refinements · mruby/mruby · GitHub

/ mruby Public
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mruby/mruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
Could not load branches
Nothing to show
{{ refName }}
...
head repository: dearblue/mruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refinements
Choose a head ref
Could not load branches
Nothing to show
{{ refName }}
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 36 files changed
  • 1 contributor

Commits on Apr 24, 2022

  1. Extract method_lookup() from mrb_search_method_vm()

    リファインメント実装で使うため。
    dearblue committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    e99b621 View commit details
    Browse the repository at this point in the history
  2. ((WIP)) リファインメント実装のための拡張

    拡張された多くの部分を実際に有効化するには、`MRB_USE_REFINEMENT` マクロを定義する必要があります。
    有効にすると、オブジェクトコード及びヒープメモリをより多く使うこととなることに注意してください。
    
    - `enum mrb_vtype` に `MRB_TT_REFINEMENT` を追加しました。
      `MRB_TT_REFINEMENT` オブジェクトは struct RClass を使います。
    - `MRB_PROC_SEPARATE_REFINEMENTS` フラグを追加します。
      スコープは作らずともリファインメント範囲が区切られる `eval` のためです。
    - `struct mrb_callinfo::activated_refinements` フィールドを追加しました。
    - `struct RProc` を拡張
      - `struct RProc::body.extra_proc` フィールドを追加します。
      - `struct RProc::body.irep` フィールド名を `struct RProc::body.irep_direct` に変更します。
        *重要*: これまでの `proc->body.irep` による irep ポインタの取得は `MRB_PROC_IREP(proc)` に置き換えます。
    - `mrb_proc_new()` と `mrb_closure_new()` 関数を拡張し、使用するリファインメントの配列を受け取る引数を追加しました。
    - `mrb_proc_copy()` 関数を拡張し、`mrb_state *` 引数を追加しました。
    - 隠し関数の追加
      - `mrb_cipush()` function
      - `mrb_refinement_funcall()` function
      - `mrb_refinement_method_search_vm()` function
      - `mrb_refinement_method_search_vm_super()` function
    dearblue committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    359f035 View commit details
    Browse the repository at this point in the history
  3. ((WIP)) Add mrbgems/mruby-refinement

    🍭The refinements feature is now available!🎉
    
    リファインメント機能は `mrbgems/mruby-refinement` によって提供されます。
    この `mruby-refinement` を有効にすると、`MRB_USE_REFINEMENT` マクロが追加されます。
    
    - 追加される `MRB_API` 関数 (`mrbgems/mruby-refinement/include/mruby/refinement.h`)
      - `mrb_define_refinement()`
    - 追加されるメソッド (`mrbgems/mruby-refinement`)
      - `main#using`
      - `Module#using`
      - `Module#refine`
      - `Module.used_modules`
    dearblue committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    c920c23 View commit details
    Browse the repository at this point in the history
  4. Symbol#to_proc がリファインメントを考慮するようになった

    引数で与えられたレシーバーとメソッドIDの交換のために新しい配列が作成されるのを抑制します。
    `to_proc` で生成したラムダ関数の中でスプラッタ変数としての配列オブジェクトを保持する必要がないためです。
    これを、変更したものをそのまま次のメソッドに渡しても問題はありません。
    
    また、リファインメントの影響を排除するための新しい命令 `OP_FORWARD` を追加して使うようにします。
    
    ((TODO)) テストする
    
    ref: https://secret-garden.hatenablog.com/entry/2018/12/25/235407
    ref: https://bugs.ruby-lang.org/issues/15114
    dearblue committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    717d4c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5932973 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    026e9b0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ffff523 View commit details
    Browse the repository at this point in the history
Loading

Back | FazBrowse Home | New Git URL