summaryrefslogtreecommitdiff
path: root/common.mk
AgeCommit message (Collapse)Author
2019-12-04Add missing dependencyTakashi Kokubun
https://travis-ci.org/ruby/ruby/jobs/620972117
2019-12-02Revert "builtin_binary.inc needs miniruby itself for RubyVM.each_builtin"Nobuyoshi Nakada
This reverts commit 2615030c521afc822c66a7e139ccba3d2365ab56, which doesn't work when cross compiling, except for mingw.
2019-12-02builtin_binary.inc needs miniruby itself for RubyVM.each_builtinNobuyoshi Nakada
2019-11-29fastpath for ivar read of FL_EXIVAR objects.Koichi Sasada
vm_getivar() provides fastpath for T_OBJECT by caching an index of ivar. This patch also provides fastpath for FL_EXIVAR objects. FL_EXIVAR objects have an each ivar array and index can be cached as T_OBJECT. To access this ivar array, generic_iv_tbl is exposed by rb_ivar_generic_ivtbl() (declared in variable.h which is newly introduced). Benchmark script: Benchmark.driver(repeat_count: 3){|x| x.executable name: 'clean', command: %w'../clean/miniruby' x.executable name: 'trunk', command: %w'./miniruby' objs = [Object.new, 'str', {a: 1, b: 2}, [1, 2]] objs.each.with_index{|obj, i| rep = obj.inspect rep = 'Object.new' if /\#/ =~ rep x.prelude str = %Q{ v#{i} = #{rep} def v#{i}.foo @iv # ivar access method (attr_reader) end v#{i}.instance_variable_set(:@iv, :iv) } puts str x.report %Q{ v#{i}.foo } } } Result: v0.foo # T_OBJECT clean: 85387141.8 i/s trunk: 85249373.6 i/s - 1.00x slower v1.foo # T_STRING trunk: 57894407.5 i/s clean: 39957178.6 i/s - 1.45x slower v2.foo # T_HASH trunk: 56629413.2 i/s clean: 39227088.9 i/s - 1.44x slower v3.foo # T_ARRAY trunk: 55797530.2 i/s clean: 38263572.9 i/s - 1.46x slower
2019-11-23Show include directive differences only when under gitv2_7_0_preview3Nobuyoshi Nakada
When building from tarballs, the source directory is not a git repository.
2019-11-18Update dependenciesNobuyoshi Nakada
2019-11-18update deps.Koichi Sasada
https://travis-ci.org/ruby/ruby/jobs/613242256#L2205
2019-11-15load prelude.rb by builtin features.Koichi Sasada
The script in prelude.rb was embed in MRI to load it (eval this script at everyboot). This commit change the loading process of prelude.rb. MRI doesn't eval a script, but load from compiled binary with builtin feature. So that Init_prelude() does not load `prelude.rb` now.
2019-11-13Update dependenciesKazuhiro NISHIYAMA
patch from https://travis-ci.org/ruby/ruby/jobs/611152175#L2204
2019-11-12Create `RUBYCOMMONDIR` directory in advanceNobuyoshi Nakada
As well as the directory per architecture. Closes https://github.com/ruby/ruby/pull/2669
2019-11-11add deps for miniprelude.cKoichi Sasada
2019-11-11Extract gem files after updateNobuyoshi Nakada
So that test/optparse/test_did_you_mean.rb can find did_you_mean.rb.
2019-11-10Get rid of FreeBSD make incompatibility [Bug #16331]Nobuyoshi Nakada
FreeBSD make works differently with `-j` option. > -j max_jobs > Specify the maximum number of jobs that `make` may have running > at any one time. The value is saved in `.MAKE.JOBS.` Turns > compatibility mode off, unless the `B` flag is also specified. > When compatibility mode is off, all commands associated with a > target are executed in a single shell invocation as opposed to > the traditional one shell invocation per line. This can break > traditional scripts which change directories on each command > invocation and then expect to start with a fresh environment on > the next line. It is more efficient to correct the scripts > rather than turn backwards compatibility on. Stop using exit, cd, exec in middle of commands.
2019-11-09Fix builtin scirpt pathsNobuyoshi Nakada
Do not search builtin scripts by using VPATH, to get rid of weird nmake VPATH. Notes: Merged: https://github.com/ruby/ruby/pull/2665
2019-11-09Updated miniprelude.o dependencyNobuyoshi Nakada
2019-11-09Embed builtin ruby scripts in miniprelude.cNobuyoshi Nakada
Instead of reading from the files by the full-path at runtime. As rbinc files need to be included in distributed tarballs, the full-paths at the packaging are unavailable at compilation times.
2019-11-09Fixed the dependencyNobuyoshi Nakada
2019-11-08Added pack.rb to BUILTIN_RB_SRCSNobuyoshi Nakada
2019-11-08Rubified the APIs of pack.cYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/2659
2019-11-08Update builtin include filesNobuyoshi Nakada
2019-11-08Renamed `load_*.inc` as `*.rbinc` to utilize a suffix ruleNobuyoshi Nakada
2019-11-08use builtins for GC.Koichi Sasada
Define a part of GC in gc.rb.
2019-11-08Define IO#read/write_nonblock with builtins.Koichi Sasada
IO#read/write_nonblock methods are defined in prelude.rb with special private method __read/write_nonblock to reduce keyword parameters overhead. We can move them into io.rb with builtin functions.
2019-11-08use builtin for RubyVM::AbstractSyntaxTree.Koichi Sasada
Define RubyVM::AbstractSyntaxTree in ast.rb with __builtin functions. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-11-08use builtin for TracePoint.Koichi Sasada
Define TracePoint in trace_point.rb and use __builtin_ syntax. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-11-08support builtin features with Ruby and C.Koichi Sasada
Support loading builtin features written in Ruby, which implement with C builtin functions. [Feature #16254] Several features: (1) Load .rb file at boottime with native binary. Now, prelude.rb is loaded at boottime. However, this file is contained into the interpreter as a text format and we need to compile it. This patch contains a feature to load from binary format. (2) __builtin_func() in Ruby call func() written in C. In Ruby file, we can write `__builtin_func()` like method call. However this is not a method call, but special syntax to call a function `func()` written in C. C functions should be defined in a file (same compile unit) which load this .rb file. Functions (`func` in above example) should be defined with (a) 1st parameter: rb_execution_context_t *ec (b) rest parameters (0 to 15). (c) VALUE return type. This is very similar requirements for functions used by rb_define_method(), however `rb_execution_context_t *ec` is new requirement. (3) automatic C code generation from .rb files. tool/mk_builtin_loader.rb creates a C code to load .rb files needed by miniruby and ruby command. This script is run by BASERUBY, so *.rb should be written in BASERUBY compatbile syntax. This script load a .rb file and find all of __builtin_ prefix method calls, and generate a part of C code to export functions. tool/mk_builtin_binary.rb creates a C code which contains binary compiled Ruby files needed by ruby command. Notes: Merged: https://github.com/ruby/ruby/pull/2655
2019-11-05Do not occupy `ARGV` by XRUBY commandNobuyoshi Nakada
Instead run test-bundled-gems.rb by `ENV['RUBY']`, which should be set by runruby.rb. Notes: Merged: https://github.com/ruby/ruby/pull/2646
2019-11-05Share test-bundled-gems-run in common.mkNobuyoshi Nakada
2019-10-30Update Unicode Emoji version from 12.0 to 12.1.Martin Dürst
This update does not add any new codepoint assignments, it just expands the range of emoji codepoint sequences recommended for public interchange. Depending on how emoji data files are cached, this commit may require manual intervention in some build environments (including some CI systems).
2019-10-24Combine call info and cache to speed up method invocationAlan Wu
To perform a regular method call, the VM needs two structs, `rb_call_info` and `rb_call_cache`. At the moment, we allocate these two structures in separate buffers. In the worst case, the CPU needs to read 4 cache lines to complete a method call. Putting the two structures together reduces the maximum number of cache line reads to 2. Combining the structures also saves 8 bytes per call site as the current layout uses separate two pointers for the call info and the call cache. This saves about 2 MiB on Discourse. This change improves the Optcarrot benchmark at least 3%. For more details, see attached bugs.ruby-lang.org ticket. Complications: - A new instruction attribute `comptime_sp_inc` is introduced to calculate SP increase at compile time without using call caches. At compile time, a `TS_CALLDATA` operand points to a call info struct, but at runtime, the same operand points to a call data struct. Instruction that explicitly define `sp_inc` also need to define `comptime_sp_inc`. - MJIT code for copying call cache becomes slightly more complicated. - This changes the bytecode format, which might break existing tools. [Misc #16258] Notes: Merged: https://github.com/ruby/ruby/pull/2564
2019-10-24Added refresh-gemsNobuyoshi Nakada
Refreshes bundled gems to the latest version, and extracts them.
2019-10-23name2ctype.h depends on also Emoji dataNobuyoshi Nakada
2019-10-16Comparable#clamp with a range [Feature #14784]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2556
2019-10-10make rb_raise a GVL-only function again卜部昌平
Requested by ko1 that ability of calling rb_raise from anywhere outside of GVL is "too much". Give up that part, move the GVL aquisition routine into gc.c, and make our new gc_raise().
2019-10-10Now error.o needs thread.hNobuyoshi Nakada
2019-10-10allow rb_raise from outside of GVL卜部昌平
Now that allocation routines like ALLOC_N() can raise exceptions on integer overflows. This is a problem when the calling thread has no GVL. Memory allocations has been allowed without it, but can still fail. Let's just relax rb_raise's restriction so that we can call it with or without GVL. With GVL the behaviour is unchanged. With no GVL, wait for it. Also, integer overflows can theoretically occur during GC when we expand the object space. We cannot do so much then. Call rb_memerror and let that routine abort the process.
2019-10-05Added dependencies on prerequisite makefilesNobuyoshi Nakada
2019-09-19Use benchmark-driver v0.15.6Takashi Kokubun
to fix another keyword argument warning which was added recently.
2019-09-13Upgrade benchmark_driver to v0.15.5Takashi Kokubun
Fixed new Struct-related keyword argument warnings
2019-09-07Fixed wrong usage of file2lastrev.rbNobuyoshi Nakada
2019-09-07Upgrade benchmark-driver to v0.15.4Takashi Kokubun
Fixing a bug on Windows introduced in v0.15.0
2019-09-07Upgrade benchmark-driver to v0.15.3Takashi Kokubun
It got some nice features for better support of benchmark_driver-output-charty, Windows, ridk, and rbenv.
2019-09-03Explain how to run an individual btest in helpTakashi Kokubun
2019-09-01Upgrade benchmark-driver for keyword args warningsTakashi Kokubun
2019-08-26Show MFLAGS to check `Set ENV` in .github/workflows/ubuntu.ymlKazuhiro NISHIYAMA
2019-08-26CPPFLAGS is not needed for linkNobuyoshi Nakada
2019-08-26Moved INCFLAGS to XCFLAGS from CPPFLAGS as well as mswinNobuyoshi Nakada
Rules which have used CPPFLAGS will need XCFLAGS or INCFLAGS now.
2019-08-26Add INCFLAGS for fake.rbNobuyoshi Nakada
INCFLAGS is not included in CPPFLAGS on mswin, not to be exported to rbconfig.rb.
2019-08-26Removed unnecessary flags for fake.rbNobuyoshi Nakada
Flags for ruby core such as warning and `_FORTIFY_SOURCE` macro are not necessary to make fake.rb, except for `RUBY_EXPORT` macro which prevents to include ruby/backward.h.
2019-08-22Use () instead of {} for nmakeHiroshi SHIBATA