Граф коммитов

48712 Коммитов

Автор SHA1 Сообщение Дата
yui-knk acf7e52d88 parse.y: Fix locations of dsym
* parse.y (dsym_node_gen): Always set locations
  to include locations of tSYMBEG and tSTRING_END.

  e.g. The locations of the NODE_LIT is fixed:

  ```
  :"a"
  ```

  * Before

  ```
  NODE_LIT (line: 1, code_range: (1,2)-(1,3))
  ```

  * After

  ```
  NODE_LIT (line: 1, code_range: (1,0)-(1,4))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07 02:48:38 +00:00
yui-knk 2c018e9646 parse.y: Fix locations of regexp
* parse.y (new_regexp_gen): Always set locations
  to include locations of tREGEXP_BEG and tREGEXP_END.

  e.g. The locations of the NODE_LIT is fixed:

  ```
  /a/
  ```

  * Before

  ```
  NODE_LIT (line: 1, code_range: (1,1)-(1,2))
  ```

  * After

  ```
  NODE_LIT (line: 1, code_range: (1,0)-(1,3))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07 02:36:51 +00:00
yui-knk d2d4839a39 parse.y: Fix locations of xstring
* parse.y (new_xstring_gen): Always set locations
  to include locations of tXSTRING_BEG and tSTRING_END.

  e.g. The locations of the NODE_XSTR is fixed:

  ```
  `a`
  ```

  * Before

  ```
  NODE_XSTR (line: 1, code_range: (1,1)-(1,2))
  ```

  * After

  ```
  NODE_XSTR (line: 1, code_range: (1,0)-(1,3))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07 02:25:37 +00:00
shugo 04594937eb remove unnecessary read_timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 23:56:04 +00:00
mame cd83444eb3 eval_intern.h: fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 22:43:54 +00:00
normal 3f799727b5 cont.c: update comment for ec refactoring
* cont.c (fiber_switch): update comment (ec.fiber => ec->fiber_ptr)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 21:51:10 +00:00
svn 530514fbbe * 2017-12-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 15:02:32 +00:00
kazu 49dc866492 `Integer#pow(b)` accepts numeric
instead of integer only and returns numeric instead of integer only
same as `Integer#**`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 15:02:31 +00:00
nobu 956cfb974f numeric.c: rb_int_powm rdoc
* numeric.c (Init_Numeric): let rdoc know that rb_int_powm is
  defined in bignum.c.  [Feature #12508] [Feature #11003]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 12:36:37 +00:00
nobu 86f05884a5 vcs.rb: fix r61054
* tool/vcs.rb (VCS::SVN.get_revisions): cmd_readd_at expects the
  whole arguments for IO.popen as the second argument, that is an
  array of command and mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:36:42 +00:00
nobu 951ef1d413 file2lastrev.rb: suppress_not_found
* tool/file2lastrev.rb: exit successfully when command not found,
  and if --suppress_not_found is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:18:53 +00:00
nobu 3234d6a6cb vcs.rb: raise NotFoundError when command not found
* tool/vcs.rb (cmd_pipe_at, cmd_read_at, system): moved from GIT
  to VCS, and now raise VCS::NotFoundError when command not found.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 11:18:52 +00:00
hsbt 9ef078e2a7 Bump fiddle-1.0.0 for released version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:35:13 +00:00
hsbt 836aaa0cdc Bump gdbm-2.0.0 for released versionn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:34:34 +00:00
hsbt 2d031181af Bump dbm-1.0.0 for released version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 08:32:01 +00:00
mame e0bed5f32e compile.c (rb_iseq_compile_node): Move the check for imemo_ifunc to top
Applying nd_type to imemo_ifunc object seems harmless fortunately, but
very dirty (to me).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 07:26:54 +00:00
mame 55f93cb63f vm_core.h (RUBY_EVENT_COVERAGE_BRANCH): renamed
This change moves RUBY_EVENT_COVERAGE from include/ruby/ruby.h to
vm_core.h and renames it to RUBY_EVENT_COVERAGE_BRANCH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 07:19:17 +00:00
mame 9be95d2a71 Remove RUBY_EVENT_SPECIFIED_LINE
Follow up of r61044

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 07:19:16 +00:00
mame c7e4f91246 insns.def (tracebranch): renamed from `trace2`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 07:04:49 +00:00
mame c3c0c0745f thread.c (update_branch_coverage): renamed from `update_coverage`
Now this function only deals with branch events, so this change renames
it and remove complexity that is no longer needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 07:04:48 +00:00
ko1 ec1d41ba0e fix last commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 06:54:40 +00:00
ko1 104ca9f4df remove unsupported RUBY_EVENT_SPECIFIED_LINE.
* vm_trace.c (get_event_id): remove experimental in past, and not supported
  now feature.

* vm_trace.c (tracepoint_inspect): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 06:53:15 +00:00
mame ec02c4861b thread.c (update_line_coverage): Use RUBY_EVENT_LINE
This change makes coverage use the general event type RUBY_EVENT_LINE
instead of a special event type RUBY_EVENT_COVERAGE.
Just a refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 06:39:05 +00:00
nobu 9fbd48ee71 prelude.c.tmpl: fix line number
* template/prelude.c.tmpl (Init_prelude): fix line number of
  preludes.  line of prelude_eval is an int, not a VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 05:22:19 +00:00
mame 3af095f84c eval_intern.h: prevent core dump with clang and make test-all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 03:19:17 +00:00
ko1 0e34638f79 remove `PUSH_TAG`/`EXEC_AG`/`POP_TAG`/`JUMO_TAG`.
* eval_intern.h: remove non-`EC_` prefix *_TAG() macros.
  Use `EC_` prefix macros explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 03:16:08 +00:00
yui-knk c1bd83cef7 parse.y: Fix the first location of heredoc identifier
* parse.y (parser_heredoc_identifier):
  Put length of term at the head of rb_strterm_heredoc_struct.term.

* parse.y (rb_parser_set_location_from_strterm_heredoc):
  Use length of term to calculate first_loc.column.

  e.g. The locations of the NODE_DSTR is fixed:

  ```
  a <<STR
  123
  #{:a}
  STR
  ```

  * Before

  ```
  NODE_DSTR (line: 3, code_range: (1,3)-(1,7))
  ```

  * After

  ```
  NODE_DSTR (line: 3, code_range: (1,2)-(1,7))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 03:09:55 +00:00
mame b7c17ad14d parse.y: remove redefined typedef
Clang told me that this is C11 feature.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 01:41:05 +00:00
yui-knk f7899d3c80 parse.y: Fix locations of HEREDOC
* parse.y (rb_parser_set_location_from_strterm_heredoc):
  Set locations based on rb_strterm_heredoc_t.

* parse.y (yylex): Set yylloc based on rb_strterm_heredoc_t
  when parsing heredoc.

  e.g. The locations of the NODE_DSTR is changed:

  ```
  a <<STR
  123
  #{:a}
  STR
  ```

  * Before

  ```
  NODE_DSTR (line: 3, code_range: (3,0)-(1,7))
  ```

  * After

  ```
  NODE_DSTR (line: 3, code_range: (1,3)-(1,7))
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-06 00:44:18 +00:00
svn b034a9d226 * 2017-12-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 23:34:15 +00:00
yui-knk 5abf308aaa test_syntax.rb: Add a test case for `not()`
* test/ruby/test_syntax.rb (TestSyntax#test_keyword_not_parens):
  Currently `not()` is tested by only TestRipper::ParserEvents#test_unary,
  so I think it's better to test this syntax directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 23:34:14 +00:00
nobu f24efa287f parse.y: nd_line of new node
* parse.y (nd_set_loc): set nd_line of the newly created node to
  the first location.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 13:49:40 +00:00
nobu 4fe720eb36 parse.y: nd_line of call_uni_op
* parse.y (call_uni_op): set nd_line to the unary operator
  location, same as non-operator method calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 13:46:21 +00:00
nobu 2ed1230429 parse.y: nd_line of logop
* parse.y (logop): set nd_line to the logical operator location,
  same as non-operator method calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 13:42:46 +00:00
nobu b9e91bfba4 parse.y: nd_line of match_op
* parse.y (match_op): set nd_line to the match operator location,
  same as non-operator method calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 13:38:01 +00:00
nobu 60bca0214b parse.y: nd_line of call_bin_op
* parse.y (call_bin_op): set nd_line to the binary operator
  location, same as non-operator method calls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 13:30:06 +00:00
hsbt 25d6a7efab Bump version to rdoc-6.0.0.
There is no changes from rdoc-6.0.0.bebta4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 11:08:00 +00:00
mame e5614fbcb0 iseq.c (iseq_load, iseq_data_to_ary): Fix a type error (for clang)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 09:45:03 +00:00
mame f9c614c668 Hide ISeq#load
I disclosed it incorrectly at r61025.  Sorry.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:58:57 +00:00
mame f6556c5c39 ext/coverage/coverage.c: method coverage has column info. of method def.
This change makes method coverage result have not only first lineno of
method defintion, but also code range (i.e. first lineno, first column,
last lineno, and last column).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:56:51 +00:00
mame a5e02f249d vm_core.h (rb_iseq_locatoin_t): add a field `code_range`
This change makes each ISeq keep NODE's code range.  This information is
needed for method coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:56:50 +00:00
nobu 2d592329e0 node.c: FIELD_BLOCK
* node.c (COMPOUND_FIELD, FIELD_BLOCK): moved block outside
  arguments like as SIMPLE_FIELD.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 08:50:14 +00:00
mame 0a6816ecd7 Revamp method coverage to support define_method
Traditionally, method coverage measurement was implemented by inserting
`trace2` instruction to the head of method iseq.  So, it just measured
methods defined by `def` keyword.

This commit drastically changes the measuring mechanism of method
coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t*
to runs (i.e., it counts the runs per method entry), and at
`Coverage.result`, it creates the result hash by enumerating all
`rb_method_entry_t*` objects (by `ObjectSpace.each_object`).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 07:16:42 +00:00
mame aa87ae7a04 node.c: a simple notation for code range of NODEs
This affects only `--dump=parsetree` and `--dump=parsetree_with_comment`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 04:23:06 +00:00
svn 133b0cf211 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 01:10:15 +00:00
hsbt b2047f79cc vm_core.h: Increase the Fiber stack size on powerpc64
Currently the Fiber stack size is small for powerpc64 and it causes
test/ruby/test_backtrace.rb test to break, since it is using a 8kb stack
size.

It breaks on powerpc64 due to the fact that a frame in the stack is
usually 50% bigger on powerpc64 compared to Intel, due to some
considerations:

 * The powerpc64 minimum frame is 2x bigger than on Intel
 * Powerpc has more registers that might be saved in the frame compared
   to Intel.

I ran the same ruby test that is failing on both Intel and Powerpc, and
each Fiber frame is ~50% bigger on powerpc64 for every single lambda
function, thus, we need to increase the stack size on powerpc64 to
accomodate the same tests/applications.

This fixes bug#13757.

Signed-off-by: Breno Leitao <leitao@debian.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 01:10:13 +00:00
shugo 65c0f47f7e Remove unnecessary read_timeout.
http://ci.rvm.jp/results/trunk-asserts-nopara@ruby-sky1/219867

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 00:59:40 +00:00
nobu 02b7d4c544 bignum.c: unified int_pow_tmp2
* bignum.c (int_pow_tmp2): unified DLONG and none DLONG code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-05 00:09:58 +00:00
svn 984759ef98 * 2017-12-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04 23:59:03 +00:00
yui-knk faf43e37ad parse.y: Fix locations of NODE_*ASGN and NODE_ERRINFO
* parse.y: Fix to only include a range of exc_var.

  e.g. The locations of the NODE_DASGN_CURR and NODE_ERRINFO are fixed:

  ```
  begin
    1
  rescue => e
    2
  end
  ```

  * Before

  ```
  NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3)
  NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 0, last_lineno: 5, last_column: 3)
  ```

  * After

  ```
  NODE_DASGN_CURR (line: 3, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11)
  NODE_ERRINFO (line: 5, first_lineno: 3, first_column: 7, last_lineno: 3, last_column: 11)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04 23:59:02 +00:00