/
ChangeLog
16001 lines (10203 loc) · 550 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Fri Oct 19 22:11:55 2012 Benoit Daloze <eregontp@gmail.com>
* pack.c (pack_unpack): set encoding of the
'H','h','B' and 'B' modifiers to US-ASCII.
* test/ruby/test_pack.rb: tests for the above.
[ruby-core:47653][Bug #7050]
* test/test_securerandom.rb: tests for SecureRandom.hex
from tenderlove. [ruby-core:46792][Bug #6799]
Fri Oct 19 19:29:11 2012 Koichi Sasada <ko1@atdot.net>
* method.h (rb_method_cfunc_t::invoker): add new field (func ptr)
`invoker'. `invoker' function invoke cfunc body
(rb_method_cfunc_t::func).
`invoker' is set at method definition timing.
With this change, the big `switch' (branch) in `call_cfunc()'
is no longer needed.
However, the performance benefit is only a bit.
* vm_core.h (rb_call_info_t::aux::func): add a new field to store
cfunc body function pointer.
* vm_method.c (call_cfunc_invoker_func): add a new function which
returns a suitable invoke function.
* vm_method.c (setup_method_cfunc_struct): added.
* vm_method.c (rb_add_method): fix to set `invoker'.
* vm_eval.c (vm_call0_body): catch up above changes.
* vm_insnhelper.c (call_cfunc): removed.
* vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body
with `invoker' function.
Fri Oct 19 16:55:58 2012 Koichi Sasada <ko1@atdot.net>
* eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().
Fri Oct 19 11:13:55 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/driver.rb: remove unexpected `output'.
(commit miss)
Fri Oct 19 10:24:03 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_search_method): remove needless local variable.
Fri Oct 19 10:22:26 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bmx_temp.rb: removed.
This file should not be in repository.
Fri Oct 19 10:20:10 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/driver.rb: add new option `--ruby-arg [ARG]'
which is passed as a launch parameter for each ruby's execution.
($ ruby [ARG] [File])
Thu Oct 18 18:42:35 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (opt_send_simple): move the location of
`opt_send_simple' to the place near `send' definition.
(to take care about icache locality).
Thu Oct 18 18:29:25 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (send): remove unused condition.
This condition will be true after r37258.
* vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on
checking blockiseq (it seems `LIKELY').
Thu Oct 18 17:31:58 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (opt_send_simple): introduce new instruction used
when no need to care about block and splat.
* compile.c: use the `opt_send_simple' instruction.
Thu Oct 18 16:44:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless):
check arity earlier at definition time.
Thu Oct 18 15:11:31 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c: add `inline' keyword to several functions.
Compilers (gcc) are conservative than I expected.
Thu Oct 18 15:01:15 2012 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h: add a decl. of
`rb_define_frameless_method()'.
Thu Oct 18 14:31:17 2012 Koichi Sasada <ko1@atdot.net>
* compile.c (new_callinfo): set a temporary index of callinfo
(used in `iseq_set_sequence()') to rb_call_info_t::aux::index.
rb_call_info_t::argc is initialiesed by same value of
rb_call_info_t::orig_argc.
Thu Oct 18 14:11:08 2012 Koichi Sasada <ko1@atdot.net>
* class.c (rb_define_frameless_method): rename from
rb_define_method_fast(). Defined method with this C API
does not make a method frame. It is bit lightweight than
ordinal C functions. Now only 0 or 1 argc are permitted.
* method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
from VM_METHOD_TYPE_CFUNC_FAST.
* vm_insnhelper.c, vm_method.c: rename related functions.
* proc.c (rb_method_entry_arity): catch up above changes.
Thu Oct 18 10:30:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (assignable_gen): fail if yyerror occurred. fix a bug in
r36973.
Thu Oct 18 09:23:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* hash.c (initialize_copy): duping should rehash the hash.
* test/ruby/test_hash.rb: added a test to ensure rehash.
Wed Oct 17 21:16:47 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* common.mk (WPROGRAM): need same dependencies as PROGRAM.
* cygwin/GNUmakefile.in (uncommon.mk): move include position
below WPROGRAM definition to be defined in uncommon.mk.
* ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
If make of ruby.exe and rubyw.exe run in parallel, link dll and link
exe run in parallel, which causes link failure on mingw. To fix this,
we make ruby.exe and rubyw.exe in one make process.
[ruby-core:48007] [Bug #7165]
Wed Oct 17 16:25:34 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
performance of invoking `method_missing'.
Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
`aux.opt_pc'.
Wed Oct 17 16:03:54 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_call_method_missing): make a refactoring
about method_missing process. Use `vm_call_method()' to invoke
`method_missing' method instead of `rb_funcall2()'.
In `vm_call_method()', set fastpath to `vm_call_method_missing()'
if it can be cached.
* vm_core.h (rb_call_info_t): add new field
`rb_call_info_t::aux::missing_reason' to pass the reason to
`vm_call_method_missing()'.
Wed Oct 17 15:33:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (opt-dir): allow multiple directories separated by
$PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
[Bug #7120]
Wed Oct 17 15:08:13 2012 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
message/delivery-status ([ruby-core:47920] [Bug #7146]),
message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
(BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).
patched by Tony Arkles.
* test/net/imap/test_imap_response_parser.rb: related test.
Wed Oct 17 11:04:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
to show the problem of r37232.
Wed Oct 17 10:48:40 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_insnhelper.c (vm_search_method): fix a build error that occurs
when OPT_INLINE_METHOD_CACHE is 0.
Wed Oct 17 08:46:47 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bm_vm2_dstr.rb: add a benchmark to measure
performance of dynamic generated string ("foo#{bar}baz").
Wed Oct 17 08:32:46 2012 Koichi Sasada <ko1@atdot.net>
* compile.c (compile_dstr_fragments): use `putobject' instead of
`putstring' for all of strings used by NODE_DSTR because
ruby users can not grab this string.
For example, the string object of "baz" in "foo#{bar}baz"
is located by `putobject' (users can not touch "baz" object
directly). This change reduces GC pressure.
This improvement is suggested by Aaron Patterson.
Wed Oct 17 08:02:57 2012 Koichi Sasada <ko1@atdot.net>
* thread.c (rb_threadptr_interrupt_mask): fix to check interrupt
after interrupt_mask changed.
Wed Oct 17 06:42:47 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_call_method): fix to return value immediately.
Remove CHECK_INTS() after that method dispatch.
Wed Oct 17 06:25:56 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* hash.c (initialize_copy): copy the underlying st_table on dup,
rather than copying the hash key by key. [ruby-core:48009]
* test/ruby/test_hash.rb: relevant tests for initialize_copy
Wed Oct 17 06:17:44 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normal
method frame setup functions.
Add checking interrupts at the tailcall setup function.
Wed Oct 17 05:35:37 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
(invoke empty block) performance.
* benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
method invocation with empty block.
Wed Oct 17 05:05:07 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skip
when splat flag is not set.
Wed Oct 17 01:53:47 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache
with rb_call_info_t to speedup `attr' getter and setter.
Cached index is stored in rb_call_info_t::aux::index.
`index' == 0 means not cached. `index' > 0 means cached and cached
index is `index - 1'.
* insns.def ((get|set)instancevariable): use new wrapper functions
vm_(get|set)instancevariable() defined in vm_insnhelper.c.
* vm_core.h (rb_call_info_t::aux): introduce new union data because
opt_pc can share with index.
Tue Oct 16 22:24:44 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/driver.rb (show_results): Show speedup ratio
with first executables score at last of results
if two or more executrables are given.
Tue Oct 16 21:59:01 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/driver.rb: some refactoring.
(1) Remove `average differential'.
In this benchmark driver, We should not care about `average'.
We use fastest score because this score should not include
any disturbances (affections of background process, etc).
If you care about timing affect, I recommend `median'
score with more than 5 examinations rather than simple
`average' score (`average' score was affected by error scores).
(2) Show log file name.
(3) Change default directory from './' to driver's directory.
Tue Oct 16 14:56:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_join): need to check again after any conversion run.
[ruby-core:48012] [Bug #7168]
Tue Oct 16 12:52:14 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_file):
rename from file_assertion.
Tue Oct 16 11:30:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_join): hide the result under construction until
return.
* file.c (rb_file_join): check nul-byte only for strings, since
FilePathStringValue() does it. [ruby-core:48012] [Bug #7168]
* file.c (rb_file_join): path names must be ASCII-compatible.
[ruby-core:48012] [Bug #7168]
* file.c (check_path_encoding): new function to ensure path name
encoding to be ASCII-compatible.
Tue Oct 16 09:40:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
Regexp.new instead of literal to ignore a parser warning.
Tue Oct 16 09:30:30 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring
warnings are already set in setup method.
Tue Oct 16 06:44:06 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.
Tue Oct 16 06:29:18 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() if
this method call needs splat argument because cached functions
(vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary))
do not check an arity.
* bootstraptest/test_method.rb: add a test to check an above issue.
Tue Oct 16 06:15:44 2012 Koichi Sasada <ko1@atdot.net>
* method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.
This method is similar to VM_METHOD_TYPE_CFUNC methods, but
called cfunc without building new frame (does not push new control
frame). If error is occurred in cfunc, the backtrace only shows
caller frame and upper.
This kind of methods can be added by rb_define_method_fast().
This feature is similar to specialized instructions (opt_plus, etc),
but more flexible (but a bit slower).
* class.c (rb_define_method_fast): added.
Maybe it will be renamed soon.
* vm_insnhelper.c (vm_call_method): support method type
VM_METHOD_TYPE_CFUNC_FAST.
* proc.c (rb_method_entry_arity): catch up new method type.
* vm_method.c (rb_add_method_cfunc_fast): added.
Tue Oct 16 02:32:29 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.
If `enable' is 0 then CI_SET_FASTPATH() doesn't work.
And add new configuration option OPT_CALL_FASTPATH. If this macro
was defined by 0, then CI_SET_FASTPATH() doesn't work any more.
* vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter
of CI_SET_FASTPATH if this method is protected.
Tue Oct 16 02:17:35 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h (VM_CALL_*): rename VM_CALL_*_BIT
to VM_CALL_* (remove `_BIT' suffix).
Add comments on each macros.
Remove unused macro VM_CALL_TAILRECURSION_BIT.
* compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto.
Mon Oct 15 22:14:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion):
rewrite file assertions.
Mon Oct 15 09:41:17 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
it was called from vm_yield_setup_args().
Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
`CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'.
`func' (ci->call) is called at the last of `send'
(and `invokesuper') instruction.
`CI_SET_FASTPATH' does not set `ci->call' when the method
(stored in `ci->me') is `protected'.
* vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'.
After several checking (visibility, argc checking), the result of
checking can be reused until re-definition of this method
with inline method cache.
Note that this optimization is now experimental.
If you find any problem about it, please tell us.
Mon Oct 15 04:51:55 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c: refactoring.
- move all `call' related functions to the last of file.
- make functions for respective method types in vm_call_method().
(all functions have same function parameters)
* vm_core.h: add `opt_pc' field in `rb_call_info_t'
as temporal variable.
* vm_eval.c (vm_call0_body): catch up above changes.
Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
* benchmark/bm_vm1_float_simple.rb: added (for flonum/float).
Mon Oct 15 02:51:16 2012 Koichi Sasada <ko1@atdot.net>
* vm_eval.c (vm_call0_body): add new function.
`vm_call0()' makes call_info struct and calls `vm_call0_body()'
with this struct. In near future, `vm_call0()' will be removed
because all of `vm_call0()' users setup call_info struct by itself.
Mon Oct 15 01:38:06 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:
use only a `ci' (rb_call_info_t) parameter instead of using
parameters such as `op_id', 'op_argc', `blockiseq' and flag.
These information are stored in rb_call_info_t at the compile
time.
This technique simplifies parameter passing at related
function calls (~10% speedups for simple method invocation at
my machine).
`rb_call_info_t' also has new function pointer variable `call'.
This `call' variable enables to customize method (block)
invocation process for each place. However, it always call
`vm_call_general()' at this changes.
`rb_call_info_t' also has temporary variables for method
(block) invocation.
* vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP
VM_CALL macro. This flag indicates that this call can skip
caller_setup (block arg and splat arg).
* compile.c: catch up above changes.
* iseq.c: catch up above changes (especially for TS_CALLINFO).
* tool/instruction.rb: catch up above changes.
* vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions
parameters are changed.
* vm_eval.c (vm_call0): ditto (it will be rewritten soon).
Sun Oct 14 12:30:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
[ruby-core:47967] [Bug #7157]
Sat Oct 13 23:15:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* regparse.c (parse_char_class): should match with a hyphen after a
range in a character class.
* test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
test.
* test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
error message.
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
because the previous name was wrong.
* test/ruby/test_regexp.rb
(TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
more test pattern.
Sat Oct 13 03:01:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (realpath_rec): prevent link from GC while link_names refers
the content.
Sat Oct 13 01:37:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_regexp.rb
(TestRegexp#test_raw_hyphen_and_type_char_after_range): added new
test. ref [ruby-core:47115] [Backport #6853]
Fri Oct 12 21:55:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* include/ruby/win32.h (rb_w32_pow): set floating point precision
for mingw-w64 x86 pow(). This improves the precision of pow() on
Windows XP for TestFloat#test_round_with_precision failure.
[ruby-core:47911] [Bug #7142]
Fri Oct 12 21:37:25 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test
depending on locale on Windows. ENV[] doesn't work properly if
console code page is not equal to file system encoding.
[ruby-core:47910] [Bug #7140]
Fri Oct 12 20:40:29 2012 Tanaka Akira <akr@fsij.org>
* process.c (posix_sh_cmds): the command name of colon is ":".
Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_get_path_check): path name must not contain NUL bytes.
Fri Oct 12 16:06:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* tool/merger.rb: now can merge revision(s) without --ticket again.
Fri Oct 12 14:10:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
default library path. [ruby-core:43726] [Bug #6207]
Fri Oct 12 05:25:00 2012 Zachary Scott <zzak@ruby-lang.org>
* lib/timeout.rb (timeout):
Remove paragraph on wrong implementation detail.
[ruby-core:47739] [Bug #7088]
Thu Oct 11 23:09:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}):
prevent String copies from GC. [ruby-core:47881] [Bug #7135]
Thu Oct 11 07:40:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
* iseq.c (insn_operand_intern): cast op to rb_call_info_t* before
compare with iseq->callinfo_entries whose type is rb_call_info_t*.
Thu Oct 11 03:37:08 2012 Koichi Sasada <ko1@atdot.net>
* bootstraptest/test_block.rb: add tests for block with super.
Thu Oct 11 02:54:07 2012 Koichi Sasada <ko1@atdot.net>
* vm_dump.c: fix debug prints to catch up recent changes
such as VM data structures.
Thu Oct 11 02:50:34 2012 Koichi Sasada <ko1@atdot.net>
* iseq.c (insn_operand_intern): add support disasm TS_CALLINFO
operands.
Wed Oct 10 15:12:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip on
windows because the platform does not have Process.group method.
patched by Jon Forums in [ruby-core:47878] [Bug #7133].
Tue Oct 9 23:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/envutil.rb (assert_file, assert_file_not): more
descriptive assertions for File predicates.
Tue Oct 9 18:01:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (rb_ary_sample): use rb_random_ulong_limited, since
precision of long may be larger than double.
* random.c (rb_random_ulong_limited): new function to return a random
value from 0 upto limit as unsigned long, similarly to
rb_genrand_ulong_limited but with arbitrary RNG object.
Tue Oct 9 17:13:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
:gid options. [ruby-core:47414] [Feature #6975]
Tue Oct 9 14:36:11 2012 Koichi Sasada <ko1@atdot.net>
* iseq.c (iseq_free): fix memory leak.
rb_iseq_t::callinfo_entries should be freed.
Tue Oct 9 14:28:18 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h (rb_call_info_t): add new type `rb_call_info_t'.
This data structure contains information including inline method
cache. After that, `struct iseq_inline_cache_entry' does not
need to contain inline cache for method invocation.
Other information will be added to this data structure.
* vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
members to `rb_iseq_t'.
* insns.def, compile.c: Use CALL_INFO instead of IC.
* tool/instruction.rb: support CALL_INFO as operand type.
* vm_insnhelper.c, vm_insnhelper.h: ditto.
Sun Oct 7 23:54:33 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
* ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
z->stream.avail_in == 0. it return Z_BUF_ERROR.
but deflate() could be called with z->stream->avail_in == 0 because
it has hidden buffer in z->stream->state (opaque structure).
fix for gem install error. [ruby-dev:46149] [Bug #7040]
Mon Oct 8 23:55:41 2012 Shugo Maeda <shugo@ruby-lang.org>
* eval.c (rb_mod_refinements): new method Module#refinements.
* test/ruby/test_refinement.rb: add new tests for the above changes.
Mon Oct 8 23:02:19 2012 Shugo Maeda <shugo@ruby-lang.org>
* eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
vm_method.c: rename omod and overlaid modules to refinements.
* eval.c (hidden_identity_hash_new): renamed from identity_hash_new.
Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
* lib/abbrev.rb: Documentation examples for Abbrev.
[ruby-core:47442] [Bug #6985]
Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
* thread.c (rb_thread_aref):
Grammar in Thread documentation.
Patch by Steve Klabnik [ruby-core:47799] [Bug #7099]
Sun Oct 7 04:37:00 2012 Zachary Scott <zzak@ruby-lang.org>
* string.c (rb_str_match):
Clarify behavior for captured strings and local variable assignment
Patch by Marcus Stollsteimer [ruby-core:47668] [Bug #7062]
Sat Oct 6 18:31:36 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
enable/disable global method caching. [ruby-dev:46203] [Bug #7111]
* vm_method.c (rb_method_entry_get_with_omod): don't use global
method cache if OPT_GLOBAL_METHOD_CACHE is 0.
Sat Oct 6 16:32:04 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_method.c (search_method): check omod only once for performance.
Sat Oct 6 09:42:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
UTF encodings are dummy but Unicode.
* encoding.c (rb_encdb_set_unicode): set Unicode flag.
* template/encdb.h.tmpl: allow ENC_DUMMY variants.
* encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
Fri Oct 5 17:18:42 JST 2012 TAKANO Mitsuhiro <tak@no32.tk>
* template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
HTML_ALIGN_MEMBERS lines. They have been obsolete in
Doxygen version 1.8.2.
Fri Oct 05 15:26:18 2012 Koichi Sasada <ko1@atdot.net>
* ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
This method returns an array of objects referenced by given object.
If given object is special objects such as true/false/nil/Fixnum etc
then it returns nil. See rdoc for details.
[ruby-core:39772]
* test/objspace/test_objspace.rb: add a test for this method.
* gc.c: add rb_objspace_reachable_objects_from().
To make this function, add several member `mark_func_data'
to rb_objspace_t. If mark_func_data is not null, then
gc_mark() calls mark_func_data::mark_func.
* gc.h: export rb_objspace_reachable_objects_from().
Thu Oct 4 23:40:04 2012 Narihiro Nakamura <authornari@gmail.com>
* gc.c (init_heap): call init_mark_stack before to allocate
altstack. This change avoid the stack overflow at the signal
handler on 32bit, but I don't understand reason... [Feature #7095]
Thu Oct 4 22:39:27 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (getlocal, setlocal): remove old getlocal/setlocal
instructions and rename getdaynmic/setdynamic instructions
to getlocal/setlocal.
* compile.c: ditto.
* iseq.c: remove TS_DINDEX.
* vm_exec.h (dindex_t): remove type definition of `dindex_t'.
* tool/instruction.rb: ditto.
Thu Oct 4 21:44:17 2012 Koichi Sasada <ko1@atdot.net>
* vm.c (vm_analysis_insn|operand|register): use st_insert
instead of using rb_hash_aset() because rb_hash_aset()
check $SAFE.
Thu Oct 4 21:15:26 2012 Koichi Sasada <ko1@atdot.net>
* vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
hooks (old macro name is COLLECT_USAGE_ANALYSIS).
This feature is only for VM developers. (I'm not sure I can use
`VM developers' (the plural form) in this sentence).
If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
usage collection features:
(1) instruction: collect instruction usages.
(2) operand: collect operand usages.
(3) register: collect register usages.
The results are stored in
RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
RubyVM::USAGE_ANALYSIS_REGS for (3).
You can stop collecting usages with
RubyVM::USAGE_ANALYSIS_INSN_STOP(),
RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
for (1), (2), (3) respectively.
You can also change the hook functions by setting
C level global variables
`ruby_vm_collect_usage_func_(insn|operand|register)'
for (1), (2), (3) respectively.
See codes for more details.
* tool/instruction.rb: fix macro names.
* iseq.c (insn_operand_intern): make it export (used in vm.c).
fix to skip several processes if not needed (pointer is 0).
* vm_dump.c: move codes for collection features to vm.c.
* vm_exec.h: rename macro and function names.
* vm_insnhelper.h: ditto.
Thu Oct 4 18:59:14 2012 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_settracefunc.rb (test_tracepoint):
remove unused test case.
(this test case is redefined by newer tests)
Thu Oct 4 17:24:51 2012 Narihiro Nakamura <authornari@gmail.com>
* gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
at suitable point.
Thu Oct 4 16:31:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
before run finalizers, to fix SEGV from btest on 32bit.
* gc.c (gc_mark_stacked_objects): extract from gc_marks().
Thu Oct 4 11:43:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (ruby_init_stack): round stack limit to page size
boundary to calculate stack size more precisely. [ruby-dev:46174]
[Bug #7084]
Wed Oct 3 19:51:57 2012 Narihiro Nakamura <authornari@gmail.com>
* gc.c: Use the non-recursive marking instead of recursion. The
recursion marking of CRuby needs checking stack overflow and the
fail-safe system, but these systems not good at partial points,
for example, marking deep tree structures. [ruby-dev:46184]
[Feature #7095]
* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
checking stack overflow of marking.
* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.
Wed Oct 3 15:33:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (ruby_init_stack): use getrlimit() for the main
thread on Mac OS X, since pthread_get_stack{addr,size}_np()
return the default value always, but not the ulimit value.
[ruby-dev:46174] [Bug #7084]
Wed Oct 3 11:43:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_io_reopen): improvement to accept optional arguments.
a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
[Feature #7103]
Wed Oct 3 04:36:11 2012 Eric Hodel <drbrain@segment7.net>
* ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
documentation
* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
ditto
* ext/openssl/ossl_x509store.c (ossl_x509store_add_cert): ditto
Wed Oct 3 02:23:37 2012 Shugo Maeda <shugo@ruby-lang.org>
* error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
taint messages.
Tue Oct 2 16:47:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (identity_hash_new): hide internal hashes for refinements.
* eval.c (rb_mod_refine): no default value.
Mon Oct 1 22:54:02 2012 Shugo Maeda <shugo@ruby-lang.org>
* eval.c (identity_hash_new): new function to create a new identity
hash.
* eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
identity_hash_new().
Mon Oct 1 02:34:53 2012 Akinori MUSHA <knu@iDaemons.org>
* configure.in (--with-opt-dir): Make this also work on DLDFLAGS
so LIBRUBY_SO links fine with libexecinfo installed in a
non-system directory.
Sun Sep 30 23:32:00 2012 Kenta Murata <mrkn@mrkn.jp>
* vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
in the list of locations of crash reports.
Sun Sep 30 21:18:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
* string.c (rb_str_concat): use memcpy to copy a string which contains
NUL characters. [ruby-core:47751] [Bug #7090]
Sat Sep 29 19:41:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
before Timeout::Error is raised. rmdir of mktmpdir fails with
EACCES if child process is alive on Windows.
* test/thread/test_queue.rb (TestQueue): increase timeout.
This test takes long time on Windows XP.
Sat Sep 29 19:41:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
clear environment variables. If http_proxy environment variable was
set, the test failed.
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.
Sat Sep 29 19:41:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/drb/drbtest.rb (DRbCore#teardown):
Use Process.kill :KILL on Windows because Process.kill :INT silently
fails on Windows 7 and raises EINVAL on Windows XP for spawned
process with new_pgroup: false.
* test/drb/drbtest.rb (DRbAry#teardown): ditto.
Sat Sep 29 19:40:32 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
set script encoding to work with LANG=C. It would work on both
Windows and Unix. Refix of r37051.
Sat Sep 29 11:21:06 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_insnhelper.c (rb_vm_using_modules): use using_modules before
klass to fix method lookup order, and use klass even if klass is
not a module to make refinements in class_eval invoked on classes
work.
* eval.c (rb_using_module): accept a class as the second argument.
* eval.c (rb_mod_using, f_using): raise a TypeError if the argument
is not a module.
* test/ruby/test_refinement.rb: add new tests for the above changes.
Sat Sep 29 02:18:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
Use ruby only on Windows since the test fails on Unix with LANG=C.
[ruby-core:47709] [Bug #7076]
Fri Sep 28 22:19:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
echo command doesn't work properly against non-ascii character on
Windows with chcp 437. Instead we use ruby.
[ruby-core:47709] [Bug #7076]
Fri Sep 28 17:54:31 2012 Koichi Sasada <ko1@atdot.net>
* vm_insnhelper.c (vm_setup_method): refactoring.
Remove src_argc and use iseq->arg_size directly.
Fri Sep 28 17:26:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
* lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
fails on Windows with msys bash. It makes comparing paths
case-insensitive.
pick from upstream to fix a failure of test-all [ruby-core:47711]
https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe
Fri Sep 28 15:44:45 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_method.c (search_method): copy refinement iclasses to search
superclasses correctly.
* test/ruby/test_refinement.rb: related test.
Fri Sep 28 15:15:41 2012 Koichi Sasada <ko1@atdot.net>
* insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
* compile.c (iseq_compile_each): ditto.
* node.h: remove unused node `NODE_OPTBLOCK'.
* ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.
Fri Sep 28 13:14:34 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
Fri Sep 28 12:51:54 2012 Koichi Sasada <ko1@atdot.net>
* vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
`bp' can be calculate by `sp' (stack pointer) of previous frame.
Now, `bp_check' field is remained for debug. You can eliminate
this field by setting VM_DEBUG_BP_CHECK as 0.
* vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
This function calculates base pointer from cfp.
* vm_insnhelper.c (vm_setup_method): push `recv' value on top of
value stack (before method parameters).
This change is for keeping consistency with normal method dispatch.
* insns.def: fix to use vm_base_ptr().
* vm.c (vm_exec): ditto.
* vm_dump.c: remove `bp' related dumps.
* cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.
Fri Sep 28 10:40:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_io_reopen): accept File::Constants as well as mode string.
based on the patch by Glass_saga (Masaki Matsushita) in
[ruby-core:47694]. [Feature #7067]
Thu Sep 27 18:36:51 2012 Shugo Maeda <shugo@ruby-lang.org>
* eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
argument of Module#refine.
* vm_method.c (search_method): if klass is an iclass, lookup the
original module of the iclass in omod in order to allow
refinements of modules.
* test/ruby/test_refinement.rb: add tests for the above changes.
Thu Sep 27 18:12:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/syslog/lib/syslog/logger.rb: add a formatter to the
Syslog::Logger object. [Bug #7065]
* test/syslog/test_syslog_logger.rb: ditto.
Wed Sep 26 16:39:57 2012 Koichi Sasada <ko1@atdot.net>
* insns.def: add new instruction `opt_empty_p' for optimize `empty?'
method. Apply a patch proposed at [ruby-dev:46120]
[ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).
* compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
ditto.
* id.c, template/id.h.tmpl: ditto.
* test/ruby/test_optimization.rb: test for this changes.
Tue Sep 25 09:59:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* insns.def (invokesuper): klass in cfp is not valid in at_exit and
END blocks. [ruby-core:47680] [Bug #7064]
Tue Sep 25 08:11:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
* iseq.c (rb_iseq_defined_string): the index of defined_strings must
be the value of type - 1.
Mon Sep 24 17:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compile.c (defined_expr), insns.def (defined): share single frozen
strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
* iseq.c (rb_iseq_defined_string): make expression strings.