Skip to content

Commit e2571e2

Browse files
committed
New upstream version 2.6.0
1 parent cd28c99 commit e2571e2

File tree

6,787 files changed

+305614
-127059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,787 files changed

+305614
-127059
lines changed

.document

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@ NEWS
2424
README.md
2525
README.ja.md
2626

27+
COPYING
28+
COPYING.ja
29+
CONTRIBUTING.md
30+
31+
LEGAL
32+
33+
# win32/README.win32 linked from README.md
34+
win32
35+
2736
doc

.editorconfig

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33
[*]
44
end_of_line = lf
55
indent_size = 4
6-
indent_style = tab
6+
indent_style = space
77
insert_final_newline = true
88
tab_width = 8
99
trim_trailing_whitespace = true
@@ -13,12 +13,15 @@ end_of_line = crlf
1313

1414
[*.gemspec]
1515
indent_size = 2
16-
indent_style = space
1716

1817
[*.rb]
1918
indent_size = 2
20-
indent_style = space
2119

2220
[*.yml]
2321
indent_size = 2
24-
indent_style = space
22+
23+
[{*[Mm]akefile*,*.mak,*.mk,depend}]
24+
indent_style = tab
25+
26+
[reg*.[ch]]
27+
indent_size = 2

.gdbinit

Lines changed: 82 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set startup-with-shell off
2+
13
define hook-run
24
set $color_type = 0
35
set $color_highlite = 0
@@ -154,8 +156,12 @@ define rp
154156
else
155157
if ($flags & RUBY_T_MASK) == RUBY_T_HASH
156158
printf "%sT_HASH%s: ", $color_type, $color_end,
157-
if ((struct RHash *)($arg0))->ntbl
158-
printf "len=%ld ", ((struct RHash *)($arg0))->ntbl->num_entries
159+
if (((struct RHash *)($arg0))->basic->flags & RHASH_ST_TABLE_FLAG)
160+
printf "st len=%ld ", ((struct RHash *)($arg0))->as.st->num_entries
161+
else
162+
printf "li len=%ld bound=%ld ", \
163+
((((struct RHash *)($arg0))->basic->flags & RHASH_ARRAY_LEN_MASK) >> RHASH_ARRAY_LEN_SHIFT), \
164+
((((struct RHash *)($arg0))->basic->flags & RHASH_ARRAY_BOUND_MASK) >> RHASH_ARRAY_BOUND_SHIFT)
159165
end
160166
print (struct RHash *)($arg0)
161167
else
@@ -698,12 +704,6 @@ define nd_cval
698704
rp ($arg0).u3.value
699705
end
700706

701-
702-
define nd_cnt
703-
printf "%su3.cnt%s: ", $color_highlite, $color_end
704-
p ($arg0).u3.cnt
705-
end
706-
707707
define nd_tbl
708708
printf "%su1.tbl%s: ", $color_highlite, $color_end
709709
p ($arg0).u1.tbl
@@ -742,12 +742,6 @@ define nd_lit
742742
rp ($arg0).u1.value
743743
end
744744

745-
746-
define nd_frml
747-
printf "%su1.node%s: ", $color_highlite, $color_end
748-
rp ($arg0).u1.node
749-
end
750-
751745
define nd_rest
752746
printf "%su2.argc%s: ", $color_highlite, $color_end
753747
p ($arg0).u2.argc
@@ -774,12 +768,6 @@ define nd_args
774768
rp ($arg0).u3.node
775769
end
776770

777-
778-
define nd_noex
779-
printf "%su1.id%s: ", $color_highlite, $color_end
780-
p ($arg0).u1.id
781-
end
782-
783771
define nd_defn
784772
printf "%su3.node%s: ", $color_highlite, $color_end
785773
rp ($arg0).u3.node
@@ -797,17 +785,6 @@ define nd_new
797785
end
798786

799787

800-
define nd_cfnc
801-
printf "%su1.cfunc%s: ", $color_highlite, $color_end
802-
p ($arg0).u1.cfunc
803-
end
804-
805-
define nd_argc
806-
printf "%su2.argc%s: ", $color_highlite, $color_end
807-
p ($arg0).u2.argc
808-
end
809-
810-
811788
define nd_cname
812789
printf "%su1.id%s: ", $color_highlite, $color_end
813790
p ($arg0).u1.id
@@ -1021,24 +998,55 @@ define print_lineno
1021998
set $pos = $pos - 1
1022999
end
10231000

1024-
set $i = 0
1025-
set $size = $iseq->body->insns_info_size
1026-
set $table = $iseq->body->insns_info
1001+
set $index = 0
1002+
set $size = $iseq->body->insns_info.size
1003+
set $table = $iseq->body->insns_info.body
1004+
set $positions = $iseq->body->insns_info.positions
10271005
#printf "size: %d\n", $size
10281006
if $size == 0
10291007
else
1030-
set $i = 1
1031-
while $i < $size
1032-
#printf "table[%d]: position: %d, line: %d, pos: %d\n", $i, $table[$i].position, $table[$i].line_no, $pos
1033-
if $table[$i].position > $pos
1034-
loop_break
1008+
if $size == 1
1009+
printf "%d", $table[0].line_no
1010+
else
1011+
if $positions
1012+
# get_insn_info_linear_search
1013+
set $index = 1
1014+
while $index < $size
1015+
#printf "table[%d]: position: %d, line: %d, pos: %d\n", $i, $positions[$i], $table[$i].line_no, $pos
1016+
if $positions[$index] > $pos
1017+
loop_break
1018+
end
1019+
set $index = $index + 1
1020+
if $positions[$index] == $pos
1021+
loop_break
1022+
end
10351023
end
1036-
set $i = $i + 1
1037-
if $table[$i].position == $pos
1038-
loop_break
1024+
else
1025+
# get_insn_info_succinct_bitvector
1026+
set $sd = $iseq->body->insns_info.succ_index_table
1027+
set $immediate_table_size = sizeof($sd->imm_part) / sizeof(uint64_t) * 9
1028+
if $pos < $immediate_table_size
1029+
set $i = $pos / 9
1030+
set $j = $pos % 9
1031+
set $index = ((int)($sd->imm_part[$i] >> ($j * 7))) & 0x7f
1032+
else
1033+
set $block_index = ($pos - $immediate_table_size) / 512
1034+
set $block = &$sd->succ_part[$block_index]
1035+
set $block_bit_index = ($pos - $immediate_table_size) % 512
1036+
set $small_block_index = $block_bit_index / 64
1037+
set $small_block_popcount = $small_block_index == 0 ? 0 : (((int)($block->small_block_ranks >> (($small_block_index - 1) * 9))) & 0x1ff)
1038+
set $x = $block->bits[$small_block_index] << (63 - $block_bit_index % 64)
1039+
set $x = ($x & 0x5555555555555555) + ($x >> 1 & 0x5555555555555555)
1040+
set $x = ($x & 0x3333333333333333) + ($x >> 2 & 0x3333333333333333)
1041+
set $x = ($x & 0x0707070707070707) + ($x >> 4 & 0x0707070707070707)
1042+
set $x = ($x & 0x001f001f001f001f) + ($x >> 8 & 0x001f001f001f001f)
1043+
set $x = ($x & 0x0000003f0000003f) + ($x >>16 & 0x0000003f0000003f)
1044+
set $popcnt = ($x & 0x7f) + ($x >>32 & 0x7f)
1045+
set $index = $block->rank + $small_block_popcount + $popcnt
10391046
end
10401047
end
1041-
printf "%d", $table[$i-1].line_no
1048+
printf "%d", $table[$index-1].line_no
1049+
end
10421050
end
10431051
end
10441052

@@ -1305,3 +1313,34 @@ define dump_node
13051313
((struct RString*)$str)->as.heap.ptr : \
13061314
((struct RString*)$str)->as.ary)
13071315
end
1316+
1317+
define print_flags
1318+
printf "RUBY_FL_WB_PROTECTED: %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_WB_PROTECTED ? "1" : "0"
1319+
printf "RUBY_FL_PROMOTED0 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_PROMOTED0 ? "1" : "0"
1320+
printf "RUBY_FL_PROMOTED1 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_PROMOTED1 ? "1" : "0"
1321+
printf "RUBY_FL_FINALIZE : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_FINALIZE ? "1" : "0"
1322+
printf "RUBY_FL_TAINT : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_TAINT ? "1" : "0"
1323+
printf "RUBY_FL_UNTRUSTED : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_UNTRUSTED ? "1" : "0"
1324+
printf "RUBY_FL_EXIVAR : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_EXIVAR ? "1" : "0"
1325+
printf "RUBY_FL_FREEZE : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_FREEZE ? "1" : "0"
1326+
1327+
printf "RUBY_FL_USER0 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER0 ? "1" : "0"
1328+
printf "RUBY_FL_USER1 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER1 ? "1" : "0"
1329+
printf "RUBY_FL_USER2 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER2 ? "1" : "0"
1330+
printf "RUBY_FL_USER3 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER3 ? "1" : "0"
1331+
printf "RUBY_FL_USER4 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER4 ? "1" : "0"
1332+
printf "RUBY_FL_USER5 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER5 ? "1" : "0"
1333+
printf "RUBY_FL_USER6 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER6 ? "1" : "0"
1334+
printf "RUBY_FL_USER7 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER7 ? "1" : "0"
1335+
printf "RUBY_FL_USER8 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER8 ? "1" : "0"
1336+
printf "RUBY_FL_USER9 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER9 ? "1" : "0"
1337+
printf "RUBY_FL_USER10 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER10 ? "1" : "0"
1338+
printf "RUBY_FL_USER11 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER11 ? "1" : "0"
1339+
printf "RUBY_FL_USER12 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER12 ? "1" : "0"
1340+
printf "RUBY_FL_USER13 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER13 ? "1" : "0"
1341+
printf "RUBY_FL_USER14 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER14 ? "1" : "0"
1342+
printf "RUBY_FL_USER15 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER15 ? "1" : "0"
1343+
printf "RUBY_FL_USER16 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER16 ? "1" : "0"
1344+
printf "RUBY_FL_USER17 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER17 ? "1" : "0"
1345+
printf "RUBY_FL_USER18 : %s\n", ((struct RBasic*)($arg0))->flags & RUBY_FL_USER18 ? "1" : "0"
1346+
end

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.a
55
*.bak
66
*.bc
7+
*.bundle
78
*.dSYM
89
*.dmyh
910
*.dylib
@@ -15,10 +16,13 @@
1516
*.obj
1617
*.old
1718
*.orig
19+
*.pch
1820
*.pdb
1921
*.rej
2022
*.s
2123
*.sav
24+
*.sl
25+
*.so
2226
*.swp
2327
*.yarb
2428
*~
@@ -60,6 +64,7 @@ lcov*.info
6064
/archive
6165
/autom4te*.cache
6266
/automake
67+
/benchmark/benchmark-driver
6368
/beos
6469
/bmlog-*
6570
/breakpoints.gdb
@@ -137,6 +142,10 @@ lcov*.info
137142
/enc/jis/props.h
138143
/enc/unicode/data
139144

145+
# /coroutine/
146+
!/coroutine/**/*.s
147+
/coroutine/**/.time
148+
140149
# /enc/trans/
141150
/enc/trans/*.c
142151
/enc/trans/*.def
@@ -145,6 +154,7 @@ lcov*.info
145154
/enc/trans/.time
146155

147156
# /exe/
157+
/exe/goruby
148158
/exe/ruby
149159
/exe/.time
150160

@@ -195,3 +205,8 @@ lcov*.info
195205
# /win32/
196206
/win32/*.ico
197207
/win32/.time
208+
209+
# MJIT
210+
/rb_mjit_header.h
211+
/mjit_config.h
212+
/include/ruby-*/*/rb_mjit_min_header-*.h

0 commit comments

Comments
 (0)