-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathChanges
14431 lines (12869 loc) · 689 KB
/
Changes
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
0.990043 2025-02-07
[New Features]
* Add StringBuffer#compare_string method.
* Add StringBuffer#equals_string method.
* Add StringBuffer#substr method.
[Internal Chnages]
* Cleanup logic of error of code generated by spvmcc command.
[Incompatible Changes]
* The defalut access control of new operator becomes protected instead of private.
* The defalut access control of field access becomes protected instead of private.
* The defalut access control of class variable access becomes protected instead of private.
0.990042 2025-01-22
[New Features]
* Add cache class variable attribute.
* Add is_cache class variable native API.
* Add Native::ClassVar#is_cache method.
* Add destroy_cache_class_vars native API.
* Add Fn#destroy_cache_class_vars method.
* Add Fn#destroy_runtime_permanent_vars method.
[Compilation Error Message Changes]
* Change compilation error message.
[Before]
The private MyClass2#$FOO class variable cannnot be called from the current class MyClass
[After]
The private $MyClass2::FOO class variable cannnot be called from the current class MyClass
[Changes]
* Replace $api->set_exception(undef); with SPVM::Fn->destroy_runtime_permanent_vars: in basic.t generated by spvmdist command.
0.990041 2025-01-20
[Incompatibe Changes]
* Remove deprecated CommandInfo#$BASE_TIME method.
0.990040 2025-01-20
[New Features]
* Add CommandInfo#WARNING class variable.
* Add set_command_info_warning native API.
* Add -w flag to spvm command.
* Add -w flag to spvmcc command.
[Incompatibe Changes]
* Rename set_command_info_base_time native API to set_command_info_basetime.
* Rename CommandInfo#$BASE_TIME class variable to $BASETIME. BASE_TIME gettor is deprecated and will be removed in the future.
0.990039 2025-01-13
[Internal Changes]
* Clanup .gitignore.
* Clanup MANIFEST.skip.
[Changes]
* Changes .gitignore file generated by spvmdist command.
[After]
/blib
/Makefile
/Makefile.old
/MYMETA.yml
/MYMETA.json
/pm_to_blib
/core.*
/core
/SPVM-*
*.bak
*.BAK
*.tmp
*.o
*.bs
.tmp
.git
.spvm_build
* Changes MANIFEST.SKIP file generated by spvmdist command.
[After]
^blib(/|$)
^Makefile$
^Makefile.old$
^MYMETA.yml$
^MYMETA.json$
^pm_to_blib$
^core\.
^core$
^SPVM-
\.bak$
\.BAK$
\.tmp$
\.o$
\.bs$
(^|/)\.tmp(/|$)
(^|/)\.git(/|$)
(^|/)\.spvm_build(/|$)
* $config->is_resource(1); is contained in the config file generated by spvmdist command with --resource option.
* Load the class in SPVM class file generaged by spvmdist command with --resource option.
[New Features]
* Add --version_from option to spvmdist command.
* Add mode field to SPVM::Builder::Config.
[Exception Message Improvement]
* Compilation messages of resources are improved.
[Incompatible Changes]
* The resource class used from a config file must be loaded.
[Document Improvement]
* Use upper case option value in docs for spvm, spvmcc, spvmdeps, spvmdist commands.
0.990038 2025-01-09
[Bug Fix]
* Fix a bug that when resource class is loaded more than once, spvmcc failed.
* Fix a bug that an anon class name is not corresponding to its file name.
[New Features]
* Add SPVM::Builder::Config#is_resource accessor method.
[Incompatible Changes]
* Remove SPVM::Builder::Config#used_as_resource accessor method.
* Remove SPVM::Builder::Config#no_compile_resource accessor method.
0.990037 2025-01-08
[Incompatible Changes]
* Rename SPVM::Builder::Config::Info to SPVM::Builder::ScriptInfo.
* SPVM::Builder::ScriptInfo#get_class_names returns also multi-numeric types.
* Remove --resource-info option in spvmcc command in favor of spvmdeps command.
* Remove --dependency option in spvmcc command in favor of spvmdeps command.
* Remove --dependency-cpan option in spvmcc command in favor of spvmdeps command.
[Internal Changes]
* Rename version_from_basic_type_name member in struct spvm_basic_type to basic_type_name_in_version_from.
* Rename version_from_basic_type member in struct spvm_runtime_basic_type to basic_type_in_version_from.
* Add SPVM::Builder::Native::BasicType#get_basic_type_in_version_from.
[New Features]
* Add get_basic_type_in_version_from basic type native API.
* Add Native::BasicType#get_basic_type_in_version_from method.
[Bug Fix]
* Fix a bug that Native::BasicType#get_parent method does not work well.
* Native::BasicType#get_version_string method returns undef if it is not specified.
* SPVM::Builder::Native::BasicType#get_version_string method returns undef if it is not specified.
0.990036 2025-01-07
[New Features]
* Add version_from statement.
* Add get_basic_type_name_in_version_from native API.
* Add Fn#get_basic_type_name_in_version_from method.
* Add SPVM class.
* Add version_from SPVM to all classes.
[Document Changes]
* The heading "Version Statement" to "version Statement".
* Add docs for Fn#get_version_string method.
[Changes]
* Fn#rand method throws an exception unless $max is greater than 0.
* Add check for the reference argument of Fn#crand.
* Add check for the reference argument of Fn#get_code_point.
[Bug Fix]
* Fix a bug that SPVM_NATIVE_VERSION_STRING is not used as an operator.
* Fix a bug that Error::Compile class is not recognized.
0.990035 2025-01-04
[New Features]
* Add Fn#dump_object_internal method.
* Add dump_object_internal native API.
* Add Fn#set_no_free method.
* Add set_seed native API.
* Add get_seed native API.
* Add seed_initialized native API.
* Add Fn#set_seed method.
* Add Fn#get_seed method.
* Add Fn#seed_initialized method.
[Changes]
* Add argument count check to native method call.
* no_free native API returns 1 if no_free flag is enabled.
0.990034 2025-01-01
[Changes]
* Changes the order of file of MANIFEST.skip and .gitignore generated by spvmdist.
* Allow right operand of == operater undef in the case that the left operand is reference type.
* Allow right operand of != operater undef in the case that the left operand is reference type.
[Bug Fix]
* Fix a bug that Format->strpinf("%s", "") does not work well.
[Changes]
* Format->strpinf("%s", undef) is treaded as Format->strpinf("%s", "");
[Compilation Error Messages Improvement]
* Improve a compilation error massage.
[Before]
The types other than the numeric type and the object type cannnot be used in the optional argument.
[After]
The optional argument %s is not allowed. The type must be a numeric type, an object type, or a numeric reference type.
* Improve a compilation error massage.
[Before]
Arguments after optional arguments must be optional arguments.
[After]
Optional arguments must be placed at the end of the arguments.
[New Features]
* Allow optional argument in numeric reference type.
method foo ($ref : int* = undef);
* Allow optional argument in multi-numeric reference type.
method foo ($ref : Complex_2d* = undef);
* Allow numeric comparison operator a referene type == undef
* Allow numeric comparison operator a referene type != undef
[Incompatible Changes]
* undef can assign to a reference type. This means you must check the reference is NULL in native classes.
* undef can cast to a reference type. This means you must check the reference is NULL in native classes.
[Internal Changes]
* SPVM_IMPLEMENT_GET_DEREF_BYTE changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_SHORT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_INT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_LONG changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_FLOAT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_DOUBLE changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_BYTE changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_SHORT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_INT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_LONG changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_FLOAT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_DEREF_DOUBLE changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_BYTE changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_SHORT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_INT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_LONG changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_FLOAT changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_DOUBLE changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_BYTE changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_SHORT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_INT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_LONG changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_FLOAT changes from macro function to inline function.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_DOUBLE changes from macro function to inline function.
* SPVM_IMPLEMENT_GET_DEREF_BYTE throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_DEREF_SHORT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_DEREF_INT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_DEREF_LONG throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_DEREF_FLOAT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_DEREF_DOUBLE throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_DEREF_BYTE throws an exception when output is undef.
* SPVM_IMPLEMENT_SET_DEREF_SHORT throws an exception when output is undef.
* SPVM_IMPLEMENT_SET_DEREF_INT throws an exception when output is undef.
* SPVM_IMPLEMENT_SET_DEREF_LONG throws an exception when output is undef.
* SPVM_IMPLEMENT_SET_DEREF_FLOAT throws an exception when output is undef.
* SPVM_IMPLEMENT_SET_DEREF_DOUBLE throws an exception when output is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_BYTE throws an exception when input is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_SHORT throws an exception when input is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_INT throws an exception when input is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_LONG throws an exception when input is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_FLOAT throws an exception when input is undef.
* SPVM_IMPLEMENT_DEREF_MULNUM_DOUBLE throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_BYTE throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_SHORT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_INT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_LONG throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_FLOAT throws an exception when input is undef.
* SPVM_IMPLEMENT_GET_MULNUM_FIELD_DEREF_DOUBLE throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_BYTE throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_SHORT throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_INT throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_LONG throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_FLOAT throws an exception when input is undef.
* SPVM_IMPLEMENT_SET_MULNUM_FIELD_DEREF_DOUBLE throws an exception when input is undef.
* Add SPVM_OPCODE_C_ID_MOVE_REF_UNDEF opcode.
* Rename SPVM_OPCODE_C_ID_IS_UNDEF to SPVM_OPCODE_C_ID_IS_UNDEF_OBJECT.
* Rename SPVM_OPCODE_C_ID_IS_NOT_UNDEF to SPVM_OPCODE_C_ID_IS_NOT_UNDEF_OBJECT.
* Add SPVM_OPCODE_C_ID_IS_UNDEF_REF.
* Add SPVM_OPCODE_C_ID_IS_NOT_UNDEF_REF.
0.990033 2024-12-17
[Bug Fix]
* Fix a bug that rehash of Hash class dose not copy weaken flag.
https://github.com/yuki-kimoto/SPVM/issues/649
0.990032 2024-12-02
[New Features]
* Add pointer attribute to the following classes.
Native::API
Native::Arg
Native::BasicType
Native::ClassFile
Native::ClassVar
Native::Field
Native::Method
Native::MethodCall
* Add C, S, L, Q specifiers to Packer#unpack and Packer#pack methods.
* Add H, h specifiers to Packer#unpack and Packer#pack methods.
* Support wildcard * in Packer#unpack and Packer#pack methods.
* Add print_exception_to_stderr native API.
[Performance Improvement]
* Methods in Packer class are precompiled.
[Internal Changes]
* Add Native::BasicType#ref_class_var field.
* Add Native::BasicType#ref_field field.
* Add Native::BasicType#ref_arg field.
* Add Native::Arg#ref_method field.
[Bug Fix]
[Compilation Bug Fix]
* Fix a bug that version statement caused a segmentation fault when a number is given.
[Warnings Fix]
* Fix the following warning in child class.
While trying to resolve method call %s->%s() can not locate package "%s" yet it is mentioned in @%s::ISA (perhaps you forgot to load "%s"?)
[Bug Fix]
* Fix a bug that die native API do not set correct exception message when get_stack_tmp_buffer is used.
https://github.com/yuki-kimoto/SPVM/issues/639
* Fix Native::Compiler bugs that runtime object is not set.
0.990031 2024-11-17
[New Features]
* Add Hash#weaken method.
* Add Hash#unweaken method.
* Add Hash#isweak method.
0.990030 2024-11-15
[New Features]
* Add lib directive.
#lib "$FindBin::Bin/lib"
* spvm command can detect class search directories specified by lib directive.
* spvmcc command can detect class search directories specified by lib directive.
* Support SPVM script such as the following script that has a sheban line.
#!spvm
#lib "$FindBin::Bin/../lib/SPVM"
class {
use TestCase;
static method main : void () {
my $sum = TestCase->sum(1000, 2000);
say "$sum";
}
}
[Changes]
* A file directive before a shebang line is allowed.
#!command
#file "FILE_PATH"
[Compilation Error Messages Improvement]
* Fix A compilation error message.
[Before]
A file in a line directive must end with ".
[After]
A file in a file directive must end with ".
[Document Changes]
* The heading "File Directive" is renamed to "file Directive".
* The heading "Line Directive" is renamed to "line Directive".
0.990029 2024-11-08
[New Features]
* Add SPVM::Builder::ConfigBuilder class.
* Add Native::MethodCall#new_proto_with_method_name method.
* Add get_stack_tmp_buffer native API.
[Internal Changes]
* Change the following constants for stack data to be more safe.
[Before]
enum {
SPVM_API_C_STACK_INDEX_EXCEPTION = 511,
SPVM_API_C_STACK_INDEX_MORTAL_STACK = 510,
SPVM_API_C_STACK_INDEX_MORTAL_STACK_TOP = 509,
SPVM_API_C_STACK_INDEX_MORTAL_STACK_CAPACITY = 508,
SPVM_API_C_STACK_INDEX_ARGS_WIDTH = 507,
SPVM_API_C_STACK_INDEX_CALL_DEPTH = 506,
SPVM_API_C_STACK_INDEX_ENV = 503,
SPVM_API_C_STACK_INDEX_TMP_BUFFER = 256,
};
[After]
enum {
SPVM_API_C_STACK_INDEX_TMP_BUFFER = 384, // 384 to 511
SPVM_API_C_STACK_INDEX_EXCEPTION = 383,
SPVM_API_C_STACK_INDEX_MORTAL_STACK = 382,
SPVM_API_C_STACK_INDEX_MORTAL_STACK_TOP = 381,
SPVM_API_C_STACK_INDEX_MORTAL_STACK_CAPACITY = 380,
SPVM_API_C_STACK_INDEX_ARGS_WIDTH = 379,
SPVM_API_C_STACK_INDEX_CALL_DEPTH = 378,
SPVM_API_C_STACK_INDEX_ENV = 377,
};
* Remove SPVM_API_C_TMP_BUFFER_SIZE. Use SPVM_NATIVE_C_STACK_TMP_BUFFER_SIZE.
0.990028 2024-11-04
[Internal Changes]
* The related classes of Native::Compiler use new_pointer method instead of new_pointer_object_by_name native API.
[Document Improvement]
* Add the doc for "Pointer Value".
* Improve docs for Pointer Class.
0.990027 2024-11-03
[New Features]
* Add Fn#get_pointer method.
* Add Fn#set_pointer method.
* Add Fn#has_null_pointer method.
* Add Fn#eq_pointer method.
* Add Fn#pointer_to_string method.
[Exception Message Fix]
* Fix the line number of the following exception message.
%s#%s method must be an instance method because its interface method is defined in %s %s.
%s#%s method must be an instance method.
The length of the arguments of %s#%s method must be greater than or equal to the length of the required arguments of %s#%s method.
The %dth argument(%s type) of %s#%s method must be able to be assigned to the %dth argument(%s type) of %s#%s method.
[Changes]
* Allow empty strings in the ccflags of a compiler comamnd excecuted spvmcc command.
* Allow empty strings in the ldflags of a linker comamnd excecuted spvmcc command.
0.990026 2024-11-01
[New Features]
* Add -c option to spvm command.
* Add no_free native API.
* Add set_no_free native API.
* Add Fn#no_free method.
[Incompatible Changes]
* Remove as_bool operator added at 0.990025 2024-10-25
bacause field setters cannot behave this way and creating 0 or 1 has no meaing.
[Internal Changes]
* Add SPVM_OBJECT_C_FLAG_NO_FREE to spvm_object struct.
* Remove Native::Stack#no_destroy field. Use no_free flag.
* Remove Native::Env#no_destroy field. Use no_free flag.
0.990025001 2024-10-26
[Document Fix]
* Fix docs for the following native APIs.
set_class_var_byte_by_name native API
set_class_var_short_by_name native API
set_class_var_int_by_name native API
set_class_var_long_by_name native API
set_class_var_float_by_name native API
set_field_byte_by_name native API
set_field_short_by_name native API
set_field_int_by_name native API
set_field_long_by_name native API
set_field_float_by_name native API
0.990025 2024-10-25
[Test Improvement]
* Add tests for NaN comparison and NaN condition evaluation.
[New Features]
* Add as_bool operator.
* Add is_numeric_type type native API.
* Add is_class_type type native API.
[Internal Changes]
* SPVM_OP_C_ID_BOOL is renamed to SPVM_OP_C_ID_CONDITION_EVALUATION.
[Exception Message Improvement]
* Improve exception messages in Hash class.
[Changes]
* Hash#get_int method can get a value from Byte, Short, Int object.
* Hash#get_short method can get a value from Byte, Short object.
* Hash#get_long method can get a value from Byte, Short, Int, Long object.
[Bug Fix]
* Fix a bug that get_type_width type native API did not work well when the argument type is a multi-numeric reference type.
[Changes]
* Improve the type check of the invocant in get_field_byte_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in get_field_short_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in get_field_int_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in get_field_long_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in get_field_double_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in get_field_object_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_byte_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_short_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_int_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_long_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_float_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_double_by_name native API. The invocant must be a class type.
* Improve the type check of the invocant in set_field_object_by_name native API. The invocant must be a class type.
[Changes with Potentially Incompatible Change]
* Improve the type check of the field in get_field_byte_by_name native API. The field must be byte type.
* Improve the type check of the field in get_field_short_by_name native API. The field must be within short type.
* Improve the type check of the field in get_field_int_by_name native API. The field must be within int type.
* Improve the type check of the field in get_field_long_by_name native API. The field must be within long type.
* Improve the type check of the field in get_field_float_by_name native API. The field must be within float type.
* Improve the type check of the field in get_field_double_by_name native API. The field must be within double type.
* Improve the type check of the field in get_field_object_by_name native API. The field must be an object type.
* Improve the type check of the field in get_field_object_ref_by_name native API. The field must be an object type.
* Improve the type check of the field in set_field_byte_by_name native API. The field must be byte or large type.
* Improve the type check of the field in set_field_short_by_name native API. The field must be short or large type.
* Improve the type check of the field in set_field_int_by_name native API. The field must be int or large type.
* Improve the type check of the field in set_field_long_by_name native API. The field must be long or large type.
* Improve the type check of the field in set_field_float_by_name native API. The field must be float or large type.
* Improve the type check of the field in set_field_double_by_name native API. The field must be double or large type.
* Improve the type check of the field in set_field_object_by_name native API. The field must be an object type.
* Improve the type check of the class_var in get_class_var_byte_by_name native API. The class variable must be byte type.
* Improve the type check of the class_var in get_class_var_short_by_name native API. The class variable must be within short type.
* Improve the type check of the class_var in get_class_var_int_by_name native API. The class variable must be within int type.
* Improve the type check of the class_var in get_class_var_long_by_name native API. The class variable must be within long type.
* Improve the type check of the class_var in get_class_var_float_by_name native API. The class variable must be within float type.
* Improve the type check of the class_var in get_class_var_double_by_name native API. The class variable must be within double type.
* Improve the type check of the class_var in get_class_var_double_by_name native API. The class variable must be an object type.
* Improve the type check of the class_var in set_class_var_byte_by_name native API. The class variable must be byte or larger type.
* Improve the type check of the class_var in set_class_var_short_by_name native API. The class variable must be short or larger type.
* Improve the type check of the class_var in set_class_var_int_by_name native API. The class variable must be int or larger type.
* Improve the type check of the class_var in set_class_var_long_by_name native API. The class variable must be long or larger type.
* Improve the type check of the class_var in set_class_var_float_by_name native API. The class variable must be float or larger type.
* Improve the type check of the class_var in set_class_var_double_by_name native API. The class variable must be double type.
* Improve the type check of the class_var in set_class_var_double_by_name native API. The class variable must be an object type.
0.990024 2024-10-23
[New Features]
* Allow multiple INIT blocks.
class Foo {
INIT {
}
INIT {
}
}
[Internal Changes]
* Add SPVM_BLOCK_C_ID_INIT_BLOCK to spvm_block.h.
* Remove SPVM_OP_C_ID_INIT_BLOCK from spvm_op.h.
* Add init_statements member variable to spvm_basic_type.h.
* Add SPVM_TYPE_is_user_defined_type.
[Test Improvement]
* Add tests for INIT block.
[Document Changes]
* Change a token name in SPVM::Document::Language::SyntaxParsing.
* Improve docs for INIT statement.
[Bug Fix]
* Fix a warning related to inheritance problem in exchange API.
https://github.com/yuki-kimoto/SPVM/issues/606
0.990023 2024-10-18
[Exception Message Fix]
* Fix an exception message "An array setting failed. The invocant must be defined." on a field.
[After]
An field access failed. The invocant must be defined.
0.990022 2024-10-17
[Bug Fix]
* Fix a bug that compilation error messages were cut off.
https://github.com/yuki-kimoto/SPVM/issues/603
0.990021 2024-10-12
[New Features]
* Add Array#repeat method.
[Improvement]
* Fix an exception message in Fn#repeat method.
* Improve the performance of Fn#repeat method.
* Fix docs in Fn#repeat method. The return type was wrong.
0.990020 2024-10-12
[Bug Fix]
* Fix a bug that child class does not call DESTROY method of its super class.
[Changes]
* Allow the same type and name field in a child class.
0.990019 2024-10-08
[New Features]
* Add --dependency-cpan option to spvmcc command.
[Incompatible Changes]
* spvmcc --dependency option do not contains SPVM.
[Document Fix]
* Fix docs for spvmcc --dependency option.
0.990018 2024-10-08
[New Features]
* Add --dependency option to spvmcc command.
[Internal Changes]
* Add get_version_string method to SPVM::Builder::Native::BasicType.
* Add get_spvm_version_string method to SPVM::Builder::Native::Runtime module.
* Add dump_dependency method to SPVM::Builder::Exe module.
0.990017 2024-10-07
[Exception Message Changes]
* Change an exception message.
[Before]
$var variable is not found.
[After]
$var is not found.
[Internal Changes]
* is_init member variable in spvm_method.h and spvm_runtime_method.h is renamed to is_init_method.
* Add SPVM_OP_C_ID_INIT_BLOCK to spvm_op.h
* Remove init_method argument of SPVM_OP_build_method_definition function.
* SPVM_OP_build_class_var_definition is renamed to SPVM_OP_build_class_var.
* SPVM_OP_build_enumeration_definition is renamed to SPVM_OP_build_enumeration.
* SPVM_OP_build_field_definition is renamed to SPVM_OP_build_field.
* SPVM_OP_build_method_definition is renamed to SPVM_OP_build_method.
* Remove op_list_anon_method_fields argument from SPVM_OP_build_method.
[Document Changes]
* token names are changes in SPVM::Document::Language::SyntaxParsing
[Bug Fix]
* Fix a bug that anon method local variable declaration cause a leak of memory allocation.
#567
0.990016 2024-10-05
[Internal Changes]
* SPVM::Builder::Native::Compiler#compile and compile_anon_class methods throw an exception when a compliation failed.
[Changes]
* spvm command throw an exception when command line options are invalid.
* spvmcc command throw an exception when command line options are invalid.
* spvmdist command throw an exception when command line options are invalid.
[New Features]
* Add --resource-info option to spvmcc command.
[Exception Changes]
* An exception in spvmcc is changed to a warning if Foo.config exists, but Foo.c do not exists.
[Warning]Can't find source file.
[Document Improvement]
* Add the way to search dependent resourcees to the help of spvmcc command.
0.990015 2024-10-04
[Exception Message Improvement]
* An exception message in an array access is improved.
[After]
An array access failed. The index is out of range.
[Incompatible Changes]
* Remove deprecated <class_name> argument in spvm command. This is a big imcompatible change, but without this, the bug that FindBin->Bin do not work well will be not fixed.
* Remove deprecated <class_name> argument in spvmcc command. This is a big imcompatible change, but without this, the bug that FindBin->Bin do not work well will be not fixed.
[New Features]
* Add -E option to spvm command.
0.990014 2024-10-04
[New Feature]
* spvm command support script name. Currently script name must start with [a-z] or contain / or \ because of class name argument is not removed.
spvm path/foo.spvm
spvm foo.spvm
spvm foo
the script contains main method in an anon class.
class {
static method main : void () {
}
}
* spvmcc command support script name. Currently script name must start with [a-z] or contain / or \ because of class name argument is not removed.
spvmcc path/foo.spvm
spvmcc foo.spvm
spvmcc foo
the script contains main method in an anon class.
class {
static method main : void () {
}
}
[Deprecation]
* Deprecate spvm command's class name argument.
spvm Foo
this will be changed to script name in a future release.
spvm path/foo.spvm
* Deprecate spvmcc command's class name argument.
spvmcc Foo
this will be changed to script name in a future release.
spvmcc path/foo.spvm
[Improve Compilation Error Messages]
* Improve a compilation message in file derective.
A file directive must start with '\"'.
[Internal Bug Fix]
* Fix a bug that compile_with_exit do not receive the file and line in arguments in SPVM::Global::build_class.
[Bug Fix]
* Fix a bug that spvm command -e option do not work well in precompilation and native methods.
0.990013 2024-10-02
[New Features]
* Add Fn#pack method.
* Add Fn#unpack method.
* Add Packer class.
* Add Fn#system_endian_to_little_endian method.
* Add Fn#little_endian_to_system_endian method.
* Add optional $offset argument to Fn#change_endian method.
* Add optional $offset argument to Fn#big_endian_to_system_endian method.
* Add optional $offset argument to Fn#system_endian_to_big_endian method.
0.990012 2024-09-26
[New Features]
* Add Fn#system_endian_to_big_endian method.
* Add Fn#big_endian_to_system_endian method.
* Add Fn#change_endian method.
* Add Fn#sort method.
* Add Fn#sort_asc method.
* Add Fn#sort_desc method.
* Add Fn#sprintf method.
* Add Fn#system_is_little_endian method.
0.990011 2024-09-20
[New Features]
* Add Array#shuffle method.
* Add Array#shuffle_any_numeric method.
* Add Fn#reverse method.
* Add Fn#slice method.
0.990010 2024-09-18
[New Features]
* Add Fn#length method.
* Add Fn#get_elem_or_char_size method.
* Add Array#new_proto_any method.
* Add Array#copy_any_numeric method.
* Add Fn#copy method.
* Add Cloner#default_cloner method.
* Add Comparator#default_comparator method.
* Add EqualityCheckable interface.
* Add eq method to Point class.
* Add eq method to Point3D class.
* Add eq method to StringBuffer class.
* Add EqualityChecker#default_equality_checker method.
* Add $shallow argument to Array#equals method.
[Changes]
* x and y field in Point class becomes protected.
* Point class has EqualityCheckable interface.
* Point3D class has EqualityCheckable interface.
* StringBuffer class has EqualityCheckable interface.
[Bug Fix]
* Fix a bug that static method call is not used in anon method.
https://github.com/yuki-kimoto/SPVM/issues/582
0.990009 2024-09-11
[New Features]
* Add SPVM_NATIVE_C_STACK_TMP_BUFFER_SIZE to spvm_native.h
* Add get_stack_tmp_buffer internal native API.
* Add the following methods to Complex_2d multi-numeric type.
new
new_array_from_pairs
new_array_from_re_array
new_array_from_im_array
to_re_array
to_im_array
to_pairs
to_string
* Add the following methods to Complex_2f multi-numeric type.
new
new_array_from_pairs
new_array_from_re_array
new_array_from_im_array
to_re_array
to_im_array
to_pairs
to_string
[Revert]
* Revert the following change in 0.990008 for performance degradation.
* Use a new runtime stack for DESTROY method instead of using the current runtime stack.
[Internal Changes]
* Improve runtime save/restore logic in destructor.
* Add the following enum values in spvm_api.h
SPVM_API_C_STACK_INDEX_TMP_BUFFER = 256,
SPVM_API_C_TMP_BUFFER_SIZE = 512,
SPVM_API_C_STACK_LENGTH = 512,
* Use snprintf instead of sprintf in all places in SPVM_API_dump_recursive function in spvm_api.c.
* Use the temporary buffer of the runtime stack in SPVM_API_dump_recursive function in spvm_api.c.
* Use the temporary buffer of the runtime stack in SPVM_API_new_stack_trace_no_mortal function in spvm_api.c.
* Reduce SPVM_API_new_memory_block calls in SPVM_API_die function in spvm_api.c.
* Add SPVM_API_get_stack_tmp_buffer function to spvm_api.c.
* Add SPVM_API_INTERNAL_get_stack_tmp_buffer to spvm_api_internal.c.
* Use the temporary buffer in a runtime stack is used in any place in spvm_implement.h.
[Changes]
* Allow multi-numeric type to have class methods.
[Test Fix]
* Change a variable name in a test for the following issue.
https://github.com/yuki-kimoto/SPVM/issues/567
Some Mac clang compilier may cause this problem, but I don't know the reason for now.
0.990008 2024-09-10
[New Features]
* Add Fn#memcmp method.
* Add Comparable interface.
* Add StringBuffer#cmp method.
* StringBuffer class has Comparable interface.
* Add new syntax for anon method field definition. You can use the varialbe name that is different from the varialbe name of a default value.
VAR : ATTRIBUTE1 ATTRIBUTE2 ATTRIBUTEn TYPE = OPERAND
# Example
{
my $default1 = 7;
my $default2 = 10;
my $object = [$var1 : int = $default1, $var2 : int = $default2] method : int () {
my $total = $var1 + $var2;
return $total;
};
}
* Add Fn#reverse_inplace method.
* Add Array#equals method.
* Add Fn#is_string_array method.
* Add Native::MethodCall#new_proto method.
[Exception Message Improvement]
* Exception messages in Native::MethodCall#call method are improved.
https://github.com/yuki-kimoto/SPVM/issues/528
[Internal Changes]
* Rename SPVM_IMPLEMENT_MOVE_OBJECT_CHECK_READ_ONLY to SPVM_IMPLEMENT_MOVE_OBJECT_CHECK_READ_ONLY_STRING.
* Rename SPVM_OPCODE_C_ID_MOVE_OBJECT_CHECK_READ_ONLY to SPVM_OPCODE_C_ID_MOVE_OBJECT_CHECK_READ_ONLY_STRING.
* SPVM_IMPLEMENT_MOVE_OBJECT_CHECK_READ_ONLY checks if the type is string type.
* Use a new runtime stack for DESTROY method instead of using the current runtime stack.
[Bug Fix]
* Fix a bug that the creation of multi dimensional array of any object by new operator is allowed.
https://github.com/yuki-kimoto/SPVM/issues/541
* Fix a bug that a case of compilation error causes segmentation fault.
https://github.com/yuki-kimoto/SPVM/issues/522
* Fix a bug that the count of memory blocks is wrong.
https://github.com/yuki-kimoto/SPVM/issues/521
* Fix th bug that (mutable string)$object cast does not throw an exception when $object is read-only.
https://github.com/yuki-kimoto/SPVM/issues/565
[Incompatible Changes]
* The fix https://github.com/yuki-kimoto/SPVM/issues/565 cause an incompatible changes.
An exception is thrown if your code contains (mutable string)$object and $object is a read-only string.
[Exception Message Changes]
* Improve exception messeges in Array class.
* Improve exception messeges in Fn class.
* Improve exception messages in spvmcc command.
* Improve an exception message "[An exception thrown in DESTROY method is coverted to a warning]".
[Changes]
* Add $api->set_exception(undef); to a test file generated by spvmdist command.
0.990007 2024-09-02
[New Features]
* Add StringBuffer#clone method.
* Add Fn#is_any_numeric_array method.
* Add Fn#array_length method.
* Add Fn#get_elem_size method.
* Add Fn#get_elem_type_name method.
* Add Fn#print_stderr method.
* Add Fn#say_stderr method.
[Document Fix]
* Fix links in docs for Fn class.
* Fix the definition of length native API.
[Before]
int32_t (*length)(SPVM_ENV*, void* array);
[After]
int32_t (*length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
And improve the docs.
[Document Changes]
* "=head1 Inheritance" is changed to "=head1 Super Class".
[Changes]
* "=head1 Inheritance" outputted by spvmdist command is changed to "=head1 Super Class".
* Add "=head1 See Also" section to the output from spvmdist command.
* Improve "Description" outputted from spmvdist command.
* Add commented meta-spec "release_status" option to Makefile.PL outputted from spvmdist command.
* "the foo type" in docs, exception messages, compilation messages are changed to "foo type".
* The type conversion from float constant to double is allowed.
[Exception Message Changes]
* Improve exception messages outputted from spvmdist command.
* The heading of a compilation error message is changed from [Compile Error] to [Compilation Error]
* Improve exception messages in operators.
* Improve exception messages in the instance method call.
[Test Improvement]
* Add a test for Fn#split method when a input is an empty string.
* Clean up tests for array operations.
* Clean up tests for type cast.
[Bug Fix]
* Fix a bug mention by "Segfault:compile_type_name" https://github.com/yuki-kimoto/SPVM/issues/554.
* Fix a bug that wrong static method call cause an segmentation fault.
* Fix a bug that the compile error message of 256 or more characters is cut off.
* Fix a bug that constant narrowing conversion causes a compilation error in the distribute type is a numeric array type.
https://github.com/yuki-kimoto/SPVM/issues/560
[Complilation Message Improvement]
* Use field notation "MyClass#foo field" in compilation error messages.
* Use class variable notation "MyClass#$Foo class variable" in compilation error messages.
* Use method notation "MyClass#foo method" in compilation error messages.
[Bug Fix with Incompatible Changes]
* There are some imcompatible changes in is_type operator to fix the following bug.
https://github.com/yuki-kimoto/SPVM/issues/545
For this, is_type operator must check runtime type instead of compile-time type if TYPE is an object type including object[].
And if TYPE is any object type(object), an compilation error occurs.
[Incompatible Changes]
* warn operator output a stack trace even if the end of the input string is "\n".
Along with this, the same change occurs in warn Native API.
The reason of this change is that debugging data with trailing \n does not show a stack trace.
We will add Fn#print_stderr and Fn#say_stderr to achieve the original behavior, no stack trace, of warn operator.
0.990006 2024-05-09
[Feature Improvement]
* Users know caller when a class loading from a Perl script failed.
0.990005 2024-05-07
[New Features]
* Add the following argument native APIs.
int32_t (*is_optional)(void* runtime, void* arg);
SPVM_VALUE (*get_default_value)(void* runtime, void* arg);
* Add the following methods to the Native::Arg class.
is_optional
get_default_value_byte
get_default_value_short
get_default_value_int
get_default_value_long
get_default_value_float
get_default_value_double
get_default_value_object
[Internal Changes]
* Use information of SPVM_RUNTIME_ARG to set default values of optional argument in native method calls.
* Remove the following operation codes.
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_BYTE
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_SHORT
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_INT
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_LONG
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_FLOAT
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_DOUBLE
SPVM_OPCODE_C_ID_GET_STACK_OPTIONAL_OBJECT
0.990004 2024-05-07
[Bug Fix with Incompatible Changes]
* Change arguments requirement in Interface Method Requirement. This fix deglation of the SPVM::Regex module.
[Before]
The length of the required arguments of the method of the I<INSTANT_METHOD_TYPE_FROM> type must be equal to the length of the required arguments the method of the I<INTERFACE_METHOD_TYPE_TO> type.
The length of the arguments of the method of the I<INSTANT_METHOD_TYPE_FROM> must be greather than or equal to the length of the arguments of the method of the I<INTERFACE_METHOD_TYPE_TO> type.
[After]
The length of the arguments of the method of the I<INTERFACE_METHOD_TO> type must be greater than or equal to the length of the required arguments the method of the I<INSTANT_METHOD_TYPE_FROM> type.
0.990003 2024-05-01
[Incompatible Changes and New Features]
* Add the mingw_ccflags field to the SPVM::Builder::Config class.
This value is set to ['-D__USE_MINGW_ANSI_STDIO'] in Windows. This changes printf format in Windows becuase the output is compliant to C99.
[Internal Changes]
* Do not use _set_output_format in Windows. -D__USE_MINGW_ANSI_STDIO contains _set_output_format effect.
0.990002 2024-04-29
[Bug Fix]
* Fix sprintf %g format in old Windows. 1.0e008(3 digit) is changed to 1.0e08(2 digit). This is C11 compliant.
0.990001 2024-04-23