aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Added gemspec for readline gem that is wrapper library for reline and ↵Hiroshi SHIBATA2019-11-093-0/+29
| | | | readline extension
* Revert "don't embed full-path."Koichi Sasada2019-11-094-27/+6
| | | | | | This reverts commit dfac2e9eb3d697e56d91151584f1d3cf9d2c79c9. It does not work if cwd is different from builddir...
* don't embed full-path.Koichi Sasada2019-11-094-6/+27
| | | | | | | 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.
* Fix passing actual object_id to finalizerJohn Hawthorn2019-11-082-18/+44
| | | | | | | | | | 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.
* Try to fix test-spec failure on macOSYusuke Endoh2019-11-091-0/+8
| | | | | | | | | | 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.
* Prettify builtin_binary formatNobuyoshi Nakada2019-11-091-4/+5
|
* * 2019-11-09 [ci skip]git2019-11-091-1/+1
|
* Fixed the dependencyNobuyoshi Nakada2019-11-091-1/+1
|
* Added pack.rb to BUILTIN_RB_SRCSNobuyoshi Nakada2019-11-081-5/+7
|
* Rubified the APIs of pack.cYusuke Endoh2019-11-085-296/+304
|
* tool/mk_builtin_loader.rb: check if op is an array or notYusuke Endoh2019-11-081-1/+1
| | | | The insn array includes not only an array but also some literal objects.
* Make prefix staticNobuyoshi Nakada2019-11-081-3/+3
|
* Update builtin include filesNobuyoshi Nakada2019-11-081-3/+6
|
* Add VPATH to rbinc rule for nmakeNobuyoshi Nakada2019-11-081-0/+3
|
* delete cc->aux.inc_sp卜部昌平2019-11-081-1/+0
| | | | Nobody uses it.
* Add file mode to generated files [ci skip]Nobuyoshi Nakada2019-11-082-0/+8
|
* builtin.h must be included *AFTER* vm_core.hNobuyoshi Nakada2019-11-081-15/+19
|
* Renamed `load_*.inc` as `*.rbinc` to utilize a suffix ruleNobuyoshi Nakada2019-11-086-24/+18
|
* Suppress "shadowing outer local variable" warning in 2.5aycabta2019-11-083-15/+21
|
* cstr -> bytesKoichi Sasada2019-11-083-7/+7
| | | | | rb_iseq_ibf_load_cstr() accepts bytes, but not NUL-terminate C string. To make it clear, rename it to _bytes.
* fix line break code (fix to LF)Koichi Sasada2019-11-081-169/+169
|
* forget to add gc.rbKoichi Sasada2019-11-081-0/+169
|
* use builtins for GC.Koichi Sasada2019-11-084-213/+42
| | | | Define a part of GC in gc.rb.
* Stop compiling if type mismatch was found.Koichi Sasada2019-11-081-0/+6
| | | | | | | | | | | 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.
* builtin.h must be included *AFTER* vm_core.hNobuyoshi Nakada2019-11-081-1/+1
|
* Removed BOM [ci skip]Nobuyoshi Nakada2019-11-081-1/+1
|
* Fix typoKazuki Tsujimoto2019-11-081-1/+1
|
* name the result of calccall卜部昌平2019-11-081-2/+3
| | | | | This is a pure refactoring for better understanding of what is happening here. Should change nothing but readability.
* Define Struct#deconstruct_keysKazuki Tsujimoto2019-11-083-0/+64
|
* revival of __func__卜部昌平2019-11-081-2/+2
| | | | | | dad2abc69fdd1af52df353b8604017bd6a5c6a99 deleted __func__ but ruby already use this feature under RUBY_FUNCTION_NAME_STRING macro. Use it.
* describe vm_cache_check_for_class_serial [ci skip]卜部昌平2019-11-081-0/+79
| | | | Added comments describing what it is. Requested by ko1.
* Change requirements of BASERUBY.Koichi Sasada2019-11-081-2/+2
| | | | | | "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.
* Define IO#read/write_nonblock with builtins.Koichi Sasada2019-11-086-130/+142
| | | | | | | 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.
* do not use __func__.Koichi Sasada2019-11-081-2/+2
| | | | Microsoft Visual Studio 12.0 doesn't support it.
* fix line break code (fix to LF)Koichi Sasada2019-11-081-134/+134
|
* fix typeKoichi Sasada2019-11-081-1/+1
|
* * remove trailing spaces. [ci skip]git2019-11-081-1/+1
|
* use builtin for RubyVM::AbstractSyntaxTree.Koichi Sasada2019-11-085-129/+157
| | | | | Define RubyVM::AbstractSyntaxTree in ast.rb with __builtin functions.
* use builtin for TracePoint.Koichi Sasada2019-11-088-407/+496
| | | | Define TracePoint in trace_point.rb and use __builtin_ syntax.
* support builtin features with Ruby and C.Koichi Sasada2019-11-0817-28/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add a counter for compactionAaron Patterson2019-11-072-0/+12
| | | | | 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 [ci skip]git2019-11-081-1/+1
|
* Use a monotonically increasing number for object_idJohn Hawthorn2019-11-075-152/+91
| | | | | | | | | | | | | | | | | 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>
* Suppress unused variable warningNobuyoshi Nakada2019-11-071-1/+1
|
* Use FIX2LONG instead of FIX2INT like 26843cbcd0NARUSE, Yui2019-11-071-4/+4
|
* Use FIX2LONG to avoid unexpected exceptionNARUSE, Yui2019-11-071-1/+1
| | | | | Though it won't happen in the real world in this context, FIX2INT may raise an exception and it cause to generate extra code.
* extend rb_call_cache卜部昌平2019-11-076-19/+75
| | | | | | | | | | | | | | | | | | | | | | Prior to this changeset, majority of inline cache mishits resulted into the same method entry when rb_callable_method_entry() resolves a method search. Let's not call the function at the first place on such situations. In doing so we extend the struct rb_call_cache from 44 bytes (in case of 64 bit machine) to 64 bytes, and fill the gap with secondary class serial(s). Call cache's class serials now behavies as a LRU cache. Calculating ------------------------------------- ours 2.7 2.6 vm2_poly_same_method 2.339M 1.744M 1.369M i/s - 6.000M times in 2.565086s 3.441329s 4.381386s Comparison: vm2_poly_same_method ours: 2339103.0 i/s 2.7: 1743512.3 i/s - 1.34x slower 2.6: 1369429.8 i/s - 1.71x slower
* Fixed test failure related Net::ProtocolHiroshi SHIBATA2019-11-072-2/+4
|
* SMTP is not moduleHiroshi SHIBATA2019-11-071-1/+1
|
* Promote cgi to default gemsHiroshi SHIBATA2019-11-075-5/+48
|