1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
mame 620ba74778 Manage AST NODEs out of GC
NODEs in AST are no longer objects managed by GC.  This change will
remove the restriction imposed by the GC.  For example, a NODE can use
more than five words (this is my primary purpose; we want to store the
position data for each NODE, for coverage library), or even a NODE can
have variable length (some kinds of NODEs have unused fields).
To do this, however, we need more work, since Ripper still uses T_NODE
objects managed by the GC.

The life time of NODEs is more obvious than other kinds of objects; they
are created at parsing, and they become disused immediately after
compilation.  This change releases all NODEs by a few `xfree`s after
compilation, so performance will be improved a bit.  In extreme example,
`eval("x=1;" * 10000000)` runs much faster (40 sec. -> 7.8 sec. on my
machine).

The most important part of this change is `ast_t` struct, which has
three contents: (1) NODE buffer (malloc'ed memory), (2) a reference to
the root NODE, and (3) an array that contains objects that must be
marked during parsing (such as literal objects).  Some functions that
had received `NODE*` arguments, must now receive `ast_t*`.

* node.c, node.h: defines `ast_t` struct and related operations.
* gc.c, internal.h: defines `imemo_ast`.
* parse.y: makes `parser_params` struct have a reference to `ast_t`.
  Instead of `rb_node_newnode`, use `rb_ast_newnode` to create a NODE.
* iseq.c, load.c, ruby.c, template/prelude.c.tmpl: modifies some
  functions to handle `ast_t*` instead of `NODE*`.
* test/ruby/test_gc.rb: ad-hoc fix for a failed test.  The test assumes
  GC eden is increased at startup by NODE object creation.  However,
  this change now create no NODE object, so GC eden is not necessarily
  increased.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27 15:59:02 +00:00
..
-ext- Fixed misspelling words. 2017-10-22 11:27:06 +00:00
base64
benchmark
bigdecimal Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
cgi Fix strange indentation 2017-05-18 15:13:30 +00:00
coverage Add test cases for branch coverage 2017-10-23 13:25:59 +00:00
csv test_features.rb: fix unused variable warning 2017-09-26 10:45:14 +00:00
date ruby.h: unnormalized Fixnum value 2017-09-07 03:24:08 +00:00
dbm
digest
drb Fix r60271 2017-10-21 14:22:04 +00:00
dtrace rename ruby-runner as bin/ruby 2017-09-15 17:42:00 +00:00
erb test_erb.rb: add test cases for uncovered methods 2017-09-26 11:30:45 +00:00
etc test_etc.rb: fix test_getgrnam for duplicated group names 2017-09-29 17:19:37 +00:00
excludes
fiddle Use mutable strings for mutation tests. 2017-09-12 23:15:34 +00:00
fileutils fix r60281 2017-10-21 14:35:19 +00:00
gdbm
io test_io_console.rb: flush 2017-09-28 02:51:41 +00:00
irb
json require 'bigdecimal' 2017-06-16 04:04:53 +00:00
lib multiple arguments to write 2017-10-23 14:05:07 +00:00
logger multiple arguments to write 2017-10-23 14:05:07 +00:00
matrix
minitest
misc
mkmf multiple arguments to write 2017-10-23 14:05:07 +00:00
monitor Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
net Host header should add branckets to IPv6 address [Bug #12642] 2017-10-26 15:29:36 +00:00
nkf Fix test code of kconv 2017-09-15 16:56:16 +00:00
objspace io.c: encoding of ARGF.inplace_mode 2017-10-10 12:30:42 +00:00
open-uri lib/open-uri.rb: accept :encoding option as well as encoding in mode string. 2017-10-21 06:22:53 +00:00
openssl openssl: merge test fix from upstream 2017-10-21 20:26:26 +00:00
optparse multiple arguments to write 2017-10-23 14:05:07 +00:00
ostruct test/ostruct: Specify frozen_string_literal: true. 2017-10-25 23:45:33 +00:00
pathname Fixed misspelling words. 2017-10-22 11:27:06 +00:00
psych Merge psych-3.0.0.beta3 from ruby/psych. 2017-07-14 06:15:58 +00:00
rdoc Fix the leak in TestRDocGeneratorDarkfish#test_generated_method_with_html_tag_yield 2017-10-17 07:41:04 +00:00
readline suppress warning: assigned but unused variable - line 2017-08-15 21:36:16 +00:00
resolv Handle Errno::EADDRNOTAVAIL with Raspberry Pi environment. 2017-10-21 16:05:01 +00:00
rexml REXML: Fix a bug that unexpected methods can be called as a XPath function 2017-08-13 12:14:24 +00:00
rinda
ripper parse.y: indent at '#' 2017-10-19 05:10:38 +00:00
rss rss itunes: fix a bug that <itunes:explicit> value isn't fully supported 2017-10-22 16:03:57 +00:00
ruby Manage AST NODEs out of GC 2017-10-27 15:59:02 +00:00
rubygems Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4). 2017-10-20 09:03:37 +00:00
scanf Fix bug about String#scanf("%a") 2017-10-21 12:34:13 +00:00
sdbm
shell test_command_processor.rb: add suffix 2017-06-23 15:08:50 +00:00
socket socket.c: null byte at Socket.getnameinfo 2017-10-11 06:16:04 +00:00
stringio stringio.c: write multiple arguments 2017-10-23 06:25:39 +00:00
strscan strscan.c: fix segfault in aref 2017-07-21 13:30:46 +00:00
syslog
testunit Get rid of a test error on Windows caused by r60417 2017-10-25 13:29:27 +00:00
thread Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
uri URI::Generic: Separate no_proxy handling 2017-09-28 10:51:31 +00:00
webrick webrick: do not hang acceptor on slow TLS connections 2017-10-12 18:50:07 +00:00
win32ole ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError. 2017-10-21 23:57:10 +00:00
yaml
zlib zlib.c: multiple arguments to write 2017-10-23 07:06:12 +00:00
colors
runner.rb the working directory may not be srcdir 2017-09-07 17:45:34 +00:00
test_abbrev.rb
test_cmath.rb
test_delegate.rb Delegate to eql? [Fix GH-1564] 2017-06-24 03:35:29 +00:00
test_extlibs.rb Revert "test/test_extilibs.rb: do not check the existence of fiddle" 2017-05-16 23:59:01 +00:00
test_find.rb test_find.rb: improve branch coverage 2017-09-30 03:31:32 +00:00
test_forwardable.rb
test_ipaddr.rb Import ipaddr 1.2.0 2017-10-21 13:34:19 +00:00
test_mutex_m.rb Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
test_observer.rb
test_open3.rb lib/open3.rb: accept IO-like object for :stdin_data argument. 2017-10-21 07:00:58 +00:00
test_pp.rb
test_prettyprint.rb
test_prime.rb prime.rb: remove alias after timeout test 2017-05-20 10:21:44 +00:00
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb Use \A and \z instead of ^ and $ 2017-10-22 09:16:54 +00:00
test_set.rb Add Set#reset 2017-10-22 12:25:34 +00:00
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
test_time.rb Make Time.parse respect timezone offset seconds 2017-10-20 01:03:18 +00:00
test_timeout.rb Remove unnecessary require 'thread' 2017-10-08 07:00:01 +00:00
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb