1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
ko1 3dbb390180 * introduce new ISeq binary format serializer/de-serializer
and a pre-compilation/runtime loader sample.
  [Feature #11788]

* iseq.c: add new methods:
  * RubyVM::InstructionSequence#to_binary_format(extra_data = nil)
  * RubyVM::InstructionSequence.from_binary_format(binary)
  * RubyVM::InstructionSequence.from_binary_format_extra_data(binary)

* compile.c: implement body of this new feature.

* load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq):
  call RubyVM::InstructionSequence.load_iseq(fname) with
  loading script name if this method is defined.

  We can return any ISeq object as a result value.
  Otherwise loading will be continue as usual.

  This interface is not matured and is not extensible.
  So that we don't guarantee the future compatibility of this method.
  Basically, you should'nt use this method.

* iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions)
  from iseq.c.

* encoding.c (rb_data_is_encoding), internal.h: added.

* vm_core.h: add several supports for lazy load.
  * add USE_LAZY_LOAD macro to specify enable or disable of
    this feature.
  * add several fields to rb_iseq_t.
  * introduce new macro rb_iseq_check().

* insns.def: some check for lazy loading feature.

* vm_insnhelper.c: ditto.

* proc.c: ditto.

* vm.c: ditto.

* test/lib/iseq_loader_checker.rb: enabled iff suitable
  environment variables are provided.

* test/runner.rb: enable lib/iseq_loader_checker.rb.

* sample/iseq_loader.rb: add sample compiler and loader.

    $ ruby sample/iseq_loader.rb [dir]

  will compile all ruby scripts in [dir].
  With default setting, this compile creates *.rb.yarb files
  in same directory of target .rb scripts.

    $ ruby -r sample/iseq_loader.rb [app]

  will run with enable to load compiled binary data.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08 13:58:50 +00:00
..
-ext- marshal.c: skip internal names 2015-12-08 05:20:41 +00:00
base64
benchmark
bigdecimal
cgi
coverage * test/coverage/test_coverage.rb: Added test-case for Coverage.restart. 2015-11-26 00:51:03 +00:00
csv
date
dbm
digest
drb
dtrace * test/dtrace/helper.rb (Dtrace::TestCase#trap_probe): dtrace buffer size is set as 8m on Solaris (default 4m). [Bug #11697] 2015-11-16 12:38:09 +00:00
erb
etc
excludes
fiddle fiddle: release GVL for ffi_call 2015-11-23 21:20:56 +00:00
fileutils * test/fileutils/test_fileutils.rb: add debug output to investigate the error that occur at random on Windows CI. 2015-12-06 07:22:17 +00:00
gdbm test_gdbm.rb: typo 2015-11-08 05:06:22 +00:00
io retry IO#getpass 2015-12-08 13:26:56 +00:00
irb
json use assert_raise 2015-10-30 04:37:13 +00:00
lib * introduce new ISeq binary format serializer/de-serializer 2015-12-08 13:58:50 +00:00
logger * test/logger/test_logdevice.rb: Fix tests of logger to make it work on 2015-11-18 00:53:14 +00:00
matrix * remove trailing spaces. 2015-10-23 02:09:16 +00:00
minitest
misc
mkmf mkmf/base.rb: capture output 2015-11-04 01:31:15 +00:00
monitor
net * lib/net/http.rb (connect): detect closed connection and reconnect 2015-11-27 14:07:35 +00:00
nkf
objspace objspace_dump.c: special const 2015-10-19 06:25:01 +00:00
open-uri * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
openssl test/openssl/test_ssl.rb (test_copy_stream): new test 2015-11-25 22:23:34 +00:00
optparse
ostruct OpenStruct#dig 2015-11-17 05:36:03 +00:00
pathname * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
psych * ext/psych/*: update psych to 2.0.16 2015-12-07 16:58:10 +00:00
rdoc
readline
resolv * lib/resolv.rb (Resolv::DNS::Message::MessageEncoder#put_labels): 2015-11-09 15:37:04 +00:00
rexml
rinda
ripper parse.y: indented hereoc 2015-12-07 14:39:52 +00:00
rss
ruby enumerator.c: lazy_grep_v 2015-12-08 07:23:43 +00:00
rubygems * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(fdab4c4). 2015-12-04 06:21:53 +00:00
scanf
sdbm
shell
socket socket: expand docs+tests for recv_io/send_io 2015-12-07 18:39:47 +00:00
stringio
strscan
syslog
testunit
thread * thread_sync.c: reduce the specification of Queue#close. 2015-11-21 00:32:09 +00:00
uri
webrick * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the test 2015-12-06 09:28:02 +00:00
win32ole use rb_check_arity [ci skip] 2015-10-25 00:43:06 +00:00
xmlrpc
zlib
colors
runner.rb * introduce new ISeq binary format serializer/de-serializer 2015-12-08 13:58:50 +00:00
test_abbrev.rb
test_cmath.rb
test_delegate.rb
test_find.rb
test_forwardable.rb forwardable.rb: full qualify names 2015-10-23 22:29:14 +00:00
test_ipaddr.rb * lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address contained 2015-10-23 07:35:14 +00:00
test_mathn.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb * lib/open3.rb: Specify frozen_string_literal: true. 2015-11-14 07:43:23 +00:00
test_pp.rb * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
test_prettyprint.rb * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true". 2015-11-10 11:48:14 +00:00
test_prime.rb * lib/prime.rb: Add basic argument checking to Prime.prime? 2015-10-20 03:19:44 +00:00
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb * lib/set.rb (#>=, #>, #<=, #<): Make use of Hash#>=, #>, #<, and 2015-11-16 06:43:43 +00:00
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb * lib/time.rb: Specify frozen_string_literal: true. 2015-11-14 08:00:29 +00:00
test_timeout.rb test_timeout.rb: exact messages 2015-11-03 12:15:31 +00:00
test_tmpdir.rb
test_tracer.rb
test_tsort.rb test/test_tsort.rb: Specify frozen_string_literal: true. 2015-11-14 09:43:18 +00:00
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb