ruby/tool
Koichi Sasada a3e6f52c17 rename __builtin_inline!(code) and introduce others.
rename __builtin_inline!(code) to __builtin_cstmt(code).
Also this commit introduce the following inlining C code features.

* __builtin_cstmt!(STMT)

(renamed from __builtin_inline!)

Define a function which run STMT implicitly and call this function at
evatuation time. Note that you need to return some value in STMT.
If there is a local variables (includes method parameters), you can
read these values.

  static VALUE func(ec, self) {
    VALUE x = ...;
    STMT
  }

Usage:
  def double a
    # a is readable from C code.
    __builtin_cstmt! 'return INT2FIX(FIX2INT(a) * 2);'
  end

* __builtin_cexpr!(EXPR)

Define a function which invoke EXPR implicitly like `__builtin_cstmt!`.
Different from cstmt!, which compiled with `return EXPR;`.
(`return` and `;` are added implicitly)

  static VALUE func(ec, self) {
    VALUE x = ...;
    return EXPPR;
  }

Usage:
  def double a
    __builtin_cexpr! 'INT2FIX(FIX2INT(a) * 2)'
  end

* __builtin_cconst!(EXPR)

Define a function which invoke EXPR implicitly like cexpr!.
However, the function is called once at compile time, not evaluated time.
Any local variables are not accessible (because there is no local variable
at compile time).

Usage:
  GCC = __builtin_cconst! '__GNUC__'

* __builtin_cinit!(STMT)

STMT are writtein in auto-generated code.
This code does not return any value.

Usage:

  __builtin_cinit! '#include <zlib.h>'
  def no_compression?
    __builtin_cconst! 'Z_NO_COMPRESSION ? Qtrue : Qfalse'
  end
2019-11-27 03:55:28 +09:00
..
lib Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
m4 typedef rb_jmpbuf_t to void *[5] if __builtin_setjmp is used 2019-09-21 13:24:58 +09:00
ruby_vm Avoid top-level search for nested constant reference from nil in defined? 2019-11-13 15:36:58 +09:00
test use builtin for TracePoint. 2019-11-08 09:09:29 +09:00
actions-commit-info.sh Add commit number of today to notification of GitHub Actions 2019-11-13 14:25:30 +09:00
asm_parse.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
bisect.sh Recent commits of trunk do not have svn revision 2019-05-07 22:53:45 +09:00
build-transcode
checksum.rb Move vpath.rb into tool library direcotry. 2019-07-15 13:16:16 +09:00
colors Move to tool/lib from test/lib. 2019-07-02 07:59:54 +09:00
darwin-cc darwin-cc: hide ld warnings 2018-09-21 07:19:13 +00:00
downloader.rb Use jsDelivr instead of raw.githubusercontent.com 2019-11-22 13:55:59 +09:00
enc-emoji-citrus-gen.rb Put jisx0208.rb to under the library directory. 2019-07-15 11:16:29 +09:00
enc-emoji4unicode.rb
enc-unicode.rb Embed the Emoji version 2018-11-27 06:44:02 +00:00
eval.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
expand-config.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
extlibs.rb Put colorize to library directory. 2019-07-15 09:40:22 +09:00
fake.rb Add RbConfig.fire_update! 2018-11-14 04:42:14 +00:00
fetch-bundled_gems.rb Use `git pull` instead of `git fetch` if master branch 2019-09-04 12:46:26 +09:00
file2lastrev.rb Exit gently if no VCS found but --suppress_not_found is given 2019-09-07 17:26:28 +09:00
format-release format-release uses the result of GitHub Actions 2019-11-12 01:22:59 +09:00
gem-unpack.rb Remove unneeded exec bits from some files 2019-11-09 21:36:30 +09:00
gen_dummy_probes.rb probes.dmyh: remove preprocessor directives 2016-07-06 05:03:14 +00:00
gen_ruby_tapset.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
generic_erb.rb Removed needless LOAD_PATH modification. 2019-07-15 13:44:37 +09:00
git-refresh tool/git-refresh: skip git fetch and checkout 2018-07-08 05:52:12 +00:00
gperf.sed gperf.sed: static declarations 2017-12-15 14:42:43 +00:00
id2token.rb Removed needless LOAD_PATH modification. 2019-07-15 13:44:37 +09:00
ifchange ifchange: --debug option 2018-02-08 02:08:27 +00:00
insns2vm.rb insns2vm.rb: make #generate_parser private 2018-01-27 02:14:20 +00:00
install-sh configure.ac 2017-09-29 13:21:17 +00:00
leaked-globals st.c: Use rb_st_* prefix instead of st_* (#2479) 2019-09-22 22:12:18 +09:00
make-snapshot Fix typo [ci skip] 2019-10-08 00:00:24 +09:00
make_hgraph.rb * tool/make_hgraph.rb: added. 2015-05-29 08:39:50 +00:00
mdoc2man.rb Add support for the `Lk` macro to tool/mdoc2man.rb 2016-09-23 12:40:16 +00:00
merger.rb Add github repo to remove_tag 2019-11-22 19:05:58 +09:00
mjit_archflag.sh mjit_archflag.sh: fix bare word in the header 2018-11-22 06:09:07 +00:00
mk_builtin_binary.rb Prettify builtin_binary format 2019-11-09 00:21:44 +09:00
mk_builtin_loader.rb rename __builtin_inline!(code) and introduce others. 2019-11-27 03:55:28 +09:00
mk_call_iseq_optimized.rb more on struct rb_call_data 2019-10-25 12:24:22 +09:00
mkconfig.rb Removed unused variable 2019-06-28 12:39:14 +09:00
mkrunnable.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
node_name.rb tool/node_name.rb: rewrote without flip-flop 2018-09-07 13:43:01 +00:00
parse.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
prereq.status Substitute autoconf variables by prereq.status 2019-07-02 09:44:37 +09:00
probes_to_wiki.rb
pure_parser.rb Refine error message 2019-08-03 14:20:36 +09:00
rbinstall.rb Remove binary data at installation 2019-11-11 12:20:03 +09:00
rbuninstall.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
redmine-backporter.rb tool/redmine-backporter.rb: Change redmine git revisions URL path. 2019-06-16 11:59:59 +09:00
release.sh tool/release.sh uses ruby-actions' result 2019-10-22 22:15:52 +09:00
rmdirs tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
run-gcov.rb tool/run-gcov.rb: ignore rubyspec_temp directory 2017-07-04 16:02:18 +00:00
run-lcov.rb Revamp method coverage to support define_method 2017-12-05 07:16:42 +00:00
runruby.rb Fix some bundler specs (#2380) 2019-08-20 09:46:31 +09:00
strip-rdoc.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
sync_default_gems.rb Add sync task for ruby/openssl 2019-11-26 18:26:08 +09:00
test-bundled-gems.rb Do not occupy `ARGV` by XRUBY command 2019-11-05 08:45:19 +09:00
test-coverage.rb `make test-all COVERAGE=true` supports directory-separated build 2018-04-05 01:05:16 +00:00
transcode-tblgen.rb tool: fixed shadowing variables 2018-05-18 00:40:06 +00:00
transform_mjit_header.rb Fix a typo [ci skip] 2018-11-05 06:02:42 +00:00
travis_retry.sh We did not have tool/ before checkout 2019-08-12 14:37:26 +09:00
update-deps Dependents on probes.h need the dummy header too 2019-11-18 23:16:22 +09:00
vtlh.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
ytab.sed Propagate parser_params to rb_yytnamerr 2019-05-10 22:02:54 +09:00