Code Monkey home page Code Monkey logo

Comments (13)

herumi avatar herumi commented on September 18, 2024

bindは一度しかできないという制約を入れるのはありでしょうか。
また二つ目のJmpについてですが、Labelがコピー可能であれば

Label AsmSmallProcedure()
{
  Label label;
  je(label);
  return label;
}

Label label1;
bind(&label1);

Label label2 = AsmSmallProcedure();

link(label2, label1); // 空labelへのlinkは一度だけという制約を入れるかも。

とすることで同等の機能が実現できるという理解はあってますか。

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

bindは一度しかできないという制約を入れるのはありでしょうか。

ありだと思います.

また二つ目のJmpについてですが、Labelがコピー可能であれば

link(label2, label1); が, je の jump 先を label1 へ向けるという semantics を持つのであれば, 同等です.

from xbyak.

herumi avatar herumi commented on September 18, 2024

ありがとうございます。ではその方向で実装を考えてみようと思います。制約はAutoGrowでないときに過去のラベルを全て保持しておかないといけなくなりそうなことから入れようかと思ってます。

from xbyak.

herumi avatar herumi commented on September 18, 2024

実装してみました。link(label2, label1)はassignL(dstLabel, srcLabel);として定義しました(dstLabelのjmp先をsrcLabelと同じにするという挙動)。

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

ありがとうございます!! 試してみますですー.

from xbyak.

herumi avatar herumi commented on September 18, 2024

不具合、改善要望ありましたらお願いします。

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

@miura1729 may also benefit from this new feature :)

iv/aero change Constellation/iv@c20c577
iv/lv5/breaker change Constellation/iv@baddc45

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

iv/aero change is now heavily tested by iv/lv5 test cases including

  • SunSpider
  • V8-suite
  • iv_unit_tests (including tests for iv/aero)
  • lv5_unit_tests (lv5 engine regression tests)
  • Test262 (11648 tests)

And currently there's no regression. Great!
https://travis-ci.org/Constellation/iv/jobs/20920736

from xbyak.

herumi avatar herumi commented on September 18, 2024

いきなりヘビーに使っていただいてありがとうございます&今まで面倒くさいやり方しかできなくてすいませんでした。

from xbyak.

herumi avatar herumi commented on September 18, 2024

ラベルにリファレンスカウンタを入れて参照回数が0になったら定義済みラベルのリストから削除するようにしてみました。
502f65a

小さいコードでは殆ど関係ないと思いますが、ある程度ステップ数が大きくてラベルが局所的なものが多いコードではこの修正はあったほうがうれしいでしょうか。
以前、std::mapよりもstd::unordered_mapの方がよくなるパターンがあると仰っていたので…。

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

おおお, 確かに, local といったスコープがないので label が際限なく増えるのはまずいですね, ありがとうございます, 早速試してみます.

from xbyak.

Constellation avatar Constellation commented on September 18, 2024

rich_label branch のものの実装に入れ替え, test が全て通るのを確認しました!

from xbyak.

herumi avatar herumi commented on September 18, 2024

確認ありがとうございました。
inLocalLabel(), outLocalLabel()で挟んだラベルも同様の処理ができますね(今頃気がついた)。対応しておきます。

from xbyak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.