summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-09Promote uri to default gemsHiroshi SHIBATA
2019-11-09Promote yaml to default gemsHiroshi SHIBATA
2019-11-09Promote timeout to default gemsHiroshi SHIBATA
2019-11-09Fixup 368ee984ed52f6abe1fdf8360ad72e6cf1cbfa66Hiroshi SHIBATA
2019-11-09Promote observer to default gems. But not yet releasedHiroshi SHIBATA
2019-11-09Promote readline to default gems named readline-extHiroshi SHIBATA
2019-11-09Added gemspec for readline gem that is wrapper library for reline and ↵Hiroshi SHIBATA
readline extension
2019-11-09Revert "don't embed full-path."Koichi Sasada
This reverts commit dfac2e9eb3d697e56d91151584f1d3cf9d2c79c9. It does not work if cwd is different from builddir...
2019-11-09don't embed full-path.Koichi Sasada
miniruby load *.rb from srcdir. To specify file path, tool/mk_builtin_loader.rb embed full path of each *.rb file. However it prevent to pre-generation of required files for tarball. This patch generate srcdir/*.rb from __FILE__ information.
2019-11-08Fix passing actual object_id to finalizerJohn Hawthorn
Previously we were passing the memory_id. This was broken previously if compaction was run (which changes the memory_id) and now that object_id is a monotonically increasing number it was always broken. This commit fixes this by defering removal from the object_id table until finalizers have run (for objects with finalizers) and also copying the SEEN_OBJ_ID flag onto the zombie objects. Notes: Merged: https://github.com/ruby/ruby/pull/2658
2019-11-09Try to fix test-spec failure on macOSYusuke Endoh
Not sure what is happening, but spec/ruby/security/cve_2018_6914_spec.rb fails on macOS. https://github.com/ruby/ruby/runs/294462511#step:10:134 I suspect that the state of a directory is weird immediately after it is created (not writable or even world writable?). This change tries to make sure that ENV["TMPDIR"] is actually used by Dir.tmpdir.
2019-11-09Prettify builtin_binary formatNobuyoshi Nakada
2019-11-09* 2019-11-09 [ci skip]git
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-08tool/mk_builtin_loader.rb: check if op is an array or notYusuke Endoh
The insn array includes not only an array but also some literal objects.
2019-11-08Make prefix staticNobuyoshi Nakada
2019-11-08Update builtin include filesNobuyoshi Nakada
2019-11-08Add VPATH to rbinc rule for nmakeNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2660
2019-11-08delete cc->aux.inc_sp卜部昌平
Nobody uses it.
2019-11-08Add file mode to generated files [ci skip]Nobuyoshi Nakada
2019-11-08builtin.h must be included *AFTER* vm_core.hNobuyoshi Nakada
2019-11-08Renamed `load_*.inc` as `*.rbinc` to utilize a suffix ruleNobuyoshi Nakada
2019-11-08Suppress "shadowing outer local variable" warning in 2.5aycabta
2019-11-08cstr -> bytesKoichi Sasada
rb_iseq_ibf_load_cstr() accepts bytes, but not NUL-terminate C string. To make it clear, rename it to _bytes.
2019-11-08fix line break code (fix to LF)Koichi Sasada
2019-11-08forget to add gc.rbKoichi Sasada
2019-11-08use builtins for GC.Koichi Sasada
Define a part of GC in gc.rb.
2019-11-08Stop compiling if type mismatch was found.Koichi Sasada
If there is a type mismatch between expected builtin function type and actual function type, C compiler shows warning. For example, `__builtin_func(1, 2)` expects `func(rb_ec_t*, VALUE self, VALUE p1, VALUE p2)` function definition. However, it is easy to overlook "warning" messages. So this patch changes to stop compiling as an error if there is a mismatch.
2019-11-08builtin.h must be included *AFTER* vm_core.hNobuyoshi Nakada
2019-11-08Removed BOM [ci skip]Nobuyoshi Nakada
2019-11-08Fix typoKazuki Tsujimoto
2019-11-08name the result of calccall卜部昌平
This is a pure refactoring for better understanding of what is happening here. Should change nothing but readability.
2019-11-08Define Struct#deconstruct_keysKazuki Tsujimoto
2019-11-08revival of __func__卜部昌平
dad2abc69fdd1af52df353b8604017bd6a5c6a99 deleted __func__ but ruby already use this feature under RUBY_FUNCTION_NAME_STRING macro. Use it.
2019-11-08describe vm_cache_check_for_class_serial [ci skip]卜部昌平
Added comments describing what it is. Requested by ko1.
2019-11-08Change requirements of BASERUBY.Koichi Sasada
"BASERUBY: Ruby 1.9.3" test on Travis-CI checks builds on Ruby 1.9.3. However this version is too old and 46acd0075d requires Ruby 2.2 and later.
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-08do not use __func__.Koichi Sasada
Microsoft Visual Studio 12.0 doesn't support it.
2019-11-08fix line break code (fix to LF)Koichi Sasada
2019-11-08fix typeKoichi Sasada
2019-11-08* remove trailing spaces. [ci skip]git
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-07Add a counter for compactionAaron Patterson
Keep track of the number of times the compactor ran. I would like to use this as a way to keep track of inline cache reference updates.
2019-11-08* 2019-11-08 [ci skip]git
2019-11-07Use a monotonically increasing number for object_idJohn Hawthorn
This changes object_id from being based on the objects location in memory (or a nearby memory location in the case of a conflict) to be based on an always increasing number. This number is a Ruby Integer which allows it to overflow the size of a pointer without issue (very unlikely to happen in real programs especially on 64-bit, but a nice guarantee). This changes obj_to_id_tbl and id_to_obj_tbl to both be maps of Ruby objects to Ruby objects (previously they were Ruby object to C integer) which simplifies updating them after compaction as we can run them through gc_update_table_refs. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2019-11-07Suppress unused variable warningNobuyoshi Nakada