This commit adds a `capacity` field to shapes, and adds shape
transitions whenever an object's capacity changes. Objects which are
allocated out of a bigger size pool will also make a transition from the
root shape to the shape with the correct capacity for their size pool
when they are allocated.
This commit will allow us to remove numiv from objects completely, and
will also mean we can guarantee that if two objects share shapes, their
IVs are in the same positions (an embedded and extended object cannot
share shapes). This will enable us to implement ivar sets in YJIT using
object shapes.
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Fixes id.h error during updating ripper.c by `make after-update`.
While it used to update id.h in the build directory, but was trying to
update ripper.c in the source directory. In principle, files in the
source directory can or should not depend on files in the build
directory.
To make some kind of Ractor related extensions, some functions
should be exposed.
* include/ruby/thread_native.h
* rb_native_mutex_*
* rb_native_cond_*
* include/ruby/ractor.h
* RB_OBJ_SHAREABLE_P(obj)
* rb_ractor_shareable_p(obj)
* rb_ractor_std*()
* rb_cRactor
and rm ractor_pub.h
and rename srcdir/ractor.h to srcdir/ractor_core.h
(to avoid conflict with include/ruby/ractor.h)
This commit introduces Ractor mechanism to run Ruby program in
parallel. See doc/ractor.md for more details about Ractor.
See ticket [Feature #17100] to see the implementation details
and discussions.
[Feature #17100]
This commit does not complete the implementation. You can find
many bugs on using Ractor. Also the specification will be changed
so that this feature is experimental. You will see a warning when
you make the first Ractor with `Ractor.new`.
I hope this feature can help programmers from thread-safety issues.
Moving public headers was 12-years ago, no depend files would
expect ruby.h in the top source directory now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently, parse.y actions are hard to read and write because the code
has double meaning (for core parser and for ripper). I think that, if
it is easy to write ripper's code shortly and simply, the double meaning
trick is not needed.
For the sake, this change adds a simple DSL for ripper's code. For
example, in parse.y, we can write:
/*% ripper: stmts_add(stmts_new, void_stmt) %*/
instead of:
$$ = dispatch2(stmts_add, dispatch0(stmts_new),
dispatch0(void_stmt));
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (ripper.c): pass the build directory path for id.h
which may be generated there.
* ext/ripper/depend (ripper.y): search the top build directory and
the top source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The order of sed commands in Makefile of ripper was wrong: it tries to
replace `y.tab.c` with `ripper.c`, but before that, ytab.sed replaced
`y.tab.c` with `parse.c`, which led to a wrong result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere. This commit adds necessary
dependencies.
Note: ruby/oniguruma.h now includes onigumo.h,
ruby/io.h includes oniguruma.h,
ruby/encoding.h also includes oniguruma.h,
and internal.h includes encoding.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/gen_dummy_probes.rb: remove include and conditional
directives from probes.dmyh which are removed by preprocessing.
* common.mk: remove unnecessary dependencies on vm_opts.h via
probes.dmyh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/ripper/depend (ripper.E): add missing $(INCFLAGS).
* ext/ripper/tools/strip.rb: insert an empty line for blank or
line directive lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
".eventids2.check" as inference one. but nmake is not cheated by macro.
this fixes build failure introduced at r53448. see also the commit log of
r53452.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
avoid mkmf.rb's suffix rule scanner (lib/mkmf.rb:2085), it detects
suffix rule from depend file and adds .SUFFIXES.
It breaks bsdmake to generate check file named ".eventids2.check".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (configuration, dummy_makefile, create_makefile):
show library installation messages only when any files need to
be updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (ext/ripper/ripper.c): VPATH is always ../.. from
ext/ripper.
* ext/ripper/depend (.y.c): VPATH is not needed for an
intermediate file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
than nmke.
* ext/ripper/depend: use VPATH expecting removed by above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
disthdrdir to specify the path of id.h, parse.h and etc.
* ext/ripper/depend: use above macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e