aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bootstraptest/test_fork.rb: Stop too restrict NPROC test temporarilymame2018-01-091-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix the position of VM_ASSERT for "pthread_create failed for time"mame2018-01-091-1/+1
| | | | | | Fix r61706. Thank you, Eric Wong. [ruby-core:84756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread: more diagnostics around timer thread creation failuresnormal2018-01-091-2/+14
| | | | | | | However, I don't think EAGAIN on pthread_create can really be fixed in our code. I suspect test machines are overloaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update dependenciesnobu2018-01-093-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update-deps: strip -j optionnobu2018-01-091-0/+4
| | | | | | | | * update-deps: strip -j option from ENV['GNUMAKEFLAGS'], not dirstack to get confused by intermingled entering/leaveing directory messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: remove dependecy on ruby/encoding.hnobu2018-01-0928-23/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: remove dependecy on ruby/io.hnobu2018-01-095-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_compile_each0): remove irrelevant tracecoveragemame2018-01-091-0/+12
| | | | | | | | | | | | | | | This change removes tracecoverage instructions on a line that has any NODE but is non-significant, such as, just one literal. This fixes the following failure that occurs only when coverage is enabled: 1) Failure: TestISeq#test_to_a_lines [.../ruby/test/ruby/test_iseq.rb:56]: <[3, 4, 7, 9]> expected but was <[3, 4, 5, 6, 7, 8, 9]>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow `-> do rescue; end` as well as `proc do rescue; end`mame2018-01-092-1/+19
| | | | | | https://twitter.com/takiuchi/status/950593389963051008 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove redefinition of mallocmame2018-01-091-9/+0
| | | | | | | Because the purpose is now unsure (maybe, to support very old bison?). If an issue occurs, it should be resurrected with explicit comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: PARSER_DEBUG is no longer usedmame2018-01-091-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove meaningless ifndef guardsmame2018-01-091-4/+0
| | | | | | Because the part of the code is already within `#ifndef RIPPER`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Explicit failure in VM_CHECK_MODE when failing to create timer threadmame2018-01-091-0/+1
| | | | | | | | "warning: pthread_create failed for timer: Resource temporarily unavailable, scheduling broken" still occurs randomly. This change will allow us to debug the issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (srcs_vpath): renamed for nmakenobu2018-01-092-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use predefined ids in a few more placesnormal2018-01-093-9/+11
| | | | | | | | | | | | | | | Saves a little space on x86: text data bss dec hex filename 3684110 11968 34240 3730318 38eb8e ruby.before 3684086 11968 34240 3730294 38eb76 ruby.after * enumerator.c: include id.h, define aliases (Init_Enumeerator): remove unnecessary rb_intern calls * gc.c (should_be_callable): use idCall * vm.c (Init_VM): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gmake.mk: update srcdir filesnobu2018-01-092-2/+3
| | | | | | | * defs/gmake.mk (commit): update source files under the sources directory after commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: set ID to yylval ID instead of tokennobu2018-01-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove special handling of tOROP and tANDOPmame2018-01-093-41/+20
| | | | | | The complexity is no longer considered necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit (print_lineno): follow up changes in r61534, r61536ktsj2018-01-091-5/+6
| | | | | | insns_info was refactored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: use change_shortcut_operator_idnobu2018-01-091-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* wrap statement expression with __extension__nobu2018-01-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove duplicated nd_line setyui-knk2018-01-091-3/+0
| | | | | | | | | * parse.y: These nodes are created with `@$` locations. Start position of `@$` is same as start position of `@1`. And NEW_XXX macros set first_loc.lineno of a passed code range to nd_line. So these nd_set_line are not needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* constifiednobu2018-01-091-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: remove extra ifdefnobu2018-01-081-2/+0
| | | | | | | * vm.c (rb_execution_context_mark): VM_ASSERT works only if VM_CHECK_MODE > 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use `getblockparamproxy` to pass blocks.ko12018-01-084-10/+5
| | | | | | | | | | | | | * compile.c (setup_args): use `getblockparamproxy` (`rb_block_param_proxy`) to represent a block parameter passing. * vm_args.c (vm_caller_setup_arg_block): check `rb_block_param_proxy` instead of using `VM_CALL_ARGS_BLOCKARG_BLOCKPARAM` call flag. * vm_core.h (VM_CALL_ARGS_BLOCKARG_BLOCKPARAM): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a bug only on assertion.ko12018-01-081-1/+1
| | | | | | | | * vm.c (rb_execution_context_mark): check escaped directly to skip assertions. Not sure why there is an inconsistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-01-09svn2018-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix mark miss of Env (which is pointed by prev_ep).ko12018-01-081-1/+8
| | | | | | | | | | * vm.c (rb_execution_context_mark): r61624 and r61659 introduce marking miss bug for Env objects as a prev_ep which is contained by Proc objects because Proc objects can be collected when they should be living and Env objects will collected unexpectedly. This patch solves this problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Make consistent with the terms about code ranges and locationsmame2018-01-084-409/+409
| | | | | | | | | | | | | "loc" was ambiguous; it might refer both a location and a code range. This change uses "loc" for a location, and "crange" or "cr" for a code range. A location (abbr. loc) is a point in a program and consists of line number and column number. A code range (abbr. crange and cr) is a range within a program and consists of a pair of locations which is the first and the last. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (remove_duplicate_keys): Remove a not used argumentyui-knk2018-01-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Factor out code fragments that merges two code rangesmame2018-01-082-32/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (block_append_gen): Remove a not used argumentyui-knk2018-01-081-23/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Use nd_loc of head and tailyui-knk2018-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.y (block_append_gen): Use nd_loc of head(tail) when create NEW_BLOCK of head(tail). e.g. The locations of the NODE_BLOCK is fixed: ``` BEGIN { :a } BEGIN { :b } ``` * Before ``` NODE_BLOCK (line: 5, code_range: (5,0)-(7,1)) ``` * After ``` NODE_BLOCK (line: 1, code_range: (1,0)-(7,1)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix the lineno of nd_set_lineyui-knk2018-01-081-15/+15
| | | | | | | | | | | | | | | | | | | * parse.y: Follow up of r61676. r61676 removed ruby_sourceline from some actions. When stop to use lineno of "n th" symbol, it's better to use last location's lineno of "n-1 th" symbol. e.g. ``` primary : k_begin {} bodystmt k_end ``` Before r61676 we use lineno of `@2` (ruby_sourceline). In this case, last location's lineno of `k_begin` (`@1`) is suitable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/http: clear compressed chunk after decompressionnormal2018-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need the compressed data once the inflate block is called; so clear it ASAP to reduce memory overhead. This is a small chunk, so it only saves a few hundred kilobytes with the script below. before: RssAnon: 5976 kB after: RssAnon: 5564 kB ------ require 'net/http' require 'zlib' response_gz = ARGV.shift or abort "#$0 TEMPORARY_FILE" # pre-create response since compressing is slower than decompressing unless File.readable?(response_gz) nr = 16384 * 2 buf = ((0..255).map(&:chr).join * 128) File.open(response_gz, 'wb') do |fp| gzip = Zlib::GzipWriter.new(fp) nr.times { gzip.write(buf) } gzip.close end buf.clear end response_gz = File.open(response_gz) s = TCPServer.new('127.0.0.1', 0) pid = fork do c = s.accept c.readpartial(16384).clear c.write("HTTP/1.1 200 OK\r\n" \ "Content-Length: #{response_gz.stat.size}\r\n" \ "Content-Encoding: gzip\r\n" \ "Accept-Ranges: bytes\r\n" \ "\r\n") IO.copy_stream(response_gz, c) c.close end addr = s.addr Net::HTTP.start(addr[3], addr[1]) do |http| http.request_get(-'/') do |res| res.read_body(&:clear) end end puts File.readlines(-'/proc/self/status').grep(/RssAnon/)[0] Process.waitpid2(pid) ------ * lib/net/http/response.rb (inflate_adapter): clear compressed_chunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update minitest-5.11.1hsbt2018-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove dispose_stringmame2018-01-083-21/+0
| | | | | | | I think that recycling the delimiter string objects doesn't pay its complexity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: vm_invoke_block_opt_callnobu2018-01-081-14/+11
| | | | | | | * vm_insnhelper.c (vm_invoke_block_opt_call): renamed with sliding arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: respect redefinition of Proc#callnobu2018-01-083-4/+34
| | | | | | | | | | | | | | | * vm.c (vm_redefinition_check_method_type): hoist out method definition type to check redefinition. * vm.c (rb_vm_check_redefinition_opt_method): should check optimized method too. * vm.c (vm_init_redefined_flag): check Proc#call. * vm_insnhelper.c (vm_call_opt_block_call): search proper method if redefined. [Bug #14335] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add parens [ci skip]kazu2018-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c: show newline node marknobu2018-01-081-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Use last_loc.lineno instead of ruby_sourcelinemame2018-01-081-7/+7
| | | | | | State-less way is better. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove `$<num>$ = ruby_sourceline` hacksmame2018-01-081-119/+47
| | | | | | Instead, use bison's lineno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: compile_case2 branchnobu2018-01-081-2/+5
| | | | | | * compile.c (compile_case2): compile as a branch condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: constified NULL_LOCnobu2018-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/NEWS-2.5.0: Time.at is a class methodmrkn2018-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Factor out special handling of a short-cut operator idmame2018-01-081-21/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove duplicated nd_loc setyui-knk2018-01-081-2/+0
| | | | | | * parse.y: nd_loc is set by NEW_CASE2/NEW_WHEN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Embed simple wrapper functions for NEW_NODEsmame2018-01-081-46/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Make NULL_LOC to be internalyui-knk2018-01-081-1/+1
| | | | | | | * parse.y (NULL_LOC): We will create NODEs only inside of parse.y, so make NULL_LOC to be internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e