Alan Wu 7293bfe1bf
YJIT: add support for calling bmethods (#6489)
* YJIT: fix a parameter name

* YJIT: add support for calling bmethods

This commit adds support for the VM_METHOD_TYPE_BMETHOD method type in
YJIT. You can get these type of methods from facilities like
Kernel#define_singleton_method and Module#define_method.

Even though the body of these methods are blocks, the parameter setup
for them is exactly the same as VM_METHOD_TYPE_ISEQ, so we can reuse
the same logic in gen_send_iseq(). You can see this from how
vm_call_bmethod() eventually calls setup_parameters_complex() with
arg_setup_method.

Bmethods do need their frame environment to be setup differently. We
handle this by allowing callers of gen_send_iseq() to control the iseq,
the frame flag, and the prev_ep. The `prev_ep` goes into the same
location as the block handler would go into in an iseq method frame.

Co-authored-by: John Hawthorn <john@hawthorn.email>

Co-authored-by: John Hawthorn <john@hawthorn.email>
2022-10-04 22:48:05 -04:00
2022-03-30 20:36:31 +13:00
2022-09-10 09:32:27 +09:00
2022-10-02 08:24:08 -05:00
2022-07-27 18:42:27 +09:00
2022-05-20 14:45:46 -07:00
2022-08-02 11:04:28 +02:00
2022-09-23 06:44:28 +09:00
2022-07-22 21:59:58 +09:00
2022-06-23 22:52:45 +09:00
2022-03-24 10:03:51 -04:00
2022-07-21 09:42:04 -07:00
2022-09-23 15:57:02 -07:00
2022-07-21 09:42:04 -07:00
2022-09-02 14:33:23 +09:00
2022-05-03 09:07:39 -04:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-06-10 22:22:16 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-10-03 23:19:55 +09:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
GPL
2022-08-02 11:04:28 +02:00
2022-07-21 09:42:04 -07:00
2022-10-02 08:24:08 -05:00
2022-09-01 15:20:49 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-09-26 00:41:16 +13:00
2022-09-26 09:21:05 +09:00
2022-09-23 06:44:28 +09:00
2022-06-15 10:52:37 -07:00
2022-10-04 07:09:33 +00:00
2022-08-01 10:36:36 +09:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-09-26 14:44:54 +09:00
2022-07-21 09:42:04 -07:00
2022-10-03 12:03:46 +02:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-08-18 23:25:05 +09:00
2022-09-14 17:30:10 +09:00
2022-07-21 09:42:04 -07:00
2022-09-04 21:53:46 -07:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-04-09 17:43:46 +09:00
2022-07-21 09:42:04 -07:00
2022-06-09 13:40:21 -05:00
2022-07-21 09:42:04 -07:00
2022-07-27 18:42:27 +09:00
2022-08-31 16:36:22 -05:00
2022-03-29 18:14:33 -07:00
2022-07-21 09:42:04 -07:00
2022-09-10 09:32:51 +09:00
2022-07-21 09:02:45 -04:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00
2022-03-24 10:03:51 -04:00
2022-07-21 09:42:04 -07:00
2022-07-21 09:42:04 -07:00

Actions Status: MinGW Actions Status: MJIT Actions Status: Ubuntu Actions Status: Windows AppVeyor status Travis Status Cirrus Status

What is Ruby?

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. mix-in, singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, macOS, etc.) cf. https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers

How to get Ruby with Git

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

https://www.ruby-lang.org/en/downloads/

The mirror of the Ruby source tree can be checked out with the following command:

$ git clone https://github.com/ruby/ruby.git

There are some other branches under development. Try the following command to see the list of branches:

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

How to build

see Building Ruby

Ruby home page

https://www.ruby-lang.org/

Documentation

Mailing list

There is a mailing list to discuss Ruby. To subscribe to this list, please send the following phrase:

subscribe

in the mail body (not subject) to the address ruby-talk-request@ruby-lang.org.

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list or on websites like https://stackoverflow.com.

Bugs should be reported at https://bugs.ruby-lang.org. Read "Reporting Issues" for more information.

Contributing

See "Contributing to Ruby", which includes setup and build instructions.

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

matz@ruby-lang.org

Description
Languages
Ruby 58.9%
C 29.5%
Rust 6.1%
C++ 2.9%
Yacc 0.9%
Other 1.6%