aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * 2018-01-15svn2018-01-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ytab.sed: Support some old bison implementationsmame2018-01-151-5/+5
| | | | | | At least, I confirmed bison 2.3 (because macOS uses the version). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_heredoc_dedent): Removedmame2018-01-141-8/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yydebugnobu2018-01-141-10/+12
| | | | | | | * parse.y (yydebug): define to disable a global variable and get rid of linker error when static linked ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove unused a macro "FIXME"mame2018-01-141-2/+0
| | | | | | | I don't know what it was, but seems that it has been already fixed since r12117. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper no longer uses rb_discard_nodenobu2018-01-141-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove a code for old yaccmame2018-01-141-9/+0
| | | | | | | | The current parse.y won't compile with yacc since it depends on many bison's extensions. Also, configure.ac does not have a check for yacc, so the macro OLD_YACC is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove almost all *_gen macros by passing parser_params explicitlymame2018-01-142-718/+636
| | | | | | | | | | | | | In parse.y many functions were suffixed "_gen" and had companion macros to pass struct parser_params implicitly, which made parse.c bigger and more obscure. This change expands and removes almost all "*_gen" macros. This requires explicit passing of struct parser_params, i.e., we need to write "foo(p, ..)" instead of "foo(..)". However, it is just extra three letters. I believe that this is easier to understand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Expand global-like accessor macros for struct parser_paramsmame2018-01-141-565/+525
| | | | | | | | For example, `lex_strterm` is expanded to `p->lex.strterm`. I believe that this expansion make the code straightforward. They look not so annoying because "parser" was renamed to "p". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Use "p" for the variable of struct parser_params consistentlymame2018-01-142-779/+779
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Avoid "p" as a variable namemame2018-01-141-104/+104
| | | | | | | | Because I want to use the name "p" for struct parser_params through parse.c. This change renames "p" to "ptr", "paren", etc. depending upon the context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* exclude flexible array size with old compilersnobu2018-01-146-9/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-01-14svn2018-01-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/http: use writev for HTTP chunked request bodiesnormal2018-01-142-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces both user and system CPU time for large uploads with dynamically-generated request bodies. user system total real before: 0.393334 1.580000 1.973334 ( 1.971066) after: 0.223334 0.976666 1.200000 ( 1.198514) ------ require 'socket' require 'net/http' require 'benchmark' nr = 1024 * 1024 * 1024 s = TCPServer.new('127.0.0.1', 0) addr = s.addr at_exit { Process.waitall } fork do c = s.accept # not exactly accurate but fast IO.copy_stream(c, '/dev/null', nr + 500000) begin buf = c.readpartial(16384) tmp = '' until buf.end_with?(-"0\r\n\r\n") buf << c.readpartial(16384, tmp) end rescue EOFError end c.write "HTTP/1.1 201 Created\r\nConnection:close\r\n\r\n" c.close end r, w = IO.pipe fork do r.close IO.copy_stream('/dev/zero', w, nr) w.close end w.close Net::HTTP.start(addr[3], addr[1]) do |http| put = Net::HTTP::Put.new('/dev0/foo') put['Content-Type'] = 'application/content-type' put['Transfer-Encoding'] = 'chunked' put.body_stream = r puts(Benchmark.measure { http.request(put) }) end ------ * lib/net/http/generic_request.rb (write): use multi-arg write * lib/net/protocol.rb (write): support multi-arg (write0): ditto [ruby-core:84845] [Feature #14339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (struct mapping_buffer): Use FLEX_ARY_LENmame2018-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (struct ibf_object_*): Use FLEX_ARY_LENmame2018-01-131-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (struct ibf_id_entry): Just removed.mame2018-01-131-13/+0
| | | | | | It looked unused. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.h (struct iseq_catch_table_entry, iseq_compile_data_storage): Use ↵mame2018-01-133-10/+6
| | | | | | FLEX_ARY_LEN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (struct apply_arg): Use FLEX_ARY_LENmame2018-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c (struct gen_ivtbl): Use FLEX_ARY_LEN.mame2018-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c (node_buffer_elem_t): Use FLEX_ARY_LENmame2018-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h (FLEX_ARY_LEN): Add a macro to define a flexible arraymame2018-01-132-9/+10
| | | | | | Also, use it in iseq.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo.hsbt2018-01-131-1/+1
| | | | | | configure.ac: delcares -> declares. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* __VA_ARGS__ is a C99ismshyouhei2018-01-132-6/+3
| | | | | | give up CALL_ATTRIBUTE macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* flexible array member is a C99ismshyouhei2018-01-131-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependenciesnobu2018-01-132-5/+1
| | | | | | | | | | | | | * common.mk: enc/unicode.$(OBJEXT) depends on onigmo.h via oniguruma.h. * common.mk: dependencies of *prelude.$(OBJEXT) are defined for each generated C sources. * enc/depend: casefold.h and name2ctype.h are located under $(UNICODE_HDR_DIR). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies using `tool/update-deps`kazu2018-01-132-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-01-13svn2018-01-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove meaningless ifndef guardsmame2018-01-121-5/+0
| | | | | | Because the part of the code is already within `#ifndef RIPPER`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (token_info_push, token_info_pop): Refactoringmame2018-01-121-41/+33
| | | | | | | | * remove unused argument len * factor out initialization code of token_info * make the condition of "mismatched indentations" warning easy to understand git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (token_info_push, token_info_pop): Use code_locationmame2018-01-121-36/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning for VC12shyouhei2018-01-121-1/+1
| | | | | | | | It says "warning C4146: unary minus operator applied to unsigned type, result still unsigned" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Remove unneeded dependence on pointer representatinmame2018-01-121-9/+8
| | | | | | A simple comparison is enough in this case git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge revision: 61746shyouhei2018-01-121-1/+1
| | | | | | | | | | `signed` is required for Rasbian (x86_64). * tool/ruby_vm/views/_insn_stack_increase.erb: specify `signed` explicitly for systems which use `unsigned` for `char` type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo.hsbt2018-01-121-1/+1
| | | | | | * template/unicode_norm_gen.tmpl: ouput -> output git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/iseq_loader: use File.open instead of Kernel#opennormal2018-01-121-2/+2
| | | | | | | This makes auditing for inadvertant command execution easier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/iseq_loader.rb: spelling fixnormal2018-01-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed typos.hsbt2018-01-122-2/+2
| | | | | | | * sample/trick2013/kinaba/remarks.markdown: algorthim -> algorithm * sample/trick2015/ksk_1/remarks.markdown: Limination -> Limitation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ruby_vm support for pre-2.0 BASERUBYshyouhei2018-01-126-9/+16
| | | | | | | This was not requested :) but actually easier than the previous so I just did it anyway. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ruby_vm support for pre-2.1 BASERUBYshyouhei2018-01-1213-114/+123
| | | | | | as requested by devs, support for BASERUBY prior to 2.1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/ruby_vm support for pre-2.3 BASERUBYshyouhei2018-01-122-12/+12
| | | | | | as requested by devs, support for BASERUBY prior to 2.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete tool/instruction.rb (2nd try)shyouhei2018-01-1253-1708/+1795
| | | | | | | | | | | | | | | | | | | | | | | Previous commit changed insns.def format. Now is the time for its generators. In doing so I chose to modernize the system, not just patch. My attempt includes - extensive use of Onigumo regular expressions - split from one big file (instruction.rb) into separated MVC - partial view Also, let me take this opportunity to kill old unused features such as - stack caching - minsns / yasmdata which are never seriously used - yarvarch document generation (moved to doc/) - vast majority of unused arguments to insns2vm.rb This commit generates VM source codes that cleanly compile, and the generated binary passes tests. At least for me. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [ci skip] add comments about file format (2nd try)shyouhei2018-01-121-4/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* new insns.def format (2nd try)shyouhei2018-01-124-504/+160
| | | | | | | - Gave up @j comments - Room for sp_inc to be a proper grammer element git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add `103 Early Hints` to `Net::HTTP::STATUS_CODES` [ci skip]kazu2018-01-121-0/+1
| | | | | | Update by `ruby lib/net/http/status.rb | sponge lib/net/http/status.rb` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/NEWS-2.5.0: `step` is not `Integer#step` but `Numeric#step` [ci skip]kazu2018-01-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (thread_cleanup_func): document small leaknormal2018-01-121-0/+4
| | | | | | | It's minor, I haven't analyzed how fixable it is, but we should at least note it, here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix for IPv6 envnaruse2018-01-111-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: Matrix#antisymmetric?stomar2018-01-111-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2018-01-110-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e