summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/helpers
AgeCommit message (Collapse)Author
2018-02-27Refactor ERB version checking for keyword argumentsk0kubun
Improving code like r62590. See r62529 for details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-26tool/ruby_vm/helpers/dumper.rb: check ERB versionk0kubun
I could not `make` trunk (62585) without this patch. ``` $ make -j4 && make install BASERUBY = /home/pocke/.rbenv/shims/ruby --disable=gems CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=misleading-indentation -Wno-overlength-strings -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wmissing-noreturn -Wimplicit-fallthrough=0 -Werror=duplicated-cond -Werror=restrict -std=gnu99 -fPIC XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/10.0.0 DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.6 -fstack-protector SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm LANG = en_GB.UTF-8 LC_ALL = LC_CTYPE = gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. generating opt_sc.inc generating optunifs.inc generating insns.inc generating insns_info.inc Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: opt_sc.inc] Error 1 make: *** Waiting for unfinished jobs.... Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: optunifs.inc] Error 1 Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) Traceback (most recent call last): 6: from ./tool/insns2vm.rb:9:in `<main>' 5: from ./tool/insns2vm.rb:9:in `each' 4: from ./tool/insns2vm.rb:10:in `block in <main>' 3: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:98:in `generate' 2: from /home/pocke/ghq/github.com/ruby/ruby/tool/ruby_vm/helpers/dumper.rb:76:in `do_render' 1: from /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:873:in `result' /home/pocke/.rbenv/versions/trunk/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) make: *** [Makefile:534: insns.inc] Error 1 make: *** [Makefile:534: insns_info.inc] Error 1 ``` I guess this issue is same as https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/62531 So I applied the same change to tool/ruby_vm/helpers/dumper.rb also. close https://github.com/ruby/ruby/pull/1826 Co-authored-by: Masataka Pocke Kuwabara <kuwabara@pocke.me> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22erb.rb: deprecate safe_level of ERB.newk0kubun
Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27dumper.rb: stop getting --destdir option valuek0kubun
via current directory. It's kind of a global state and fragile to implementation changes in other places, and how the `Dir.getwd` is set is not obvious from just reading around `RubyVM::Dumper#initialize` if it depends on the global state. tool/ruby_vm/controllers/application_controller.rb: explicitly pass destdir to RubyVM::Dumper. tool/ruby_vm/scripts/insns2vm.rb: explicitly pass destdir parsed from optparse. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12tool/ruby_vm support for pre-2.0 BASERUBYshyouhei
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
2018-01-12tool/ruby_vm support for pre-2.1 BASERUBYshyouhei
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
2018-01-12delete tool/instruction.rb (2nd try)shyouhei
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
2018-01-10merge revisions 61753:61750 61747:61740 61737:61728shyouhei
Revert all the VM generator rewrites; requested by naruse git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09delete tool/instruction.rbshyouhei
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@61733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e