-
Notifications
You must be signed in to change notification settings - Fork 14
/
Changes
14161 lines (12624 loc) · 677 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.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
[Document Improvement]
* Add the doc of the spvmdist command.
* Add the doc of the spvm command.
* Add the doc of the spvmcc command.
* Improve the doc of the Error class.
* Fix links in docs.
[Remove Files]
* Remove unneeded SPVM/Env.pm file.
* Remove unneeded SPVM/Stack.pm file.
* Remove unneeded SPVM/Runtime.pm file.
0.990 2024-04-23
[Major Version Up]
* SPVM 0.990 is a major version up. The document is finished.
[Document Improvement]
* Add the doc of the Sync::Mutex class.
* Add the doc of Thread Safe to SPVM::Document::Language::System.
0.989105 2024-04-23
[Fix Bug]
* Fix the bug that native mortal stack is not released properly in a normal method and a precompilation method implementation.
env->enter_scope and env->leave_scope are added to the start and end of a normal method and a precompilation method implementation.
[Document Improvement]
* Improve the doc of Operators.
* The heading "Mortal Stack" in SPVM::Document::NativeClass is changed to "Native Mortal Stack".
[Internal Changes]
* Cleanup method calls.
0.989104 2024-04-20
[Document Improvement]
* Improve the doc of Tokanization.
[Internal Changes]
* SPVM_OP_C_ID_CURRENT_CLASS to SPVM_OP_C_ID_OUTMOST_CLASS.
[Fix Bug with Incompatible Changes]
* An ASCII a-zA-Z must follow "=" in POD start.
[Document Fix]
* \0 is a octal escape character.
0.989103 2024-04-16
[Internal Changes]
* Remove the is_anon field from spvm_runtime_method.h.
* Remove the is_anon field from spvm_method.h.
[Document Improvement]
* Improve the doc of Types.
* Improve the doc of Class.
* Improve the doc of Operators.
* Improve the doc of GarbageCollection.
0.989102 2024-04-15
[Internal Changes]
* The is_super_class basic type native API shares the logic of its compiler.
* The has_interface basic type native API shares the logic of its compiler.
[Imcompatible Changes]
* The class name created by an anon method is changed.
[Before]
MyClass::anon::3::23
[After]
MyClass::anon_method::3::23
* The anon class name is changed.
[Before]
eval::anon::3
[After]
eval::anon_class::3
[Imcompatible Changes]
* The class generated by a anon method is not an anon class.
.989101 2024-04-14
[Imcompatible Changes]
* An instance method cannot be assigned to a statice method of its super classes in the interface method requirement.
[Internal Changes]
Internal assignment requirement and cast requirement method does not set compiler error messages directly.
[Compilation Error Message Improvement]
* Improve a compilation error message related to the assignment requirement, cast requirement, the interface method requirement, the interface requirement. [Document Fix and Improvement]
* Improve the doc of Class.
* Improve the doc of Types.
0.989100 2024-04-10
[Document Fix and Improvement]
* The heading "Boolean Conversion is changed to "Condition Evaluation", and it is moved from the doc of Types to the doc of Operators.
* The concept "Implicite Type Conversion" is changed to "Data Conversion".
* The hedding "Type Conversion" is renamed to "Data Conversion", and moved from Types to Operators.
[Compilation Error Message Improvement]
* Improve a compilation error message.
[Before]
The implicite type conversion from \"%s\" to \"%s\" in %s is not allowed.
[After]
The \"%s\" type cannot be assigned to the \"%s\" type in %s.
0.989099 2024-04-08
[Document Fix and Improvement]
* Fix and improve the document of Operators.
* Fix and improve the document of Types.
[Support Changes]
* SPVM doesn't support C++ compilers that does not support -std=c++11 option.
0.989098 2024-04-04
[Document Fix and Improvement]
* Fix and improve the document of Operators.
* Fix and improve the document of Class.
* The heading "Array Access" is changed to "Element Access".
[Internal Changes]
* The type check logic is simplified and it is shared with the compilation time and runtime.
0.989097 2024-04-02
[Imcompatible Changes]
* The copy operator does not thrown an exception, and causes an compilation error instead of an exception.
* The warn operator causes an compilation error if the type of the operand is the undef type.
[Compilation Error Messsage Improvement]
* Improve compilation error messages in the isa, is_type, isa_error, is_error operators.
* The compilation error messages in the != operator are improved.
* The compilation error messages in the == operator are improved.
[Document Fix and Improvement]
* Fix and improve the document of operators.
* Fix and improve the document of class definition.
0.989096 2024-03-27
[Incompatible Changes]
* Change the definition of the value field in the Bool class.
[Before]
has value : ro int;
[After]
has value : ro byte;
* Remove the new_env method from the Native::Runtime.
[New Features]
* Add the following native APIs.
int32_t (*get_byte_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* byte_object);
int32_t (*get_short_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* short_object);
int32_t (*get_int_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* int_object);
int64_t (*get_long_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* long_object);
float (*get_float_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* float_object);
double (*get_double_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* double_object);
* Add the following native runtime APIs.
SPVM_ENV* (*get_env)(void* runtime);
* Add the get_env method to the Native::Rutnime.
[Internal Changes]
* A runtiem has its runtime environment.
[Breaking Binary Compatibility]
Native API IDs are changed after 195
[Before]
195 reserved195,
196 new_stack,
197 free_stack,
198 get_field_object_defined_and_has_pointer_by_name,
199 get_field_object_ref,
200 get_field_object_ref_by_name,
201 is_binary_compatible_stack,
202 assign_object,
203 new_string_array_no_mortal,
204 new_memory_block,
205 free_memory_block,
206 get_memory_blocks_count,
207 say,
208 warn,
209 spvm_stdin,
210 spvm_stdout,
211 spvm_stderr,
212 check_bootstrap_method
213 new_array_proto_element_no_mortal
214 new_array_proto_element
[After]
195 is_binary_compatible_stack,
196 new_stack,
197 free_stack,
198 get_field_object_defined_and_has_pointer_by_name,
199 get_field_object_ref,
200 get_field_object_ref_by_name,
201 check_bootstrap_method
202 assign_object,
203 new_string_array_no_mortal,
204 new_memory_block,
205 free_memory_block,
206 get_memory_blocks_count,
207 say,
208 warn,
209 spvm_stdin,
210 spvm_stdout,
211 spvm_stderr,
212 new_array_proto_element_no_mortal
213 new_array_proto_element
214 get_byte_object_value
215 get_short_object_value
216 get_int_object_value
217 get_long_object_value
218 get_float_object_value
219 get_double_object_value
0.989095 2024-03-26
[Bug Fix]
* Fix the bug that second compilation use freed op field information.
https://github.com/yuki-kimoto/SPVM/issues/507
* Fix the bug that second compilation use freed op class variable information.
0.989094 2024-03-26
[Internal Changes]
* SPVM::Builder::Config::Info does not depend on the SPVM::Native::Compiler.
[Bug Fix]
* Fix the bug that the spvmcc command does not compile precompilation anon methods.
[Incompatible Changes]
* Precompilation methods are no more fallback if is_precompile_fallback is set to a true value.
0.989093 2024-03-25
[Bug Fix]
* Fix the bug that the logical OR operator set the internal condition flag where it should not be changed.
* Fix the bug that the logical AND operator set the internal condition flag where it should not be changed.
[Internal Changes]
* Remove REFCNT operation in syntax parsing.
* Operations are reorder and renamed in syntax parsing.
[Test Cleanup]
* Cleanup tests for operators
* Cleanup tests for statements
0.989092 2024-03-23
[New Features]
* Add the get_basic_types method to the Native::Runtime class.
* Add the get_methods method to the Native::BasicType class.
* Add the get_fields method to the Native::BasicType class.
* Add the get_class_vars method to the Native::BasicType class.
[Incompatible Changes]
* Add the Native::Constant class.
* Remove the get_class_names in the Native::Runtime class.
* Remove the get_basic_type_names in the Native::Runtime class.
* Remove the get_method_names in the Native::Runtime class.
* Remove the get_field_names in the Native::Runtime class.
* Remove the get_class_var_names in the Native::Runtime class.
* Remove the in the Native::Runtime class.
* Change the return values of the get_class_names method in the SPVM::Builder::Config::Info.
[Before]
This method is the same as the L<get_class_names|Native::Runtime/"get_class_names"> method in the C<Native::Runtime>, but the return value is converted to an array reference of strings.
[After]
Returns the all class and interface names except for anon classes loaded by the runtime.
[Bug Fix]
* Fix the bug that the is_read_only operator set the internal condition flag.
* Fix the bug that the isweak operator set the internal condition flag.
* Fix the bug that the can operator set the internal condition flag.
* Fix the bug that the string comparison operators and the numeric comparison operators set the internal condition flag.
* Fix the bug that the isa, isa_error, is_type, is_error, is_compile_type operators set the internal condition flag.
* Fix the bug that the logical NOT operator set the internal condition flag where it should not be changed.
[Internal Changes]
* Runtime precompilation can be detected in easy way that update blib/lib/SPVM/Builder/include/spvm_version.h in Makefile.PL.
* The can operator receive the constant string ID for method name.
0.989091 2024-03-21
[Incompatible Changes]
* The check_stack_env native API is renamed to is_binary_compatible_stack.
* Remove the call_class_method_for_env method in the Native::MethodCall class.
* Remove the call_callback method in the Native::MethodCall class.
* Change the set_exception method in the Native::MethodCall class.
[Before]
static method set_exception : void ($exception : string, $);
[After]
static method set_exception : void ($exception : string, $stack : Native::Stack = undef, $env : Native::Env = undef);
* Change the get_exception method in the Native::MethodCall class.
[Before]
static method get_exception : string ($stack : Native::Stack = undef, $env : Native::Env = undef);
[After]
method get_exception : string ();
[New Features]
* Add the get_current_method argument native API.
* Add the get_current_runtime basic type native API.
* Add the new_class_method_with_env_stack, new_instance_method_static_with_env_stack, new_instance_method_with_env_stack methods to the Native::MethodCall class.
* Add the Native::MethodCall::Error::ExceptionThrown class.
* Add the optional argument $error_id_ref to the call, call_class_method, call_instance_method_static, call_instance_method.
[New Features]
* Add the get_current_method argument native API.
* Add the get_current_runtime basic type native API.
* Add the new_class_method_with_env_stack, new_instance_method_static_with_env_stack, new_instance_method_with_env_stack methods to the Native::MethodCall class.
* Add the Native::MethodCall::Error::ExceptionThrown class.
* Add the optional argument $error_id_ref to the call, call_class_method, call_instance_method_static, call_instance_method.
0.989090 2024-03-20