0.989076 2023-02-19
[Changes]
* Improve the compilation error message in the compile and compile_anon_class in the Native::Compiler class.
[New Features]
* Add line directive syntax.
#line 35
0.989075 2023-02-19
[Changes]
* The $args argument in the call_class_method method in the Native::MethodCall class becomes optional.
* The $args argument in the call method in the Native::MethodCall class becomes optional.
[New Features]
* Add the eval_string method in the Native::Compiler class.
* Add the spvm command
0.989074 2023-02-14
[New Features]
* Add anon class syntax. Anon class cause compilation error, but this will be used for the compile_anon_class method.
class {
}
* Add the compile_anon_class native compiler API.
* Add the compile_anon_class method to the Native::Compiler class.
0.989073 2023-02-14
[Changes]
* The spvmdist command outputs .gitattributes file that contains "*.spvm text eol=lf".
* Add the spvm_utf8.c and spvm_utf8.h files.
[Incompatible Changes and New Features]
* Rename the call_class_method in the Native::MethodCall class to call_class_method_for_env.
* Add the new call_class_method to the Native::MethodCall class.
static method call_class_method : void ($basic_type_name : string, $method_name : string, $args : object[]);
[Incompatible Changes]
* The new line of SPVM source codes must be LF. Otherwise compilation error occurs.
* Change the specification of "Line Terminators"
The line terminators are C<LF> of ASCII.
When a line terminator appears, the current line number is incremented by 1.
Compilation Errors:
The new line of SPVM source codes must be LF. The source code cannot contains CR and CRLF.
* The charactor encoding of SPVM source codes must be UTF-8. Otherwise a compilation error occurs.
[Document Improvement]
* Add the specification of "End of Source Code"
A SPVM source code ends with C<\0> in ASCII. If a source code is loaded by a file, C<\0> is added to the end of the source code.
* Add the specification of "Character Encoding of Source Code"
The character encoding of SPVM source codes is UTF-8.
Compilation Errors:
The charactor encoding of SPVM source codes must be UTF-8. Otherwise a compilation error occurs.
0.989072 2023-02-14
[New Features]
* Add single quote string literal syntax.
q'Hello World!'
* Add the global_before_create_compile_info_cbs field to the SPVM::Builder::Config::Exe class.
* Add the add_global_before_create_compile_info_cb method to the SPVM::Builder::Config::Exe class.
* Add the after_create_compile_info_cbs method to the SPVM::Builder::Config class.
* Add the add_after_create_compile_info_cb method to the SPVM::Builder::Config class.
* Add the after_create_link_info_cbs to the SPVM::Builder::Config class.
* Add the add_after_create_link_info_cb to the SPVM::Builder::Config class.
* Add the set_global_optimize to the SPVM::Builder::Config::Exe class.
[Bug Fix]
* Fix the bug that not found basic type names cause segfault in the followin APIs.
call_class_method_by_name
call_instance_method_static_by_name
call_instance_method_by_name
* Fix bug that the following methods are not mortal.
call_class_method_by_name
call_instance_method_static_by_name
call_instance_method_by_name
* Fix bug that spvmcc do not set config_exe to compile SPVM core source and bootstrap source.
[Changes]
* Add periods to exception messages in native APIs.
[Incompatible Changes]
* The before_each_compile_cbs field in the SPVM::Builder::Config::Exe is renamed to global_before_compile_cbs.
* The add_before_each_compile_cb method in the SPVM::Builder::Config::Exe is renamed to add_global_before_compile_cb.
* before_compile_cbs are executed just before the compilation.
* before_link_cbs are executed just before the link.
0.989071 2023-02-12
[New Features]
* Add the input_dir field to SPVM::Builder::Config.
[Changes]
* Add the "=head1 Inheritance" to the Perl module file generated by the spvmcc command.
[Bug Fix]
* Fix the output of a binary string of the dump operator.
* Checks the definition of the main method generated by the spvmcc command.
* Checks input class file and config file of the spvmcc command for dependencies.
* Fix the bug that the class name could not contains :: in the spvmcc command.
* before_compile_cbs are executed before the compilation needed checking.
* Fix the bug that update of resource file is not detected in jit compile.
[Incompatible Changes]
* The merge_options method in the Fn class is changed.
If $options1 is not defined, $options1 is set to an empty any object array.
If $options2 is not defined, $options2 is set to an empty any object array.
The following process is not performed.
If $options2 contains the same key of $options1, the key of $options1 is overwritten by the key of $options2.
* The executable file generated by the spvmcc command returns status code as same as SPVM error id.
* Include directories by add_include_dir is high priority than native include direcotory and resource include directory.
0.989070 2023-02-09
[New Features]
* Add the force option to the build_dynamic_lib_dist_precompile method and the build_dynamic_lib_dist_native method
in the SPVM::Builder::API class.
[Internal Changes]
* Add spvm_version.h, and spvm_native.h includes spvm_version.h.
[Changes]
* SPVM compilation dependency is checked by spvm_version.h update, instead of checking all files.
* Add spvm_version.h to dependency of Makefile generated by create_make_rule_native and create_make_rule_precompile in Makefile.PL.
0.989069 2023-02-09
[New Features]
* Add a message in compiling and linking a source file like
[Compile a %s source file ...]
[Generate a dynamic link file ...]
* Add the resource_loader_config field to the SPVM::Builder::Config class.
* Add the category field to the SPVM::Builder::Config class.
* Add the category field to the SPVM::Builder::CompileInfo class.
* Add the --no-config option to the spvmcc command.
* Add the -m, --mode option to the spvmcc command.
* Add the config_exe field to SPVM::Builder::Config.
* Add the is_jit field to SPVM::Builder::Config.
* Add the cc_output_dir field to SPVM::Builder::Config.
* Add the output_dir field to SPVM::Builder::Config.
* Add the output_file field to SPVM::Builder::Config.
* Add the used_as_resource field to SPVM::Builder::Config.
[Deprecation]
* The SPVM:: prefix is no more required in the class name given to the create_make_rule function in Makefile.PL.
[Bug Fix]
* Add resource dependency to the create_make_rule_native method in Makefile.PL.
[Incompatible Changes]
* A resource must need its SPVM class file.
* Remove the -c, --config option in the spvmcc command.
* The format of the --required-resources option in the spvmdist command
[After]
{"argv":["args1","args2"],"class_name":"TestCase::Resource::Mylib1","mode":"mode1","resource_loader_class_name":"TestCase::NativeAPI2"}
[Changes]
* Linker messages output before executing command.
* No native class file and no ext is allowed.
* A config file --config given to the spvmcc command can be plcaed in the directory as same as the SPVM class file.
* Unshift "lib" directory in Makefile.PL that is generated by the spvmdist command.
[Internal Changes]
* Resources are loaded in a compilattion instead of a link.
0.989068 2023-01-22
[New Features]
* Add the copy_object_with_proto method to the Array class.
* Add the copy_object_address_with_proto method to the Array class.
[Bug Fix]
* Fix the bug that the unweaken operator does not work well.
* Fix the bug that the get_string method in the Hash class throws exception when the value is undef.
* Fix the bug that parant's private fields can access from child classes.
0.989067 2023-01-05
[Incompatible Changes]
* Remove the DEFAULT_CAPACITY enumeration from the StringBuffer class.
[New Features]
* Add the memset_char method to the Fn class.
* Add the set_length method to the StringBuffer class.
* Add the set method to the StringBuffer class.
[Incompatible Changes]
* The dump operator print escaped character if caracters in the string is not valid UTF-8 or is not printable ASCII.
[Bug Fix]
* Fix the bug that {"foo"} causes a segmentation fault.
[Exception Messages Improvement]
* Improve the exception message of the new method in the SPVM::Builder::Config.
[Document Fix and Improvement]
* Fix and improve the doc of SPVM::Builder::Config.
* Fix and improve the doc of SPVM::Builder::Resource.
* Fix and improve the doc of SPVM::Builder::Config::Exe.
[Document Improvement]
* Improve the docs of the Byte, Short, Int, Long, Float, Double classes.
* Improve the docs of the ByteList, ShortList, IntList, LongList, FloatList, DoubleList classes.
0.989066 2023-01-03
[Document Fix]
* Fix and improve the doc of SPVM::Builder::Config.
[New features]
* Add the config field to the SPVM::Builder::LibInfo.
[New features and Incompatible Changes]
* Remove the static_option_cb in the SPVM::Builder::LibInfo class and add the static_lib_ldflag option to the SPVM::Builder::Config.
* Add the create_ldflags method to the SPVM::Builder::LibInfo and remove the to_arg method from the SPVM::Builder::LibInfo.
[Incompatible Changes]
* Rename the to_cmd method in the SPVM::Builder::CompileInfo class to the to_command method.
* Rename the to_cmd method in the SPVM::Builder::LinkInfo class to the to_command method.
* Rename the create_link_command method in the SPVM::Builder::LinkInfo class to the create_command method.
* Rename the create_compile_command method in the SPVM::Builder::CompileInfo class to the create_command method.
* The new method in the SPVM::Builder::LibInfo must be given the config option.
* The create_command_args in the SPVM::Builder::LinkInfo is renamed to create_ldflags.
* The create_command_args in the SPVM::Builder::CompileInfo is renamed to create_ccflags.
* The new method in the SPVM::Builder::LinkInfo must be given the config option.
* The new method in the SPVM::Builder::CompileInfo must be given the config option.
[Document Fix and Improvement]
* Fix and improve the doc of SPVM::Builder::LibInfo.
* Fix and improve the doc of SPVM::Builder::LinkInfo.
* Fix and improve the doc of SPVM::Builder::CompileInfo.
* Fix and improve the doc of SPVM::Builder::ObjectFileInfo.
0.989065 2023-12-22
[Incompatible Changes]
* The divui operator is renamed to the div_uint operator.
* The divul operator is renamed to the div_ulong operator.
0.989064 2023-12-20
[Exception Message Fix and Improvement]
* Fix and improve the exception messages in the get_(byte|short|int|long|float|double|string) methods in the Hash class.
[New Features]
* Add the following method to the Hash class.
get_or_default_byte
get_or_default_short
get_or_default_int
get_or_default_long
get_or_default_float
get_or_default_double
get_or_default_string
get_or_default
* Add the following method to the Native class.
get_current_runtime
get_current_compiler
* The is_type operator can receive non-object types.
* Add the repeat_string method to the Array class.
[Document Improvement]
* Improve the doc of the Cloneable interface.
[Changes]
* Add "Details", "Interfaces", "Enumerations" sections to the doc generated by the spvmdist command.
* "of L<SPVM>" in the doc generated by the spvmdist command is changed to "in L<SPVM">.
* Change the beheivior of the isa operator. If the right type is object[], a compilation time type check is performed.
* The default buffer length of the strerror_string, strerror, strerror_string_nolen, strerror_nolen native APIs becomes 128.
* errno is set to an appropriate value if the strerror_string, strerror, strerror_string_nolen, strerror_nolen native APIs failed.
* The strerror_string, strerror, strerror_string_nolen, strerror_nolen native APIs does not return NULL.
[Bug Fix]
* Fix the bug that '+' in 1234+ is parsed as the part of numeric literal.
* Fix the bug of types of optional arguments.
* Fix the bug that deep recursion cause a segfault.
[Incompatible Changes]
* Remove the deprecated new_memory_stack native API.
* Remove the deprecated free_memory_stack native API.
* The % operator returns modulo instead of C remainder. This is the same as the Perl's % beheivor.
int32_t ret = in1 % in2;
if ((in1 < 0) != (in2 < 0) && ret) { ret += in2; }
* The remui operator is renamed to the mod_uint operator.
* The remul operator is renamed to the mod_ulong operator.
* The depth of the recursive calls becomes from 10000 to 1000.
[Language Specification Changes]
* The % operator is called the modulo operator.
0.989063 2023-11-20
[Incompatible Changes]
* The SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_COMPILE native API constant is renamed to SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_COMPILE_CLASS.
* The build_precompile_module_source runtime native API constant is renamed to build_precompile_class_source.
[Breaking Binary Compatibility]
* The Native API IDs are changed.
0 runtime
1 api
2 new_env,
3 free_env,
4 call_init_methods,
5 set_command_info_program_name,
6 set_command_info_argv,
7 set_command_info_base_time,
8 destroy_class_vars,
9 args_width,
10 get_object_basic_type,
11 get_object_basic_type_id,
12 get_object_basic_type_name,
13 get_object_type_dimension,
14 get_basic_type,
15 get_basic_type_by_name,
16 get_basic_type_by_id,
17 get_basic_type_id,
18 get_basic_type_id_by_name,
19 get_class_var,
20 get_class_var_byte,
21 get_class_var_short,
22 get_class_var_int,
23 get_class_var_long,
24 get_class_var_float,
25 get_class_var_double,
26 get_class_var_object,
27 get_class_var_string,
28 set_class_var_byte,
29 set_class_var_short,
30 set_class_var_int,
31 set_class_var_long,
32 set_class_var_float,
33 set_class_var_double,
34 set_class_var_object,
35 set_class_var_string,
36 get_class_var_object_ref,
37 get_class_var_byte_by_name,
38 get_class_var_short_by_name,
39 get_class_var_int_by_name,
40 get_class_var_long_by_name,
41 get_class_var_float_by_name,
42 get_class_var_double_by_name,
43 get_class_var_object_by_name,
44 get_class_var_string_by_name,
45 set_class_var_byte_by_name,
46 set_class_var_short_by_name,
47 set_class_var_int_by_name,
48 set_class_var_long_by_name,
49 set_class_var_float_by_name,
50 set_class_var_double_by_name,
51 set_class_var_object_by_name,
52 set_class_var_string_by_name,
53 get_field,
54 get_field_static,
55 get_field_byte,
56 get_field_short,
57 get_field_int,
58 get_field_long,
59 get_field_float,
60 get_field_double,
61 get_field_object,
62 get_field_string,
63 set_field_byte,
64 set_field_short,
65 set_field_int,
66 set_field_long,
67 set_field_float,
68 set_field_double,
69 set_field_object,
70 set_field_string,
71 get_field_byte_by_name,
72 get_field_short_by_name,
73 get_field_int_by_name,
74 get_field_long_by_name,
75 get_field_float_by_name,
76 get_field_double_by_name,
77 get_field_object_by_name,
78 get_field_string_by_name,
79 set_field_byte_by_name,
80 set_field_short_by_name,
81 set_field_int_by_name,
82 set_field_long_by_name,
83 set_field_float_by_name,
84 set_field_double_by_name,
85 set_field_object_by_name,
86 set_field_string_by_name,
87 get_field_string_chars_by_name,
88 get_method,
89 get_class_method,
90 get_instance_method_static,
91 get_instance_method,
92 call_method_no_mortal,
93 call_method,
94 call_class_method_by_name,
95 call_instance_method_static_by_name,
96 call_instance_method_by_name,
97 new_object_no_mortal,
98 new_object,
99 new_object_by_name,
100 new_pointer_object_no_mortal,
101 new_pointer_object,
102 new_pointer_object_by_name,
103 get_pointer,
104 set_pointer,
105 new_string_nolen_no_mortal,
106 new_string_nolen,
107 new_string_no_mortal,
108 new_string,
109 new_byte_array_no_mortal,
110 new_byte_array,
111 new_short_array_no_mortal,
112 new_short_array,
113 new_int_array_no_mortal,
114 new_int_array,
115 new_long_array_no_mortal,
116 new_long_array,
117 new_float_array_no_mortal,
118 new_float_array,
119 new_double_array_no_mortal,
120 new_double_array,
121 new_object_array_no_mortal,
122 new_object_array,
123 new_object_array_by_name,
124 new_string_array,
125 new_muldim_array_no_mortal,
126 new_muldim_array,
127 new_muldim_array_by_name,
128 new_mulnum_array_no_mortal,
129 new_mulnum_array,
130 new_mulnum_array_by_name,
131 new_array_proto_no_mortal,
132 new_array_proto,
133 length,
134 get_elems_byte,
135 get_elems_short,
136 get_elems_int,
137 get_elems_long,
138 get_elems_float,
139 get_elems_double,
140 get_elem_object,
141 get_elem_string,
142 set_elem_object,
143 set_elem_string,
144 get_chars,
145 get_bool_object_value,
146 concat_no_mortal,
147 concat,
148 shorten,
149 make_read_only,
150 is_read_only,
151 print,
152 print_stderr,
153 dump_no_mortal,
154 dump,
155 dumpc,
156 copy_no_mortal,
157 copy,
158 get_spvm_version_string,
159 get_spvm_version_number,
160 get_version_string,
161 get_version_number,
162 die,
163 get_exception,
164 set_exception,
165 new_stack_trace_no_mortal,
166 new_stack_trace,
167 is_string,
168 is_class,
169 is_pointer_class,
170 is_array,
171 is_object_array,
172 is_numeric_array,
173 is_mulnum_array,
174 isa,
175 isa_by_name,
176 is_type,
177 is_type_by_name,
178 elem_isa,
179 get_elem_size,
180 get_type_name_no_mortal,
181 get_type_name,
182 get_compile_type_name_no_mortal,
183 get_compile_type_name,
184 enter_scope,
185 leave_scope,
186 push_mortal,
187 weaken,
188 isweak,
189 unweaken,
190 strerror_string,
191 strerror_string_nolen,
192 strerror,
193 strerror_nolen,
194 new_memory_stack,
195 free_memory_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_stack_env,
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,
0.989062 2023-11-20
[New Features]
* Add the prepend_include_dir compiler native API is added.
[Changes]
* An interface can have class methods.
[Bug Fix]
* Fix the bug that the env got by the get_current_env method in the Native class does not contains the current runtime.
[New Features]
* Add the get_basic_type_id method to the Fn class.
* Add the Error::Compile class.
[Test Improvement]
* Add tests of error classes.
[Incompatible Changes]
* The compile method in the Native::Compiler throw an exception when compilation errors occurred.
* The compile method in the Native::Compiler returns void.
* The code_point method in the Fn class throw an exceptions.
* Remove the GET_CODE_POINT_ERROR_OVER_STRING_RANGE and GET_CODE_POINT_ERROR_INVALID_UTF8 methods from the Fn class.
[Exception Message Improvement]
* Add periods to exception messages.
0.989061 2023-11-14
[Incompatible Changes]
* The __PACKAGE__ operator returns its outer class in anon method.
* The current class "&" means its outer class in anon method.
* If the class variable is used in an anon method and it is not full qualified, its current class means its outer class.
[Changes]
* The Perl module file Name section the spvmdist command generates is change a little.
0.989060 2023-11-09
[Compilation Error Messages Improvement]
* Improve compilation error messages in interface.
[New Features]
* Add more simple anon method filed definition syntax
class Foo::Bar {
method some_method : void () {
my $foo = 1;
my $bar = 5L;
my $comparator = (Comparator)[has foo : int = $foo, has bar : long = $bar] method : int ($x1 : object, $x2 : object) {
my $foo = $self->{foo};
my $bar = $self->{bar};
print "$foo\n";
print "$bar\n";
};
}
}
Same as avobe but more simple with new syntax:
class Foo::Bar {
method some_method : void () {
my $foo = 1;
my $bar = 5L;
my $comparator = (Comparator)[$foo : int, $bar : long] method : int ($x1 : object, $x2 : object) {
print "$foo\n";
print "$bar\n";
};
}
}
0.989059 2023-11-09
[Test Improvement]
* Add tests of thread safetiness.
[Changes]
* The first version number of the Changes file generated by the spvmdist command is changed from 0.01 to 0.001.
* Add a test that checks the count of memory blocks to the t/basic.t file generated by the spvmdist command.
[Bug Fix]
* Fix the bug that line numbers in compilation error messages.
[New Features]
* Add the check_option_names method to the Fn class.
* Add the shuffle_object method to the Array class.
* Add syntax of die OPERAND_ERROR_ID ',' OPERAND_MESSAGE.
* Add spvm_warnf Native API.
* Add the spvm_stdin native API.
* Add the spvm_stdout native API.
* Add the spvm_stderr native API.
[Breaking Binary Compatibility]
* Break the binary compatibility of the die statement.
[Internal Changes]
* SET_ERROR_ID in spvm_impelment.h receives a basic type ID instead of a basic type.
* SET_ERROR_ID in spvm_opcode.h is renamed to SET_ERROR_ID_BY_TYPE.
0.989058 2023-10-30
[Bug Fix]
* Fix the bug that the print_stderr native API print output to stdout.
[Incompatible Changes]
* The new_stack native API uses the new_memory_block native API.
* The free_stack native API uses the free_memory_block native API.
0.989057 2023-10-30
[Internal Changes]
* Keys of spvm_hash is allocated temporary in temporary hash.
* Entries of spvm_hash is allocated temporary in temporary hash.
* The val field of the Hash::Entry is renamed to value.
[Incompatible Changes]
* The get_memory_blocks_count method in the SPVM::ExchangeAPI returns the count of memory blocks the runtime allocate.
* The get_memory_blocks_count in the native API returns the count of memory blocks the runtime allocate.
* Remove the get_meory_block_count_stack in the native API.
0.989056 2023-10-30
[Incompatible Changes]
* Remove the lock_object in the internal native API.
* Remove the unlock_object in the internal native API.
* The inc_ref_count in the internal native API becomes atomic operation.
* The dec_ref_count in the internal native API becomes atomic operation.
[Internal Changes]
* Each object does not have a mutex.
[Bug Fix]
* Some mutex bugs are fixed.
0.989055 2023-10-28
[Incompatible Changes]
* Revert the following changes
[Incompatible Changes] 0.989054 2023-10-26
* The pop and shift methods in the List class and the StringList class return undef if the length is 0, instead of throwing an exception.
0.989054 2023-10-26
[Incompatible Changes]
* Remove the get_array_unsafe method from the StringList class and the List class.
* Remove the set_array methods are removed from the ByteList, ShortList, IntList, LongList, FloatList, DoubleList, StringList, and List classes.
* Remove the DEFAULT_CAPACITY enumerations are removed from the ByteList, ShortList, IntList, LongList, FloatList, DoubleList, StringList, and List classes.
[Changes]
* The StringList class extends the List class.
* The shift and unshift method becomes O(1) in the List and StringList classes.
[Bug Fix]
* Fix the bug that the reserve method in the List class creates any object array instead of using Array->new_proto.
0.989053 2023-10-26
[New Feautres]
* Add the to_address method to the Fn class.
static method to_address : string ($object : object);
[Compilation Error Message Changes]
* A compilation error message is changed.
[before]
The character -2 in a 8bit signed integer is not expected.
[after]
Use of the character code "FE" is not allowed in source code.
[Bug Fix]
* Fix a bug that a token is returned when the charactor is not allowed in source code.
* Fix a bug where the tokenizer was affected by locale.
0.989052 2023-10-24
[New Features]
* Add the get_memory_blocks_count method to the Fn class.
static method get_memory_blocks_count : int ();
[Fix Warnings]
* Fix warnings in Windows such as "warning: implicit declaration of function 'InitializeSRWLock';"
0.989051 2023-10-11
[New Feature]
* Add the Callback class.
* Add the defer method to the Fn class.
* Add the SPVM_NATIVE_GET_POINTER macro function to the Native APIs.
* Add the SPVM_NATIVE_SET_POINTER macro function to the Native APIs.
[Incompatible Changes]
* The handler field in the Scope::Guard class is renamed to the callback field.
* Remove the Scope::Guard::Handler.
* Change the definition of the new method in the Scope::Guard class.
[before]
static method new : Scope::Guard ($handler : Scope::Guard::Handler);
[after]
static method new : Scope::Guard ($callback : Callback);
* Remove the Native::MethodCall::Callback class.
* Change the definition of the new method in the Scope::Guard class.
[before]
static method call_callback : void ($callback : Native::MethodCall::Callback, $error_id : int*, $stack : Native::Stack = undef);
[after]
static method call_callback : void ($callback : Callback, $error_id : int*, $stack : Native::Stack = undef);
* Rename the SPVM_API_new_env function in spvm_native.h to SPVM_NATIVE_new_env. This is undocumented function.
* Remove the SPVM_API_free_env function. This is undocumented function.
[Internal Changes]
* The pointer member is moved to the beginning of spvm_object structure.
0.989050 2023-10-04
[Incompatible Changes]
* Rename the Mutex class to the Sync::Mutex class.
0.989049 2023-10-04
[New Features]
* Add the mutex native APIs.
* Add the Mutex class.
0.989048 2023-10-03
[Internal Changes]
* The warn operator does not call fflush function in the C language.
* The print operator uses the print native API.
* The say operator uses the say native API.
* The say operator uses the warn native API.
[Incompatible Changes]
* The print native API outputs to SPVM stdout instead of the C language stdout.
* The print_stderr native API outputs to SPVM stderr instead of the C language stderr.
[New Feature]
* The say native API is added.
* The warn native API is added.
0.989047 2023-09-30
[New Features]
* SPVM has own stdin, stdout, stderr.
* Add the following runtime native APIs
FILE* (*get_spvm_stdin)(void* runtime);
FILE* (*get_spvm_stdout)(void* runtime);
FILE* (*get_spvm_stderr)(void* runtime);
[Bug Fix]
* Fix bugs that SPVM stdio does not work well on latest Windows 2022 Server.
0.989046 2023-09-28
[Internal Changes]
* Use setmode instead of _setmode because _setmode fails in latest MinGW.
[Incompatible Changes]
* Remove the leave_scope_local native API.
* Remove the compiler field from the Native::Env class.
* Remove the compiler Native API.
* The get_memory_blocks_count method in the ExchangeAPI class returns the count of the memory blocks allocated by the current call stack,
instead of the current environment.
* The new_memory_stack method do not increment the memory blocks count allocated by the runtime allocator.
* The free_memory_stack method do not decrement the memory blocks count allocated by the runtime allocator.
* Remove the new_memory_env native API.
* Remove the free_memory_env native API.
* Remove the get_memory_blocks_count_env native API.
* Remove the allocator native API.
[New Features]
* Add the following runtime native APIs
void* (*get_compiler)(void* runtime);
void (*set_compiler)(void* runtime, void* compiler);
* Add the get_compiler method to the Native::Runtime class.
* Add the following Native APIs.
void* (*new_memory_block)(SPVM_ENV* env, SPVM_VALUE* stack, size_t size);
void (*free_memory_block)(SPVM_ENV* env, SPVM_VALUE* stack, void* block);
int32_t (*get_memory_blocks_count)(SPVM_ENV* env, SPVM_VALUE* stack);
[Deprecations]
* Deprecate the following Native APIs.
void* (*new_memory_stack)(SPVM_ENV* env, SPVM_VALUE* stack, size_t size);
void (*free_memory_stack)(SPVM_ENV* env, SPVM_VALUE* stack, void* block);
int32_t (*get_memory_blocks_count_stack)(SPVM_ENV* env, SPVM_VALUE* stack);
0.989045 2023-09-26
[New Features]
* Make SPVM Language thread-safe logically. The tests are not done.
0.989044 2023-09-18
[Internal Changes]
* A blessed object has SV* object instead of the reference to SV* object
[New Features]
* Add the following Native APIs.
void* (*new_string_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
* Add internal native APIs.
[Changes]
* The unweaken operator and the unweaken native API becomes thread safe.
* The weaken operator and the weaken native API becomes thread safe.
[Incompatible Changes]
* The following native APIs are removed.
- void (*dec_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void (*dec_ref_count_only)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void (*inc_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- int32_t (*get_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
0.989043 2023-09-18
[New Features]
* Add the following native APIs.
void (*dec_ref_count_only)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*leave_scope_local)(SPVM_ENV* env, SPVM_VALUE* stack, void** object_vars, int32_t* mortal_stack, int32_t* mortal_stack_top_ptr, int32_t original_mortal_stack_top);
void (*assign_object)(SPVM_ENV* env, SPVM_VALUE* stack, void** dist_address, void* src_object);
[Changes]
* SPVM object have a mutex data.
[Internal Changes]
* Assignability symbol table becomes thread safe.
* compile becomes thread safe.
[Incompatible Changes]
* The following native APIs are renamed.
- void** (*get_class_var_object_address)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ void** (*get_class_var_object_ref)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
- void** (*get_field_object_address)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ void** (*get_field_object_ref)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
- void** (*get_field_object_address_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error_id, const char* func_name, const char* file, int32_t line);
+ void** (*get_field_object_ref_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error_id, const char* func_name, const char* file, int32_t line);
* The following native APIs are removed.
int32_t (*remove_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t scope_id, void* remove_object);
0.989042 2023-09-12
[Incompatible Changes]
* The create_default_config function in the SPVM::Builder::Util module return gnu99 instead of c99.
* The default config become gnu99 instead of c99 in all places.
* The default value of the dynamic_lib_ccflags in the SPVM::Builder::Config module.
[Before]
if ($Config{cccdlflags} =~ /-fPIC\b/) {
$self->dynamic_lib_ccflags(['-fPIC']);
}
else {
$self->dynamic_lib_ccflags([]);
}
[After]
if ($^O eq 'MSWin32') {
$self->dynamic_lib_ccflags([]);
}
else {
$self->dynamic_lib_ccflags(['-fPIC']);
}
[New Features]
* The following fidlds are added to the SPVM::Builder::Config module.
thread_ccflags
thread_ldflags
* All modules are compiled and linked with "-pthread" option except for Windows.
This is because of using mutex features.
* All SPVM source files are compiled and linked with "-pthread" option except for Windows.
This is because of using mutex features.
* Add spvm_mutex.h and spvm_mutex.c.
[Document Improvement]
* Class names in the return value and argument in method definitions in doc are linked.
0.989041 2023-09-09
[New Features]
* The call_method method in the SPVM::ExchangeAPI class: any object argument can receive a value of string type.
[Exception Messages Changes]
* English syntax is improved. "the $arg" is changeded to "$arg".
* SPVM.xs: Exception messages are improved.
[Bug Fix]
* Fix a bug that when the global Exchange API object is refered from sub routnie, a segfault occur.
* Fix a bug that the plcae that needs only a basic type name uses SPVM::BlessedObject::String.
Segfault occured in some places.
0.989040 2023-09-06
[Changes]
* Anon class has the same access constrol as the outer class.
* Anon class has the same alias names as the outer class.
[Test Bug Fix]
* Tests of the add_before_link_cb in the SPVM::Builder::Config are fixed.
0.989039 2023-09-05
[New Features]
* The following methods are added to the Array class.
static method merge_byte : byte[] ($array1 : byte[], $array2 : byte[]);
static method merge_short : short[] ($array1 : short[], $array2 : short[]);
static method merge_int : int[] ($array1 : int[], $array2 : int[]);
static method merge_long : long[] ($array1 : long[], $array2 : long[]);
static method merge_float : float[] ($array1 : float[], $array2 : float[]);
static method merge_double : double[] ($array1 : double[], $array2 : double[]);
static method merge_string : string[] ($array1 : string[], $array2 : string[]);
static method merge_object : object[] ($array1 : object[], $array2 : object[]);
[Bug Fix]
* A bug fix: The following tests has not succeeded.
{
my $source = [
'class MyClass2 extends MyClass { use Point; use Point3D; method main : void ($point : Point3D) {} }',
'class MyClass { use Point; use Point3D; method main : void ($point : Point) {} }',
];
compile_ok($source);
}
{
my $source = [
'class MyClass2 extends MyClass { use Point; use Point3D; method main : void ($point : Point) {} }',
'class MyClass { use Point; use Point3D; method main : void ($point : Point3D) {} }',
];
compile_not_ok($source, q|The type of the 1th argument of the "main" method in the "MyClass2" class must be able to be assigned to the type of the 1th argument of the "main" method in the "MyClass" class.|);
}
0.989039 2023-08-30
[Warnings Fix]
* Suppress warning: unknown warning option ‘-Wno-compound-token-split-by-macro’ [-Wunknown-warning-option] in Mac.
0.989038 2023-08-29
[New Features]
* Here document is supported.
0.989037 2023-08-28
[Document Changes]
* The doc of the Hash class is improved.
[Internal Changes]
* ppport.h is upgraded to 3.68
* The default entries length of a hash become 1.
[Incompatible Bug Fix]
* The is_class_method field in the SPVM::Builder::LibInfo is renamed to is_static.
This is wrongly changed.
* The count field in the Hash class is renamed to the keys_length method.
* The the to_array method in the Hash class support decendent order.
[Incompatible Changes]
* The delete method in the Hash class throws an excetpion.
The $key must be defined.
* The exists method in the Hash class throws an excetpion.
The $key must be defined.
* The get method in the Hash class throws an excetpion.
The $key must be defined.
0.989036 2023-08-17
[New Features]
* The type native APIs are added.
[Incompatible Changes]
* The following runtime nataive APIs are removed and moved to the type native APIs.
int32_t (*get_type_width)(void* runtime, void* basic_type, int32_t dimension, int32_t flag);
int32_t (*can_assign)(void* runtime, void* dist_basic_type, int32_t dist_type_dimension, int32_t dist_type_flag, void* src_basic_type, int32_t src_type_dimension, int32_t src_type_flag);
int32_t (*is_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t flag);
* Native API IDs of runtime nataive API are changed.
0 get_object_data_offset
1 get_object_ref_count_offset
2 get_object_length_offset
3 get_basic_type_by_id
4 get_basic_type_by_name
5 get_basic_types_length
6 build_precompile_module_source
7 build_precompile_method_source
0.989035 2023-08-14
[Changes]
* An interface can have multiple required methods.
* An interface can define an interface of itself.
class MyClass : interface_t {
interface MyClass;
}
[Document Changes]
* Module Attribute is renamed to Class Attribute
* SPVM::Document::NativeModule is renamed to SPVM::Document::NativeClass
[Incompatible Changes]
* All methods and fields and native APIs that names are "module_name" are renamed to "class_name".
* The module file native API is renamed to the class file native API.
[Bug Fix]
* A bug fix: the get_field_string native API does not work well.
0.989034 2023-08-14
[Bug Fix]
* A bug is fixed: the interface checking has not worked well in compilation time.
* A bug is fixed: the has_interface basic type native APIhas not worked well.
* A bug is fixed: The checking of interface compatibility has not worked well in required interface methods.
[Changes]
* The checking of interface compatibility is performed when a type conversion is performed.
[New Feature]
* The duck typing is supported.
* The type assignability is cached.
0.989033 2023-08-08
[New Features]
* The following native APIs are added.
void** (*get_field_object_address)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
void** (*get_field_object_address_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error_id, const char* func_name, const char* file, int32_t line);
int32_t (*check_stack_env)(SPVM_ENV* env, SPVM_VALUE* stack);
* The Native class is added.
* The Native::MethodCall::Callback class is added.
* The following methods are added to the Native::MethodCall class.
static method call_callback : void ($callback : Native::MethodCall::Callback, $error_id : int*, $stack = undef : Native::Stack);
static method call_class_method : void ($basic_type_name : string, $method_name : string, $error_id : int*, $stack : Native::Stack = undef, $env : Native::Env = undef);
static method get_exception : string ($stack : Native::Stack = undef, $env : Native::Env = undef);
static method set_exception : void ($exception : string, $stack : Native::Stack = undef, $env : Native::Env = undef);
0.989032 2023-08-04
[Revertion]
* The following change is reverted.
The definitions of the following fields in the Env class are changed.
- has compiler : ro Native::Compiler;
+ has compiler : Native::Compiler;
- has runtime : ro Native::Runtime;
+ has runtime : Native::Runtime;
0.989031 2023-08-02
[New Features]
* The Native::MethodCall class is added.
[Incompatibe Changes]
* The definitions of the following fields in the Stack class are changed.
- has env : ro Native::Env;
+ has env : Native::Env;
* The definitions of the following fields in the Env class are changed.
- has compiler : ro Native::Compiler;
+ has compiler : Native::Compiler;
- has runtime : ro Native::Runtime;
+ has runtime : Native::Runtime;
0.989030 2023-07-28
[Incompatible Changes]
* The following native APIs are renamed.
- int32_t (*items)(SPVM_ENV* env, SPVM_VALUE* stack);
+ int32_t (*args_width)(SPVM_ENV* env, SPVM_VALUE* stack);
* The items operator is renamed to args_width.
[New Features]
* The following runtime native APIs were added.
+ int32_t (*get_type_width)(void* runtime, void* basic_type, int32_t dimension, int32_t flag);
* The following argument native APIs were added.
+ int32_t (*get_stack_index)(void* runtime, void* arg);
[Changes]
* The width of the arguments must be less than or equal to 255.
0.989029 2023-07-27
[New Features]
* The following native APIs were added.
void* (*get_field_object_defined_and_has_pointer_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error_id, const char* func_name, const char* file_name, int32_t line);
[Bug Fix]
* The Native::Env memory bug is fixed.
0.989028 2023-07-26
[New Features]
* The following compiler native APIs were added.
void (*add_module_file)(void* compiler, const char* module_name);
void (*delete_module_file)(void* compiler, const char* module_name);
[New Features]
* The following module file native APIs are added.
+ void* (*free_instance)(void* compiler, void* module_file);
[Incompatible Changes]
* The order of the compiler native APIs were changed.
0 new_instance,
1 free_instance,
2 get_start_line,
3 set_start_line,
4 get_start_file,
5 set_start_file,
6 get_include_dirs_length,
7 get_include_dir,
8 add_include_dir,
9 clear_include_dirs,
10 get_module_file,
11 set_module_file,
12 compile,
13 get_error_message,
14 get_error_messages_length,
15 get_runtime,
* if (rquire Foo) statement was now reset after a single compilation.
* The set_module_file compiler native API can be set even if the module file alread exists.
* The following methods in the Native::ModuleFile class were removed.
static method new : Native::ModuleFile ($compiler : Native::Compiler);
method set_module_name : void ($module_name : string);
* The following module file Native APIs were removed.
void* (*new_instance)(void* compiler);
void (*set_module_name)(void* compiler, void* module_file, const char* module_name);
* The following compiler native APIs were removed.
void (*set_module_file)(void* compiler, const char* module_name, void* module_file);
* Native API IDs of the module file native APIs were changed.
0 get_module_name
1 get_file
2 set_file
3 get_dir
4 set_dir
5 get_rel_file
6 set_rel_file
7 get_content
8 set_content
9 get_content_length
10 set_content_length
* Native API IDs of the compiler native APIs were changed.
0 new_instance
1 free_instance
2 get_start_line
3 set_start_line
4 get_start_file
5 set_start_file
6 get_include_dirs_length
7 get_include_dir
8 add_include_dir
9 clear_include_dirs
10 add_module_file
11 delete_module_file
12 get_module_file
13 compile
14 get_error_message
15 get_error_messages_length
16 get_runtime
0.989027 2023-07-23
[Bug Fix]
* A bug fixed: The error messages of the compiler had not been freeded properly.
* A bug fixed: The each time compile memory had not been freeded when the compilation failed.
0.989026 2023-07-21
[Incompatible Changes]
* The __module_name field in the SPVM::ExchangAPI::Class was renamed to the __name field.
* The module file native APIs were changed.
- void (*set_module_name)(void* compiler, void* module_file, void* module_name);
+ void (*set_module_name)(void* compiler, void* module_file, const char* module_name);
- void (*set_file)(void* compiler, void* module_file, void* file);
+ void (*set_file)(void* compiler, void* module_file, const char* file);
- void (*set_dir)(void* compiler, void* module_file, void* dir);
+ void (*set_dir)(void* compiler, void* module_file, const char* dir);
- void (*set_rel_file)(void* compiler, void* module_file, void* rel_file);
+ void (*set_rel_file)(void* compiler, void* module_file, const char* rel_file);
- void (*set_content)(void* compiler, void* module_file, void* content);
+ void (*set_content)(void* compiler, void* module_file, const char* content);
* The following compiler native APIs were renamed.
- void (*add_module_file)(void* compiler, const char* module_name, void* module_file);
+ void (*set_module_file)(void* compiler, const char* module_name, void* module_file);
[New Features]
* The Native::ModuleFile class was added.
* The following methods were added to the Native::Compiler.
+ method get_module_file : Native::ModuleFile ($module_name : string);
+ method set_module_file : void ($module_name : string, $module_file : Native::ModuleFile);
[Bug Fix]
* The bug that SPVM file dependencies was wrong was fixed.
0.989025 2023-07-18
[New Features]
* The following methods were added to the Native::Runtime.
method get_basic_types_length : int ();
method get_basic_type : Native::BasicType ($id : int);
* The following argument native API were added.
const char* (*get_name)(void* runtime, void* arg);
int32_t (*get_index)(void* runtime, void* arg);
[Incompatible Changes]
* Modules renamed.
Env was renamed to Native::Env.
Stack was renamed to Native::Stack.
Runtime was renamed to Native::Runtime.
Compiler was renamed to Native::Compiler.
* The native API IDs in the class variable native APIs were changed.
0 get_name
1 get_index
2 get_basic_type
3 get_type_dimension
4 get_type_flag
5 get_current_basic_type
* The index native API were added to the class variable native APIs.
int32_t (*get_index)(void* runtime, void* class_var);
* The native API IDs in the argument native APIs were changed.
0 get_name
1 get_index
2 get_basic_type
3 get_type_dimension
4 get_type_flag
* The following methods in the Native::Runtime were removed.
- method get_basic_type_names : string[] ();
- method get_basic_type_parent_name : string ($basic_type_name : string);
- method get_basic_type_anon_basic_type_names : string[] ($basic_type_name : string);
- method get_method_names : string[] ($basic_type_name : string, $options : object[] = undef)
- method get_method_is_class_method : int ($basic_type_name : string, $method_name : string);
- method get_precompile_method_address : Address ($basic_type_name : string, $method_name : string);
- method get_native_method_address : Address ($basic_type_name : string, $method_name : string);
- method set_native_method_address : string ($basic_type_name : string, $method_name : string, $address : Address);
- method set_precompile_method_address : string ($basic_type_name : string, $method_name : string, $address : Address);
* The following methods in the Native::Runtime were changed.
- method build_precompile_module_source : string ($basic_type_name : string);
+ method build_precompile_module_source : string ($basic_type : Native::BasicType);
0.989024 2023-07-14
[New Features]
* The runtime was created by the additional compile.
* The following native APIs were added.
void* compiler;
[Incompatibe Changes]
* The DESTROY method in the Runtime class was removed.
[Incompatibe Changes]
* The DESTROY method in the Runtime class was removed.
* The following runtime native APIs were removed.
- void* (*new_instance)(void);
- void (*free_instance)(void* runtime);
* The runtime native API IDs were reordered.
0 get_object_data_offset
1 get_object_ref_count_offset
2 get_object_length_offset
3 get_basic_type_by_id
4 get_basic_type_by_name
5 get_basic_types_length
6 is_object_type
7 can_assign
8 build_precompile_module_source
9 build_precompile_method_source
* Compiler native APIs were changed.
- void* (*build_runtime)(void* compiler);
+ void* (*get_runtime)(void* compiler);
* The following methods in the Compiler class were changed.
- native method build_runtime : Runtime ();
+ native method get_runtime : Runtime ();
* The following methods and fields in the Env class were changed.
# Fields
- has runtime : ro Runtime;
+ has compiler : ro Compiler;
# Class Methods
- native static method new : Env ($runtime : Runtime = undef);
+ native static method new : Env ($compiler : Compiler = undef);
[Incompatibe Changes]
* The Native API IDs were reordered.
0 compiler
1 runtime
2 api
3 new_env
4 free_env
5 call_init_methods
6 set_command_info_program_name
7 set_command_info_argv
8 set_command_info_base_time
9 destroy_class_vars
10 items
11 get_object_basic_type
12 get_object_basic_type_id
13 get_object_basic_type_name
14 get_object_type_dimension
15 get_basic_type
16 get_basic_type_by_name
17 get_basic_type_by_id
18 get_basic_type_id
19 get_basic_type_id_by_name
20 get_class_var
21 get_class_var_byte
22 get_class_var_short
23 get_class_var_int
24 get_class_var_long
25 get_class_var_float
26 get_class_var_double
27 get_class_var_object
28 get_class_var_string
29 set_class_var_byte
30 set_class_var_short
31 set_class_var_int
32 set_class_var_long
33 set_class_var_float
34 set_class_var_double
35 set_class_var_object
36 set_class_var_string
37 get_class_var_object_address
38 get_class_var_byte_by_name
39 get_class_var_short_by_name
40 get_class_var_int_by_name
41 get_class_var_long_by_name
42 get_class_var_float_by_name
43 get_class_var_double_by_name
44 get_class_var_object_by_name
45 get_class_var_string_by_name
46 set_class_var_byte_by_name
47 set_class_var_short_by_name
48 set_class_var_int_by_name
49 set_class_var_long_by_name
50 set_class_var_float_by_name
51 set_class_var_double_by_name
52 set_class_var_object_by_name
53 set_class_var_string_by_name
54 get_field
55 get_field_static
56 get_field_byte
57 get_field_short
58 get_field_int
59 get_field_long
60 get_field_float
61 get_field_double
62 get_field_object
63 get_field_string
64 set_field_byte
65 set_field_short
66 set_field_int
67 set_field_long
68 set_field_float
69 set_field_double
70 set_field_object
71 set_field_string
72 get_field_byte_by_name
73 get_field_short_by_name
74 get_field_int_by_name
75 get_field_long_by_name
76 get_field_float_by_name
77 get_field_double_by_name
78 get_field_object_by_name
79 get_field_string_by_name
80 set_field_byte_by_name
81 set_field_short_by_name
82 set_field_int_by_name
83 set_field_long_by_name
84 set_field_float_by_name
85 set_field_double_by_name
86 set_field_object_by_name
87 set_field_string_by_name
88 get_field_string_chars_by_name
89 get_method
90 get_class_method
91 get_instance_method_static
92 get_instance_method
93 call_method_no_mortal
94 call_method
95 call_class_method_by_name
96 call_instance_method_static_by_name
97 call_instance_method_by_name
98 new_object_no_mortal
99 new_object
100 new_object_by_name
101 new_pointer_object_no_mortal
102 new_pointer_object
103 new_pointer_object_by_name
104 get_pointer
105 set_pointer
106 new_string_nolen_no_mortal
107 new_string_nolen
108 new_string_no_mortal
109 new_string
110 new_byte_array_no_mortal
111 new_byte_array
112 new_short_array_no_mortal
113 new_short_array
114 new_int_array_no_mortal
115 new_int_array
116 new_long_array_no_mortal
117 new_long_array
118 new_float_array_no_mortal
119 new_float_array
120 new_double_array_no_mortal
121 new_double_array
122 new_object_array_no_mortal
123 new_object_array
124 new_object_array_by_name
125 new_string_array
126 new_muldim_array_no_mortal
127 new_muldim_array
128 new_muldim_array_by_name
129 new_mulnum_array_no_mortal
130 new_mulnum_array
131 new_mulnum_array_by_name
132 new_array_proto_no_mortal
133 new_array_proto
134 length
135 get_elems_byte
136 get_elems_short
137 get_elems_int
138 get_elems_long
139 get_elems_float
140 get_elems_double
141 get_elem_object
142 get_elem_string
143 set_elem_object
144 set_elem_string
145 get_chars
146 get_bool_object_value
147 concat_no_mortal
148 concat
149 shorten
150 make_read_only
151 is_read_only
152 print
153 print_stderr
154 dump_no_mortal
155 dump
156 dumpc
157 copy_no_mortal
158 copy
159 get_spvm_version_string
160 get_spvm_version_number
161 get_version_string
162 get_version_number
163 die
164 get_exception
165 set_exception
166 new_stack_trace_no_mortal
167 new_stack_trace
168 is_string
169 is_class
170 is_pointer_class
171 is_array
172 is_object_array
173 is_numeric_array
174 is_mulnum_array
175 isa
176 isa_by_name
177 is_type
178 is_type_by_name
179 elem_isa
180 get_elem_size
181 get_type_name_no_mortal
182 get_type_name
183 get_compile_type_name_no_mortal
184 get_compile_type_name
185 enter_scope
186 leave_scope
187 push_mortal
188 remove_mortal
189 weaken
190 isweak
191 unweaken
192 strerror_string
193 strerror_string_nolen
194 strerror
195 strerror_nolen
196 allocator
197 new_memory_env
198 free_memory_env
199 get_memory_blocks_count_env
200 new_memory_stack
201 free_memory_stack
202 get_memory_blocks_count_stack
203 new_stack
204 free_stack
205 get_ref_count
206 inc_ref_count
207 dec_ref_count
0.989023 2023-07-12
[New Features]
* The following native APIs were added.
+ void* (*get_class_var_string)(void* env, void* stack, void* class_var);
+ void (*set_class_var_string)(void* env, void* stack, void* class_var, void* value);
+ void* (*get_class_var_string_by_name)(void* env, void* stack, const void* basic_type_name, const void* class_var_name, int32_t** error_id, const void* func_name, const void* file, int32_t line);
+ void (*set_class_var_string_by_name)(void* env, void* stack, const void* basic_type_name, const void* class_var_name, void* value, int32_t** error_id, const void* func_name, const void* file, int32_t line);
+ void* (*get_field_string)(void* env, void* stack, void* object, void* field);
+ void (*set_field_string)(void* env, void* stack, void* object, void* field, void* value);
+ void* (*get_field_string_by_name)(void* env, void* stack, void* object, const void* field_name, int32_t** error_id, const void* func_name, const void* file, int32_t line);
+ void (*set_field_string_by_name)(void* env, void* stack, void* object, const void* field_name, void* value, int32_t** error_id, const void* func_name, const void* file, int32_t line);
* The following methods were added to the Env class.
method get_exception : string ();
method set_exception : void ($exception : string);
[Incompatibe Changes]
* The Native API IDs were reordered.
0 runtime
1 api
2 new_env
3 free_env
4 call_init_methods
5 set_command_info_program_name
6 set_command_info_argv
7 set_command_info_base_time
8 destroy_class_vars
9 items
10 get_object_basic_type
11 get_object_basic_type_id
12 get_object_basic_type_name
13 get_object_type_dimension
14 get_basic_type
15 get_basic_type_by_name
16 get_basic_type_by_id
17 get_basic_type_id
18 get_basic_type_id_by_name
19 get_class_var
20 get_class_var_byte
21 get_class_var_short
22 get_class_var_int
23 get_class_var_long
24 get_class_var_float
25 get_class_var_double
26 get_class_var_object
27 get_class_var_string
28 set_class_var_byte
29 set_class_var_short
30 set_class_var_int
31 set_class_var_long
32 set_class_var_float
33 set_class_var_double
34 set_class_var_object
35 set_class_var_string
36 get_class_var_object_address
37 get_class_var_byte_by_name
38 get_class_var_short_by_name
39 get_class_var_int_by_name
40 get_class_var_long_by_name
41 get_class_var_float_by_name
42 get_class_var_double_by_name
43 get_class_var_object_by_name
44 get_class_var_string_by_name
45 set_class_var_byte_by_name
46 set_class_var_short_by_name
47 set_class_var_int_by_name
48 set_class_var_long_by_name
49 set_class_var_float_by_name
50 set_class_var_double_by_name
51 set_class_var_object_by_name
52 set_class_var_string_by_name
53 get_field
54 get_field_static
55 get_field_byte
56 get_field_short
57 get_field_int
58 get_field_long
59 get_field_float
60 get_field_double
61 get_field_object
62 get_field_string
63 set_field_byte
64 set_field_short
65 set_field_int
66 set_field_long
67 set_field_float
68 set_field_double
69 set_field_object
70 set_field_string
71 get_field_byte_by_name
72 get_field_short_by_name
73 get_field_int_by_name
74 get_field_long_by_name
75 get_field_float_by_name
76 get_field_double_by_name
77 get_field_object_by_name
78 get_field_string_by_name
79 set_field_byte_by_name
80 set_field_short_by_name
81 set_field_int_by_name
82 set_field_long_by_name
83 set_field_float_by_name
84 set_field_double_by_name
85 set_field_object_by_name
86 set_field_string_by_name
87 get_field_string_chars_by_name
88 get_method
89 get_class_method
90 get_instance_method_static
91 get_instance_method
92 call_method_no_mortal
93 call_method
94 call_class_method_by_name
95 call_instance_method_static_by_name
96 call_instance_method_by_name
97 new_object_no_mortal
98 new_object
99 new_object_by_name
100 new_pointer_object_no_mortal
101 new_pointer_object
102 new_pointer_object_by_name
103 get_pointer
104 set_pointer
105 new_string_nolen_no_mortal
106 new_string_nolen
107 new_string_no_mortal
108 new_string
109 new_byte_array_no_mortal
110 new_byte_array
111 new_short_array_no_mortal
112 new_short_array
113 new_int_array_no_mortal
114 new_int_array
115 new_long_array_no_mortal
116 new_long_array
117 new_float_array_no_mortal
118 new_float_array
119 new_double_array_no_mortal
120 new_double_array
121 new_object_array_no_mortal
122 new_object_array
123 new_object_array_by_name
124 new_string_array
125 new_muldim_array_no_mortal
126 new_muldim_array
127 new_muldim_array_by_name
128 new_mulnum_array_no_mortal
129 new_mulnum_array
130 new_mulnum_array_by_name
131 new_array_proto_no_mortal
132 new_array_proto
133 length
134 get_elems_byte
135 get_elems_short
136 get_elems_int
137 get_elems_long
138 get_elems_float
139 get_elems_double
140 get_elem_object
141 get_elem_string
142 set_elem_object
143 set_elem_string
144 get_chars
145 get_bool_object_value
146 concat_no_mortal
147 concat
148 shorten
149 make_read_only
150 is_read_only
151 print
152 print_stderr
153 dump_no_mortal
154 dump
155 dumpc
156 copy_no_mortal
157 copy
158 get_spvm_version_string
159 get_spvm_version_number
160 get_version_string
161 get_version_number
162 die
163 get_exception
164 set_exception
165 new_stack_trace_no_mortal
166 new_stack_trace
167 is_string
168 is_class
169 is_pointer_class
170 is_array
171 is_object_array
172 is_numeric_array
173 is_mulnum_array
174 isa
175 isa_by_name
176 is_type
177 is_type_by_name
178 elem_isa
179 get_elem_size
180 get_type_name_no_mortal
181 get_type_name
182 get_compile_type_name_no_mortal
183 get_compile_type_name
184 enter_scope
185 leave_scope
186 push_mortal
187 remove_mortal
188 weaken
189 isweak
190 unweaken
191 strerror_string
192 strerror_string_nolen
193 strerror
194 strerror_nolen
195 allocator
196 new_memory_env
197 free_memory_env
198 get_memory_blocks_count_env
199 new_memory_stack
200 free_memory_stack
201 get_memory_blocks_count_stack
202 new_stack
203 free_stack
204 get_ref_count
205 inc_ref_count
206 dec_ref_count
* The following native APIs were removed.
- int32_t (*has_interface)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* interface_basic_type);
- int32_t (*has_interface_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* basic_type_name);
- void* (*alloc_memory_block_zero)(SPVM_ENV* env, size_t size);
- void (*free_memory_block)(SPVM_ENV* env, void* block);
- int32_t (*get_memory_blocks_count)(SPVM_ENV* env);
- void* memory_blocks_count;
* The following native APIs were renamed.
- int32_t (*call_init_blocks)(SPVM_ENV* env, SPVM_VALUE* stack);
+ int32_t (*call_init_methods)(SPVM_ENV* env, SPVM_VALUE* stack);
- void (*cleanup_global_vars)(SPVM_ENV* env, SPVM_VALUE* stack);
+ void (*destroy_class_vars)(SPVM_ENV* env, SPVM_VALUE* stack);
- void* (*new_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
+ void* (*new_object_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
- void* (*new_byte_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_byte_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_short_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_short_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_int_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_int_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_long_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_long_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_float_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_float_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_double_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
+ void* (*new_double_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
- void* (*new_object_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
+ void* (*new_object_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
- void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t element_dimension, int32_t length);
+ void* (*new_muldim_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t element_dimension, int32_t length);
- void* (*new_mulnum_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
+ void* (*new_mulnum_array_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
- void* (*new_string_nolen_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes);
+ void* (*new_string_nolen_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes);
- void* (*new_string_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes, int32_t length);
+ void* (*new_string_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes, int32_t length);
- void* (*concat_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* string1, void* string2);
+ void* (*concat_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* string1, void* string2);
- void* (*new_stack_trace_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);
+ void* (*new_stack_trace_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);
- int32_t (*call_method_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* method, int32_t items);
+ int32_t (*call_method_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* method, int32_t items);
- void* (*get_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
+ void* (*get_type_name_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void* (*dump_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
+ void* (*dump_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void* (*new_array_proto_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t length);
+ void* (*new_array_proto_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t length);
- void* (*copy_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
+ void* (*copy_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void* (*new_pointer_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, void* pointer);
+ void* (*new_pointer_object_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, void* pointer);
- void* (*get_compile_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t dimension, int32_t flag);
+ void* (*get_compile_type_name_no_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t dimension, int32_t flag);
* The following methods in the Env class were renamed.
- method build_stack : Stack ();
+ method new_stack : Stack ();
0.989022 2023-07-11
[Document Fix]
* The doc of Native API IDs of the module file native APIs were fixed.
[Incompatibe Changes]
* The runtime native APIs were changed.
- void* object_header_size;
- void* object_ref_count_offset;
- void* object_length_offset;
+ int32_t (*get_object_data_offset)(void* runtime);
+ int32_t (*get_object_ref_count_offset)(void* runtime);
+ int32_t (*get_object_length_offset)(void* runtime);
- void (*build_precompile_module_source)(void* runtime, void* string_buffer, const char* module_name);
- void (*build_precompile_method_source)(void* runtime, void* string_buffer, const char* module_name, const char* method_name);
+ void (*build_precompile_module_source)(void* runtime, void* string_buffer, void* module_basic_type);
+ void (*build_precompile_method_source)(void* runtime, void* string_buffer, void* method);
* The method native APIs were changed.
- void* (*get_opcode)(void* runtime, void* method, int32_t opcode_index);
+ void* (*get_opcode_by_index)(void* runtime, void* method, int32_t opcode_index);
0.989021 2023-07-11
[New Features]
* The argument native API was added.
* The class native variable API was added.
* The field native API was added.
* The method native API was added.
* The basic type native API was added.
* The following method were added to the Env class.
static method new : Env ($runtime : Runtime = undef);
* The following native APIs were added.
void* (*get_runtime)(SPVM_ENV* env, SPVM_VALUE* stack);
void (*set_runtime)(SPVM_ENV* env, SPVM_VALUE* stack, void* runtime);
[Document Changes]
* SPVM::Document::NativeClass was renamed to SPVM::Document::NativeModule.
[Incompatibe Changes]
* Native API IDs of the runtime native APIs were reordered.
0 new_instance
1 free_instance
2 object_header_size
3 object_ref_count_offset
4 object_length_offset
5 get_basic_type_by_id
6 get_basic_type_by_name
7 get_basic_types_length
8 is_object_type
9 can_assign
10 build_precompile_module_source
11 build_precompile_method_source
* The following runtime native APIs were removed.
- const char* (*get_method_name)(void* runtime, void* method);
- int32_t (*get_method_is_class_method)(void* runtime, void* method);
- int32_t (*get_method_is_anon)(void* runtime, void* method);
- int32_t (*get_method_is_native)(void* runtime, void* method);
- int32_t (*get_method_is_precompile)(void* runtime, void* method);
- int32_t (*get_method_byte_vars_width)(void* runtime, void* method);
- int32_t (*get_method_short_vars_width)(void* runtime, void* method);
- int32_t (*get_method_int_vars_width)(void* runtime, void* method);
- int32_t (*get_method_long_vars_width)(void* runtime, void* method);
- int32_t (*get_method_float_vars_width)(void* runtime, void* method);
- int32_t (*get_method_double_vars_width)(void* runtime, void* method);
- int32_t (*get_method_object_vars_width)(void* runtime, void* method);
- int32_t (*get_method_ref_vars_width)(void* runtime, void* method);
- int32_t (*get_method_mortal_stack_length)(void* runtime, void* method);
- int32_t (*get_method_opcodes_length)(void* runtime, void* method);
- int32_t (*get_method_args_length)(void* runtime, void* method);
- int32_t (*get_method_required_args_length)(void* runtime, void* method);
- int32_t (*get_method_is_enum)(void* runtime, void* method);
- void* (*get_method_return_basic_type)(void* runtime, void* method);
- int32_t (*get_method_return_type_dimension)(void* runtime, void* method);
- int32_t (*get_method_return_type_flag)(void* runtime, void* method);
- void* (*get_method_current_basic_type)(void* runtime, void* method);
- void* (*get_method_by_index)(void* runtime, void* basic_type, int32_t method_index);
- void* (*get_method_by_name)(void* runtime, void* basic_type, const char* method_name);
- void* (*get_method_by_name)(void* runtime, void* basic_type, const char* method_name);
- int32_t (*get_method_index)(void* runtime, void* method);
- void* (*get_native_method_address)(void* runtime, void* method);
- void (*set_native_method_address)(void* runtime, void* method, void* address);
- void* (*get_precompile_method_address)(SPVM_ENV*, void* method);
- void (*set_precompile_method_address)(void* runtime, void* method, void* address);
- const char* (*get_field_name)(void* runtime, void* field);
- void* (*get_field_basic_type)(void* runtime, void* field);
- int32_t (*get_field_type_dimension)(void* runtime, void* field);
- int32_t (*get_field_type_flag)(void* runtime, void* field);
- void* (*get_field_current_basic_type)(void* runtime, void* field);
- void* (*get_field_by_index)(void* runtime, void* basic_type, int32_t field_index);
- void* (*get_field_by_name)(void* runtime, void* basic_type, const char* field_name);
- int32_t (*get_field_index)(void* runtime, void* field);
- int32_t (*get_field_offset)(void* runtime, void* field);
- void* (*get_class_var_by_index)(void* runtime, void* basic_type, int32_t class_var_index);
- const char* (*get_class_var_name)(void* runtime, void* class_var);
- void* (*get_class_var_basic_type)(void* runtime, void* class_var);
- int32_t (*get_class_var_type_dimension)(void* runtime, void* class_var);
- int32_t (*get_class_var_type_flag)(void* runtime, void* class_var);
- void* (*get_class_var_current_basic_type)(void* runtime, void* class_var);
- void* (*get_class_var_by_name)(void* runtime, void* basic_type, const char* class_var_name);
- int32_t (*get_class_var_index)(void* runtime, void* class_var);
- void* (*get_class_var_current_basic_type)(void* runtime, void* class_var);
- void* (*get_class_var_by_name)(void* runtime, void* basic_type, const char* class_var_name);
- int32_t (*get_class_var_index)(void* runtime, void* class_var);
- void* (*get_arg_basic_type)(void* runtime, void* arg);
- int32_t (*get_arg_type_dimension)(void* runtime, void* arg);
- int32_t (*get_arg_type_flag)(void* runtime, void* arg);
- void* (*get_arg_by_index)(void* runtime, void* method, int32_t arg_index);
- void* (*get_basic_type_anon_basic_type)(void* runtime, void* basic_type, int32_t anon_basic_type_index);
- const char* (*get_basic_type_module_rel_file)(void* runtime, void* basic_type);
- const char* (*get_basic_type_module_dir)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_is_anon)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_fields_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
- void* (*get_basic_type_parent)(void* runtime, void* basic_type);
- const char* (*get_basic_type_version_string)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
- void* (*get_basic_type_parent)(void* runtime, void* basic_type);
- const char* (*get_basic_type_version_string)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
- void* (*get_basic_type_parent)(void* runtime, void* basic_type);
- const char* (*get_basic_type_version_string)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_id)(void* runtime, void* basic_type);
* The following runtime native APIs were renamed.
- void* (*get_field)(void* runtime, void* basic_type, int32_t field_index);
+ void* (*get_field_by_index)(void* runtime, void* basic_type, int32_t field_index);
- void* (*get_class_var)(void* runtime, void* basic_type, int32_t class_var_index);
+ void* (*get_class_var_by_index)(void* runtime, void* basic_type, int32_t class_var_index);
- void* (*get_method)(void* runtime, void* basic_type, int32_t method_index);
+ void* (*get_method_by_index)(void* runtime, void* basic_type, int32_t method_index);
- void* (*get_arg)(void* runtime, void* method, int32_t arg_index);
+ void* (*get_arg_by_index)(void* runtime, void* method, int32_t arg_index);
* The spvm_native.c was removed.
* The methods in the Runtime class were removed.
- method build_env : Env ();
* The following structures in Native API were renamed.
-struct spvm_env_compiler;
-typedef struct spvm_env_compiler SPVM_ENV_COMPILER;
+struct spvm_api_compiler;
+typedef struct spvm_api_compiler SPVM_API_COMPILER;
-struct spvm_env_module_file;
-typedef struct spvm_env_module_file SPVM_ENV_MODULE_FILE;
+struct spvm_api_module_file;
+typedef struct spvm_api_module_file SPVM_API_MODULE_FILE;
-struct spvm_env_runtime;
-typedef struct spvm_env_runtime SPVM_ENV_RUNTIME;
+struct spvm_api_runtime;
+typedef struct spvm_api_runtime SPVM_API_RUNTIME;
-struct spvm_env_string_buffer;
-typedef struct spvm_env_string_buffer SPVM_ENV_STRING_BUFFER;
+struct spvm_api_string_buffer;
+typedef struct spvm_api_string_buffer SPVM_API_STRING_BUFFER;
-struct spvm_env_allocator;
-typedef struct spvm_env_allocator SPVM_ENV_ALLOCATOR;
+struct spvm_api_allocator;
+typedef struct spvm_api_allocator SPVM_API_ALLOCATOR;
* The following native API were removed.
- void (*free_env_prepared)(SPVM_ENV* env);
- void (*free_env)(SPVM_ENV* env);
- SPVM_ENV* (*new_env)(SPVM_ENV* env);
* The following native API were renamed.
- SPVM_ENV* (*new_env_raw)();
- void (*free_env_raw)(SPVM_ENV* env);
+ SPVM_ENV* (*new_env)();
+ void (*free_env)(SPVM_ENV* env);
-SPVM_ENV* SPVM_NATIVE_new_env_raw(void);
+SPVM_ENV* SPVM_NATIVE_new_env(void);
* The following native module file API were removed.
- SPVM_API_MODULE_FILE* (*new_env)(void);
0.989020 2023-07-07
[Incompatibe Changes]
* The following Native APIs were removed.
int32_t (*init_env)(SPVM_ENV* env);
* The following Native Runtime APIs were removed.
- int32_t* (*get_runtime_codes)(void* runtime);
- int32_t (*get_runtime_codes_length)(void* runtime);
- void (*build)(void* runtime, int32_t* runtime_codes);
- void* (*get_allocator)(void* runtime);
- int32_t* (*get_opcodes)(void* runtime);
- int32_t (*get_method_opcodes_base)(void* runtime, void* method);
- int32_t (*get_method_args_base)(void* runtime, void* method);
- int32_t (*get_basic_type_fields_base)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_base)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_base)(void* runtime, void* basic_type);
* The following Native Runtime APIs were renamed.
- int32_t (*get_method_call_stack_byte_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_short_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_int_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_long_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_float_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_double_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_object_vars_length)(void* runtime, void* method);
- int32_t (*get_method_call_stack_ref_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_byte_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_short_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_int_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_long_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_float_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_double_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_object_vars_width)(void* runtime, void* method);
+ int32_t (*get_method_ref_vars_width)(void* runtime, void* method);
* The following methods in the Runtime were removed.
method get_runtime_codes : int[] ();
* The following Native Compiler APIs were removed.
- int32_t* (*create_runtime_codes)(void* compiler, void* allocator);
[Changes]
* The start_file argument of the set_start_file method in the Native Compiler API was copied.
* The include_dir argument of the add_include_dir method in the Native Compiler API was copied.
[New Features]
* The following Native Compiler APIs were added.
void* (*get_module_file)(void* compiler, const char* module_name);
void (*add_module_file)(void* compiler, const char* module_name, void* module_file);
void* (*build_runtime)(void* compiler);
* SPVM Module File Native APIs were added.
* The following Native API was added.
void* (*get_object_basic_type)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
0.989019 2023-07-04
[Changes]
* spvm_module_file.h and spvm_module_c were added to include and src directories.
* Compilation error messages in toke.c were improved.
* Compilation error messages in op.c were improved.
[Incompatibe Changes]
* The no_compiler_api option in the SPVM::Builder::Config::Exe module was removed.
* The no_precompile option in the SPVM::Builder::Config::Exe module was removed.
* The following Native Runtime APIs were changed.
- void* (*new_object)();
+ void* (*new_instance)(void);
- void (*free_object)(void* runtime);
+ void (*free_instance)(void* runtime);
* The following Native Compiler APIs were changed.
- void* (*new_object)();
+ void* (*new_instance)(void);
- void (*free_object)(void* compiler);
+ void (*free_instance)(void* compiler);
* The following Native Precompile APIs were changed.
- void* (*new_object)();
+ void* (*new_instance)(void);
- void (*free_object)(void* precompile);
+ void (*free_instance)(void* precompile);
- void (*build_source)(void* precompile, void* string_buffer, const char* basic_type_name);
+ void (*build_module_source)(void* precompile, void* string_buffer, const char* basic_type_name);
* The following Native Allocator APIs were changed.
- void* (*new_object)();
+ void* (*new_instance)(void);
- void (*free_object)(void* allocator);
+ void (*free_instance)(void* allocator);
* The following Native String Buffer APIs were changed.
- void* (*new_object)();
+ void* (*new_instance)(void* allocator, int32_t capacity);
- void (*free_object)(void* string_buffer);
+ void (*free_instance)(void* string_buffer);
- const char* (*get_value)(void* string_buffer);
+ const char* (*get_string)(void* string_buffer);
* The following Native Runtime APIs were added.
+ void (*build_precompile_module_source)(void* runtime, void* string_buffer, const char* module_name);
+ void (*build_precompile_method_source)(void* runtime, void* string_buffer, const char* module_name, const char* method_name);
* The methods in the Rutnime class were added and Native Precompile APIs were removed.
- method build_precompile_source : string ($basic_type_name : string);
+ method build_precompile_module_source : string ($basic_type_name : string);
0.989018 2023-07-03
[Incompatibe Changes]
* The following Native Runtime APIs were changed.
- void* (*get_basic_type)(void* runtime, int32_t basic_type_id);
+ void* (*get_basic_type_by_id)(void* runtime, int32_t basic_type_id);
0.989017 2023-06-30
[New Features]
The following Native APIs were added.
* void* (*get_basic_type_by_id)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
[Incompatibe Changes]
* The following Native Runtime APIs were removed.
- int32_t (*get_basic_type_id_by_name)(void* runtime, const char* basic_type_name);
* The following Native APIs were change.
- void* (*new_pointer_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
- void* (*new_pointer_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
+ void* (*new_pointer_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, void* pointer);
+ void* (*new_pointer_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, void* pointer);
- int32_t (*is_type)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t basic_type_id, int32_t type_dimension);
+ int32_t (*is_type)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* basic_type, int32_t type_dimension);
- void* (*new_mulnum_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
- void* (*new_mulnum_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
+ void* (*new_mulnum_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
+ void* (*new_mulnum_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
- void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
- void* (*new_muldim_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
+ void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t element_dimension, int32_t length);
+ void* (*new_muldim_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t element_dimension, int32_t length);
- void* (*new_object_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
- void* (*new_object_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
+ void* (*new_object_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
+ void* (*new_object_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type, int32_t length);
- void* (*new_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
- void* (*new_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
+ void* (*new_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
+ void* (*new_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
- int32_t (*isa)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t basic_type_id, int32_t type_dimension);
+ int32_t (*isa)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* basic_type, int32_t type_dimension);
- const char* (*get_version_string)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
- double (*get_version_number)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
+ const char* (*get_version_string)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
+ double (*get_version_number)(SPVM_ENV* env, SPVM_VALUE* stack, void* basic_type);
- int32_t (*has_interface)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t interface_basic_type_id);
+ int32_t (*has_interface)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* interface_basic_type);
* The following Native Runtime APIs were change.
- int32_t (*can_assign)(void* runtime, int32_t dist_basic_type_id, int32_t dist_type_dimension, int32_t dist_type_flag, int32_t src_basic_type_id, int32_t src_type_dimension, int32_t src_type_flag);
+ int32_t (*can_assign)(void* runtime, void* dist_basic_type, int32_t dist_type_dimension, int32_t dist_type_flag, void* src_basic_type, int32_t src_type_dimension, int32_t src_type_flag);
- int32_t (*is_object_type)(void* runtime, int32_t basic_type_id, int32_t type_dimension, int32_t flag);
+ int32_t (*is_object_type)(void* runtime, void* basic_type, int32_t type_dimension, int32_t flag);
- int32_t (*get_arg_basic_type_id)(void* runtime, void* arg);
+ void* (*get_arg_basic_type)(void* runtime, void* arg);
- int32_t (*get_method_return_basic_type_id)(void* runtime, void* method);
+ void* (*get_method_return_basic_type)(void* runtime, void* method);
- int32_t (*get_method_current_basic_type_id)(void* runtime, void* method);
+ void* (*get_method_current_basic_type)(void* runtime, void* method);
- void* (*get_method)(void* runtime, int32_t basic_type_id, int32_t method_index);
+ void* (*get_method)(void* runtime, void* basic_type, int32_t method_index);
- void* (*get_method_by_name)(void* runtime, int32_t basic_type_id, const char* method_name);
+ void* (*get_method_by_name)(void* runtime, void* basic_type, const char* method_name);
- int32_t (*get_field_basic_type_id)(void* runtime, void* field);
+ void* (*get_field_basic_type)(void* runtime, void* field);
- int32_t (*get_field_current_basic_type_id)(void* runtime, void* method);
+ void* (*get_field_current_basic_type)(void* runtime, void* field);
- void* (*get_field_by_name)(void* runtime, int32_t basic_type_id, const char* field_name);
+ void* (*get_field_by_name)(void* runtime, void* basic_type, const char* field_name);
- void* (*get_field)(void* runtime, int32_t basic_type_id, int32_t field_index);
+ void* (*get_field)(void* runtime, void* basic_type, int32_t field_index);
- int32_t (*get_class_var_basic_type_id)(void* runtime, void* class_var);
+ void* (*get_class_var_basic_type)(void* runtime, void* class_var);
- int32_t (*get_class_var_current_basic_type_id)(void* runtime, void* class_var);
+ void* (*get_class_var_current_basic_type)(void* runtime, void* class_var);
- void* (*get_class_var_by_name)(void* runtime, int32_t basic_type_id, const char* class_var_name);
+ void* (*get_class_var_by_name)(void* runtime, void* basic_type, const char* class_var_name);
- void* (*get_class_var)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
+ void* (*get_class_var)(void* runtime, void* basic_type, int32_t class_var_index);
- const char* (*get_basic_type_version_string)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_version_string)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_parent_id)(void* runtime, int32_t basic_type_id);
+ void* (*get_basic_type_parent)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_base)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_class_vars_base)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_methods_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_base)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_methods_base_v2)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_fields_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_fields_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_fields_base)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_fields_base)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_is_anon)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_is_anon)(void* runtime, void* basic_type);
- const char* (*get_basic_type_module_dir)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_module_dir)(void* runtime, void* basic_type);
- const char* (*get_basic_type_module_rel_file)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_module_rel_file)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_category)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_category)(void* runtime, void* basic_type);
- const char* (*get_basic_type_name)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_name)(void* runtime, void* basic_type);
0.989016 2023-06-29
[Incompatibe Changes]
* The following Native Runtime APIs were changed.
- int32_t (*get_basic_type_name_id)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_name)(void* runtime, int32_t basic_type_id);
- int32_t (*get_class_var_name_id)(void* runtime, void* class_var);
+ const char* (*get_class_var_name)(void* runtime, void* class_var);
- int32_t (*get_field_name_id)(void* runtime, void* field);
+ const char* (*get_field_name)(void* runtime, void* field);
- int32_t (*get_method_name_id)(void* runtime, void* method);
+ const char* (*get_method_name)(void* runtime, void* method);
- int32_t (*get_basic_type_module_rel_file_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_module_dir_id)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_module_rel_file)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_module_dir)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_version_string_id)(void* runtime, int32_t basic_type_id);
+ const char* (*get_basic_type_version_string)(void* runtime, int32_t basic_type_id);
* The following Native Runtime APIs were removed.
- const char* (*get_constant_string_value)(void* runtime, int32_t constant_string_id, int32_t* string_length);
- const char* (*get_name)(void* runtime, int32_t constant_string_id);
[New Features]
* The following Native Runtime APIs were added.
const char* (*get_basic_type_name)(void* runtime, int32_t basic_type_id);
const char* (*get_class_var_name)(void* runtime, void* class_var);
const char* (*get_field_name)(void* runtime, void* field);
const char* (*get_method_name)(void* runtime, void* method);
[Compilation Error Message Improvement]
* Complication error messages were improved.
[Changes]
* The string cancatlation optimization was removed.
0.989015 2023-06-27
[Incompatibe Changes]
* The following native APIs were removed.
void (*set_args_stack_length)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t args_length);
int32_t (*get_args_stack_length)(SPVM_ENV* env, SPVM_VALUE* stack);
[Incompatibe Changes]
* The following Native APIs were removed.
void* class_vars_heap
void* init_flags;
int32_t (*get_opcodes_length)(void* runtime);
* The following Native Runtime APIs were removed.
void* init_flags;
0.989014 2023-06-26
[Bug Fix]
* The bug that the get_field_static Native API didn't work well was fixed.
[Incompatibe Changes]
* The following Native APIs were removed.
void* object_flag_offset;
void* object_weaken_backref_head;
void* object_basic_type_id_offset;
void* object_type_dimension_offset;
void* object_length_offset;
void* object_header_size;
void* object_ref_count_offset;
* The following Native Runtime APIs were removed.
void* object_flag_offset;
void* object_weaken_backref_head;
void* object_basic_type_id_offset;
void* object_type_dimension_offset;
* The following Native Runtime APIs were change.
- int32_t (*get_arg_basic_type_id)(void* runtime, int32_t arg_id);
- int32_t (*get_arg_type_dimension)(void* runtime, int32_t arg_id);
- int32_t (*get_arg_type_flag)(void* runtime, int32_t arg_id);
+ int32_t (*get_arg_basic_type_id)(void* runtime, void* arg);
+ int32_t (*get_arg_type_dimension)(void* runtime, void* arg);
+ int32_t (*get_arg_type_flag)(void* runtime, void* arg);
[New Features]
* The following Native Runtime APIs were added.
+ void* (*get_arg)(void* runtime, void* method, int32_t arg_index);
0.989013 2023-06-26
[New Features]
* The following methods were added.
The get_array_unsafe field in the ByteList class was added.
The get_array_unsafe field in the ShortList class was added.
The get_array_unsafe field in the IntList class was added.
The get_array_unsafe field in the LongList class was added.
The get_array_unsafe field in the FloatList class was added.
The get_array_unsafe field in the DoubleList class was added.
The get_array_unsafe field in the List class was added.
The get_array_unsafe field in the StringList class was added.
The get_string_unsafe field in the StringBuffer class was added.
* The following Native API constant value were added.
SPVM_NATIVE_VERSION_NUMBER
SPVM_NATIVE_VERSION_STRING
[Incompatibe Changes]
* The following fields were removed.
The values field in the ByteList class was removed.
The values field in the ShortList class was removed.
The values field in the IntList class was removed.
The values field in the LongList class was removed.
The values field in the FloatList class was removed.
The values field in the DoubleList class was removed.
The values field in the List class was removed.
The values field in the StringList class was removed.
The value field in the StringBuffer class was removed.
* A version string cannot contain "_".
A version string must be able to be parsed by the C<strtod> C function. Otherwise a compilation error occurs.
0.989012 2023-06-26
[Bug Fix]
* A bug was fixed: Some native APIs had not returned correct error return values.
[Incompatibe Changes]
* The following Native APIs were changed.
- int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name, int32_t args_stack_length, const char* func_nam
e, const char* file, int32_t line);
- int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* method_name, int32_t args_stack_length, const char* func_name, const char* file, int32
_t line);
+ void (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name, int32_t args_stack_length, int32_t* error, const c
har* func_name, const char* file, int32_t line);
+ void (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* method_name, int32_t args_stack_length, int32_t* error, const char* func_name, const char
* file, int32_t line);
- int32_t (*call_instance_method_static_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name, int32_t args_stack_length, const char* func_name, const char* file, int32_t line);
+ void (*call_instance_method_static_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name, int32_t args_stack_length, int32_t* error, const char* func_name, const char* file, int32_t line);
0.989011 2023-06-25
[New Features]
* The following Native Runtime API were added.
int32_t (*get_field_offset)(void* runtime, void* field);
[Incompatibe Changes]
* The following Native Runtime APIs were removed.
int32_t (*get_field_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t field_index);
int32_t (*get_field_address_id_by_name)(void* runtime, const char* basic_type_name, const char* field_name);
* The length of the merged fields in a class must be lower than 65535.
* The following Native APIs were changed.
- void* (*get_class_var)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* class_var_name);
+ void* (*get_class_var)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* class_var_name);
- void* (*get_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
+ void* (*get_method)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name);
- void* (*get_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
+ void* (*get_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name);
- void* (*get_instance_method_static)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
+ void* (*get_instance_method_static)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name);
- int32_t (*get_field_id)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name);
+ void* (*get_field)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name);
- int32_t (*get_field_id_static)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* field_name);
+ void* (*get_field_static)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* field_name);
- int8_t (*get_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- int16_t (*get_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- int32_t (*get_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- int64_t (*get_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- float (*get_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- double (*get_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- void* (*get_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id);
- void (*set_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, int8_t value);
- void (*set_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, int16_t value);
- void (*set_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, int32_t value);
- void (*set_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, int64_t value);
- void (*set_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, float value);
- void (*set_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, double value);
- void (*set_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_address_id, void* value);
+ int8_t (*get_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ int16_t (*get_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ int32_t (*get_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ int64_t (*get_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ float (*get_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ double (*get_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ void* (*get_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ void (*set_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int8_t value);
+ void (*set_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int16_t value);
+ void (*set_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int32_t value);
+ float (*get_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ double (*get_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ void* (*get_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field);
+ void (*set_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int8_t value);
+ void (*set_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int16_t value);
+ void (*set_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int32_t value);
+ void (*set_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, int64_t value);
+ void (*set_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, float value);
+ void (*set_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, double value);
+ void (*set_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* field, void* value);
* The following Native APIs were removed.
- int32_t (*get_field_offset)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t field_address_id);
0.989010 2023-06-22
[New Features]
* The following Native Runtime APIs were added.
+int32_t SPVM_API_RUNTIME_get_class_var_address_id(SPVM_RUNTIME* runtime, SPVM_RUNTIME_METHOD* class_var);
+int32_t SPVM_API_RUNTIME_get_class_var_index(SPVM_RUNTIME* runtime, SPVM_RUNTIME_METHOD* class_var);
+int32_t SPVM_API_RUNTIME_get_field_address_id(SPVM_RUNTIME* runtime, SPVM_RUNTIME_METHOD* field);
+int32_t SPVM_API_RUNTIME_get_field_index(SPVM_RUNTIME* runtime, SPVM_RUNTIME_METHOD* field);
* The following Native APIs were added.
+ void* (*new_stack_trace_raw_v2)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);
+ void* (*new_stack_trace_v2)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);
int8_t (*get_class_var_byte_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
int16_t (*get_class_var_short_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
int32_t (*get_class_var_int_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
int64_t (*get_class_var_long_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
float (*get_class_var_float_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
double (*get_class_var_double_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
void* (*get_class_var_object_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index);
void (*set_class_var_byte_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, int8_t value);
void (*set_class_var_short_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, int16_t value);
void (*set_class_var_int_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, int32_t value);
void (*set_class_var_long_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, int64_t value);
void (*set_class_var_float_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, float value);
void (*set_class_var_double_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, double value);
void (*set_class_var_object_v2)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t class_var_index, void* value);
[Warnings]
* The beheivior of the following Native APIs were deprecated and will be replaced with version 2 APIs.
+ void* (*new_stack_trace_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_address_id, int32_t line);
+ void* (*new_stack_trace)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_address_id, int32_t line);
int8_t (*get_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
int16_t (*get_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
int32_t (*get_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
int64_t (*get_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
float (*get_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
double (*get_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
void* (*get_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
void (*set_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int8_t value);
void (*set_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int16_t value);
void (*set_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int32_t value);
void (*set_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int64_t value);
void (*set_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, float value);
void (*set_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, double value);
void (*set_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, void* value);
[Incompatibe Changes]
* The following Native Runtime APIs were changed.
- int32_t (*get_basic_type_name_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_name_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_category)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_category)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_module_rel_file_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_module_dir_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_is_anon)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_fields_base_address_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_fields_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_base_address_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_methods_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_base_address_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_module_rel_file_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_module_dir_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_is_anon)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_fields_base_address_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_fields_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_methods_base_address_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_methods_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_class_vars_base_address_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_class_vars_length)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_parent_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_version_string_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_parent_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_version_string_id)(void* runtime, int32_t basic_type_id);
* The following Native APIs were changed.
- int32_t (*call_method_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
+ int32_t (*call_method_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* method, int32_t args_stack_length);
- int32_t (*call_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
+ int32_t (*call_method)(SPVM_ENV* env, SPVM_VALUE* stack, void* method, int32_t args_stack_length);
- void* (*new_stack_trace_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_address_id, int32_t line);
- void* (*new_stack_trace)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_address_id, int32_t line);
+ void* (*new_stack_trace_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);
+ void* (*new_stack_trace)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, void* method, int32_t line);0.989009 2023-06-21
- int32_t (*get_class_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name);
+ void* (*get_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
- int32_t (*get_instance_method_id_static)(SPVM_ENV* env, const char* basic_type_name, const char* method_name);
+ void* (*get_instance_method_static)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
- int32_t (*get_instance_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name);
+ void* (*get_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name);
- int32_t (*get_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* method_name);
+ void* (*get_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* method_name);
- int32_t (*get_class_var_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, const char* class_var_name);
+ void* (*get_class_var)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, const char* class_var_name);
- int8_t (*get_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- int16_t (*get_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- int32_t (*get_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- int64_t (*get_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- float (*get_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- double (*get_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- void* (*get_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id);
- void (*set_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int8_t value);
- void (*set_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int16_t value);
- void (*set_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int32_t value);
- void (*set_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, int64_t value);
- void (*set_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, float value);
- void (*set_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, double value);
- void (*set_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_var_address_id, void* value);
+ int8_t (*get_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ int16_t (*get_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ int32_t (*get_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ int64_t (*get_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ float (*get_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ double (*get_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ void* (*get_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var);
+ void (*set_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, int8_t value);
+ void (*set_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, int16_t value);
+ void (*set_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, int32_t value);
+ void (*set_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, int64_t value);
+ void (*set_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, float value);
+ void (*set_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, double value);
+ void (*set_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* class_var, void* value);
* The following Native Runtime APIs were changed.
- void* (*get_field)(void* runtime, void* basic_type, int32_t field_index);
- void* (*get_class_var)(void* runtime, void* basic_type, int32_t class_var_index);
- void* (*get_method)(void* runtime, void* basic_type, int32_t method_index);
+ void* (*get_field)(void* runtime, int32_t basic_type_id, int32_t field_index);
+ void* (*get_class_var)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
+ void* (*get_method)(void* runtime, int32_t basic_type_id, int32_t method_index);
- int32_t (*get_method_is_static)(void* runtime, void* method);
+ int32_t (*get_method_is_class_method)(void* runtime, void* method);
- void* (*get_basic_type_by_id)(void* runtime, int32_t basic_type_id);
+ void* (*get_basic_type)(void* runtime, int32_t basic_type_id);
* The following Native Runtime APIs were removed.
- int32_t (*get_method_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t method_index);
- int32_t (*get_method_address_id_by_name)(void* runtime, const char* basic_type_name, const char* method_name);
[New Features]
* The following Native Runtime APIs were added.
void* (*get_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name);
* The following Native Runtime APIs were added.
void* (*get_class_var_by_name)(void* runtime, int32_t basic_type_id, const char* class_var_name);
void* (*get_field_by_name)(void* runtime, int32_t basic_type_id, const char* field_name);
void* (*get_method_by_name)(void* runtime, int32_t basic_type_id, const char* method_name);
int32_t (*get_method_address_id)(void* runtime, void* method);
int32_t (*get_method_index)(void* runtime, void* method);
[Bug Fix]
* The following bug was fixed. Cached symbol IDs in the precompile code does not work well in some cases.
0.989008 2023-06-20
[Incompatibe Changes]
* The following Native Runtime APIs were changed.
- int32_t (*get_basic_type_rel_file_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_module_rel_file_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_dir_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_module_dir_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_method_opcodes_base_id)(void* runtime, int32_t method_id);
+ int32_t (*get_method_opcodes_base_address_id)(void* runtime, int32_t method_id);
- int32_t (*get_method_args_base_id)(void* runtime, int32_t method_id);
+ int32_t (*get_method_args_base_address_id)(void* runtime, int32_t method_id);
- int32_t (*get_basic_type_fields_base_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_fields_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_methods_base_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_methods_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_class_vars_base_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_class_vars_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_method_id_by_index)(void* runtime, int32_t basic_type_id, int32_t method_index);
- int32_t (*get_method_id_by_name)(void* runtime, const char* basic_type_name, const char* method_name);
- int32_t (*get_method_name_id)(void* runtime, int32_t method_id);
+ int32_t (*get_method_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t method_index);
+ int32_t (*get_method_address_id_by_name)(void* runtime, const char* basic_type_name, const char* method_name);
+ int32_t (*get_method_name_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_is_static)(void* runtime, int32_t method_id);
- int32_t (*get_method_is_anon)(void* runtime, int32_t method_id);
- int32_t (*get_method_is_native)(void* runtime, int32_t method_id);
- int32_t (*get_method_is_precompile)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_byte_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_short_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_int_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_long_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_float_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_double_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_object_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_call_stack_ref_vars_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_mortal_stack_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_opcodes_base_address_id)(void* runtime, int32_t method_id);
- int32_t (*get_method_opcodes_length)(void* runtime, int32_t method_id);
- int32_t (*get_method_args_base_address_id)(void* runtime, int32_t method_id);
- int32_t (*get_method_args_length)(void* runtime, int32_t method_id);
+ int32_t (*get_method_is_static)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_is_anon)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_is_native)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_is_precompile)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_byte_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_short_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_int_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_long_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_float_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_double_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_object_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_call_stack_ref_vars_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_mortal_stack_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_opcodes_base_address_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_opcodes_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_args_base_address_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_args_length)(void* runtime, int32_t method_address_id);
- void* (*get_native_method_address)(void* runtime, int32_t method_id);
- void (*set_native_method_address)(void* runtime, int32_t method_id, void* address);
- void* (*get_precompile_method_address)(SPVM_ENV*, int32_t method_id);
- void (*set_precompile_method_address)(void* runtime, int32_t method_id, void* address);
+ void* (*get_native_method_address)(void* runtime, int32_t method_address_id);
+ void (*set_native_method_address)(void* runtime, int32_t method_address_id, void* address);
+ void* (*get_precompile_method_address)(SPVM_ENV*, int32_t method_address_id);
+ void (*set_precompile_method_address)(void* runtime, int32_t method_address_id, void* address);
- int32_t (*get_method_required_args_length)(void* runtime, int32_t method_id);
+ int32_t (*get_method_required_args_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_is_enum)(void* runtime, int32_t method_id);
+ int32_t (*get_method_is_enum)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_return_basic_type_id)(void* runtime, int32_t method_id);
- int32_t (*get_method_return_type_dimension)(void* runtime, int32_t method_id);
- int32_t (*get_method_return_type_flag)(void* runtime, int32_t method_id);
+ int32_t (*get_method_return_basic_type_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_return_type_dimension)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_return_type_flag)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_current_basic_type_id)(void* runtime, int32_t method_id);
- int32_t (*get_field_current_basic_type_id)(void* runtime, int32_t method_id);
- int32_t (*get_class_var_current_basic_type_id)(void* runtime, int32_t method_id);
+ int32_t (*get_method_current_basic_type_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_field_current_basic_type_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_class_var_current_basic_type_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_field_id_by_index)(void* runtime, int32_t basic_type_id, int32_t field_index);
- int32_t (*get_field_id_by_name)(void* runtime, const char* basic_type_name, const char* field_name);
- int32_t (*get_field_name_id)(void* runtime, int32_t field_id);
+ int32_t (*get_field_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t field_index);
+ int32_t (*get_field_address_id_by_name)(void* runtime, const char* basic_type_name, const char* field_name);
+ int32_t (*get_field_name_id)(void* runtime, int32_t field_address_id);
- int32_t (*get_field_basic_type_id)(void* runtime, int32_t field_id);
- int32_t (*get_field_type_dimension)(void* runtime, int32_t field_id);
- int32_t (*get_field_type_flag)(void* runtime, int32_t field_id);
+ int32_t (*get_field_basic_type_id)(void* runtime, int32_t field_address_id);
+ int32_t (*get_field_type_dimension)(void* runtime, int32_t field_address_id);
+ int32_t (*get_field_type_flag)(void* runtime, int32_t field_address_id);
- int32_t (*get_class_var_id_by_index)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
- int32_t (*get_class_var_id_by_name)(void* runtime, const char* basic_type_name, const char* class_var_name);
- int32_t (*get_class_var_name_id)(void* runtime, int32_t class_var_id);
+ int32_t (*get_class_var_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
+ int32_t (*get_class_var_address_id_by_name)(void* runtime, const char* basic_type_name, const char* class_var_name);
+ int32_t (*get_class_var_name_id)(void* runtime, int32_t class_var_address_id);
- int32_t (*get_class_var_basic_type_id)(void* runtime, int32_t class_var_id);
- int32_t (*get_class_var_type_dimension)(void* runtime, int32_t class_var_id);
- int32_t (*get_class_var_type_flag)(void* runtime, int32_t class_var_id);
+ int32_t (*get_class_var_basic_type_id)(void* runtime, int32_t class_var_address_id);
+ int32_t (*get_class_var_type_dimension)(void* runtime, int32_t class_var_address_id);
+ int32_t (*get_class_var_type_flag)(void* runtime, int32_t class_var_address_id);
- int32_t (*get_class_var_address_id_by_index)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
+ void* (*get_class_var)(void* runtime, void* basic_type, int32_t class_var_index);
- int32_t (*get_class_var_name_id)(void* runtime, int32_t class_var_address_id);
+ int32_t (*get_class_var_name_id)(void* runtime, void* class_var);
- int32_t (*get_class_var_basic_type_id)(void* runtime, int32_t class_var_address_id);
- int32_t (*get_class_var_type_dimension)(void* runtime, int32_t class_var_address_id);
- int32_t (*get_class_var_type_flag)(void* runtime, int32_t class_var_address_id);
+ int32_t (*get_class_var_basic_type_id)(void* runtime, void* class_var);
+ int32_t (*get_class_var_type_dimension)(void* runtime, void* class_var);
+ int32_t (*get_class_var_type_flag)(void* runtime, void* class_var);
- int32_t (*get_class_var_current_basic_type_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_class_var_current_basic_type_id)(void* runtime, void* class_var);
- int32_t (*get_field_name_id)(void* runtime, int32_t field_address_id);
+ int32_t (*get_field_name_id)(void* runtime, void* field);
- int32_t (*get_field_basic_type_id)(void* runtime, int32_t field_address_id);
- int32_t (*get_field_type_dimension)(void* runtime, int32_t field_address_id);
- int32_t (*get_field_type_flag)(void* runtime, int32_t field_address_id);
+ int32_t (*get_field_basic_type_id)(void* runtime, void* field);
+ int32_t (*get_field_type_dimension)(void* runtime, void* field);
+ int32_t (*get_field_type_flag)(void* runtime, void* field);
+ void* (*get_field_by_address_id)(void* runtime, int32_t field_address_id);
- int32_t (*get_method_name_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_name_id)(void* runtime, void* method);
- int32_t (*get_method_is_static)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_is_anon)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_is_native)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_is_precompile)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_byte_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_short_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_int_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_long_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_float_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_double_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_object_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_call_stack_ref_vars_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_mortal_stack_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_opcodes_base_address_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_opcodes_length)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_args_base_address_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_args_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_is_static)(void* runtime, void* method);
+ int32_t (*get_method_is_anon)(void* runtime, void* method);
+ int32_t (*get_method_is_native)(void* runtime, void* method);
+ int32_t (*get_method_is_precompile)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_byte_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_short_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_int_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_long_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_float_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_double_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_object_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_call_stack_ref_vars_length)(void* runtime, void* method);
+ int32_t (*get_method_mortal_stack_length)(void* runtime, void* method);
+ int32_t (*get_method_opcodes_base_address_id)(void* runtime, void* method);
+ int32_t (*get_method_opcodes_length)(void* runtime, void* method);
+ int32_t (*get_method_args_base_address_id)(void* runtime, void* method);
+ int32_t (*get_method_args_length)(void* runtime, void* method);
- void* (*get_native_method_address)(void* runtime, int32_t method_address_id);
- void (*set_native_method_address)(void* runtime, int32_t method_address_id, void* address);
- void* (*get_precompile_method_address)(SPVM_ENV*, int32_t method_address_id);
- void (*set_precompile_method_address)(void* runtime, int32_t method_address_id, void* address);
+ void* (*get_native_method_address)(void* runtime, void* method);
+ void (*set_native_method_address)(void* runtime, void* method, void* address);
+ void* (*get_precompile_method_address)(SPVM_ENV*, void* method);
+ void (*set_precompile_method_address)(void* runtime, void* method, void* address);
- int32_t (*get_method_required_args_length)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_required_args_length)(void* runtime, void* method);
- int32_t (*get_method_is_enum)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_is_enum)(void* runtime, void* method);
- int32_t (*get_method_return_basic_type_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_return_type_dimension)(void* runtime, int32_t method_address_id);
- int32_t (*get_method_return_type_flag)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_return_basic_type_id)(void* runtime, void* method);
+ int32_t (*get_method_return_type_dimension)(void* runtime, void* method);
+ int32_t (*get_method_return_type_flag)(void* runtime, void* method);
- int32_t (*get_method_current_basic_type_id)(void* runtime, int32_t method_address_id);
- int32_t (*get_field_current_basic_type_id)(void* runtime, int32_t method_address_id);
+ int32_t (*get_method_current_basic_type_id)(void* runtime, void* method);
+ int32_t (*get_field_current_basic_type_id)(void* runtime, void* method);
- int32_t (*get_basic_type_name_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_name_id)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_category)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_category)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_module_rel_file_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_module_dir_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_is_anon)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_fields_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_fields_length)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_methods_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_fields_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_fields_length)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_methods_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_methods_length)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_class_vars_base_address_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_class_vars_length)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_module_rel_file_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_module_dir_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_is_anon)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_fields_base_address_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_fields_length)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_methods_base_address_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_methods_length)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_class_vars_base_address_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_class_vars_length)(void* runtime, void* basic_type);
- int32_t (*get_basic_type_parent_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_version_string_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_parent_id)(void* runtime, void* basic_type);
+ int32_t (*get_basic_type_version_string_id)(void* runtime, void* basic_type);
* The following Native Runtime API were removed.
- int32_t (*get_anon_method_method_id)(void* runtime, int32_t anon_method_id);
- int32_t (*get_basic_type_anon_methods_base_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_basic_type_anon_methods_length)(void* runtime, int32_t basic_type_id);
0.989007 2023-06-19
[Document Changes]
* The hedding "Class Attribute" was renamed to "Module Attribute"
* The hedding "Class Name" was renamed to "Basic Type Name"
[Bug Fix and Incompatibe Changes]
* The no-build-spvm-classes option in the Makefile.PL that was generated by spvmdist command was renamed to the no-build-spvm-modules option.
This had been wrongly changed.
[Incompatibe Changes]
* The class_name fields in the all classes(.spvm) were renamed to the basic_type_name methods and fields.
* The class_name method and fields in the Perl modules(.pm) were renamed to module_name.
* The following Native Runtime APIs were changed.
- int32_t (*get_basic_type_parent_class_basic_type_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_parent_id)(void* runtime, int32_t basic_type_id);
* The __CLASS__ operator was renamed to __PACKAGE__ operator.
[Compilation Error Messages]
* The expression "class name" was reduced.
[Exception Messages]
* The expression "class name" was reduced.
0.989006 2023-06-18
[New Features]
* The get_basic_type_name method in the Runtime class was added.
[Incompatible Changes]
* The following Native Runtime APIs were changed.
- int32_t (*get_basic_type_class_path_id)(void* runtime, int32_t basic_type_id);
+ int32_t (*get_basic_type_dir_id)(void* runtime, int32_t basic_type_id);
- int32_t (*get_method_class_basic_type_id)(void* runtime, int32_t method_id);
+ int32_t (*get_method_current_basic_type_id)(void* runtime, int32_t method_id);
- int32_t (*get_field_class_basic_type_id)(void* runtime, int32_t method_id);
+ int32_t (*get_field_current_basic_type_id)(void* runtime, int32_t method_id);
- int32_t (*get_class_var_class_basic_type_id)(void* runtime, int32_t method_id);
+ int32_t (*get_class_var_current_basic_type_id)(void* runtime, int32_t method_id);
* The following Native API contant values were changed.
[Before]
0 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNKNOWN
1 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_NOT_FOUND_CLASS
2 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNDEF
3 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_VOID
4 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_NUMERIC
5 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_MULNUM
6 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_STRING
7 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS
8 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE
9 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_ANY_OBJECT
[After]
0 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNKNOWN
1 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNDEF
2 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_VOID
3 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_NUMERIC
4 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_MULNUM
5 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_STRING
6 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS
7 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE
8 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_ANY_OBJECT
* The get_classes_length method in the Runtime class was removed.
* The get_class_names in the Runtime class was removed.
* The get_parent_class_name in the Runtime class was renamed to the get_basic_type_parent_name method.
* The get_class_file in the Runtime class was renamed to the get_file method.
* The build_precompile_class_source in the Runtime class was renamed to the build_precompile_source method.
* The get_anon_class_names in the Runtime class was renamed to the get_basic_type_anon_basic_type_names method.
* The following Native Runtime API were changed.
- int32_t (*get_method_is_class_method)(void* runtime, int32_t method_id);
+ int32_t (*get_method_is_static)(void* runtime, int32_t method_id);
* The following Native Precompile API were changed.
- void (*build_class_source)(void* precompile, void* string_buffer, const char* class_name);
+ void (*build_source)(void* precompile, void* string_buffer, const char* class_name);
* The following Native Compiler API were changed.
- void (*add_class_path)(void* compiler, const char* class_path);
+ void (*add_include_dir)(void* compiler, const char* include_dir);
- int32_t (*get_class_paths_length )(void* compiler);
+ int32_t (*get_include_dirs_length )(void* compiler);
- const char* (*get_class_path )(void* compiler, int32_t index);
+ const char* (*get_include_dir )(void* compiler, int32_t index);
- void (*clear_class_paths)(void* compiler);
+ void (*clear_include_dirs)(void* compiler);
* The class-path option in the spvmcc command was renamed to include-dir.
[Breaking Binary Compatibility]
* Binary compatibility was broken.
0.989005 2023-06-15
[Changes]
* include/spvm_class.h and src/spvm_class.c were removed.
0.989004 2023-06-14
[New Features]
* The get_field_basic_type_id Native Runtime API was added.
* The get_field_type_dimension Native Runtime API was added.
* The get_field_type_flag Native Runtime API was added.
* The get_class_var_basic_type_id Native Runtime API was added.
* The get_class_var_type_dimension Native Runtime API was added.
* The get_class_var_type_flag Native Runtime API was added.
* The get_method_return_basic_type_id Native Runtime API was added.
* The get_method_return_type_dimension Native Runtime API was added.
* The get_method_return_type_flag Native Runtime API was added.
* The get_arg_basic_type_id Native Runtime API was added.
* The get_arg_type_dimension Native Runtime API was added.
* The get_arg_type_flag Native Runtime API was added.
* The get_method_class_basic_type_id Native Runtime API was added.
* The get_field_class_basic_type_id Native Runtime API was added.
* The get_class_var_class_basic_type_id Native Runtime API was added.
* The get_basic_type_parent_class_basic_type_id Native Runtime API was added.
[Incompatible Changes]
* The get_field_type_id Native Runtime API was removed.
* The get_method_return_type_id Native Runtime API was removed.
* The get_type_stack_length Native Runtime API was removed.
* The get_arg_type_id Native Runtime API was removed.
* The get_basic_type_is_class Native Runtime API was removed.
* The following Native Runtime APIs were removed.
int32_t (*get_type_basic_type_id)(void* runtime, int32_t type_id);
int32_t (*get_type_dimension)(void* runtime, int32_t type_id);
int32_t (*get_type_is_object)(void* runtime, int32_t type_id);
int32_t (*get_type_is_ref)(void* runtime, int32_t type_id);
int32_t (*get_type_flag)(void* runtime, int32_t type_id);
int32_t (*get_basic_type_class_id)(void* runtime, int32_t basic_type_id);
int32_t (*get_field_class_id)(void* runtime, int32_t basic_type_id);
int32_t (*get_method_class_id)(void* runtime, int32_t basic_type_id);
int32_t (*get_class_var_class_id)(void* runtime, int32_t basic_type_id);
int32_t (*get_class_id_by_name)(void* runtime, const char* class_name);
int32_t (*get_class_name_id)(void* runtime, int32_t class_id);
int32_t (*get_class_class_rel_file_id)(void* runtime, int32_t class_id);
int32_t (*get_class_class_path_id)(void* runtime, int32_t class_id);
int32_t (*get_class_is_anon)(void* runtime, int32_t class_id);
int32_t (*get_class_fields_base_id)(void* runtime, int32_t class_id);
int32_t (*get_class_fields_length)(void* runtime, int32_t class_id);
int32_t (*get_class_methods_base_id)(void* runtime, int32_t class_id);
int32_t (*get_class_methods_length)(void* runtime, int32_t class_id);
int32_t (*get_class_class_vars_base_id)(void* runtime, int32_t class_id);
int32_t (*get_class_class_vars_length)(void* runtime, int32_t class_id);
int32_t (*get_class_anon_methods_base_id)(void* runtime, int32_t class_id);
int32_t (*get_class_anon_methods_length)(void* runtime, int32_t class_id);
* The following Native Runtime APIs were changed.
- int32_t (*get_class_var_id_by_index)(void* runtime, int32_t class_id, int32_t class_var_index);
+ int32_t (*get_class_var_id_by_index)(void* runtime, int32_t basic_type_id, int32_t class_var_index);
- int32_t (*get_field_id_by_index)(void* runtime, int32_t class_id, int32_t field_index);
+ int32_t (*get_field_id_by_index)(void* runtime, int32_t basic_type_id, int32_t field_index);
- int32_t (*get_method_id_by_index)(void* runtime, int32_t class_id, int32_t method_index);
+ int32_t (*get_method_id_by_index)(void* runtime, int32_t basic_type_id, int32_t method_index);
0.989003 2023-06-09
[Bug Fix]
* The following bug was fixed: The can_assign Native Runtime API didnot work well.
[New Features]
* The isa_error operator and the is_operator were added.
[Changes]
* The Error::System class extends the Error class.
* The Error::NotSupported class extends the Error class.
[Incompatible Changes]
* The get_class_id Native API was removed. This is internally used now.
* The get_class_id_by_name Native API was removed. This is internally used now.
[Warnings]
* Native Runtime APIs that get and set the class id will be removed in the nearly feature.
0.989002 2023-06-08
[Document Bug]
* The basic type IDs were wrong. This was fixed.
0 SPVM_NATIVE_C_BASIC_TYPE_ID_UNKNOWN
1 SPVM_NATIVE_C_BASIC_TYPE_ID_UNDEF
2 SPVM_NATIVE_C_BASIC_TYPE_ID_VOID
3 SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE
4 SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT
5 SPVM_NATIVE_C_BASIC_TYPE_ID_INT
6 SPVM_NATIVE_C_BASIC_TYPE_ID_LONG
7 SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT
8 SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE
9 SPVM_NATIVE_C_BASIC_TYPE_ID_STRING
10 SPVM_NATIVE_C_BASIC_TYPE_ID_ANY_OBJECT
11 SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE_CLASS
12 SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT_CLASS
13 SPVM_NATIVE_C_BASIC_TYPE_ID_INT_CLASS
14 SPVM_NATIVE_C_BASIC_TYPE_ID_LONG_CLASS
15 SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT_CLASS
16 SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE_CLASS
17 SPVM_NATIVE_C_BASIC_TYPE_ID_BOOL_CLASS
18 SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_CLASS
19 SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_SYSTEM_CLASS
20 SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_NOT_SUPPORTED_CLASS
21 SPVM_NATIVE_C_BASIC_TYPE_ID_COMMAND_INFO_CLASS
22 SPVM_NATIVE_C_BASIC_TYPE_ID_ADDRESS_CLASS
[New Features]
* The basic_type_id operator was added.
[Incompatible Changes]
* The error operator was renamed to the eval_error_id operator. The eval_error_id operator returns the basic type id, not the class id.
* The class_id operator was removed.
* The code field in the ExchangeAPI::Error class was renamed to the id field.
* The set_error_code operator was removed.
* The error_code operator was removed.
* The die Native API returned the basic type ID of the Error class.
* The deprecated following syntax was removed.
var ASSIGN operator ':' qualified_type opt_type_comment
0.989001 2023-06-07
[Incompatible Changes]
* The new_stack_trace_by_name Native API was removed.
* The new_stack_trace_raw_by_name Native API was removed.
* The following Native APIs were removed.
void* (*new_object_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
void* (*new_muldim_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t element_dimension, int32_t length);
void* (*new_mulnum_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
int32_t (*has_interface_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* interface_basic_type_name);
* The IDs of the following Native APIs were changed.
new_object_array_by_name
new_muldim_array_by_name
new_mulnum_array_by_name
has_interface_by_name
* The definition of the following Native APIs were changed.
- void* (*new_object_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
+ void* (*new_object_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length, int32_t* error, const char* func_name, const char* file, int32_t line);
- void* (*new_muldim_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t element_dimension, int32_t length);
+ void* (*new_muldim_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t element_dimension, int32_t length, int32_t* error, const char* func_name, const char* file, int32_t line);
- void* (*new_mulnum_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
+ void* (*new_mulnum_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length, int32_t* error, const char* func_name, const char* file, int32_t line);
[Bug Fix]
* A following bug was fiexed. The new_object_array_by_name, new_muldim_array_by_name, and new_mulnum_array_by_name Native APIs could not be called.
* A following bug was fiexed. The isa_by_name, is_type_by_name, and has_interface_by_name Native APIs didnot work correctly.
[Internale Changes]
* The spvm_object structure was restored. The basci_type_name member was removed in the spvm_object strucutre and the basic_type_id member is added again.
0.989 2023-06-06
[New Features]
* The get_object_basic_type_name Native API was added.
* The isa_by_name Native API was added.
* The is_type_by_name Native API was added.
* The new_stack_trace_by_name Native API was added.
* The new_stack_trace_raw_by_name Native API was added.
* The can_assign Native Runtime API was added.
* The following Native APIs were added.
void* (*new_object_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
void* (*new_object_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
void* (*new_muldim_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t element_dimension, int32_t length);
void* (*new_muldim_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t element_dimension, int32_t length);
void* (*new_mulnum_array_raw_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
void* (*new_mulnum_array_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t length);
int32_t (*has_interface_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* interface_basic_type_name);
[Incompatible Changes]
* The definition of the get_compile_type_name_raw Native API was changed.
- void* (*get_compile_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t type_dimension, int32_t type_flag);
+ void* (*get_compile_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t type_dimension, int32_t type_flag);
* The definition of the get_compile_type_name Native API was changed.
- void* (*get_compile_type_name)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t type_dimension, int32_t type_flag);
+ void* (*get_compile_type_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t type_dimension, int32_t type_flag);
[Warning]
* Many Native APIs will be changed in the nearly release.
The IDs of the symbol will not be published to the user.
Risky operations such as ID will be moved from Native APIs to Native Runtime APIs.
[Bug Fix]
* The bug that the dump operator does not work well weaken fields and elements.
0.988 2023-06-05
[New Features]
* The has_keys method in the Hash class is added.
* The replacement argument is added to the substr method in the Fn class.
static method substr : string ($string : string, $offset : int, $length : int = -1, $replacement : string = undef);
[Changed]
* An exception is thrown when the invocant of the instance method call is undef.
[Exception Message Improvement]
The following exception message is changed.
- "The implementation of the \"%s\" instance method defined in \"%s\" is not found.",
+ "The implementation of the \"%s\" method in the \"%s\" interface is not found.",
0.987 2023-05-29
[Changes]
* INIT block in precompile class is not precompiled.
0.986 2023-05-29
[Incompatible Changes]
* The syntax of the optional argument is changed. The before syntax is deprecated and will be removed.
[Before]
static method METHOD_NAME : RETURN_TYPE (ARG_NAME1 : ARG_TYPE1, ARG_NAME2 = DEFAULT_VALUE : ARG_TYPE2) {
}
[After]
static method METHOD_NAME : RETURN_TYPE (ARG_NAME1 : ARG_TYPE1, ARG_NAME2 : ARG_TYPE2 = DEFAULT_VALUE) {
}
0.985 2023-05-26
[Bug Fix]
* The bug that scopes does not work well in some cases.
0.984 2023-05-25
[Bug Fix]
* The bug that the allow statemenet throws segfault.
0.983 2023-05-25
[Bug Fix]
* The bug of array init reference count is fixed.
* The bug of anon method reference count is fixed.
* The bug of setting field reference count is fixed.
[Incompatible Changes]
* The refcnt operator is removed. The reference count is managed internally, not user land.
0.982 2023-05-24
[Document Changes]
* The "Execution Stack" heading is renamed to "Call Stack"
* The "Capture" heading is renamed to "Anon Method Field Definition".
[Incompatible Changes]
* Variable Length Argument is removed.
* The syntax of the capture is changed. The variable is passed by fields, not local variables.
0.981 2023-05-22
[Incompatible Changes]
* Capture syntax is changed. The before syntax is deprecated and will be removed.
[Before]
[$name : TYPE] method : int () {}
[After]
[has name : TYPE = $name] method : int () {}
0.980 2023-05-20
[Compilation Error Message Improvement]
* Some compilation error messages are improved.
[Internal Changes]
* Internal changes are done.
0.979 2023-05-19
[Compilation Error Changes]
* A compilation error message is changed. "The operand of the case statement must be an integer literal of the int type, a character litaral, or an enumeration value.".
[Internal Changes]
* The internal symbol names are cleaned up.
0.978 2023-05-16
[Incompatible Changes and Bug Fix]
* Fixed the bug that precidence of operators are wrong. The precidence must be the same as Perl.
[Compilation Error Improvement]
* The compiliation error message "The character %d in a signed int is not expected." in tokenization is output.
[Bug Fix]
* The bug that __END__ does not work well is fixed.
* The bug that variable declaration with logical operator does not work correctly.
[Internal Changes]
* Removed FREE_TMP op. The reference count is not correct now in source codes.
0.977 2023-05-11
[Incompatible Changes]
* The definition of the following native APIs are changed.
[Before]
void (*call_init_blocks)(SPVM_ENV* env);
[After]
int32_t (*call_init_blocks)(SPVM_ENV* env, SPVM_VALUE* stack);
[Before]
int32_t (*set_command_info_base_time)(SPVM_ENV* env, int64_t base_time);
[After]
int32_t (*set_command_info_base_time)(SPVM_ENV* env, SPVM_VALUE* stack, int64_t base_time);
[Before]
int32_t (*set_command_info_argv)(SPVM_ENV* env, void* obj_argv);
[After]
int32_t (*set_command_info_argv)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_argv);
[Before]
int32_t (*set_command_info_program_name)(SPVM_ENV* env, void* obj_program_name);
[After]
int32_t (*set_command_info_program_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_program_name);
[Before]
void (*cleanup_global_vars)(SPVM_ENV* env, SPVM_VALUE* stack);
[After]
void (*cleanup_global_vars)(SPVM_ENV* env);
[Changes]
* The simple constructor inline expansion is removed.
* The constant method inline expansion is removed.
* INIT blocks that is the super class or used classes are automatically called.
[Document Changes]
* The heading "Loading Class" is renamed to "use Statement".
* The heading "Allow Field Access" is renamed to "allow Statement".
* The heading "Interface Gurantee" is renamed to "interface Statement".
* The heading "Class Alias" is renamed to "alias Statement".
0.976 2023-05-09
[New Features]
* Added the Immutable::ByteList class.
* Added the Immutable::ShortList class.
* Added the Immutable::IntList class.
* Added the Immutable::LongList class.
* Added the Immutable::FloatList class.
* Added the Immutable::DoubleList class.
* Added the Immutable::StringList class.
0.975 2023-05-09
[Incompatible Changes]
* Removed the Mutable::Byte class.
* Removed the Mutable::Short class.
* Removed the Mutable::Int class.
* Removed the Mutable::Long class.
* Removed the Mutable::Float class.
* Removed the Mutable::Double class.
* Removed the deprecated ref operator.
* Removed the deprecated index_v2 method in the Fn class.
* Removed the deprecated rindex_v2 method in the Fn class.
0.974 2023-05-08
[New Features]
* Added the Mutable::Byte class.
* Added the Mutable::Short class.
* Added the Mutable::Int class.
* Added the Mutable::Long class.
* Added the Mutable::Float class.
* Added the Mutable::Double class.
[Incompatible Changes]
* The set_value method in the Byte class is removed. This class becomes immutable.
* The set_value method in the Short class is removed. This class becomes immutable.
* The set_value method in the Int class is removed. This class becomes immutable.
* The set_value method in the Long class is removed. This class becomes immutable.
* The set_value method in the Float class is removed. This class becomes immutable.
* The set_value method in the Double class is removed. This class becomes immutable.
0.973 2023-05-07
[Changes]
* Default value is passed to the arguments of native methods.
[Test Improvement]
* Tests of the floating point literal are added.
0.972 2023-05-04
[New Features]
* The die statemenet support undef operand.
die undef;
* The compile_type_name operator is added.
[Changes]
* The compile error message of yacc are uniformed.
* The indent of the stack trace of an exception is now 2.
* The default warn message is changed to "Warning".
* The default exception message is changed to "Error".
[Incompatible Changes and Breaking Binary Compatibility]
* The call_method Native API is renamed to call_method_raw and added the new call_method Native API.
[Deprecation and New Features]
* The ref operator is deprecated and will be removed.
The type_name operator is added. The type_name operator is the same as the ref operator.
0.971012 2023-05-03
[Incompatible Changes]
* The index method in the Fn is replaced with the index_v2 method.
* The rindex method in the Fn is replaced with the rindex_v2 method.
0.971011 2023-05-03
[Compiler Options Changes]
* Removed -D__USE_MINGW_ANSI_STDIO of the compiler option that is used by SPVM.xs and SPVM core sources
because MinGW maybe changes the beheivior of functions in stdio.h.
-std=c99 defines this definition automatically.
[Document Changes]
* The die operator becomes the die statemenet.
* void Returning Operator is merged into Operator.
* The doc of the warn operator is improved.
[Bug Fix]
* XS and SPVM source codes were compiled by C99 in 0.9702, but in face compiled by GNU C99 from now.
XS and SPVM source codes are compiled by C99 now.
* Fixed the bug that the module_name option of the link method in ExtUtils::CBuilder is not set correctly.
[Document Changes]
* "Undefined Type" is renamed to "undef Type".
[New Feature]
* Added operand less warn operator.
warn;
* The warn operator allow undef type.
warn undef;
[Changes]
* The die operator performet numeric to string convertion.
* The die operator can't receive undef.
* The binding INIT block to Perl is skipped.
* The die operator becomes the die statemenet.
[Compilation Error Message Changes]
* The format of compilation error messages is changed.
[Before]
MESSAGE at FILE_NAME line LINE
[After]
MESSAGE.
at FILE_NAME line LINE
[Exception Message Changes]
* The exception messages in Standard Modules ends with ".".
* The exception messages in Standard Modules ends with ".".
* The exception messages in operations ends with ".".
* The default die message is changed to "Died.".
* Fixed exception messages of the warn operator, print operator, make_read_only operator.
[Message Changes]
* The default warn message is changed to "Warned.".
[Warning Fix]
* Fixed warning that the binding subroutines are redefined when it is used twice.
[Internal Improvement]
* Use more snprintf instead of sprintf.
0.971010 2023-05-02
[Notice of Backward Compatibility Breaking]]
* The index_v2 method in the Fn class is added, and the definition and implementation of the index method in the Fn class will be replaced to the index_v2 method in the Fn class.
The index_v2 method in the Fn class will be removed.
[Before]
static method index : int ($string : string, $substring : string, $string_offset = 0 : int, $string_length = -1 : int);
[After]
static method index : int ($string : string, $substring : string, $begin = 0 : int, $end = -1 : int);
* The rindex_v2 method in the Fn class is added, and the definition and implementation of the rindex method in the Fn class will be replaced to the rindex_v2 method in the Fn class.
The rindex_v2 method in the Fn class will be removed.
[Before]
static method rindex : int ($string : string, $substring : string, $offset = 0 : int, $length = -1 : int);
[After]
static method rindex_v2 : int ($string : string, $substring : string, $end = -1 : int, $begin = 0 : int);
0.971009 2023-04-30
[Changes]
* Support semi colon less eval block.
eval { }
[Test Improvement]
* Added tests of the version string.
[Bug Fix]
* Fixed the bug that doing "use SPVM 'MyClass'" twice output warnings.
* Fixed the bug that type conversion from long to string doesn't work well.
[Bug Fix and Breaking Binary Compatibility]
* Fixed the bug that temporary buffer in (string) type cast is not initialized properly.
* Fixed the bug that temporary buffer for exeption of calling methodin is not initialized properly.
[Fix Wranings]
* Fix warning "too many arguments in call to 'SPVM_API_new_env_raw'"
0.971008 2023-04-27
[Test Fix]
* Fixed the version number tests.
0.971007 2023-04-25
[Incompatible Changes]
* The dismiss method in the Scope::Guard class is removed.
* The x and y field in the Point class becomes private.
* The z field in the Point3D class becomes private.
* The definitions of the following fields in the Point class are changed.
[Before]
has x : rw int;
has y : rw int;
[After]
has x : ro int;
has y : ro int;
* The definitions of the following fields in the Point3D class are changed.
[Before]
has z : rw int;
[After]
has z : ro int;
0.971006 2023-04-25
[Changes]
* A empty default INIT block is defined if the class don't have a INIT block.
0.971005 2023-04-25
[Incompatible Changes]
* The has_impl operator is renamed to the can operator, and the syntax is changed.
[Before]
has_impl OPERAND -> METHOD_NAME
[After]
OPERAND can METHOD_NAME
0.971004 2023-04-25
[Changes]
* Simplify the test of the version string in basic.t that is generated by the spvmdist command.
0.971003 2023-04-24
[New Features]
* Added the following Native APIs.
double (*get_spvm_version_number)(SPVM_ENV* env, SPVM_VALUE* stack);
const char* (*get_version_string)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_id);
double (*get_version_number)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t class_id);
* Added the following method in the Fn class.
static method get_spvm_version_number : double ();
[Incompatible Changes]
* The version string is not normalized.
* Renamed the following Runtime Native APIs.
[Before] int32_t (*get_class_version_id)(void* runtime, int32_t class_id);
[After] int32_t (*get_class_version_string_id)(void* runtime, int32_t class_id);
* Renamed the following Native APIs.
- const char* (*get_spvm_version)(SPVM_ENV* env, SPVM_VALUE* stack);
+ const char* (*get_spvm_version_string)(SPVM_ENV* env, SPVM_VALUE* stack);
[Compilation Error Message Improvement]
* Compilation error messages of the version string are improved.
0.971002 2023-04-22
[Makefile.PL Bug Fix]
* Fixed the bug that the version of SPVM can't get from SPVM.pm.
[Bug Fix]
* Fixed the bug that the Makefile.PL that is generated by the spvmdist command can't find module dependencies
0.971001 2023-04-21
[New Features]
* Added the following Native APIs.
const char* (*get_spvm_version)(SPVM_ENV* env, SPVM_VALUE* stack);
* Added the following method in the Fn class.
static method get_spvm_version : string ();
[Document Changes]
* "Reader" is renamed to "Getter Method"
* "Writer" is renamed to "Setter Method"
[Changes]
* An interface doesn't need to have a required method.
* Added the check that the version is defined to the Makefile.PL that is generated by the spvmdist command.
[Versioning Changes]
* The versioning rule is changed from 0.XXYY to 0.XXXYYY.
* The version of SPVM is got from lib/SPVM/Builder/include/spvm_api.h
[Incompatible Changes and Performane degration]
* Inline expansions of get/set field, get/set class variable, new method, constant method are disabled, so performance degration occurs.
This is for easiness of thread-safetiness implementation and improving binary compatibility.
The inline expansion of enumeration value is only performed.
* Wrongly working code is not worked.
if ($foo->set_x(3)) {
}
0.9707 2023-04-19
[New Features]
* Added the version declaration syntax.
class Foo {
version "1.001"
}
* Added the following Runtime Native API.
int32_t (*get_class_version_id)(void* runtime, int32_t class_id);
* Added the following methods in the Fn class.
static method get_version_string : string ($class_name : string);
static method get_version_number : double ($class_name : string)
[Changes]
* The spvmdist command with --resource outputs SPVM class file.
* The perl module file generated by the spvmdist command doesn't have a version declaration.
* The SPVM class file generated by the spvmdist command has a version declaration.
* The spvmdist command gets the version string from SPVM class file and set VERSTION of Makefile.PL to it.
[Bug Fix]
* Fixed the bug that a Makefile.PL that is generated by the spvmdist command doesn't contains author's name and email.
0.9706 2023-04-17
[Concept Changes]
* Call Stack is renamed to Excution Stack
because this is a not call stack.
[New Features]
* Added the disable_resource field in the SPVM::Builder::Config class.
* Added the file field in the SPVM::Builder::ObjectFileInfo class.
* Added the dynamic_lib_ccflags field in the SPVM::Builder::Config class and ccflags default is [].
[Incompatible Changes]
* Removed the set_std method in the SPVM::Builder::Config and added the std field.
* Renamed the static field in the SPVM::Builder::LibInfo to the is_static field.
* The to_string method in the SPVM::Builder::ObjectFileInfo gets to return the file field.
* Changed the beheivior of the quiet field in the SPVM::Builder::Config. A negative value means detecting quiet, not undef.
[Bug Fix]
* Fixed the bug that the to_string method in the SPVM::Builder::CompileInfo is not renamed to the to_cmd method.
[Document Improvement]
* SPVM::Document::NativeClass is improved.
0.9705 2023-04-13
[New Features]
* Added the SPVM_CC_QUIET environment variable.
* Added the class_name field in the SPVM::Builder::Config class.
* Added the to_arg method in the SPVM::Builder::LibInfo class.
[Exception Messages Changes]
* Improved English syntax.
[Compilation Error Messages Changes]
* Improved English syntax.
[Document Changes]
* Improved English syntax.
* SPVM::Document::Tutorial::Complex is moved to "Complex - SPVM Wiki"
* SPVM::Document::Tutorial is moved to "Tutorial - SPVM Wiki"
* SPVM::Document::Benchmark is moved to "Benchmark - SPVM Wiki"
[Changes]
* Getting environment variables is normalized.
* Removed the unused SPVM::Compiler::Util class.
[Incompatible Changes]
* The create_merged_ccflags method in the SPVM::Builder::CompileInfo is renamed to the create_compile_command_args.
* Removed the cc field in the SPVM::Builder::CompileInfo class.
* Removed the ccflags field in the SPVM::Builder::CompileInfo class.
* Removed the optimize field in the SPVM::Builder::CompileInfo class.
* Removed the include_dirs field in the SPVM::Builder::CompileInfo class.
* Removed the builder_include_dir field in the SPVM::Builder::CompileInfo class.
* Removed the ld field in the SPVM::Builder::LinkInfo class.
* Removed the ldflags field in the SPVM::Builder::LinkInfo class.
* Removed the dynamic_lib_ldflags field in the SPVM::Builder::LinkInfo class.
* Removed the ld_optimize field in the SPVM::Builder::LinkInfo class.
* Removed the output_type field in the SPVM::Builder::LinkInfo class.
* Removed the lib_dirs field in the SPVM::Builder::LinkInfo class.
* Removed the lib_infos field in the SPVM::Builder::LinkInfo class.
* Renamed the object_file_infos field in the SPVM::Builder::LinkInfo class to object_files.
* Removed the get_native_include_dir method in the SPVM::Builder::Config class and added the native_include_dir field in the SPVM::Builder::Config class.
* Removed the get_native_src_dir method in the SPVM::Builder::Config class and added the native_src_dir field in the SPVM::Builder::Config class.
* Renamed the create_merged_ldflags method in the SPVM::Builder::LinkInfo class to the create_link_command_args method.
* Renamed the to_string method in the SPVM::Builder::LinkInfo class to the to_cmd method.
* Renamed the to_string method in the SPVM::Builder::CompileInfo class to the to_cmd method.
* Removed the class_name field in the SPVM::Builder::LinkInfo class to the to_cmd method.
* Renamed the file_flag field in the SPVM::Builder::LibInfo to the is_abs field.
* Removed the config field in the SPVM::Builder::LibInfo to the is_abs field.
* The to_string method in the SPVM::Builder::LibInfo returned the name field.
* Renamed the static_name_cb in the SPVM::Builder::LibInfo class to the static_option_cb method.
[Bug Fix]
* Fixed the bug that the config field in the SPVM::Builder::LinkInfo class is not set.
0.9704 2023-04-11
[Prerequirement Changes]
* JSON::PP 2.27105+ is required.
[New Features]
* Added the --interface option to the spvmdist command.
* The module doc that is generated by the spvmdist command by --resource option outputs the doc for resources.
* Added the get_native_include_dir method in the SPVM::Builder::Config class.
* Added the get_native_src_dir method in the SPVM::Builder::Config class.
* Added the get_loaded_config_files in the SPVM::Builder::Config class.
* Added the load_config in the SPVM::Builder::Config class.
* Added the load_base_config in the SPVM::Builder::Config class.
* Added the load_mode_config in the SPVM::Builder::Config class.
* Added the before_compile_cbs fields in the SPVM::Builder::Config class.
* Added the before_each_compile_cbs fields in the SPVM::Builder::Config::Exe class.
* Added the before_link_cbs fields in the SPVM::Builder::Config class.
* Added the clone method in the SPVM::Builder::Config class.
* Added the config_bootstrap field in the SPVM::Builder::Config::Exe class.
* Added the config_spvm_core field in the SPVM::Builder::Config::Exe class.
* Added the create_default_config function in the SPVM::Builder::Util::API module.
* Added the -r, --required-resources option in the spvmcc command.
[Document Changes]
* Renamed SPVM::Document::NativeModule to SPVM::Document::NativeClass.
[Incompatible Canges]
* Removed the builder_include_dir field in the SPVM::Builder::Config.
* Removed the builder_src_dir field in the SPVM::Builder::Config.
* Removed the own_include_dir field in the SPVM::Builder::Config. Use native_include_dir method instead.
* Removed the own_src_dir field in the SPVM::Builder::Config. Use native_src_dir method instead.
* Removed the deprecated add_ccflags method in the SPVM::Builder::Config class.
* Removed the deprecated add_include_dirs method in the SPVM::Builder::Config class.
* Removed the deprecated add_ldflags method in the SPVM::Builder::Config class.
* Removed the deprecated add_lib_dirs method in the SPVM::Builder::Config class.
* Removed the deprecated add_libs method in the SPVM::Builder::Config class.
* Removed the deprecated add_static_libs method in the SPVM::Builder::Config class.
* Removed the deprecated add_source_files method in the SPVM::Builder::Config class.
* Removed the before_link method in the SPVM::Builder::Config class. Use add_before_link_cb instead.
* Removed the before_compile method in the SPVM::Builder::Config class. Use add_before_compile_cb instead.
* The all methods in SPVM product is renamed by the following rule
s/module_dir/class_path/g
s/modules/classes/g
s/module/class/g
s/Modules/Classes/g
s/MODULES/CLASSES/g
s/MODULE/CLASS/g
s/Module file/Class file/g
s/Module searching directries/Class paths/g
s/Module not found/Class not found/g
s/Module found/Class found/g
s#L<class\|/"Module"> file#class file#g
s/Loading Module/Loading Class/g
s/Load Module/Load Class/g
s/Loaded Modules/Loaded Classes/g
s/Module searching directries/Class paths/g
s/Module searching directries/Class paths/g
s/Module searching directries/Class paths/g
s/NativeModules/NativeClasses/g
s/Native Modules/Native Classes/g
s/Native modules/Native classes/g
s/native modules/native classes/g
s/NativeModule/NativeClass/g
s/Native Module/Native Class/g
s/Native module/Native class/g
s/native module/native class/g
* The --module-dir option in the spvmcc command is renamed to the --class-path.
* The regex that remove extention from config file is changed to (\.[^\.]+)?\.config$.
* The args field in the SPVM::Builder::Resource is renamed to the argv field.
0.9703 2023-04-07
[New Features]
* Added the following methods in the Fn class.
static method merge_options : object[] ($options1 : object[], $options2 : object[]);
static method object_to_int : int ($object : object);
static method object_to_long : long ($object : object);
* Added the following methods in the Sort class.
static method sort_options_asc : void ($options : object[]);
[Changes]
* Hash randomization doesn't use system time as the seed. Use the address of the Hash object.
[Incompatible Changes]
* Removed SPVM::Time. Use SPVM::Sys::Time instead.
* Removed SPVM::Time::Info. Use SPVM::Sys::Time::Tm instead.
0.9702 2023-04-07
[Changes]
* Improved the exception message when native source files are compiled.
[After]
"The $source_file file can't be compiled by the following command:\n@$cc_cmd\n"
* Even if the compilation of a native source file failed, the command is output to STDERR.
[Changes]
* SPVM and standard modules are compiled by C99, not GNU C99.
* The config file that is generated by the spvmcc command use new_c99 instead of new_gnu99.
[Deprecateion]
* (Deprecated) The methods of SPVM::Time will be implemented in SPVM::Sys::Time
(Deprecated) SPVM::Time::Info will be implemented in SPVM::Sys::Time
This is due to the decision not to include the ability to invoke system calls in the core of the SPVM.
0.9701 2023-04-03
[Version Number Fix]
* This release is 0.9701.
[Incompatible Changes]
* Renamed the global_before_compile field in the SPVM::Builder::Config::Exe to before_each_compile
[New Features and Deprecation]
Add the add_ccflag in the SPVM::Builder::Config class. the add_ccflags method is deprecated.
Add the add_include_dir in the SPVM::Builder::Config class. the add_include_dirs method is deprecated.
Add the add_ldflag in the SPVM::Builder::Config class. the add_ldflags method is deprecated.
Add the add_lib_dir in the SPVM::Builder::Config class. the add_lib_dirs method is deprecated.
Add the add_lib in the SPVM::Builder::Config class. the add_libs method is deprecated.
Add the add_static_lib in the SPVM::Builder::Config class. the add_static_libs method is deprecated.
Add the add_source_file in the SPVM::Builder::Config class. the add_source_files method is deprecated.
[Bug Fix]
* Fixed the bug that Makefile.PL that is generated by the spvmdist command doesn't output MIT license meta information.
[Incompatible Changes]
* Removed the deprecated new_pointer_raw, new_pointer, new_pointer_by_name Native API are removed.
* Removed the unused object_type_category_offset Native API is removed.
* Changed the ID of Native APIs. This breaks binary compatibility. This maybe the last ID changes(0 - 204) of Native APIs.
[Before]
0 class_vars_heap
1 object_header_size
2 object_weaken_backref_head_offset
3 object_ref_count_offset
4 object_basic_type_id_offset
5 object_type_dimension_offset
6 reserved6
7 object_flag_offset
8 object_length_offset
9 api
10 allocator
11 new_env_raw
12 free_env_raw
13 isa
14 elem_isa
15 runtime
16 reserved16
17 reserved17
18 reserved18
19 reserved19
20 get_basic_type_id
21 get_field_id
22 get_field_offset
23 get_class_var_id
24 get_class_method_id
25 get_instance_method_id
26 new_object_raw
27 new_object
28 new_byte_array_raw
29 new_byte_array
30 new_short_array_raw
31 new_short_array
32 new_int_array_raw
33 new_int_array
34 new_long_array_raw
35 new_long_array
36 new_float_array_raw
37 new_float_array
38 new_double_array_raw
39 new_double_array
40 new_object_array_raw
41 new_object_array
42 new_muldim_array_raw
43 new_muldim_array
44 new_mulnum_array_raw
45 new_mulnum_array
46 new_string_nolen_raw
47 new_string_nolen
48 new_string_raw
49 new_string
50 reserved50
51 reserved51
52 concat_raw
53 concat
54 new_stack_trace_raw
55 new_stack_trace
56 length
57 get_elems_byte
58 get_elems_short
59 get_elems_int
60 get_elems_long
61 get_elems_float
62 get_elems_double
63 get_elem_object
64 set_elem_object
65 get_field_byte
66 get_field_short
67 get_field_int
68 get_field_long
69 get_field_float
70 get_field_double
71 get_field_object
72 set_field_byte
73 set_field_short
74 set_field_int
75 set_field_long
76 set_field_float
77 set_field_double
78 set_field_object
79 get_class_var_byte
80 get_class_var_short
81 get_class_var_int
82 get_class_var_long
83 get_class_var_float
84 get_class_var_double
85 get_class_var_object
86 set_class_var_byte
87 set_class_var_short
88 set_class_var_int
89 set_class_var_long
90 set_class_var_float
91 set_class_var_double
92 set_class_var_object
93 get_pointer
94 set_pointer
95 call_method
96 get_exception
97 set_exception
98 get_ref_count
99 inc_ref_count
100 dec_ref_count
101 enter_scope
102 push_mortal
103 leave_scope
104 remove_mortal
105 is_type
106 is_object_array
107 get_object_basic_type_id
108 get_object_type_dimension
109 weaken
110 isweak
111 unweaken
112 alloc_memory_block_zero
113 free_memory_block
114
115 get_type_name_raw
116 get_type_name
117 new_env
118 free_env
119 memory_blocks_count
120 get_chars
121 die
122 new_object_by_name
123 reserved123
124 set_field_byte_by_name
125 set_field_short_by_name
126 set_field_int_by_name
127 set_field_long_by_name
128 set_field_float_by_name
129 set_field_double_by_name
130 set_field_object_by_name
131 get_field_byte_by_name
132 get_field_short_by_name
133 get_field_int_by_name
134 get_field_long_by_name
135 get_field_float_by_name
136 get_field_double_by_name
137 get_field_object_by_name
138 set_class_var_byte_by_name
139 set_class_var_short_by_name
140 set_class_var_int_by_name
141 set_class_var_long_by_name
142 set_class_var_float_by_name
143 set_class_var_double_by_name
144 set_class_var_object_by_name
145 get_class_var_byte_by_name
146 get_class_var_short_by_name
147 get_class_var_int_by_name
148 get_class_var_long_by_name
149 get_class_var_float_by_name
150 get_class_var_double_by_name
151 get_class_var_object_by_name
152 call_class_method_by_name
153 call_instance_method_by_name
154 get_field_string_chars_by_name
155 free_env_prepared
156 dump_raw
157 dump
158 reserved158
159 reserved159
160 get_instance_method_id_static
161 get_bool_object_value
162 cleanup_global_vars
163 make_read_only
164 is_read_only
165 is_array
166 is_string
167 is_numeric_array
168 is_mulnum_array
169 get_elem_size
170 new_array_proto_raw
171 new_array_proto
172 copy_raw
173 copy
174 shorten
175 has_interface
176 reserved176
177 reserved177
178 reserved178
179 print
180 print_stderr
181 init_env,
182 call_init_blocks
183 get_class_id
184 new_stack
185 free_stack
186 reserved186
187 new_memory_env
188 free_memory_env
189 get_memory_blocks_count_env
190 new_memory_stack
191 free_memory_stack
192 get_memory_blocks_count_stack
193 set_command_info_program_name
194 set_command_info_argv
195 get_class_id_by_name
196 strerror
197 new_string_array
198 get_args_stack_length
199 set_args_stack_length
200 dumpc
201 new_pointer_object_raw
202 new_pointer_object
203 new_pointer_object_by_name
204 get_elem_string
205 set_elem_string
206 reserved206
207 reserved207
208 is_class
209 is_pointer_class
210 reserved201
211 reserved211
212 reserved212
213 reserved213
214 reserved214
215 reserved215
216 reserved216
217 reserved217
218 reserved218
219 reserved219
220 reserved220
221 reserved221
222 reserved222
223 reserved223
224 reserved224
225 strerror_string
226 get_basic_type_id_by_name
227 get_field_id_static
228 get_args_stack_length
229 call_instance_method_static_by_name
230 get_method_id
231 strerror_nolen
232 strerror_string_nolen
233 get_compile_type_name_raw
234 get_compile_type_name
235 set_command_info_base_time
[After]
0 class_vars_heap
1 object_header_size
2 object_weaken_backref_head_offset
3 object_ref_count_offset
4 object_basic_type_id_offset
5 object_type_dimension_offset
6 object_flag_offset
7 object_length_offset
8 api
9 allocator
10 new_env_raw
11 free_env_raw
12 isa
13 elem_isa
14 runtime
15 get_basic_type_id
16 get_field_id
17 get_field_offset
18 get_class_var_id
19 get_class_method_id
20 get_instance_method_id
21 new_object_raw
22 new_object
23 new_byte_array_raw
24 new_byte_array
25 new_short_array_raw
26 new_short_array
27 new_int_array_raw
28 new_int_array
29 new_long_array_raw
30 new_long_array
31 new_float_array_raw
32 new_float_array
33 new_double_array_raw
34 new_double_array
35 new_object_array_raw
36 new_object_array
37 new_muldim_array_raw
38 new_muldim_array
39 new_mulnum_array_raw
40 new_mulnum_array
41 new_string_nolen_raw
42 new_string_nolen
43 new_string_raw
44 new_string
45 concat_raw
46 concat
47 new_stack_trace_raw
48 new_stack_trace
49 length
50 get_elems_byte
51 get_elems_short
52 get_elems_int
53 get_elems_long
54 get_elems_float
55 get_elems_double
56 get_elem_object
57 set_elem_object
58 get_field_byte
59 get_field_short
60 get_field_int
61 get_field_long
62 get_field_float
63 get_field_double
64 get_field_object
65 set_field_byte
66 set_field_short
67 set_field_int
68 set_field_long
69 set_field_float
70 set_field_double
71 set_field_object
72 get_class_var_byte
73 get_class_var_short
74 get_class_var_int
75 get_class_var_long
76 get_class_var_float
77 get_class_var_double
78 get_class_var_object
79 set_class_var_byte
80 set_class_var_short
81 set_class_var_int
82 set_class_var_long
83 set_class_var_float
84 set_class_var_double
85 set_class_var_object
86 get_pointer
87 set_pointer
88 call_method
89 get_exception
90 set_exception
91 get_ref_count
92 inc_ref_count
93 dec_ref_count
94 enter_scope
95 push_mortal
96 leave_scope
97 remove_mortal
98 is_type
99 is_object_array
100 get_object_basic_type_id
101 get_object_type_dimension
102 weaken
103 isweak
104 unweaken
105 alloc_memory_block_zero
106 free_memory_block
107 get_memory_blocks_count
108 get_type_name_raw
109 get_type_name
110 new_env
111 free_env
112 memory_blocks_count
113 get_chars
114 die
115 new_object_by_name
116 set_field_byte_by_name
117 set_field_short_by_name
118 set_field_int_by_name
119 set_field_long_by_name
120 set_field_float_by_name
121 set_field_double_by_name
122 set_field_object_by_name
123 get_field_byte_by_name
124 get_field_short_by_name
125 get_field_int_by_name
126 get_field_long_by_name
127 get_field_float_by_name
128 get_field_double_by_name
129 get_field_object_by_name
130 set_class_var_byte_by_name
131 set_class_var_short_by_name
132 set_class_var_int_by_name
133 set_class_var_long_by_name
134 set_class_var_float_by_name
135 set_class_var_double_by_name
136 set_class_var_object_by_name
137 get_class_var_byte_by_name
138 get_class_var_short_by_name
139 get_class_var_int_by_name
140 get_class_var_long_by_name
141 get_class_var_float_by_name
142 get_class_var_double_by_name
143 get_class_var_object_by_name
144 call_class_method_by_name
145 call_instance_method_by_name
146 get_field_string_chars_by_name
147 free_env_prepared
148 dump_raw
149 dump
150 get_instance_method_id_static
151 get_bool_object_value
152 cleanup_global_vars
153 make_read_only
154 is_read_only
155 is_array
156 is_string
157 is_numeric_array
158 is_mulnum_array
159 get_elem_size
160 new_array_proto_raw
161 new_array_proto
162 copy_raw
163 copy
164 shorten
165 has_interface
166 print
167 print_stderr
168 init_env
169 call_init_blocks
170 get_class_id
171 new_stack
172 free_stack
173 new_memory_env
174 free_memory_env
175 get_memory_blocks_count_env
176 new_memory_stack
177 free_memory_stack
178 get_memory_blocks_count_stack
179 set_command_info_program_name
180 set_command_info_argv
181 get_class_id_by_name
182 strerror
183 new_string_array
184 get_args_stack_length
185 set_args_stack_length
186 dumpc
187 new_pointer_object_raw
188 new_pointer_object
189 new_pointer_object_by_name
190 get_elem_string
191 set_elem_string
192 is_class
193 is_pointer_class
194 strerror_string
195 get_basic_type_id_by_name
196 get_field_id_static
197 items
198 call_instance_method_static_by_name
199 get_method_id
200 strerror_nolen
201 strerror_string_nolen
202 get_compile_type_name_raw
203 get_compile_type_name
204 set_command_info_base_time
* Changed the ID of Runtime Native APIs. This breaks binary compatibility. This maybe the last ID changes(0 - 83) of Runtime Native APIs.
[Before]
0 new_object
1 free_object
2 reserved2
3 get_opcodes
4 get_opcodes_length
5 get_runtime_codes
6 get_runtime_codes_length
7 get_classes_length
8 get_constant_string_id
9 get_constant_string_value
10 get_name
11 get_basic_type_id_by_name
12 get_basic_type_name_id
13 get_basic_type_class_id
14 get_basic_type_category
15 get_type_basic_type_id
16 get_type_dimension
17 get_type_stack_length
18 get_type_is_object
19 get_type_is_ref
20 get_class_id_by_name
21 get_class_name_id
22 get_class_module_rel_file_id
23 get_class_module_dir_id
24 get_class_is_anon
25 get_class_fields_base_id
26 get_class_fields_length
27 get_class_methods_base_id
28 get_class_methods_length
29 get_class_class_vars_base_id
30 get_class_class_vars_length
31 get_class_anon_methods_base_id
32 get_class_anon_methods_length
33 get_class_var_id_by_index
34 get_class_var_id_by_name
35 get_class_var_name_id
36 reserved36
37 get_class_var_class_id
38 get_field_id_by_index
39 get_field_id_by_name
40 get_field_name_id
41 get_field_type_id
42 reserved42
43 get_field_class_id
44 get_method_id_by_index
45 get_method_id_by_name
46 get_method_name_id
47 reserved47
48 get_method_return_type_id
49 get_method_class_id
50 get_method_is_class_method
51 get_method_is_anon
52 get_method_is_native
53 get_method_is_precompile
54 get_method_call_stack_byte_vars_length
55 get_method_call_stack_short_vars_length
56 get_method_call_stack_int_vars_length
57 get_method_call_stack_long_vars_length
58 get_method_call_stack_float_vars_length
59 get_method_call_stack_double_vars_length
60 get_method_call_stack_object_vars_length
61 get_method_call_stack_ref_vars_length
62 get_method_mortal_stack_length
63 get_method_opcodes_base_id
64 get_method_opcodes_length
65 get_method_args_base_id
66 get_method_args_length
67 get_arg_type_id
68 get_anon_method_method_id
69 get_native_method_address
70 set_native_method_address
71 get_precompile_method_address
72 set_precompile_method_address
73 object_header_size
74 object_weaken_backref_head_offset
75 object_ref_count_offset
76 object_basic_type_id_offset
77 object_type_dimension_offset
78 object_flag_offset
79 object_length_offset
80 get_allocator
81 build
82 get_class_parent_class_id
83 get_method_required_args_length
84 get_class_is_pointer
85 get_method_is_enum
86 get_type_flag
87 is_object_type
[After]
0 new_object
1 free_object
2 get_opcodes
3 get_opcodes_length
4 get_runtime_codes
5 get_runtime_codes_length
6 get_classes_length
7 get_constant_string_id
8 get_constant_string_value
9 get_name
10 get_basic_type_id_by_name
11 get_basic_type_name_id
12 get_basic_type_class_id
13 get_basic_type_category
14 get_type_basic_type_id
15 get_type_dimension
16 get_type_stack_length
17 get_type_is_object
18 get_type_is_ref
19 get_class_id_by_name
20 get_class_name_id
21 get_class_module_rel_file_id
22 get_class_module_dir_id
23 get_class_is_anon
24 get_class_fields_base_id
25 get_class_fields_length
26 get_class_methods_base_id
27 get_class_methods_length
28 get_class_class_vars_base_id
29 get_class_class_vars_length
30 get_class_anon_methods_base_id
31 get_class_anon_methods_length
32 get_class_var_id_by_index
33 get_class_var_id_by_name
34 get_class_var_name_id
35 get_class_var_class_id
36 get_field_id_by_index
37 get_field_id_by_name
38 get_field_name_id
39 get_field_type_id
40 get_field_class_id
41 get_method_id_by_index
42 get_method_id_by_name
43 get_method_name_id
44 get_method_return_type_id
45 get_method_class_id
46 get_method_is_class_method
47 get_method_is_anon
48 get_method_is_native
49 get_method_is_precompile
50 get_method_call_stack_byte_vars_length
51 get_method_call_stack_short_vars_length
52 get_method_call_stack_int_vars_length
53 get_method_call_stack_long_vars_length
54 get_method_call_stack_float_vars_length
55 get_method_call_stack_double_vars_length
56 get_method_call_stack_object_vars_length
57 get_method_call_stack_ref_vars_length
58 get_method_mortal_stack_length
59 get_method_opcodes_base_id
60 get_method_opcodes_length
61 get_method_args_base_id
62 get_method_args_length
63 get_arg_type_id
64 get_anon_method_method_id
65 get_native_method_address
66 set_native_method_address
67 get_precompile_method_address
68 set_precompile_method_address
69 object_header_size
70 object_weaken_backref_head_offset
71 object_ref_count_offset
72 object_basic_type_id_offset
73 object_type_dimension_offset
74 object_flag_offset
75 object_length_offset
76 get_allocator
77 build
78 get_class_parent_class_id
79 get_method_required_args_length
80 get_class_is_pointer
81 get_method_is_enum
82 get_type_flag
83 is_object_type
0.9699 2023-04-02
[License Change]
* SPVM license is changed to MIT License.
* The license that is generated by the spvmdist command is changed to MIT License.
0.9698 2023-03-31
[New Features]
* Added the new_muldim_array method in the SPVM::ExchangeAPI class.
* Added the SPVM::ExchangeAPI::Error class.
* Added the new_error method in the SPVM::ExchangeAPI class.
* The call_method method in the SPVM::ExchangeAPI class can get the error code thrown by a SPVM method.
my $ret = $api->call_method($invocant, $method_name, @args, $error);
* Added the new_object_array_len method in the SPVM::ExchangeAPI.
* Added the new_string_array_len method in the SPVM::ExchangeAPI.
* Added the new_any_object_array_len method in the SPVM::ExchangeAPI.
* Added the new_any_mulnum_array_len method in the SPVM::ExchangeAPI.
* Added the new_any_muldim_array_len method in the SPVM::ExchangeAPI.
* Added the __get_type_name method in the SPVM::ExchangeAPI.
* Added the is_object_type Runtime Native API.
[Document Fix]
* Fixed and improved the doc of the call_method in the SPVM::ExchangeAPI class.
* Added the doc of the new_byte_array_unsigned method in the ExchangeAPI class.
* Added the doc of the new_short_array_unsigned method in the ExchangeAPI class.
* Added the doc of the new_int_array_unsigned method in the ExchangeAPI class.
* Added the doc of the new_long_array_unsigned method in the ExchangeAPI class.
[Incompatible Changes]
* Don't support multi-dimensional array creation in the new_object_array method in the SPVM::ExchangeAPI class. Use the new_muldim_array method instead.
[Bug Fix]
* Fixed the bug that the new_object_array and new_object_array_raw Native API can recieve non object array type.
* Fixed the bug that the new_mulnum_array in the Exchange API can recieve non multi-numeric array type.
* Fixed the bug that the new_mulnum_array_len in the Exchange API can recieve non multi-numeric array type.
* Fixed the bug that the new_mulnum_array_from_bin in the Exchange API can recieve non multi-numeric array type.
* Fixed the bug that return value conversion of any object type retrun a SPVM::BlessedObject::Class object, not SPVM::BlessedObject::String when the object is a string.
0.9697 2023-03-23
[New Features]
* Added the following Native APIs.
=head2 get_elem_string
void* (*get_elem_string)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t index);
The same as L</"get_elem_object">.
=head2 set_elem_string
void (*set_elem_string)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t index, void* string);
The same as L</"set_elem_object">.
[Incompatible Changes]
* Changed the following native API implementation. This breaks binary compatibility.
=head2 new_muldim_array_raw
- void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
-Creates a new multi dimension array by specifying the basic type ID, the type dimension of the element, and the array length. The basic type ID must be the correct basic type ID got bu C<get_basic_type_id> function. the type dimension of the element must be less than or equals to 255.
+ void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t type_dimension, int32_t length);
+Creates a new multi-dimensional array by specifying the basic type ID and the type dimension, and the array length. The basic type ID must be the correct basic type ID got bu C<get_basic_type_id> function. the type dimension of the element must be less than or equals to C<255>.
=head2 new_muldim_array
- void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
+ void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t type_dimension, int32_t length);
* Removed the undocumented string_object_to_string and string_object_to_bin methods in the SPVM::ExchangeAPI method
and added a private _xs_to_bin method to SPVM::BlessedObject::String.
* Removed the undocumented array_length method in the SPVM::ExchangeAPI method
and added a private _xs_length method to SPVM::BlessedObject::Array
* Renamed the undocumented api method in the SPVM::BlessedObject method to __api.
* Removed the undocumented array_to_elems method in the SPVM::ExchangeAPI method
and added a private _xs_to_elems method to SPVM::BlessedObject::Array
* Removed the undocumented array_to_bin method in the SPVM::ExchangeAPI method
and added a private _xs_to_bin method to SPVM::BlessedObject::Array
* Removed the undocumented array_set method in the SPVM::ExchangeAPI method
and added a private _xs_set method to SPVM::BlessedObject::Array
* Removed the undocumented array_get method in the SPVM::ExchangeAPI method
and added a private _xs_get method to SPVM::BlessedObject::Array
[Document Improvement]
* Improved the doc of the SPVM::BlessedObject::String.
* Improved the doc of the SPVM::BlessedObject::Class.
* Improved the doc of the SPVM::BlessedObject::Array.
* Improved the doc of ExchangeAPI.
[Test Improvement]
* Improved the tests of the SPVM::BlessedObject::String.
* Improved the tests of the SPVM::BlessedObject::Class.
* Improved the tests of the SPVM::BlessedObject::Array.
* Improved the tests of ExchangeAPI.
[Exception Message Improvement]
* Improved the exception messages of the SPVM::BlessedObject::String.
* Improved the exception messages of the SPVM::BlessedObject::Class.
* Improved the exception messages of the SPVM::BlessedObject::Array.
[Bug Fix]
* Fixed the range checking bug of the set and get methods in the SPVM::BlessedObject::Array.
* Fixed the bug that the set method in the SPVM::BlessedObject::Array can be set non-assignable element.
0.9696 2023-03-22
[New Features]
* Added the dump method in the SPVM::ExchangeAPI class.
[Document Fix]
* Fixed the doc. The set_exception method in the SPVM::ExchangeAPI can't receive a string.
* Fixed the doc of the converson of the string Argument in SPVM::ExchangeAPI. Explicite using SvPV for conversion.
* Fixed the doc of the new_any_object_array. This was new_options wrongly.
[Exception Message Improvement]
* Improved the new_string method in the SPVM::ExchangeAPI class.
* Improved the new_string_from_bin method in the SPVM::ExchangeAPI class.
[Incompatible Changes]
* The new_string method in the SPVM::ExchangeAPI can receive undef.
* The new_string_from_bin method in the SPVM::ExchangeAPI can receive undef.
* The new_string_from_bin in the SPVM::ExchangeAPI is the same as the new_string method.
* Removed deprecated SPVM functions. This is now used from SPVM::Exchange::API.
- new_byte_array
- new_byte_array_unsigne
- new_byte_array_len
- new_byte_array_from_bin
- new_byte_array_from_string
- new_short_array
- new_short_array_unsigned
- new_short_array_len
- new_short_array
- new_short_array_unsigned
- new_short_array_len
- new_short_array_from_bin
- new_int_array
- new_int_array_unsigned
- new_int_array_len
- new_int_array_from_bin
- new_long_array
- new_long_array_unsigned
- new_long_array_len
- new_long_array_from_bin
- new_float_array
- new_float_array_len
- new_float_array_from_bin
- new_double_array
- new_double_array_len
- new_double_array_from_bin
- new_string
- new_string_from_bin
- new_object_array
- new_object_array_len
- new_any_object_array
- new_mulnum_array
- new_mulnum_array_from_bin
- new_string_array
- new_string_array_len
- get_exception
- set_exception
- get_memory_blocks_count
- call_method
- new_address_object
* Removed deprecated pointer_t class descriptor. This is now used as pointer descriptor.
* Removed the new_byte_array_from_string method in the SPVM::Exchange::API.
* Removed the new_string_from_bin method in the SPVM::Exchange::API.
* The new_byte_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_byte_array_unsigned in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_short_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_short_array_unsigned in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_short_array_from_bin in the SPVM::ExchangeAPI throw an exception when the binary is not divisible by 2.
* The new_short_array_from_bin in the SPVM::ExchangeAPI throw an exception when the array is undef.
* The new_int_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_int_array_unsigned in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_int_array_from_bin in the SPVM::ExchangeAPI throw an exception when the binary is not divisible by 4.
* The new_int_array_from_bin in the SPVM::ExchangeAPI throw an exception when the array is undef.
* The new_long_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_long_array_unsigned in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_long_array_from_bin in the SPVM::ExchangeAPI throw an exception when the binary is not divisible by 8.
* The new_long_array_from_bin in the SPVM::ExchangeAPI throw an exception when the array is undef.
* The new_float_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_float_array_from_bin in the SPVM::ExchangeAPI throw an exception when the binary is not divisible by 4.
* The new_float_array_from_bin in the SPVM::ExchangeAPI throw an exception when the array is undef.
* The new_double_array method in the SPVM::ExchangeAPI throw an exception when the element is a reference.
* The new_double_array_from_bin in the SPVM::ExchangeAPI throw an exception when the binary is not divisible by 8.
* The new_double_array_from_bin in the SPVM::ExchangeAPI throw an exception when the array is undef.
* The new_string_array method in the SPVM::ExchangeAPI throws an exception when the element is a reference.
[Bug Fix]
* Fixed the bugs that exchange API call_method can't receive string number such as "8" if the type is numeric.
* Fixed the bugs that exchange API call_method can't receive string number such as "8" if the type is numeric reference.
* Fixed the return type of the get_anon_class_names in the Runtime class
[Before]
method get_anon_class_names : string ($class_name : string);
[After]
method get_anon_class_names : string[] ($class_name : string);
[Changes]
* Added a warning when non-number-like value is passed to numeric argument in Excahnge API call_method.
* Added an exception to the new_options method in the SPVM::ExchangeAPI class.
The value of the $options must be a SPVM::BlessedObject object
[Exception Message Improvement]
* Improved exception messages in SPVM::ExchangeAPI.
0.9695 2023-03-05
[Incomaptible Changes]
* The instance method is always resolved in the runtime from the instance type.
* A child class must have the method that has the compatiblity of the same name method of its super class if it exists.
* Removed the Point::Interface class.
* Removed has_interfaces method in the Point class.
[Code Cleanup]
* Removed unused is_passed_to_method member variable in the struct spvm_op.
[Compilation Error Message Changes]
* Compilation error messages of calling method is changed.
0.9694 2023-03-03
[Test Improvement]
* Added the tests of C++ libstdc++.
* Added the tests of C++ tread.
[Bug Fix]
* Fixed the bug that the spvmcc command can't output compilation error messages.
0.9693 2023-03-03
[New Features]
* Added the $max optional argument is added to the rand method in the Fn class.
[Before]
static method rand : double ($seed : int*);
[After]
static method rand : double ($seed : int*, $max = 1 : int);
[Bug Fix]
* Fixed the bug that the next statement doesn't work well in the for statement for iterating.
[Changed]
* Added "\.tmp/" to MANIFEST.skip that is generated by the spvmdist command.
[Document Changes]
* Added the link to SPVM::Resource::RE2 to "CPAN Modules" of SPVM::Document::Modules
[CI Fix]
* Fixed windows-latest workflow for CI. This is not syncronized to windows-2019.
* Fixed new lines from CRLF to LF of the windows-latest.yml.
[Exception Message Improvement]
* Exception messages are changed in Exchange API.
[Before]
"Too few arguments passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
"Too many arguments passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
[After]
"Too few arguments are passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
"Too many arguments are passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
[Compilation Error Message Improvement]
* Compilation error messages are changed.
[Before]
"The length of the arguments passed to the \"%s\" %s method in the \"%s\" class must be less than or equal to %d at %s line %d"
"The length of the arguments passed to the \"%s\" %s method in the \"%s\" class must be at least %d at %s line %d"
[After]
"Too many arguments are passed to the \"%s\" method in the \"%s\" class at %s line %d"
"Too few arguments are passed to the \"%s\" method in the \"%s\" class at %s line %d"
0.9692 2023-02-20
[New Features]
* Added the new_options method in the SPVM::ExchangeAPI class.
* Added the set_command_info_base_time Native API.
int32_t (*set_command_info_base_time)(SPVM_ENV* env, int64_t base_time);
[Changes]
* The link to the CPAN page is added to README.md that is generated by the spvmdist command.
[Bug Fix]
* Fixed a bug that the SPVM::Builder::Util::API::create_make_rule_native function
used in Makefile.PL did not add files in Foo.native/include and Foo.native/src to dependencies.
[Incompatible Changes]
* Removed the set_command_info method in the Env class.
* Added the set_command_info_program_name method in the Env class.
* Added the set_command_info_argv method in the Env class.
* Added the set_command_info_base_time method in the Env class.
[Exception Message Improvement]
Improved exception messages.
[Before]
- "Too few arguments. The length of the arguments of the \"%s\" method in the \"%s\" class must be less than %d\n
- "Too many arguments. The length of the arguments of the \"%s\" method in the \"%s\" class must be more than %d\n %s at %s line %d\n
[After]
+ "Too few arguments passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
+ "Too many arguments passed to the \"%s\" method in the \"%s\" class\n %s at %s line %d\n"
0.9691 2023-02-08
[Incompatible Changes]
* The die Native API receives the last three arguemnt(the function name, the file name, the line number) instead of the last tow arguments(the file name, the line number).
[Before]
env->die(env, stack, "Error", __FILE__, __LINE__);
[After]
env->die(env, stack, "Error", __func__, __FILE__, __LINE__);
* The definitions of the following Native APIs are changed. A function name is needed. The function name can be got by __func__ macro in C language.
[Before]
- void* (*new_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* error, const char* file, int32_t line);
- void* (*new_pointer_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* file, int32_t line);
- void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int8_t value, int32_t* error, const char* file, int32_t line);
- void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int16_t value, int32_t* error, const char* file, int32_t line);
- void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t value, int32_t* error, const char* file, int32_t line);
- void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int64_t value, int32_t* error, const char* file, int32_t line);
- void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, float value, int32_t* error, const char* file, int32_t line);
- void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, double value, int32_t* error, const char* file, int32_t line);
- void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
- int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- int16_t (*get_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- int32_t (*get_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- int64_t (*get_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- float (*get_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- double (*get_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int8_t value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int16_t value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int64_t value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, float value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, double value, int32_t* error, const char* file, int32_t line);
- void (*set_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, void* value, int32_t* error, const char* file, int32_t line);
- int8_t (*get_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- int16_t (*get_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- int32_t (*get_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- int64_t (*get_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- float (*get_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- double (*get_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- void* (*get_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
- int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
- int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
- const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
- int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
- const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
- int32_t (*get_class_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* error, const char* file, int32_t line);
- void* (*new_pointer_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* file, int32_t line);
- int32_t (*get_basic_type_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t* error, const char* file, int32_t line);
- int32_t (*call_instance_method_static_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
[After]
+ void* (*new_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void* (*new_pointer_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int8_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int16_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int64_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, float value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, double value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, void* value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int16_t (*get_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*get_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int64_t (*get_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ float (*get_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ double (*get_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int8_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int16_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int64_t value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, float value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, double value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void (*set_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, void* value, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int8_t (*get_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int16_t (*get_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*get_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int64_t (*get_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int16_t (*get_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*get_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int64_t (*get_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ float (*get_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ double (*get_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void* (*get_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* func_name, const char* file, int32_t line);
+ int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* method_name, int32_t args_stack_length, const char* func_name, const char* file, int32_t line);
+ const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*get_class_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ void* (*new_pointer_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*get_basic_type_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t* error, const char* func_name, const char* file, int32_t line);
+ int32_t (*call_instance_method_static_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* func_name, const char* file, int32_t line);
0.9690 2023-02-08
[Test Improvement]
* Use __func__ in the tests of Native API.
[Exception Message Imprvement]
* Exchange APIs contains C function name in the exception stack trace.
* Improved the exception message when an undefined method is called from Exchange API.
[Before]
Can't use string ("SPVM::TestCase::Sys::FileTest") as a HASH ref while "strict refs" in use
[After]
The "not_defined_method" method in the "Int" class is not defined
[Changes]
* Removed a indent that is generated by the spvmdist command.
[Document Improvement]
* Updated CPAN module list in SPVM::Document::Modules.
=item * L<Cwd|SPVM::Cwd>
=item * L<Digest::MD5|SPVM::Digest::MD5>
=item * L<Digest::SHA|SPVM::Digest::SHA>
=item * L<Errno|SPVM::Errno>
=item * L<File::Basename|SPVM::File::Basename>
=item * L<File::Spec|SPVM::File::Spec>
=item * L<File::Spec|SPVM::File::Spec>
=item * L<FindBin|SPVM::FindBin>
=item * L<IO|SPVM::IO>
=item * L<IO::File|SPVM::IO::File>
=item * L<IO::Socket::INET|SPVM::IO::Socket::INET>
=item * L<IO::Select|SPVM::IO::Select>
=item * L<JSON|SPVM::JSON>
=item * L<Math|SPVM::Math>
=item * L<MIME::Base64|SPVM::MIME::Base64>
=item * L<MIME::QuotedPrint|SPVM::MIME::QuotedPrint>
=item * L<Regex|SPVM::Regex>
=item * L<Resource::Re2::V2022_06_01|SPVM::Resource::Re2::V2022_06_01>
=item * L<Resource::SocketUtil|SPVM::Resource::SocketUtil>
=item * L<Resource::Zlib::V1_2_11|SPVM::Resource::Zlib::V1_2_11>
=item * L<Sys|SPVM::Sys>
=item * L<Sys::FileTest|SPVM::Sys::FileTest>
=item * L<Sys::IO|SPVM::Sys::IO>
=item * L<Sys::Ioctl|SPVM::Sys::Ioctl>
=item * L<Sys::Poll|SPVM::Sys::Poll>
=item * L<Sys::Process|SPVM::Sys::Process>
=item * L<Sys::Select|SPVM::Sys::Select>
=item * L<Sys::Signal|SPVM::Sys::Signal>
=item * L<Sys::Socket|SPVM::Sys::Socket>
=item * L<Sys::Time|SPVM::Sys::Time>
=item * L<Sys::User|SPVM::Sys::User>
=item * L<Time::Local|SPVM::Time::Local>
=item * L<Unicode|SPVM::Unicode>
0.9689 2023-02-01
[New Features]
* Support the static method call in Exchange API
my $list = SPVM::FloatList->new([]);
$list->SPVM::FloatList::push(1);
* Added the utf8_length method in the Fn class.
static method utf8_length : int ($string : string)
Gets the length as a UTF-8 string from the $string, and returns it.
Examples:
# 3
my $utf8_length = Fn->utf8_length("あいう");
* Added the to_code_points method in the Fn class.
static method to_code_points : int[] ($string : string)
Converts the $string to the Unicode code points, and returns it.
* Added the to_utf8_chars method in the Fn class.
static method to_utf8_chars : string[] ($string : string);
Converts the $string to UTF-8 characters, and returns it.
* Added the utf8_substr method in the Fn class.
static method utf8_substr : string ($string : string, $utf8_offset : int, $utf8_length = -1 : int);
Gets the substring from the $string. The extracting range of the string is from the $utf8_offset to the position proceeded by the $utf8_length, and returns it.
=head2 to_utf8_chars
static method to_utf8_chars : string[] ($string : string);
Converts the $string to UTF-8 characters, and returns it.
[Exception Message Fix]
* Fixed the exception message of the call_method in the SPVM::ExchangeAPI class.
[Before]
The 2th argument of the "push" method in the "IntList" class must be a number
[After]
The 1th argument of the "push" method in the "IntList" class must be a number
[Doc Simplification]
* Argument names are not wraped by <code></code> tag.
0.9688 2023-01-30
[New Features]
* Added the equals_string_range method in the Fn class.
static method equals_string_range : int ($string1 : string, $string1_offset : int, $string2 : string, $string2_offset : int, $length : int)
[Bug Fix]
* Fixed the bug that the index method in the Fn class returned the wrong result.
{
my $string = "foo,bar,baz,,";
my $substring = ",";
my $offset = 8;
my $found_offset = Fn->index($string, $substring, $offset);
}
0.9687 2022-01-30
[New Features]
* Added the tr method in the Fn class.
static method tr : string ($string : string, $pattern : string, $replace : string);
0.9686 2022-01-27
[Imcompatible Changes]
* Default loaded modules are not binded to Perl implicitly. Explicit importing is needed.
use SPVM 'Int';
[Changes]
* Removed INIT block in the SPVM::Global module. The global API is initialized at runtime when SPVM::api() is called at first.
[Build Process Bug Fix]
* Fixed the bug that the version of SPVM can't be parsed in SPVM.pm file.
0.9685 2022-01-26
[Imcompatible Changes]
* The default beheivior of the split method in the Fn class becomes the same as the split function in Perl.
the split method supports 0 limit and the default becomes 0.
[Before]
static method split : string[] ($separator : string, $string : string, $limit = -1 : int);
[After]
static method split : string[] ($separator : string, $string : string, $limit = 0 : int);
* Removed undocumented temporary added the to_string method in the SPVM::BlessedObject::Array.
[New Features]
* Added the to_strings and to_bins method in the SPVM::BlessedObject::Array.
0.9684 2022-01-24
[New Features]
* Added the api function in the SPVM class.
* Added the feature that creating SVPM::ExchangeAPI object
* Added the SPVM::ExchangeAPI::Class class.
* Added the class method in the SPVM::ExchangeAPI.
* The compile method in the Compiler class support undef class name.
[Bug Fix]
* Fixed the bug that the build_runtime method in the Compiler class can't be called only after the compile method is called.
[Document Change]
* SPVM::Document::ExchangeAPI is rewritten by way to using the SVPM::ExchangeAPI object.
and its content is moved into the document of SPVM and SPVM::ExchangeAPI.
[Deprecation]
The following SPVM::xxx functions are deprecated. These functions will be removed in the future. Use the methods in the L<SPVM::ExchangeAPI> directly.
new_byte_array
new_byte_array_unsigne
new_byte_array_len
new_byte_array_from_bin
new_byte_array_from_string
new_short_array
new_short_array_unsigned
new_short_array_len
new_short_array_from_bin
new_int_array
new_int_array_unsigned
new_int_array_len
new_int_array_from_bin
new_long_array
new_long_array_unsigned
new_long_array_len
new_long_array_from_bin
new_float_array
new_float_array_len
new_float_array_from_bin
new_double_array
new_double_array_len
new_double_array_from_bin
new_string
new_string_from_bin
new_object_array
new_object_array_len
new_any_object_array
new_mulnum_array
new_mulnum_array_from_bin
new_string_array
new_string_array_len
get_exception
set_exception
get_memory_blocks_count
call_method
new_address_object
How to rewrite the code:
# Before
my $int_array = SPVM::new_int_array([1, 2, 3]);
# After
my $api = SPVM::api();
my $int_array = $api->new_int_array([1, 2, 3]);
[Incompatible Changes]
* The new_byte_array_from_string method in the SPVM::ExchangeAPI class doesn't perform C<utf8::encode>.
This method becomes the same as the new_byte_array_from_bin method.
[Document Bug Fix]
* Fixed the document bug that currently the methods in the SPVM::ExchangeAPI doesn't perform any encodeing/decoding using utf8::encode/utf8::decode
to create strings, but the doc of Exchange API remains this.
0.9683 2022-01-21
[New Features]
* Added the Compiler class.
* Added the Runtime class.
* Added the Env class.
* Added the Stack class.
[Exception Message Improvement]
* Exception messages are improved.
- "SPVM_BUILD_DIR environment variable must be set to build a $category method at runtime";
+ "The \"build_dir\" field must be defined to build a $category method at runtime. Perhaps the setting of the SPVM_BUILD_DIR environment variable is forgotten"; [After]
- "SPVM_BUILD_DIR environment variable must be set for link";
+ "The \"build_dir\" field must be defined to build the native module for the $category methods. Perhaps the setting of the SPVM_BUILD_DIR environment variable is forgotten";
[Changes]
The document of the module file that is generated by the spvmdist command is changed.
[Before]
=head1 Name
SPVM::$class_name - foo
=head1 Description
C<SPVM::$class_name> is the L<SPVM>'s C<$class_name> class.
[After]
=head1 Name
SPVM::$class_name - Short Description
=head1 Description
C<SPVM::$class_name> is the C<$class_name> class in L<SPVM> language.
[Document Changes]
* Added the "Executable Envrionment" heading to SPVM::Document::NativeAPI.
* Renamed the "Stack" heading to SPVM::Document::NativeAPI to "Call Stack".
0.9682 2022-01-18
[New Feature]
* Added get_class_name in the SPVM::BlessedObject::Class.
* Added the AUTOLOAD method in the SPVM::BlessedObject::Class to call methods dinamically.
* Added the default loaded Address class.
* Added the SPVM::new_address_object function.
[Internal Compatible Changes]
* The runtime field in the SPVM::Builder::CC is renamed to the at_runtime field.
* The build_runtime method in the SPVM::Builder::CC is renamed to the build_at_runtime method.
* The module_dirs method in the SPVM::Builder save the field to its instance instead of the compiler object.
* Removed the get_error_messages, print_error_messages, compile methods in the SPVM::Builder.
* Removed the print_error_messages in the SPVM::Builder::Compiler.
* Removed the builder accessor method in the SPVM::Builder::CC class.
* Moved the create_build_src_path method in the SPVM::Builder class to SPVM::Builder::Util.
* Moved the create_build_include_path method in the SPVM::Builder class to SPVM::Builder::Util.
* Moved the create_build_object_path method in the SPVM::Builder class to SPVM::Builder::Util.
* Moved the create_build_lib_path method in the SPVM::Builder class to SPVM::Builder::Util.
* SPVM::Builder::CC doesn't depend on SPVM::Builder.
* Removed the builder method in the SPVM::Builder::CC.
* Removed the build_dir method in the SPVM::Builder::Exe.
* Removed the compiler accessor method in the SPVM::Builder.
* The compile method in the SPVM::Builder::Compiler returns the success flag instead of the runtime
* Added the build_runtime method in the SPVM::Builder::Compiler.
* Removed the dynamic_lib_files field in the SPVM::Builder.
* Initialization is done in the INIT block.
[Incompatible Changes]
* Removed the prepare Runtime Native API. This method is called in the build Runtime Native API automatically.
* Removed the following method in the SPVM::Builder::API class.
sub compile;
sub get_error_messages;
sub get_class_names;
sub get_method_names;
sub build_shared_lib_dist_precompile;
sub build_shared_lib_dist_native;
* "use SPVM()" occurs runtime error. "use SPVM(MyClass) or "use SPVM" is valid.
* SPVM::ExchangeAPI::call_method doesn't need the class name of the first argument.
* A object is blessed to SPVM::BlessedObject::Class always.
* Changed the arguments of the SPVM::ExchangeAPI::call_method function of the instance method call.
[Before]
SPVM::ExchangeAPI::call_method ($BOOT_ENV, $BOOT_STACK, $class_name, $method_name, $int_obj, @rest_args);
[After]
SPVM::ExchangeAPI::call_method ($BOOT_ENV, $BOOT_STACK, $int_obj, $method_name, @rest_args);
[Bug Fix]
* Fixed the bug that segmentation fault occurs in the following codes.
use SPVM;
SPVM::get_memory_blocks_count();
my $obj_int = SPVM::ExchangeAPI::call_method(SPVM::GET_ENV(), SPVM::GET_STACK(), "Int", "new", 1);
my $value = $obj_int->value;
0.9681 2022-01-13
[New Features]
* Added the following Compiler Native APIs.
void (*clear_module_dirs)(SPVM_COMPILER* compiler);
[Incompative Changes]
* Rename the following Compiler Native APIs.
- int32_t* (*create_spvm_32bit_codes)(void* compiler, void* allocator);
+ int32_t* (*create_runtime_codes)(void* compiler, void* allocator);
* Rename the following Runtime Native APIs.
- int32_t* (*get_spvm_32bit_codes)(void* runtime);
+ int32_t* (*get_runtime_codes)(void* runtime);
- int32_t (*get_spvm_32bit_codes_length)(void* runtime);
+ int32_t (*get_runtime_codes_length)(void* runtime);
[Internal Compatible Changes]
* The SPVM runtime, env, stack that are used for Perl interpreter are automatically destructed by the destructors.
* Added SPVM::Builder::Runtime and the runtime is separated from SPVM::Builder
* Removed the stack field in the SPVM::Builder class.
* Removed the env field in the SPVM::Builder class.
* Removed the runtime field in the SPVM::Builder class.
* Added the $SPVM::INTERPRETER package variable.
* Added SPVM::Builder::Compiler and the compiler is separated from SPVM::Builder
* $SPVM::Builder is destructed after building the runtime.
0.9680 2022-01-07
[New Features]
* Added the pointer class desciptor. This is the same as the pointer_t descriptor.
* Added the following Native APIs.
+ void* (*new_pointer_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
+ void* (*new_pointer_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
+ void* (*new_pointer_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* file, int32_t line);
[Deprecation]
* The pointer_t descriptor is deprecated because pointer_t is not type. Use the pointer descriptor instead.
* The following Native APIs are deprecated.
+ void* (*new_pointer_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
+ void* (*new_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
+ void* (*new_pointer_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* error, const char* file, int32_t l [Incompatible Changes]
* Removed the following Native APIs because a pointer class can have fields as the language feature.
- void* (*new_pointer_with_fields_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
- void* (*new_pointer_with_fields)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
- void* (*new_pointer_with_fields_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t fields_length, int32_t* error, c
onst char* file, int32_t line);
- int32_t (*get_pointer_no_need_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void (*set_pointer_no_need_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t flag);
- int32_t (*get_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- void (*set_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t length);
- int32_t (*get_pointer_fields_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
- int8_t (*get_pointer_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- int16_t (*get_pointer_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- int32_t (*get_pointer_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- int64_t (*get_pointer_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- float (*get_pointer_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- double (*get_pointer_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- void* (*get_pointer_field_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
- void (*set_pointer_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int8_t value);
- void (*set_pointer_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int16_t value);
- void (*set_pointer_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int32_t value);
- void (*set_pointer_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int64_t value);
- void (*set_pointer_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, float value);
- void (*set_pointer_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, double value);
- void (*set_pointer_field_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, void* value);
0.9679 2022-01-06
[Cancel Revert]
* Cancel revert of 0.9678.
[Bug Fix]
* Fixed the bug that native methods can't be called in INIT block.
0.9678 2022-01-06
[Revert]
* Temporary reverted 0.9677 release because of breaking SPVM::SYS.
0.9677 2022-01-06
[Changes]
* Dynamic library files are loaded at run-time instead of compile-time.
[Bug Fix]
* Fixed the bug that the SPVM compiler is not released.
[Incompatible Changes]
* Changed the names of the following Compiler Native APIs.
- int32_t (*compile_spvm)(void* compiler, const char* class_name);
+ int32_t (*compile)(void* compiler, const char* class_name);
* Changed the names of the following String Buffer Native APIs.
- void* (*new_string_buffer_tmp)();
+ void* (*new_object)();
- void (*free_string_buffer)(void* string_buffer);
+ void (*free_object)(void* string_buffer);
* Changed the names of the following Precompile Native APIs.
- void* (*new_precompile)();
+ void* (*new_object)();
- void (*free_precompile)(void* precompile);
+ void (*free_object)(void* precompile);
* Changed the names of the following Allocator Native APIs.
- void* (*new_allocator)();
+ void* (*new_object)();
- void (*free_allocator)(void* allocator);
+ void (*free_object)(void* allocator);
* Changed the names of the following Compiler Native APIs.
- void* (*new_compiler)();
+ void* (*new_object)();
- void (*free_compiler)(void* compiler);
+ void (*free_object)(void* compiler);
* Changed the names of the following Runtime Native APIs.
- void* (*new_runtime)();
+ void* (*new_object)();
- void (*free_runtime)(void* runtime);
+ void (*free_object)(void* runtime);
* Changed the definitions of the following Native APIs.
- void (*cleanup_global_vars)(SPVM_ENV* env, SPVM_VALUE* stack);
+ void (*cleanup_global_vars)(SPVM_ENV* env);
- void (*call_init_blocks)(SPVM_ENV* env, SPVM_VALUE* stack);
+ void (*call_init_blocks)(SPVM_ENV* env);
- int32_t (*set_command_info_program_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_program_name);
+ int32_t (*set_command_info_program_name)(SPVM_ENV* env, void* obj_program_name);
- int32_t (*set_command_info_argv)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_argv);
+ int32_t (*set_command_info_argv)(SPVM_ENV* env, void* obj_argv);
* The program name and command line arguments are not used in INIT blocks.
* The main method of the program that is generated by the spvmcc command doesn't receive the program name and the command line arguments.
The program name can be get CommandInfo->PROGRAM_NAME.
The command line arguments can be get CommandInfo->ARGV.
[New Features]
* The pointer class can have fields.
* The object of the pointer class can be created by the new operator.
* The pointer class can inherit the parent class.
[Compilation Error Message Fix]
* Fixed the compilation error messages
[Before]
The class "%s" method
The instance "%s" method
[After]
The "%s" class method
The "%s" instance method
[Exception Message Improvement]
* Unified exception messages in Exchange API.
[Before]
%s basic type
%s field
%s class
%s method
[After]
"%s" basic type
"%s" field
"%s" class
"%s" method
[Memory Usage Degration]
* Internal object data has the native_object member variable. This size is the size of void*.
This is used for the pointer class.
0.9676 2022-01-03
[New Features]
* Added the following constant values of Native API.
1 SPVM_NATIVE_C_TYPE_FLAG_REF
2 SPVM_NATIVE_C_TYPE_FLAG_MUTABLE
* Added the following Native APIs.
void* (*get_compile_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t dimension, int32_t flag);
void* (*get_compile_type_name)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t dimension, int32_t flag);
* Added the get_method_is_enum Runtime Native API.
int32_t SPVM_API_RUNTIME_get_method_is_enum(SPVM_RUNTIME* runtime, int32_t method_id);
* Added the following Runtime Native APIs.
int32_t (*get_type_flag)(SPVM_RUNTIME* runtime, int32_t type_id);
[Warning Fix]
* Fixed the following warning on FreeBSD.
warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!strcmp(dumpc, "undef") == 0) {
[Incompatible Bug Fix]
* Fixed the return type of the SPVM object the get_type_name_raw and get_type_name native API.
[Before]
byte[]
[After]
string
* Fixed the return type of the SPVM object the concat_raw and concat native API.
[Before]
byte[]
[After]
string
* Fixed the return type of the SPVM object the new_string_nolen_raw and new_string_nolen native API.
[Before]
byte[]
[After]
string
[Test Improvement]
* Added the tests of get_class_parent_class_id, get_method_required_args_length, get_method_required_args_length Runtime Native APIs.
[Improve Exception Messages]
* Improve the exception messages of Exchange API.
0.9675 2022-12-27
[Improve Exception Messages]
* Improve the exception messages of Exchange API.
[Bug Fix]
* Fixed the bug that the method call of Exchange API can't call the method of the super class.
0.9674 2022-12-26
[Changes]
* Renamed t/use_spvm_class.t to t/basic.t that is generated by the spvmdist command.
* Renamed a variable name %spvm_requires to %configure_and_runtime_requires of Makefile.PL that is generated by the spvmdist command.
0.9673 2022-12-25
[New Features]
* Added the is_compile_type operator.
0.9672 2022-12-24
[Performance Degration]
* Degrates the performance of the method call, field access, class variable access, basic type access, class access in precompiled source
because the ids are cached only at the beginning of the precompiled function, not static memory.
[Changes]
* Precompiled methods become reentrant because method IDs, field IDs, class variable IDs, basic type IDs, class IDs are not saved to static variables.
0.9671 2022-12-23
[Changes]
* Added the following codes to the Makefile.PL that is generated by the spvmdist command.
unless (\$meta) {
# Do something such as environment check.
}
* SPVM is added to CONFIGURE_REQUIRES and PREREQ_PM of the Makefile.PL that is generated by the spvmdist command.
SPVM is needed for both generating Makefile.PL and the runtime.
I think only CONFIGURE_REQUIRES is good, but I found the cpanm command didn't see CONFIGURE_REQUIRES in a case,
so both specifications is safe.
* .gitignore that is generated by the spvmdist command is changed.
[Before]
blib/*
Makefile
Makefile.old
MYMETA.yml
MYMETA.json
pm_to_blib
.spvm_build
t/.spvm_build
core.*
core
SPVM-*
*.bak
*.BAK
*.tmp
*.o
*.bs
[After]
/blib/*
/Makefile
/Makefile.old
/MYMETA.yml
/MYMETA.json
/pm_to_blib
/SPVM-*
.spvm_build
core.*
core
*.bak
*.BAK
*.tmp
*.o
*.bs
[Improved Exception Messages]
* Improve an exception message.
[After]
The DynaLoader::dl_load_file function failed:Can't load the \"$dynamic_lib_file\" file for the $category methods in the $class_name class: $dl_error
0.9670 2022-12-22
[New Features]
* Added the following Native APIs.
const char* (*strerror_nolen)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t errno_value);
void* (*strerror_string_nolen)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t errno_value);
[Bug Fix]
* Fixed the bug that the length of the return vlaue of the strerror_string Native API was wrong.
[Test Fix]
* Fixed the testging bug that the tests of the strerror and strerror_string Native APIs don't work.
0.9669 2022-12-21
[Incompatible Changes]
* Renamed the create_precompile_source Precompile Native API to build_class_source.
[New Features]
* Added the build_method_source Precompile Native API.
void (*build_method_source)(void* precompile, void* string_buffer, const char* class_name, const char* method_name);
This generates the source for JIT compile.
* Added the get_method_id Native API.
int32_t (*get_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name);
[Performance Improvement]
* Improve the performance of the method call, field access, class variable access, basic type access, class access in precompiled source
because the ids are cached at the beginning of the precompiled function.
0.9668 2022-12-20
[New Features]
* Added the items native API.
int32_t (*items)(SPVM_ENV* env, SPVM_VALUE* stack);
* Added the items operator.
* Added the call_instance_method_static_by_name native API.
int32_t (*call_instance_method_static_by_name)(SPVM_ENV* env, SPVM_VALUE* stack,
const char* class_name, const char* method_name, int32_t args_stack_length,
const char* file, int32_t line);
[Incompatible Bug Fix]
* Fixed the bug that env->get_args_stack_length returns the legnth of arguments, not the stack length of the arguments.
[Compatible Internal Changes]
* The CALL_METHOD opcode is separated into CALL_CLASS_METHOD, CALL_INSTANCE_METHOD_STATIC, and CALL_INSTANCE_METHOD_DYNAMIC.
[Incompatible Changes]
* Changed the name of the call_spvm_method native API to call_method.
* Removed the following native APIs. Use call_method instead.
- int32_t (*call_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
- int32_t (*call_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
* Changed the definition of the call_instance_method_by_name native API.
0.9667 2022-12-17
[New Features]
* Added the following native API.
int32_t (*get_field_id_static)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* field_name);
[Changes]
* Getting and setting field in precompiled modules use env->get_field_id_static instead of env->get_field_id.
[Incompatible Changes]
* Renamed the following runtime native APIs
- void* object_header_byte_size;
+ void* object_header_size;
* Renamed the following native APIs
- void* object_header_byte_size;
+ void* object_header_size;
- int32_t (*get_elem_byte_size)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
+ int32_t (*get_elem_size)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
* Changed the definitions of the following native APIs.
- int32_t (*get_basic_type_id)(SPVM_ENV* env, const char* basic_type_name);
- int32_t (*get_field_id)(SPVM_ENV* env, void* object, const char* field_name);
- int32_t (*get_field_offset)(SPVM_ENV* env, int32_t field_id);
- int32_t (*get_class_var_id)(SPVM_ENV* env, const char* class_name, const char* class_var_name);
- int32_t (*get_class_method_id)(SPVM_ENV* env, const char* class_name, const char* method_name);
- int32_t (*get_instance_method_id)(SPVM_ENV* env, void* object, const char* method_name);
+ int32_t (*get_basic_type_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name);
+ int32_t (*get_field_id)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name);
+ int32_t (*get_field_offset)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t field_id);
+ int32_t (*get_class_var_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name);
+ int32_t (*get_class_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name);
+ int32_t (*get_instance_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name);
[Runtime Exception Message Improvement]
* Improved exception messages.
[After]
"The %s field is not found"
"The %s class method in the %s class is not found"
"The object must be defined"
"The type dimension of the object must be equal to 0"
"The %s instance method is not found in the %s class or its super class"
"The %s class is not loaded"
"The type dimension of the object must be equal to 0"
"The %s field is not found in the %s class or its super class"
"The %s class variable in the %s class is not found" q
0.9666 2022-12-16
[Bug Fix]
* Fixed the bug that SPVM don't work on Windows Server 2020/2022.
[Prerequirement Changes]
* SPVM needs ExtUtils::CBuilder 0.280236+.
[New Features]
* The string in the config mode allow "-"
Foo.my_mode-azAZ09.config
[Changes]
* Added --no-build-spvm-modules option to Makefile.PL that is generated by the spvmdist command.
* Added --meta option to Makefile.PL that is generated by the spvmdist command.
* Changed the Name, Usage, Description that is generated by the spvmdist command.
=head1 Name
SPVM::$class_name - foo
=head1 Description
C<SPVM::$class_name> is the L<SPVM>'s C<$class_name> class.
=head1 Usage
use $class_name;
* Removed cpanm from MANIFEST.skip that is generated by the spvmdist command.
[Build Process Improvement]
* Added --no-build-spvm-modules option to Makefile.PL.
* Added --no-precompile-tests option to Makefile.PL.
* Added --meta option to Makefile.PL.
[Test Improvement]
* Solo tests use spvmcc command.
0.9665 2022-12-10
[Internal Compatible Changes]
* Renamed spvm_api_vm.h to spvm_vm.h.
* Renamed spvm_api_vm.c to spvm_vm.c.
* Renamed SPVM_API_VM_call_spvm_method_vm to SPVM_VM_call_spvm_method.
* Added SPVM_API_call_spvm_method_vm.
* Renamed spvm_inline_api.h to spvm_implement.h
* Shared opcodes in vm codes and precompiled codes.
* The CALL_METHOD opcode is separated to the logic of calling method and return the value.
[Runtime Performance Degration]
* For the reason that shared opcodes in vm codes and precompiled codes, the runtime performance maybe degraded a little.
[Compililation Performance Improvement]
* The compilation time of the precompied codes are improved.
[Compililation File Size Improvement]
* The compilation file size of the precompied codes become small.
[Bug Fix]
* Fixed the potential bug of the stack of the arguments and return value.
[Improve Excepion Messages]
* Improved exception messages.
[After]
"The %s basic type is not found",
"The %s field is not found",
"The %s class variable in the %s class is not found",
"The %s class is not found",
"The %s method in the %s class is not found",
0.9664 2022-12-01
[Internal Compatible Changes]
* Added spvm_inline_api.h and use it in spvm_api.c, spvm_api_vm.c, spvm_precompile.c
[New Features]
* Added the new syntax of the octal escape character and 3digit is allowed.
\1, \2, \3, \4, \5, \6, \7, \8, \9
\377
\o{377}
[Imcompatible New Features and Changes]
* \1, \2, \3, \4, \5, \6, \7, \8, \9 is not raw escape character.
This becomes the part of the octal escape character.
0.9663 2022-11-29
[Changes]
* Add the following file to the MANIFEST.SKIP that is generated by the spvmdist command.
^cpanm$
* The version of the module file that is generated by the spvmdist command is not outputted
when the --only-lib-files option is specified.
[New Features]
* Added the follwoing opitonal arguments to the push method in the StringBuffer class.
[Before]
method push : void ($string : string);
[After]
method push : void ($string : string, $offset = 0 : int, $length = -1 : int);
And added the some exceptions. See the doc.
Adds a C<$string> from the C<$offset> to the position proceeded by the C<$length> after the end of the string in the string buffer.
Exceptions:
The C<$string> must be defined.
The C<$offset> must be greater than or equal to 0.
The C<$offset> + C<$length> must be less than or equal to the length of the C<$string>.
* Added the follwoing method to the Hash class.
method clone : Hash ();
method to_array : object[] ($sort = 0 : int);
method delete_or_default_byte : int ($key : string, $default : int);
method delete_or_default_short : int ($key : string, $default : int);
method delete_or_default_int : int ($key : string, $default : int);
method delete_or_default_long : long ($key : string, $default : long);
method delete_or_default_float : float ($key : string, $default : float);
method delete_or_default_double : double ($key : string, $default : double);
method delete_or_default_string : string ($key : string, $default : string);
method delete_or_default : object ($key : string, $default : object);
* Added the Cloneable interface to tha Hash class.
[Imcompatible New Features]
* The octal escape character \000 and \o{} is added.
\000 got to be interpreted \o{00} instead of "\0" . "00"
* The \0 becomes the feature of the octal escape character.
[Internal Non-Affecting Changes]
* Fixed the bug that MyTest::compile_ok and MyTest::compile_not_ok can't create the multi-level directory.
[Compilation And Runtime Error Message Improvement]
* Notation of class names, method names, field names, and class variable names in compilation and runtime error messages has been unified.
The \"%s\" class.
The \"%s\" method.
The \"%s\" instance method.
The \"%s\" class method.
The \"%s\" field.
The \"%s\" class variable.
[Exception Error Message Improvement]
* The notation of the arguments in the exception messages is unified.
The $foo
[Bug Fix]
* Fixed the bug that the interface of the parent class is not recognized.
* Fiexd the bug that The checking of the required method doesn't see the super class
https://github.com/yuki-kimoto/SPVM/issues/246
* Fixed the bug that when searching field doesn't found in the super class, eternal loop occur.
https://github.com/yuki-kimoto/SPVM/issues/249
* The bug that original exception is overwriten by destructor exception
https://github.com/yuki-kimoto/SPVM/issues/253
* Fixed the bug that Windows I/O binary mode in spvmcc command.
[Incompatible Bug Fix]
* Fixed the bug that Format->sprintf "%p" output differs Linux and Windows. "0x" is added to the output on Windows.
[New Features]
* The method can have the more optional arguments than the arguments of the interface method.
* Added the following methods to the Fn class.
static method sizeof_native_int : int ();
static method sizeof_native_pointer : int ();
static method init_string : void ($string : mutable string, $ascii_code = 0 : int, $offset = 0 : int, $length = -1 : int);
[Imcompatible Changes]
* The field in the "foo" class with the same name as the "MyClass\" field in the parent class cannot be defined.
[Exception Message Improvement]
Improve the following message.
[Before]
(An exception thrown in the DESTROY method is converted to a warning)%s\n
[After]
[The following exception is coverted to a warning because it is thrown in the DESTROY method]\n%s\n
0.9662 2022-11-15
[Incompatible Changes]
* The reader of the byte and short field return the int type.
This is because public API is good to return the int type regardless of the internal field type byte/short.
* The writer of the byte and short field recieve the int type.
This is because public API is good to receive the int type regardless of the internal field type byte/short.
* The reader of the byte and short class variable return the int type.
This is because public API is good to return the int type regardless of the internal class variable type byte/short.
* The writer of the byte and short class variable return the int type.
This is because public API is good to return the int type regardless of the internal class variable type byte/short.
* The definitions of the following method in the Fn class is changed. This is because all of the argument and return type is from byte/short to int.
- static method BYTE_MAX : byte ()
+ static method BYTE_MAX : int ()
- static method BYTE_MIN : byte ()
+ static method BYTE_MIN : int ()
- static method INT16_MAX : short ()
+ static method INT16_MAX : int ()
- static method INT16_MIN : short ()
+ static method INT16_MIN : int ()
- static method INT8_MAX : byte ()
+ static method INT8_MAX : int ()
- static method INT8_MIN : byte ()
+ static method INT8_MIN : int ()
- static method SHORT_MAX : short ()
+ static method SHORT_MAX : int ()
- static method SHORT_MIN : short ()
+ static method SHORT_MIN : int ()
- static method UBYTE_MAX : byte ()
+ static method UBYTE_MAX : int ()
- static method UINT16_MAX : short ()
+ static method UINT16_MAX : int ()
- static method UINT8_MAX : byte ()
+ static method UINT8_MAX : int ()
- static method USHORT_MAX : short ()
+ static method USHORT_MAX : int ()
- static method replace_chars : void ($string : mutable string, $from_ch : byte, $to_ch : byte)
+ static method replace_chars : void ($string : mutable string, $from_ch : int, $to_ch : int)
- precompile static method replace_chars : void ($string : mutable string, $from_ch : byte, $to_ch : byte) {
+ precompile static method replace_chars : void ($string : mutable string, $from_ch : int, $to_ch : int) {
* The definitions of the following method in the Array class is changed. This is because all of the argument and return type is from byte/short to int.
- static method memset_byte : void ($array : byte[], $element : byte, $offset = 0 : int, $length = -1 : int)
+ static method memset_byte : void ($array : byte[], $element : int, $offset = 0 : int, $length = -1 : int)
- static method memset_short : void ($array : short[], $element : short, $offset = 0 : int, $length = -1 : int)
+ static method memset_short : void ($array : short[], $element : int, $offset = 0 : int, $length = -1 : int)
- precompile static method memset_byte : void ($array : byte[], $element : byte, $offset = 0 : int, $length = -1 : int) {
+ precompile static method memset_byte : void ($array : byte[], $element : int, $offset = 0 : int, $length = -1 : int) { [After]
- precompile static method memset_short : void ($array : short[], $element : short, $offset = 0 : int, $length = -1 : int) {
+ precompile static method memset_short : void ($array : short[], $element : int, $offset = 0 : int, $length = -1 : int) {
* The definitions of the following method in the Byte class is changed. This is because all of the argument and return type is from byte/short to int.
- static method new : Byte ($value : byte)
+ static method new : Byte ($value : int)
* The definition of the following method in the Short class is changed. This is because all of the argument and return type is from byte/short to int.
- static method new : Short ($value : short);
+ static method new : Short ($value : int);
* The definitions of the following method in the ByteList class is changed. This is because all of the argument and return type is from byte/short to int.
- method get : byte ($index : int)
+ method get : int ($index : int)
- method insert : void ($index : int, $value : byte)
+ method insert : void ($index : int, $value : int)
- method pop : byte ()
+ method pop : int ()
- method push : void ($value : byte)
+ method push : void ($value : int)
- method remove : byte ($index : int)
+ method remove : int ($index : int)
- method set : void ($index : int, $value : byte)
+ method set : void ($index : int, $value : int)
- method shift : byte ()
+ method shift : int ()
- method unshift : void ($value : byte)
+ method unshift : void ($value : int)
* The definitions of the following method in the ShortList class is changed. This is because all of the argument and return type is from byte/short to int.
- method get : byte ($index : int)
+ method get : int ($index : int)
- method insert : void ($index : int, $value : byte)
+ method insert : void ($index : int, $value : int)
- method pop : byte ()
+ method pop : int ()
- method push : void ($value : byte)
+ method push : void ($value : int)
- method remove : byte ($index : int)
+ method remove : int ($index : int)
- method set : void ($index : int, $value : byte)
+ method set : void ($index : int, $value : int)
- method shift : byte ()
+ method shift : int ()
- method unshift : void ($value : byte)
+ method unshift : void ($value : int)
* The definitions of the following method in the Sort class is changed. This is because all of the argument and return type is from byte/short to int.
- static method sort_byte : void ($array : byte[], $comparator : Comparator::Byte, $offset = 0 : int, $length = -1 : int)
+ static method sort_byte : void ($array : byte[], $comparator : Comparator::Int, $offset = 0 : int, $length = -1 : int)
- Sort->sort_byte($array, method : int ($a : byte, $b : byte) { return $a <=> $b; }, $offset, $length);
+ Sort->sort_byte($array, method : int ($a : int, $b : int) { return $a <=> $b; }, $offset, $length);
- static method sort_short : void ($array : short[], $comparator : Comparator::Short, $offset = 0 : int, $length = -1 : int)
+ static method sort_short : void ($array : short[], $comparator : Comparator::Int, $offset = 0 : int, $length = -1 : int)
- Sort->sort_short($array, method : int ($a : short, $b : short) { return $b <=> $a; }, $offset, $length);
+ Sort->sort_short($array, method : int ($a : int, $b : int) { return $b <=> $a; }, $offset, $length);
[After]
* The definitions of the following method in the Hash class is changed. This is because all of the argument and return type is from byte/short to int.
- get_byte : byte ($name : string)
+ get_byte : int ($name : string)
- get_short : short ($name : string)
+ get_short : int ($name : string)
- set_byte : void ($name : string, $value : byte)
+ set_byte : void ($name : string, $value : int)
- set_short : void ($name : string, $value : short)
+ set_short : void ($name : string, $value : int)
* The definitions of the following method in the StringBuffer class is changed. This is because all of the argument and return type is from byte/short to int.
- method push_char : void ($char : byte)
+ method push_char : void ($char : int)
* Removed the Comparator::Byte class. Use Comparator::Int instead.
* Removed the Comparator::Short class. Use Comparator::Int instead.
[Document Changes]
* Renamed the conceptual name "Accessor Method" to "Accessor".
* Renamed the conceptual name "Getting Method" to "Reader".
* Renamed the conceptual name "Setting Method" to "Writer".
[Internal Changes]
* Renamed SPVM_OP_build_convert to SPVM_OP_build_type_cast.
0.9661 2022-11-14
[Incompatible Changes]
* Removed the following undocumented native APIs.
void* (*get_field_object_by_name_v2)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
void (*set_field_object_by_name_v2)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
* The definitions of the following native APIs are changed.
This is because SPVM supported inheritance, but the corresponding native APIs of getting/setting fields din't support inheritance.
[Before]
int32_t (*get_field_id)(SPVM_ENV* env, const char* class_name, const char* field_name);
void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int8_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int16_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int64_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, float value, int32_t* error, const char* file, int32_t line);
void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, double value, int32_t* error, const char* file, int32_t line);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
int16_t (*get_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
int32_t (*get_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
int64_t (*get_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
float (*get_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
double (*get_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
[After]
int32_t (*get_field_id)(SPVM_ENV* env, void* object, const char* field_name);
void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int8_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int16_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int64_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, float value, int32_t* error, const char* file, int32_t line);
void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, double value, int32_t* error, const char* file, int32_t line);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int8_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int16_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int64_t value, int32_t* error, const char* file, int32_t line);
void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, float value, int32_t* error, const char* file, int32_t line);
void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, double value, int32_t* error, const char* file, int32_t line);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
int16_t (*get_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
int32_t (*get_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
int64_t (*get_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
float (*get_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
double (*get_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* field_name, int32_t* error, const char* file, int32_t line);
0.9660 2022-11-08
[Incompatible Changes]
* The chomp and chompr method in the Fn class removes "\r\n", not only "\n".
0.9659 2022-10-28
[Test Improvement]
* Added the tests of opcodes.
[Internal Changes without Effects]
* Renamed SPVM_OPCODE_C_ID_INIT_UNDEF to SPVM_OPCODE_C_ID_INIT_OBJECT
* Removed SPVM_OPCODE_C_ID_MOVE_UNDEF because it is the same as SPVM_OPCODE_C_ID_INIT_OBJECT.
* Renamed SPVM_OPCODE_C_ID_TYPE_CONVERSION_CONDITIONAL_xxx to SPVM_OPCODE_C_ID_BOOL_CONVERSION_xxx.
* Renamed SPVM_OPCODE_C_ID_NEW_MULTI_ARRAY to SPVM_OPCODE_C_ID_NEW_MULDIM_ARRAY.
[Changes]
* The reference type can be used in the == and != operator.
* The reference type can be used in bool conversion such as "if ($ref) { }"
[Incompatible Changes]
* In Windows the stdout, stderr, stdin of the executable file that is generated by spvmcc command becomes binary mode.
The following codes are added to the main function of the executable file.
#ifdef _WIN32
_setmode(stdout, _O_BINARY);
_setmode(stderr, _O_BINARY);
_setmode(stdin, _O_BINARY);
#endif
The document is added to SPVM::Document::Language.
=head1 Standard IO
C<stdin>, C<stdout>, C<stderr> in C<C language> is set to the binary mode on all systems.
This means the escape character of the string literal C<"\n"> is not coverted to C<"\r\n"> when it is got from C<stdin> and it is printed to C<stdout> and C<stderr>.
C<stdin>, C<stdout>, C<stderr> can be changed to the text mode using the L<native module|SPVM::Document::NativeModule>, but don't do that.
0.9658 2022-10-26
[New Features]
* Added the say operator.
[Test Improvement]
* Added the test numbers to the test directories.
* Added the test of the type assignability.
* Added the test of the type castability.
[Internal Changes with No Effects]
* Use SPVM_TYPE_equals more.
[Bug Fix]
* Fixed the bug that a compilation error occured when (string[]) type cast from string[] type.
* Fixed the bug that the type cast from from string type to numeric type is allowed.
0.9657 2022-10-21
[Changes]
* Changed a warning message when an exception is thrown in the DESTROY method.
[Before]
(in cleanup)...
[After]
(An exception thrown in the DESTROY method is converted to a warning)...
* The Hash class uses siphash-1-3 as the hash function instead of MurmurHash.
[New Features]
* Added the following native APIs.
int32_t (*get_pointer_no_need_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_no_need_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t flag);
int32_t (*get_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t length);
0.9656 2022-10-19
[New Features]
* Added the Scope::Guard class.
[Document Improvement]
* Improved and fixed the doc of the "Anon Method" in SPVM::Document::Language.
0.9655 2022-10-12
[Bug Fix With Incompatible Changes]
* The return types of the following methods in the Time::Info class. This change will probably not break existing code.
[Before]
method set_tm_sec : int ($sec : int);
method set_tm_min : int ($min : int);
method set_tm_hour : int ($hour : int);
method set_tm_mday : int ($mday : int);
method set_tm_mon : int ($mon : int);
method set_tm_year : int ($year : int);
method set_tm_wday : int ($wday : int);
method set_tm_yday : int ($yday : int);
method set_tm_isdst : int ($isdst : int);
[After]
method set_tm_sec : void ($tm_sec : int);
method set_tm_min : void ($tm_min : int);
method set_tm_hour : void ($tm_hour : int);
method set_tm_mday : void ($tm_mday : int);
method set_tm_mon : void ($tm_mon : int);
method set_tm_year : void ($tm_year : int);
method set_tm_wday : void ($tm_wday : int);
method set_tm_yday : void ($tm_yday : int);
method set_tm_isdst : void ($tm_isdst : int);
[Document Bug Fix]
* Fixed the document bugs that getter method names are wrong in the Time::Info class.
[Before]
method sec : int ();
method min : int ();
method hour : int ();
method mday : int ();
method mon : int ();
method year : int ();
method wday : int ();
method yday : int ();
method isdst : int ();
[After]
method tm_sec : int ();
method tm_min : int ();
method tm_hour : int ();
method tm_mday : int ();
method tm_mon : int ();
method tm_year : int ();
method tm_wday : int ();
method tm_yday : int ();
method tm_isdst : int ();
[Document Inprovemeth]
* Improved the doc of the Time::Info class.
0.9654 2022-10-05
[New Features]
* Added the replace_chars method to the Fn class.
static method replace_chars : void ($string : mutable string, $from_ch : byte, $to_ch : byte)
* Added the get_basic_type_id_by_name native API.
int32_t (*get_basic_type_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* basic_type_name, int32_t* error, const char* file, int32_t line);
[Bug Fix]
* Fixed the bug that the void returning method can be assigned and a segfault occured.
* Fixed the bug that when the class that has the super class was assigned to a non-assignable type, a segfault occured.
* Fixed the bug that when the instance method is not found in its super classes, a infinity loop occured.
[Compilation Error Messgae Changes]
* A compilation error message was changed.
[Before]
The instance method "port" is not defined in the class "Sys::Socket::Sockaddr::In" or the super classes
[After]
The instance method "port" is not defined in the class "Sys::Socket::Sockaddr::In" or its super classes
* A compilation error message was changed.
[Before]
The field "port" is not defined in the class "Sys::Socket::Sockaddr::In" or the super classes
[After]
The field "port" is not defined in the class "Sys::Socket::Sockaddr::In" or its super classes
[Bug Fix With Incompatible Changes]
* Fixed the bug that the method could be defined by the different legnth of the arguments of the method in the interface.
* Fixed the bug that the method could be defined as a class method although the method is defined in the interface.
* Fixed the bug that the differnet type of the argument of the method defined in the interface could be defined.
* Fixed the bug that the invalid return type of the method defined in the interface could be defined.
[Specification Changes]
* If a method defined in the interface is defined, the method must have the same type of arguments as the method defined in the interface, and the return value must be able to be assigned without an implicite conversion to the method defined in the interface. Otherwise a compilation error will occur.
[Incompatible Changes]
* Changed the name of the following method in the Cloneable interface.
[Before]
required method cloneable_clone : object ()
[After]
required method clone : object ()
* Changed the definition of the following method in the Point class.
[Before]
method cloneable_clone : object ()
[After]
method clone : Point ()
* Changed the definition of the following method in the Point3D class.
[Before]
method cloneable_clone : object ()
[After]
method clone : Point3D ()
0.9653 2022-09-27
[New Features]
* Add the strerror_string native API.
void* (*strerror_string)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t errno_value, int32_t length);
[Document Improvement]
* Add the link from SPVM::Document::LanguageSpecification to SPVM::Document::Language
* Add the following CPAN modules to SPVM::Document::Modules
=item * L<SPVM::Sys> - System Calls
=item * L<SPVM::Sys::IO> - System Calls for File IO
=item * L<SPVM::Sys::FileTest> - File Test
=item * L<SPVM::Sys::Socket> - System Calls for Sockect
=item * L<SPVM::Sys::User> - System Calls for User Manipulation
=item * L<SPVM::Sys::Process> - System Calls for Process
0.9652 2022-09-09
[Incompatible Changes]
* The numeric class(Byte, Short, Int, Long, Float, Double) become mutable.
* The Byte class becomes mutable.
[Before]
has value : ro byte;
[After]
has value : rw byte;
* The Short class becomes mutable.
[Before]
has value : ro short;
[After]
has value : rw short;
* The Int class becomes mutable.
[Before]
has value : ro int;
[After]
has value : rw int;
* The Long class becomes mutable.
[Before]
has value : ro long;
[After]
has value : rw long;
* The Float class becomes mutable.
[Before]
has value : ro float;
[After]
has value : rw float;
* The Double class becomes mutable.
[Before]
has value : ro double;
[After]
has value : rw double;
0.9651 2022-09-08
[New Features]
* Add the FILE_NAME variable to the native module file that is generated by spvmdist.
static const char* FILE_NAME = "Foo.c";
* Add the shorten_null_char method to the Fn class.
static method shorten_null_char : void ($string : mutable string)
Shorten the string just before the first null character C<\0>.
If null characters is not found, do nothing.
The string must be defined. Otherwise an exception will occur.
B<Example:>
my $message = (mutable string)copy "foo\0bar";
# "foo"
my $message_shoten = Fn->shorten_null_char($message);
* Add the init method to the Point class
=head2 init
protected method init : Point ($x = 0 : int, $y = 0 : int)
Initialize L</"x"> and L</"y">.
* Add the init method to the Point3D class
=head2 init
protected method init : Point3D ($x = 0 : int, $y = 0 : int, $z = 0 : int)
Initialize L</"x">, L</"y">, and L</"z">.
[Test Changes]
* Move shorten test from string.t to module/Fn.t
[Incompatible Changes]
* Rename the pointable method in the Point class to the has_interfaces method.
* Rename the pointable method in the Pointable class to the has_interfaces method.
* Rename Pointable class to the Point::Interface class.
0.9650 2022-09-02
[Incompatible Changes]
* Rename the following methods in Time::Info
[Before]
native method sec : int ();
native method min : int ();
native method hour : int ();
native method mday : int ();
native method mon : int ();
native method year : int ();
native method wday : int ();
native method yday : int ();
native method hour : int ();
native method mday : int ();
native method mon : int ();
native method year : int ();
native method wday : int ();
native method yday : int ();
native method isdst : int ();
native method set_sec : int ($sec : int);
native method set_min : int ($min : int);
native method set_hour : int ($hour : int);
native method set_mday : int ($mday : int);
native method set_mon : int ($mon : int);
native method set_year : int ($year : int);
native method set_wday : int ($wday : int);
native method set_yday : int ($yday : int);
native method set_isdst : int ($isdst : int);
[After]
native method tm_sec : int ();
native method tm_min : int ();
native method tm_hour : int ();
native method tm_mday : int ();
native method tm_mon : int ();
native method tm_year : int ();
native method tm_wday : int ();
native method tm_yday : int ();
native method tm_isdst : int ();
native method set_tm_sec : int ($sec : int);
native method set_tm_min : int ($min : int);
native method set_tm_hour : int ($hour : int);
native method set_tm_mday : int ($mday : int);
native method set_tm_mon : int ($mon : int);
native method set_tm_year : int ($year : int);
native method set_tm_wday : int ($wday : int);
native method set_tm_yday : int ($yday : int);
native method set_tm_isdst : int ($isdst : int);
* Remove the following deprecated methods.
Point->new_xy
Point3D->new_xyz
Array->copy_range_byte
Array->copy_range_double
Array->copy_range_float
Array->copy_range_int
Array->copy_range_long
Array->copy_range_object
Array->copy_range_object_address
Array->copy_range_short
Array->copy_range_string
Array->copy_range_string_address
Array->copy_range_object
Array->copy_range_object_address
Array->copy_range_short
Array->copy_range_string
Array->copy_range_string_address
Array->memcpy_object
Array->memcpy_string
Array->memmove_object
Array->memmove_string
Fn->get_next_code_point
Fn->look_next_code_point
Fn->index_len
Fn->rindex_len
Fn->split_limit
Fn->trim_ascii_space
Fn->index_len
Fn->rindex_len
Fn->split_limit
Fn->trim_ascii_space
[Compilation Error Message Improvement]
* The following compilation error message is changed.
[Before]The narrowing type conversion can't be performed in %s at %s line %d
[After]The implicite narrowing conversion from \"%s\" to \"%s\" in %s is not allowed at %s line %d
[Incompatible Document Changes]
* Rename the heading.
[Before]String Type
[After]string Type
[Before]Integer Promotional Type Conversion
[After]Integer Promotional Conversion
[Before]Numeric Widening Type Conversion
[After]Numeric Widening Conversion
[Before]Numeric Narrowing Type Conversion
[After]Numeric Narrowing Conversion
[Before]Binary Numeric Type Conversion
[After]Binary Numeric Conversion
[Before]Numeric-to-String Type Conversion
[After]Numeric-to-String Conversion
[Before]String-to-byte[] Type Conversion
[After]String-to-byte[] Conversion
[Before]byte[]-to-String Type Conversion
[After]byte[]-to-string Conversion
[Before]Boxing Type Conversion
[After]Boxing Conversion
[Before]Unboxing Type Conversion
[After]Unboxing Conversion
[Before]Conditional Type Conversion
[After]Bool Conversion
0.9649 2022-08-31
[Bug Fix]
* Fix the bug that the destcutor changes the original return vlaue.
[Document Improvement]
* Improve the doc of the unary plus operator.
* Improve the doc of the unary minus operator.
* Improve many parts. The numeric widening type conversion is replaced with the integer promotional type conversion.
* Improve the doc of the switch statement.
* Improve the doc of "Loop Syntax".
* Improve the doc of "return Statement".
* Improve the doc of "Empty Statement".
* Improve the doc of "Operator Statement".
[Document Fix]
* Fix the type of the heading "Character Literal".
0.9648 2022-08-30
[New Features]
* Add Pointable module.
* Add Pointable interface to Point class.
* Add the following method to Point class.
required method pointable : int ();
[Incompatible Changes]
* All method call that is called from the class is resolved in compilation time.
[Before]
# (0, 0, 0)
my $point3d = Point3D->new(1, 2, 3);
my $point = (Point)$point3d;
$point->clear;
[After]
# (0, 0, 3) because $point is Point class.
my $point3d = Point3D->new(1, 2, 3);
my $point = (Point)$point3d;
$point->clear;
Please rewrite to
# (0, 0, 0).
my $point3d = Point3D->new(1, 2, 3);
my $point = (Point)$point3d;
$point->(Pointable)->clear;
0.9647 2022-08-29
[New Features]
* Add "protected" attribute.
* Implement the compilation error check of "protected" class.
* Implement the compilation error check of "protected" method.
* Implement the compilation error check of "protected" class variable.
* Implement the compilation error check of "protected" field.
[Bug Fix]
* Fix the bug that private field is searched.
[Imcompative Changes]
* SUPER:: qualifier calls the method of the super class of the current class, instead of the instance.
* The field searching of the field access is used for the class and the super classes.
* Remove the following API.
int32_t (*get_instance_method_id_super)(SPVM_ENV* env, void* object, const char* method_name);
[Changes]
* The definition of the fields are changes in Point class.
[Before]
has x : rw int;
has y : rw int;
[After]
has x : rw protected int;
has y : rw protected int;
* The definition of the fields are changes in Point3D class.
[Before]
has z : rw int;
[After]
has z : rw protected int;
* Allow the field definition the name is the same as the super class.
[Compilation Error Messages Improvement]
* Improve the following compilation error message.
[Before]
The object can't be created from the private class
[After]
The object of the private class "Int" can't be created from the current class "MyClass"
* Improve the following compilation error message.
[Before]
The private method "foo" in the class "MyClass2" can't be called
[After]
The private method "foo" of the class "MyClass2" can't be called from the current class "MyClass"
* Improve the following compilation error message.
[Before]
The private class variable "$MyClass2::FOO" can't be accessed
[After]
The private class variable "$FOO" of the class "MyClass2" can't be accessed from the current class "MyClass"
* Improve the following compilation error message.
[Before]
The private field "x" in the class "MyClass2" can't be accessed
[After]
The private field "x" in the class "MyClass2" can't be accessed from the current class "MyClass"
[Test Improvement]
* Add "protected" tests.
* Fix inheritance tests.
[Internal Changes Without Effect]
* Change the definition of the following function.
[Before]
int32_t SPVM_OP_is_allowed(SPVM_COMPILER* compiler, SPVM_OP* op_class_current, SPVM_OP* op_class_dist);
[After]
int32_t SPVM_OP_is_allowed(SPVM_COMPILER* compiler, SPVM_CLASS* class_current, SPVM_CLASS* class_dist);
* Add SPVM_OP_CHECKER_can_access.
* Add SPVM_ATTRIBUTE_C_ID_UNKNOWN.
* Rename SPVM_OP_build_has to SPVM_OP_build_field.
* Add compile_ok, compile_ok_file to MyTest.pm.
* Add merged_fields_original_offset to spvm_class.c and set it.
* Rename tmp_merged_fields to merged_fields of spvm_class.h.
0.9646 2022-08-29
[New Features]
* Add the following native APIs.
void* (*new_pointer_with_fields)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
void* (*new_pointer_with_fields_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
void* (*new_pointer_with_fields_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t fields_length, int32_t* error, const char* file, int32_t line);
int32_t (*is_class)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*is_pointer_class)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_pointer_fields_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int8_t (*get_pointer_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
int16_t (*get_pointer_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
int32_t (*get_pointer_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
int64_t (*get_pointer_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
float (*get_pointer_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
double (*get_pointer_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
void* (*get_pointer_field_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index);
void (*set_pointer_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int8_t value);
void (*set_pointer_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int16_t value);
void (*set_pointer_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int32_t value);
void (*set_pointer_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, int64_t value);
void (*set_pointer_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, float value);
void (*set_pointer_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, double value);
void (*set_pointer_field_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_index, void* value);
* The pointer class can inherit a pointer class.
* DESTROY method can be called as a instance method.
* The child class inherits the destructor of the parent class if the destructor of the current class doesn't eixst.
[Test Improvement]
* Add tests of pointer fields native APIs.
[Bug Fix]
* Fix the bug that native API new_pointer_with_fields_raw can't set the length of the fields.
[Needed Resource Changes]
* The pointer class need the following memory because of the feature that any information can be saved.
[Before]
(intptr_t)env->object_header_byte_size + sizeof(void*) * 2;
[After]
(intptr_t)env->object_header_byte_size + sizeof(SPVM_VALUE) * 2;
[Internal Changes Without Effect]
* Add the following functions to spvm_api.c
SPVM_OBJECT* SPVM_API_new_pointer_with_fields(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
SPVM_OBJECT* SPVM_API_new_pointer_with_fields_by_name(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t fields_length, int32_t* error, const char* file, int32_t line);
SPVM_OBJECT* SPVM_API_new_pointer_with_fields_raw(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer, int32_t fields_length);
* Add the following functions to spvm_api.c
int32_t SPVM_API_get_pointer_fields_length(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object);
int8_t SPVM_API_get_pointer_field_byte(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
int16_t SPVM_API_get_pointer_field_short(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
int32_t SPVM_API_get_pointer_field_int(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
int64_t SPVM_API_get_pointer_field_long(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
float SPVM_API_get_pointer_field_float(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
double SPVM_API_get_pointer_field_double(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
void* SPVM_API_get_pointer_field_pointer(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index);
void SPVM_API_set_pointer_field_byte(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, int8_t value);
void SPVM_API_set_pointer_field_short(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, int16_t value);
void SPVM_API_set_pointer_field_int(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, int32_t value);
void SPVM_API_set_pointer_field_long(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, int64_t value);
void SPVM_API_set_pointer_field_float(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, float value);
void SPVM_API_set_pointer_field_double(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, double value);
void SPVM_API_set_pointer_field_pointer(SPVM_ENV* env, SPVM_VALUE* stack, SPVM_OBJECT* object, int32_t field_index, void* value);
0.9645 2022-08-26
[Incompatible Changes]
* Remove the following native APIs. These are added 0.9640(2022-08-16)
int32_t (*check_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*enable_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*disable_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t length);
void* (*get_pointer_any_info)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_any_info)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* any_info);
0.9644 2022-08-26
[Document Changes]
* Add heading "Conditional Branch".
* Add heading "Loop Syntax".
* Reorder a heading. "void Reterning Operator" is moved after "Operator".
* Reorder headding. The following headding is moved after "Loop Syntax".
"Empty Statement"
"Operator Statement"
"void Returning Operator Statement"
* Improve multi-dimentional array representation from [][]... to []...[]
* Improve the doc of if Statement
* Improve the doc of elsif Statement
* Improve the doc of else Statement
* Improve the doc of unless Statement
* Add the "Integral Type Within int" heading
Integral Type Within int
The integral type within int is the integral type within the int type.
In other words, the integral types within int are the byte type, the short type, and the int type.
* Add the heading "Integer Promotional Type Conversion"
* Rename the heading "String Creating Operator" to "new_string_len Operator".
* Rename the heading "Enumeration Call" to "Getting Enumeration Value".
* Rename the following heading and the content.
[Before]
"Enumeration Descriptors"
"Method Descriptors"
"Field Descriptor"
"Class Variable Descriptor"
"Class Descriptor"
[After]
"Enumeration Attributes"
"Method Attributes"
"Field Attribute"
"Class Variable Attribute"
"Class Attribute"
[Document Fix]
* The heading "Integral Type" is renamed to "Integer Type". This was my English mistake.
And the contens.
[Test Improvement]
* Cleanup tests for statements.
if.t unless.t -> conditional_branch.t
* Add the test of the compilation error of the new_string_len operator
[Exception Message Improvement[
* The following exception message is improved.
[Before]
The private method \"%s\" can't be called at %s line %d
[After]
The private method \"%s\" in the class \"%s\" can't be called
* The following exception message is improved.
[Before]
The array length specified by the new operator must be the int type
[After]
The array length specified by the new operator must be an integer type within int
* The following exception message is improved.
[Before]
The condition of the switch statement must be the int type
[After]
The condition of the switch statement must be an integer type within int
[Internal Changes Without Effect]
* Add the following functions to "spvm_basic_type.c"
int32_t SPVM_BASIC_TYPE_is_integral_type_within_int(SPVM_COMPILER* compiler, int32_t basic_type_id);
* Add the following functions to "spvm_type.c"
int32_t SPVM_TYPE_is_integral_type_within_int(SPVM_COMPILER* compiler, int32_t basic_type_id, int32_t dimension, int32_t flag);
* "integral_type" is replaced to "integer_type".
* "integer_type_except_for_long" is replaced to "integer_type_within_int".
* Rename SPVM_OP_CHECKER_apply_unary_numeric_widening_conversion in spvm_op_checker.c to SPVM_OP_CHECKER_apply_integer_promotional_conversion
* Rename the following functions in spvm_op_checker.c
[Before]
void SPVM_OP_CHECKER_apply_numeric_to_string_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_term);
void SPVM_OP_CHECKER_apply_integer_promotional_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_unary);
void SPVM_OP_CHECKER_apply_binary_numeric_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_first, SPVM_OP* op_last);
[After]
void SPVM_OP_CHECKER_perform_numeric_to_string_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_term);
void SPVM_OP_CHECKER_perform_integer_promotional_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_unary);
void SPVM_OP_CHECKER_perform_binary_numeric_conversion(SPVM_COMPILER* compiler, SPVM_OP* op_first, SPVM_OP* op_last);
* Rename the following functions in spvm_type.c
SPVM_TYPE_check_assignability to SPVM_TYPE_can_assign
SPVM_TYPE_check_castability to SPVM_TYPE_can_cast
* Replace "descriptor" to "attribute".
Rename "spvm_descriptor.c" to "spvm_attribute.c"
Rename "spvm_descriptor.h" to "spvm_attribute.h"
0.9643 2022-08-18
[Revert]
* Revert the following changes.
0.9642 2022-08-17
[Chagnes]
* SPVM::Builder::Util::API::create_make_rule_native and SPVM::Builder::Util::API::create_make_rule_precompile output SPVM core files dependency.
[New Features]
* The method defined in the interface method can have the block.
* The above method is called by using static instance method call.
class MyStringable : interface_t {
method to_string : string ();
method call_to_string : string () {
return "call_to_string " . $self->to_string;
}
}
class MyClass {
interface MyStringable;
static method main : int () {
my $object = new MyClass;
$object->MyStringable::call_to_string;
}
}
[Compilation Error Messages Improvement]
* Improve the following compilation error message.
class MyClass { use Stringable; use Point3D; static method main : void () { my $stringable = (Stringable)Point3D->new; $stringable->SUPER::clear; } }
[Before]
Understandable Message.
[After]
The method of the super class can't be called from the interface type
0.9642 2022-08-17
[Improvement Exception Messages]
* Improve many exception messages.
[Exception Messages Fix]
* Fix many exception messages.
[Chagnes]
* SPVM::Builder::Util::API::create_make_rule_native and SPVM::Builder::Util::API::create_make_rule_precompile output SPVM core files dependency.
[Internal Ineffective Changes]
* In SPVM::Builder::Util::need_generate, SPVM core source files are searched from SPVM::Builder::Util path instead fo SPVM::Builder path.
* Add SPVM::Builder::Util::get_spvm_core_files and use it from SPVM::Builder::Util::need_generate.
* Remove the tail slash of builder dir in SPVM::Builder::Util::get_spvm_core_files.
* Add shared error messages to spvm_precompile.c
* The names of the opcodes become upper case again.
0.9641 2022-08-17
[New Features]
* Add the following methods to Fn class.
static method is_class : int ($object : object)
static method is_pointer_class : int ($object : object)
* Add the following runtime native APIs.
int32_t (*get_class_is_pointer)(void* runtime, int32_t class_id);
* Add the following native APIs.
int32_t (*is_class)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*is_pointer_class)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
[Document Fix]
* Remove the headding "Pointer Type" and add "Pointer Class".
* SPVM::Document::LanguageSpecification is renamed to SPVM::Document::Language.
SPVM::Document::LanguageSpecification remains and the content is the link to SPVM::Document::Language.
0.9640 2022-08-16
[New Features]
* Add the following native APIs.
int32_t (*check_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*enable_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*disable_flag_pointer_dont_free)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_length)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t length);
void* (*get_pointer_any_info)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*set_pointer_any_info)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, void* any_info);
[Document Fix]
* Fix the parsing difinition. I have forgot to add the void returning operator in before release.
* Rename the headding "empty Statement" to "Empty Statement".
* Rename Operation Statement to Operator Statement.
* Add void Returning Operator Statement.
[Document Improvement]
* Method Call becomes headding 1.
[Improvement Exception Messages]
* Improve many exception messages.
[Needed Resource Changes]
* The pointer class need the following memory because of the feature that any information can be saved.
[Before]
(intptr_t)env->object_header_byte_size + sizeof(void*);
[After]
(intptr_t)env->object_header_byte_size + sizeof(void*) * 2;
[Internal Ineffective Changes]
* Revmoe unneeded SPVM_OP_C_ID_ELEMENT, SPVM_OP_C_ID_OARRAY, SPVM_OP_C_ID_SET, SPVM_OP_C_ID_GET ops.
* Rename SPVM_OP_C_ID_NULL to SPVM_OP_C_ID_DO_NOTHING.
* Remove SPVM_OP_C_ID_STAB.
* Remove SPVM_OP_C_ID_PRECOMPILE, SPVM_OP_C_ID_RW, SPVM_OP_C_ID_RO, SPVM_OP_C_ID_WO, SPVM_OP_C_ID_REQUIRED.
* Remove SPVM_OP_C_ID_SELF.
* Remove SPVM_OP_C_ID_BLOCK_END.
* Reorder ops.
* The part of spvm_api.c and spvm_api.h is separated to spvm_vm.c and spvm_api_vm.h.
* SPVM_API_call_spvm_method_vm in spvm_api.c is renamed to SPVM_API_VM_call_spvm_method_vm in spvm_api_vm.c.
* Reorder opcodes in spvm_api_vm.c.
* Reorder opcodes in spvm_precompile.c.
* Change the definition of the following function
[Before]
const char* SPVM_OPCODE_get_opcode_name(SPVM_COMPILER* compiler, int32_t opcode_id);
[After]
const char* SPVM_OPCODE_get_opcode_name(int32_t opcode_id);
* The exception messages are shared.
* Add SPVM_OBJECT_C_FLAG_POINTER_DONT_FREE to spvm_object.h
0.9639 2022-08-15
[New Features]
* Add the is_type operator.
* Add Error::NotSupported class. This class is default loaded.
[Bug Fix]
* Fix the bug that non-class types become child classes.
* Fix the bug that pointer class types become child classes.
* Fix the bug that the interface name specified by the interface statement becomes the same name of the current interface.
[Document Fix]
* Fix the document bug of Class IDs of SPVM::Document::NativeAPI
[Before]
=head2 Class IDs
1 SPVM_NATIVE_C_CLASS_ID_ERROR
2 SPVM_NATIVE_C_CLASS_ID_ERROR
[After]
=head2 Class IDs
1 SPVM_NATIVE_C_CLASS_ID_ERROR
2 SPVM_NATIVE_C_CLASS_ID_ERROR_SYSTEM
3 SPVM_NATIVE_C_CLASS_ID_ERROR_NOT_SUPPORTED
* Add all standard modules to SPVM::Document::Modules.
Until now, default loaded modules were removed.
The following is the current list of standard modules.
Array
Bool
Byte
ByteList
Cloneable
Cloner
CommandInfo
Comparator
Comparator::Byte
Comparator::Double
Comparator::Float
Comparator::Int
Comparator::Long
Comparator::Short
Comparator::String
Complex_2d
Complex_2f
Double
DoubleList
EqualityChecker
EqualityChecker::Address
Error
Error::NotSupported
Error::System
Float
FloatList
Fn
Format
Hash
Hash::Entry
Int
IntList
List
Long
LongList
Point
Point3D
Short
ShortList
Sort
Stringable
StringBuffer
Stringer
StringList
Time
Time::Info
* die, warn, print, weaken, unweaken, make_read_only statement become void returning operators instead of statements.
[Compilation Error Message Improvement]
* Improve compilation error messages.
[Document Improvement]
* Add the docs of the void returning operator.
* Improve the doc of the new operator
[Test Improvement]
* Add many compilation error tests.
[Ineffective Changes]
* die, warn, print, weaken, unweaken, make_read_only statement become void returning operators instead of statements.
[Internal Ineffective Changes]
* Rename SPVM_OP_build_value_op_statement to SPVM_OP_build_operator_statement
0.9638 2022-08-10
[Fix Bug]
* Fix the bug that spvmdist command can't show help
[Test Improvement]
* Add spvmcc -h, --help option tests
[Compilation Error Message Improvement]
* Improve compilation error messages.
* Fix wrong compilation error messages.
[Ineffective Changes]
* The refcnt operator receive an operater instead of a variable.
* op names become lower case.
* opcode names become lower case.
[Incompatible Changes]
* spvmdist and spvmcc help message is output to stdout, instead of stderr.
0.9637 2022-08-08
[New Features]
* for-each Statement
The for-each statement is a statement to write the for statement for iterating easily.
for my VAR (@OPERATOR) {
}
for my VAR (@{OPERATOR}) {
}
The following C<for> statement is the same as the following for-each statement.
# for
my $array = [1, 2, 3];
for (my $i = 0; $i < @$array; $i++) {
my $element = $array->[$i];
}
# for-each
my $array = [1, 2, 3];
for my $element (@$array) {
}
0.9636 2022-08-08
[New Features]
* Add the following native API.
const char* (*dumpc)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
[Improve Compilation Error Messages]
* Improve compillation error messages in many places.
[Bug Fix]
* Fix the bug that the array initialization compilation error is not detected.
* Fix the bug that non-interface type can be specified the operand of the interface statement.
[Test]
* Add many tests of compilation errors.
[Incompatible Changes]
* Fix the bug that the array initialization compilation error is not detected.
For the reason of this, A compilation error occurs in the following code.
{"foo" => 1, "bar"}
0.9635 2022-08-05
[New Features]
* If the depth of the method call is over 10000, an exception is thrown.
* Use union type in type comment.
has union_type : object of string|Point;
* Add DEFAULT_CAPACITY enumeration value to ByteList class.
enum {
DEFAULT_CAPACITY = 4,
}
* Add capacity field is added to ByteList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of ByteList class.
[Before]
static method new : ByteList ($array = undef : byte[])
static method new_len : ByteList ($length : int)
[After]
static method new : ByteList ($array = undef : byte[], $capacity = -1 : int)
static method new_len : ByteList ($length : int, $capacity = -1 : int)
* Add reserve method to ByteList class .
* Add capacity field is added to ShortList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of ShortList class.
[Before]
static method new : ShortList ($array = undef : short[])
static method new_len : ShortList ($length : int)
[After]
static method new : ShortList ($array = undef : short[], $capacity = -1 : int)
static method new_len : ShortList ($length : int, $capacity = -1 : int)
* Add reserve method to ShortList class .
* Add capacity field is added to IntList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of IntList class.
[Before]
static method new : IntList ($array = undef : int[])
static method new_len : IntList ($length : int)
[After]
static method new : IntList ($array = undef : int[], $capacity = -1 : int)
static method new_len : IntList ($length : int, $capacity = -1 : int)
* Add reserve method to IntList class .
* Add capacity field is added to LongList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of LongList class.
[Before]
static method new : LongList ($array = undef : long[])
static method new_len : LongList ($length : int)
[After]
static method new : LongList ($array = undef : long[], $capacity = -1 : int)
static method new_len : LongList ($length : int, $capacity = -1 : int)
* Add reserve method to LongList class .
* Add capacity field is added to FloatList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of FloatList class.
[Before]
static method new : FloatList ($array = undef : float[])
static method new_len : FloatList ($length : int)
[After]
static method new : FloatList ($array = undef : float[], $capacity = -1 : int)
static method new_len : FloatList ($length : int, $capacity = -1 : int)
* Add reserve method to FloatList class .
* Add capacity field is added to DoubleList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of DoubleList class.
[Before]
static method new : DoubleList ($array = undef : double[])
static method new_len : DoubleList ($length : int)
[After]
static method new : DoubleList ($array = undef : double[], $capacity = -1 : int)
static method new_len : DoubleList ($length : int, $capacity = -1 : int)
* Add reserve method to DoubleList class .
* Add capacity field is added to StringList class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of StringList class.
[Before]
static method new : StringList ($array = undef : string[])
static method new_len : StringList ($length : int)
[After]
static method new : StringList ($array = undef : string[], $capacity = -1 : int)
static method new_len : StringList ($length : int, $capacity = -1 : int)
* Add reserve method to StringList class .
* Add capacity field is added to List class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of List class.
[Before]
static method new : List ($array = undef : object[])
static method new_len : List ($length : int)
[After]
static method new : List ($array = undef : object[], $capacity = -1 : int)
static method new_len : List ($length : int, $capacity = -1 : int)
* Add reserve method to List class .
* Add capacity field is added to StringBuffer class.
has capacity : ro int;
* Add optional capacity argument is added to new and new_len of StringBuffer class.
[Before]
static method new : StringBuffer ($string = undef : string)
[After]
static method new : StringBuffer ($string = undef : string, $capacity = -1 : int)
* Add reserve method to StringBuffer class.
* Add new_len method to StringBuffer class.
static method new_len : StringBuffer ($length : int, $capacity = -1 : int)
[Specification Bug Fix]
* The escape character of the string literal "\0" becomes 0x24 ($). This was wrongly 0x44 (D).
[Incompatible Changes]
* The escape character of the string literal "\0" becomes 0x24 ($). This was wrongly 0x44 (D).
* If the depth of the method call is over 10000, an exception is thrown.
[Internal Changes]
* Remove inline expansion of precompile function in the same class. This maybe reduce the performance of the method call.
* Call depth is managed.
0.9634 2022-08-03
[Changes]
* Add an optional argument to the following methods of StringBuffer class.
[qBefore]
static method new : StringBuffer ()
[After]
static method new : StringBuffer ($string = undef : string)
* Add optional arguments to the following methods of Point class.
[Before]
static method new : Point ()
[After]
static method new : Point ($x = 0 : int, $y = 0 : int)
* Add optional arguments to the following methods of Point3D class.
[Before]
static method new : Point3D ()
[After]
static method new : Point3D ($x = 0 : int, $y = 0 : int, $z = 0 : int)
[Incompatible Changes]
* The defintions of the following methods of ByteList class are changed.
[Before]
static method new : ByteList ($array : byte[]...)
[After]
static method new : ByteList ($array = undef : byte[])
* The defintions of the following methods of ShortList class are changed.
[Before]
static method new : ShortList ($array : short[]...)
[After]
static method new : ShortList ($array = undef : short[])
* The defintions of the following methods of IntList class are changed.
[Before]
static method new : IntList ($array : int[]...)
[After]
static method new : IntList ($array = undef : int[])
* The defintions of the following methods of LongList class are changed.
[Before]
static method new : LongList ($array : long[]...)
[After]
static method new : LongList ($array = undef : long[])
* The defintions of the following methods of FloatList class are changed.
[Before]
static method new : FloatList ($array : float[]...)
[After]
static method new : FloatList ($array = undef : float[])
* The defintions of the following methods of DoubleList class are changed.
[Before]
static method new : DoubleList ($array : double[]...)
[After]
static method new : DoubleList ($array = undef : double[])
* The defintions of the following methods of List class are changed.
[Before]
static method new : List ($array : object[]...)
[After]
static method new : List ($array = undef : object[])
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_byte : byte[] ($array : byte[])
Copy a C<byte> array.
If the array is not defined, return C<undef>.
[After]
static method copy_byte : byte[] ($array : byte[], $offset = 0 : int, $length = -1 : int)
Create a new C<byte> array with the length sepcified by the argument, and copy the elements of the C<byte> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_byte calls Array->copy_byte.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_short : short[] ($array : short[])
Copy a C<short> array.
If the array is not defined, return C<undef>.
[After]
static method copy_short : short[] ($array : short[], $offset = 0 : int, $length = -1 : int)
Create a new C<short> array with the length sepcified by the argument, and copy the elements of the C<short> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_short calls Array->copy_short.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_int : int[] ($array : int[])
Copy a C<int> array.
If the array is not defined, return C<undef>.
[After]
static method copy_int : int[] ($array : int[], $offset = 0 : int, $length = -1 : int)
Create a new C<int> array with the length sepcified by the argument, and copy the elements of the C<int> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_int calls Array->copy_int.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_long : long[] ($array : long[])
Copy a C<long> array.
If the array is not defined, return C<undef>.
[After]
static method copy_long : long[] ($array : long[], $offset = 0 : int, $length = -1 : int)
Create a new C<long> array with the length sepcified by the argument, and copy the elements of the C<long> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_long calls Array->copy_long.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_float : float[] ($array : float[])
Copy a C<float> array.
If the array is not defined, return C<undef>.
[After]
static method copy_float : float[] ($array : float[], $offset = 0 : int, $length = -1 : int)
Create a new C<float> array with the length sepcified by the argument, and copy the elements of the C<float> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_float calls Array->copy_float.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_double : double[] ($array : double[])
Copy a C<double> array.
If the array is not defined, return C<undef>.
[After]
static method copy_double : double[] ($array : double[], $offset = 0 : int, $length = -1 : int)
Create a new C<double> array with the length sepcified by the argument, and copy the elements of the C<double> array from the offset to the offset + the length - C<1> to the created array.
If the length is less than C<0>, the length is calcurated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_double calls Array->copy_double.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_object : object[] ($array : object[], $cloner : Cloner)
Copy an object array. Each element is cloned by the L<Cloner|SPVM::Cloner>.
[After]
static method copy_object : object[] ($array : object[], $cloner = undef : Cloner, $offset = 0 : int, $legnth = -1 : int)
Create a new object array with the length sepcified by the argument, and clone the elements of the object array by the length from the offset to the created array.
Each element is cloned by the L<Cloner|SPVM::Cloner>.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The length must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_object calls Array->copy_object.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_string : string[] ($array : string[])
Copy a C<string> array using the C<copy> operator.
If the array is not defined, return C<undef>.
[After]
static method copy_string : string[] ($array : string[], $offset = 0 : int, $length = -1 : int)
Create a new C<string> array with the length sepcified by the argument, and copy the elements of the C<string> array using C<copy> operator by the length from the offset to the created array.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_string calls Array->copy_string.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method copy_string_address : string[] ($array : string[])
Copy the addresses of the elements of a C<string> array.
If the array is not defined, return C<undef>.
[After]
static method copy_string_address : string[] ($array : string[], $offset = 0 : int, $length = -1 : int)
Create a new C<string> array with the length sepcified by the argument, and copy the addresses of the elements of the C<string> array by the length from the offset to the created array.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will be thrown.
The offset must be greater than or equal to C<0>. Otherwise an exception will be thrown.
The offset + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will be thrown.
* Array->copy_range_string_address calls Array->copy_string_address.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_byte : void ($dest : byte[], $dest_offset : int, $element : byte, $length : int)
Set the range of the elements of the destination C<byte> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_byte : void ($array : byte[], $element : byte, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<byte> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_short : void ($dest : short[], $dest_offset : int, $element : short, $length : int)
Set the range of the elements of the destination C<short> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_short : void ($array : short[], $element : short, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<short> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_int : void ($dest : int[], $dest_offset : int, $element : int, $length : int)
Set the range of the elements of the destination C<int> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_int : void ($array : int[], $element : int, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<int> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_long : void ($dest : long[], $dest_offset : int, $element : long, $length : int)
Set the range of the elements of the destination C<long> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_long : void ($array : long[], $element : long, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<long> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_float : void ($dest : float[], $dest_offset : int, $element : float, $length : int)
Set the range of the elements of the destination C<float> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_float : void ($array : float[], $element : float, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<float> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_double : void ($dest : double[], $dest_offset : int, $element : double, $length : int)
Set the range of the elements of the destination C<double> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_double : void ($array : double[], $element : double, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<double> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_string : void ($dest : string[], $dest_offset : int, $element : string, $length : int)
Set the range of the elements of the destination C<string> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_string : void ($array : string[], $element : string, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<string> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintion and implementation of the following method of Array class is changed.
[Before]
static method memset_object : void ($dest : object[], $dest_offset : int, $element : object, $length : int)
Set the range of the elements of the destination C<object> array to the element specified by the argument.
The range of the elements of the destination array is by the length from the offset of the destination to the offset of the destination.
The destination must be defined. Otherwise an exception will occur.
The offset of the destination must be greater than or equal to C<0>. Otherwise an exception will occur.
The length must be greater than or equal to 0. Otherwise an exception will occur.
The offset of the destination + the length specified by the argument must be less than or equal to the length of the destination. Otherwise an exception will occur.
[After]
static method memset_object : void ($array : object[], $element : object, $offset = 0 : int, $length = -1 : int)
Set the range of the elements of the C<object> array to the element specified by the argument.
The range of the elements of the array is by the length from the offset.
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
The array must be defined. Otherwise an exception will occur.
The offset of the array must be greater than or equal to C<0>. Otherwise an exception will occur.
The offset of the array + the length specified by the argument must be less than or equal to the length of the array. Otherwise an exception will occur.
* The defintions of the following method of Hash class is changed.
[Before]
static method new : Hash ($key_values : object[]...)
[After]
static method new : Hash ($key_values = undef : object[])
* The defintion and implementation of the following methods of Sort class is changed.
[Before]
static method sort_byte : void ($array : byte[], $offset : int, $length : int, $comparator : Comparator::Byte)
static method sort_byte_asc : void ($array : byte[], $offset : int, $length : int)
static method sort_byte_desc : void ($array : byte[], $offset : int, $length : int)
static method sort_short : void ($array : short[], $offset : int, $length : int, $comparator : Comparator::Short)
static method sort_short_asc : void ($array : short[], $offset : int, $length : int)
static method sort_short_desc : void ($array : short[], $offset : int, $length : int)
static method sort_int : void ($array : int[], $offset : int, $length : int, $comparator : Comparator::Int)
static method sort_int_asc : void ($array : int[], $offset : int, $length : int)
static method sort_int_desc : void ($array : int[], $offset : int, $length : int)
static method sort_long : void ($array : int[], $offset : int, $length : long, $comparator : Comparator::Long)
static method sort_long_asc : void ($array : long[], $offset : int, $length : int)
static method sort_long_desc : void ($array : long[], $offset : int, $length : int)
static method sort_float : void ($array : int[], $offset : int, $length : int, $comparator : Comparator::Float)
static method sort_float_asc : void ($array : float[], $offset : int, $length : int)
static method sort_float_desc : void ($array : float[], $offset : int, $length : int)
static method sort_double : void ($array : int[], $offset : int, $length : int, $comparator : Comparator::Double)
static method sort_double_asc : void ($array : double[], $offset : int, $length : int)
static method sort_double_desc : void ($array : double[], $offset : int, $length : int)
static method sort_string : void ($array : int[], $offset : int, $length : int, $comparator : Comparator::String)
static method sort_string_asc : void ($array : string[], $offset : int, $length : int)
static method sort_string_desc : void ($array : string[], $offset : int, $length : int)
static method sort_object : void ($array : int[], $offset : int, $length : int, $comparator : Comparator)
The length must be greater than or equal to C<0>. Otherwise an exception will be thrown.
[After]
static method sort_byte : void ($array : byte[], $comparator : Comparator::Byte, $offset = 0 : int, $length = -1 : int)
static method sort_byte_asc : void ($array : byte[], $offset = 0 : int, $length = -1 : int)
static method sort_byte_desc : void ($array : byte[], $offset = 0 : int, $length = -1 : int)
static method sort_short : void ($array : short[], $comparator : Comparator::Short, $offset = 0 : int, $length = -1 : int)
static method sort_short_asc : void ($array : short[], $offset = 0 : int, $length = -1 : int)
static method sort_short_desc : void ($array : short[], $offset = 0 : int, $length = -1 : int)
static method sort_int : void ($array : int[], $comparator : Comparator::Int, $offset = 0 : int, $length = -1 : int)
static method sort_int_asc : void ($array : int[], $offset = 0 : int, $length = -1 : int)
static method sort_int_desc : void ($array : int[], $offset = 0 : int, $length = -1 : int)
static method sort_long : void ($array : int[], $comparator : Comparator::Long, $offset : int, $length : long)
static method sort_long_asc : void ($array : long[], $offset = 0 : int, $length = -1 : int)
static method sort_long_desc : void ($array : long[], $offset = 0 : int, $length = -1 : int)
static method sort_float : void ($array : int[], $comparator : Comparator::Float, $offset = 0 : int, $length = -1 : int)
static method sort_float_asc : void ($array : float[], $offset = 0 : int, $length = -1 : int)
static method sort_float_desc : void ($array : float[], $offset = 0 : int, $length = -1 : int)
static method sort_double : void ($array : int[], $comparator : Comparator::Double, $offset = 0 : int, $length = -1 : int)
static method sort_double_asc : void ($array : double[], $offset = 0 : int, $length = -1 : int)
static method sort_double_desc : void ($array : double[], $offset = 0 : int, $length = -1 : int)
static method sort_string : void ($array : int[], $comparator : Comparator::String, $offset = 0 : int, $length = -1 : int)
static method sort_string_asc : void ($array : string[], $offset = 0 : int, $length = -1 : int)
static method sort_string_desc : void ($array : string[], $offset = 0 : int, $length = -1 : int)
static method sort_object : void ($array : int[], $comparator : Comparator, $offset = 0 : int, $length = -1 : int)
If the length is less than C<0>, the length is calculated from the length of the array and the offset.
* The defintion and implementation of the following methods of Fn class is changed.
[Before]
static method contains : int ($string : string, $substring : string)
static method index : int ($string : string, $substring : string, $offset : int)
static method rindex : int ($string : string, $substring : string, $offset : int)
static method substr : string ($string : string, $offset : int, $length : int)
The length must be greater than or equal to C<0>. Otherwise an exception will be thrown.
[After]
static method contains : int ($string : string, $substring : string, $offset = 0 : int, $length = -1 : int)
static method index : int ($string : string, $substring : string, $offset = 0 : int, $length = -1 : int)
static method rindex : int ($string : string, $substring : string, $offset = 0 : int, $length = -1 : int)
static method substr : string ($string : string, $offset : int, $length = -1 : int)
If the length is less than C<0>, the length to the end of the string is calculated from the length of the string and the offset.
[Deprecation]
* The following methods of Point class are deprecated.
# Point->new_xy($x, $y) is deprecated. Use Point->new($x, $y) instead. This method will be removed after 2022-09-03
static method new_xy : Point ($x : int, $y : int)
* The following methods of Point3D class are deprecated.
# Point3D->new_xyz($x, $y, $z) is deprecated. Use Point3D->new($x, $y, $z) instead. This method will be removed after 2022-09-03
static method new_xyz : Point3D ($x : int, $y : int, $z : int)
* The following methods of Array class are deprecated.
static method copy_range_byte : byte[] ($array : byte[], $offset : int, $length : int) {
warn "Array->copy_range_byte(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_byte($array, $offset, $length);
}
static method copy_range_short : short[] ($array : short[], $offset : int, $length : int) {
warn "Array->copy_range_short(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_short($array, $offset, $length);
}
static method copy_range_int : int[] ($array : int[], $offset : int, $length : int) {
warn "Array->copy_range_int(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_int($array, $offset, $length);
}
static method copy_range_long : long[] ($array : long[], $offset : int, $length : int) {
warn "Array->copy_range_long(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_long($array, $offset, $length);
}
static method copy_range_float : float[] ($array : float[], $offset : int, $length : int) {
warn "Array->copy_range_float(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_float($array, $offset, $length);
}
static method copy_range_double : double[] ($array : double[], $offset : int, $length : int) {
warn "Array->copy_range_double(\$array, \$offset, \$length) is deprecated. Use Array->copy(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_double($array, $offset, $length);
}
static method copy_range_object_address : object[] ($array : object[], $offset : int, $length : int) {
warn "Array->copy_range_object_address(\$array, \$offset, \$length) is deprecated. Use Array->copy_object_address(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_range_object($array, $offset, $length, undef);
}
static method copy_range_object : object[] ($array : object[], $offset : int, $length : int, $cloner : Cloner) {
warn "Array->copy_range_object(\$array, \$offset, \$length, \$cloner) is deprecated. Use Array->copy_object(\$array, \$cloner, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_object($array, $cloner, $offset, $length);
}
static method copy_range_string : string[] ($array : string[], $offset : int, $length : int) {
warn "Array->copy_range_string(\$array, \$offset, \$length) is deprecated. Use Array->copy_string(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_string($array, $offset, $length);
}
static method copy_range_string_address : string[] ($array : string[], $offset : int, $length : int) {
warn "Array->copy_range_string_address(\$array, \$offset, \$length) is deprecated. Use Array->copy_string_address(\$array, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return ©_string_address($array, $offset, $length);
}
* The following methods of Fn class are deprecated.
static method index_len : int ($string : string, $substring : string, $offset : int, $length : int) {
warn "Fn->index_len(\$string, \$substring, \$offset, \$length) is deprecated. Use Fn->index(\$string, \$substring, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return &index($string, $substring, $offset, $length);
}
static method rindex_len : int ($string : string, $substring : string, $offset : int, $length : int) {
warn "Fn->rindex_len(\$string, \$substring, \$offset, \$length) is deprecated. Use Fn->rindex(\$string, \$substring, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return &rindex($string, $substring, $offset, $length);
}
static method split_limit : string[] ($sep : string, $string : string, $limit : int) {
warn "Fn->split_limit(\$string, \$substring, \$offset, \$length) is deprecated. Use Fn->split(\$string, \$substring, \$offset, \$length) instead. This method will be removed after 2022-09-03";
return &split($sep, $string, $limit);
}
[Test Fix]
* Add Point3D tests. These tests are removed wrongly.
0.9633 2022-08-03
[New Features]
* Add optional argument feature.
* Add the following native APIs. The length of the arguments can be got in the native module.
int32_t (*get_args_stack_length)(SPVM_ENV* env, SPVM_VALUE* stack);
void (*set_args_stack_length)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t args_length);
* Add the following runtime native APIs.
int32_t (*get_method_required_args_length)(void* runtime, int32_t method_id);
[Improve Exception Messages]
* Improve exception messages in native APIs.
[Incompatible Changes]
* All the implementations, the fields, the arguments, native APIs, documents about the concept of "signature" are removed.
* The definitions of the following native APIs are changed.
[Before]
int32_t (*get_field_id)(SPVM_ENV* env, const char* class_name, const char* field_name, const char* signature);
int32_t (*get_class_var_id)(SPVM_ENV* env, const char* class_name, const char* class_var_name, const char* signature);
int32_t (*get_class_method_id)(SPVM_ENV* env, const char* class_name, const char* method_name, const char* signature);
int32_t (*get_instance_method_id)(SPVM_ENV* env, void* object, const char* method_name, const char* signature);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, const char* signature, void* value, int32_t* error, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, const char* signature, int32_t* error, const char* file, int32_t line);
void (*set_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, const char* signature, void* value, int32_t* error, const char* file, int32_t line);
void* (*get_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, const char* signature, int32_t* error, const char* file, int32_t line);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, const char* signature, const char* file, int32_t line);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name, const char* signature, const char* file, int32_t line);
int32_t (*get_instance_method_id_static)(SPVM_ENV* env, const char* class_name, const char* method_name, const char* signature);
int32_t (*get_instance_method_id_super)(SPVM_ENV* env, void* object, const char* method_name, const char* signature);
[After]
int32_t (*get_field_id)(SPVM_ENV* env, const char* class_name, const char* field_name);
int32_t (*get_class_var_id)(SPVM_ENV* env, const char* class_name, const char* class_var_name);
int32_t (*get_class_method_id)(SPVM_ENV* env, const char* class_name, const char* method_name);
int32_t (*get_instance_method_id)(SPVM_ENV* env, void* object, const char* method_name);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, void* value, int32_t* error, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* error, const char* file, int32_t line);
void (*set_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, void* value, int32_t* error, const char* file, int32_t line);
void* (*get_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* error, const char* file, int32_t line);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, const char* file, int32_t line);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name, const char* file, int32_t line);
int32_t (*get_instance_method_id_static)(SPVM_ENV* env, const char* class_name, const char* method_name);
int32_t (*get_instance_method_id_super)(SPVM_ENV* env, void* object, const char* method_name);
* The definitions of the following runtime native APIs are removed.
int32_t (*get_class_var_signature_id)(void* runtime, int32_t class_var_id);
int32_t (*get_field_signature_id)(void* runtime, int32_t field_id);
int32_t (*get_method_signature_id)(void* runtime, int32_t method_id);
* The precompiled methods don't use get_field_id_cache, get_class_var_id_cache, get_method_id_cache.
* The definitions of the following runtime native APIs are changed.
[Before]
int32_t (*get_type_width)(void* runtime, int32_t type_id);
[After]
int32_t (*get_type_stack_length)(void* runtime, int32_t type_id);
* The definitions of the following native APIs are changed.
[Before]
int32_t (*call_spvm_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, const char* file, int32_t line);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name, const char* file, int32_t line);
int32_t (*call_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id);
int32_t (*call_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id);
[After]
int32_t (*call_spvm_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name, int32_t args_stack_length, const char* file, int32_t line);
int32_t (*call_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
int32_t (*call_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id, int32_t args_stack_length);
* The definitions of the following native APIs are removed.
int32_t (*get_method_id_cache)(SPVM_ENV* env, const char* method_cache_name, int32_t method_cache_name_length);
int32_t (*get_field_id_cache)(SPVM_ENV* env, const char* field_cache_name, int32_t field_cache_name_length);
int32_t (*get_class_var_id_cache)(SPVM_ENV* env, const char* class_var_cache_name, int32_t class_var_cache_name_length);
[Internal Ineffective Changes]
* Rename the opcode SPVM_OPCODE_C_ID_CALL_INSTANCE_METHOD_BY_SIGNATURE to SPVM_OPCODE_C_ID_CALL_INSTANCE_METHOD_BY_NAME.
* Remove signature_id fields in spvm_runtime_class_var, spvm_runtime_field, spvm_runtime_method.
* Add args_length field to spvm_call_method.h.
* Rename width of spvm_runtime_type to stack_length.
* Rename width of spvm_type to stack_length.
* Rename SPVM_TYPE_get_width to SPVM_TYPE_get_stack_length.
0.9632 2022-08-01
[Internal Ineffective Changes]
* Add set_field_object_by_name_v2 native API.
0.9631 2022-08-01
[Internal Ineffective Changes]
* Add get_field_object_by_name_v2 native API.
0.9630 2022-07-30
[Bug Fix]
* Fix the bug that SPVM::new_object_array can't receive non-class object.
* Fix the bug that Fn->sprintf %.3s work well.
[New Features]
* Add GET_CODE_POINT_ERROR_OVER_STRING_RANGE, GET_CODE_POINT_ERROR_INVALID_UTF8 to Fn class.
* Add Fn->split_limit.
* Error::System class becomes a default loaded module.
* The class id of Error::System become always 2.
* Add the constant values of the native API
SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_SYSTEM_CLASS
SPVM_NATIVE_C_CLASS_ID_ERROR_SYSTEM
* Add SPVM::new_any_object_array function.
[Performance fix]
* Fn->join use StringBuffer internally.
* Improve substr performance.
[Changes]
* Fn->index, Fn->index_len, Fn->rindex, Fn->rindex_len throw an exception when the arguments are invalid.
* If the element of the strings of the argument of Fn->join is undef, "" is joined.
* Fn->ord throws exceptions when the input is undefined or the length is less than 0.
* Fn->pow, Fn->powi throws exceptions when the arguments are invalid.
* Fn->join throws exceptions when the arguments are invalid.
* Improve Fn->substr exception messages.
* Fn->repeat allows 0 count.
* Fn->index_len, Fn->contains, Fn->index can check empty string.
* Improve Fn->to_int_with_base exception message.
* Improve Fn->to_long_with_base exception message.
* Fn->contains become the alias for the following code
my $ret = Fn->index($string, $substring, 0) >= 0;
* Excnahge API shows the stack trace when exceptions are thrown
[Deprecation]
* Fn->trim_ascii_space is renamed to Fn->trim. Fn->trim_ascii_space is deprecated.
* Fn->get_next_code_point is renamed to Fn->get_code_point. Fn->get_next_code_point is deprecated.
* Fn->look_next_code_point is renamed to Fn->look_code_point. Fn->look_next_code_point is deprecated.
* Add Fn->RAND_MAX doc.
[Document]
* Improve Array class doc.
[Document Fix]
* Fix Fn->chr doc.
* Fix Fn->contains doc.
* Add Fn->is_array doc.
* Fix the doc that the range of Array->memcpy_(byte|short|int|long|flaot|double|object_address|string_address) is wrong.
* Fix the doc that the range of Array->copy_range_(byte|short|int|long|flaot|double) is wrong.
* Fix the doc that the range of Array->memset_(byte|short|int|long|flaot|double|object|string) is wrong.
* Remove Fn->srpintf doc. This remained wrongly.
* Remove %U specifier doc. This ramained wrongly.
[Incompatible Changes]
* Fn->index_len throw exception.
The offset + the length specified by the argument must be less than or equal to the length of the string
* Fn->ord become the following alias
my $offset = 0;
my $code_point = Fn->get_code_point($string, \$offset);
* Fn->shorten throw exceptions
The string must be defined
The length must be greater than or equal to 0
* Fn->trim throw exceptions
The string must be defined
* Fn->chomp throws exceptions
* Fn->chompr throws exceptions
* Sort->sort_(byte|short|int|long|float|double|string|object) throw exceptions
The comparator must be defined
[Bug Fix]
* Fix the bug that Fn->rindex_len, Fn->rindex don't work well.
* Fix the bug Arrya->memmove_string_address calls Arrya->memmove_object. The correct code call Arrya->memmove_object_address.
0.9629 2022-07-26
[New Features]
* Add copy_object_address to Array class.
* Add copy_range_object_address to Array class.
* Add copy_range_string_address to Array class.
* Add copy_string_address to Array class.
* Add equals_object_address to Array class.
* Add equals_string_address to Array class.
* Add %p specifier to Format->sprintf method.
[Document Fix]
* Add the doc of clear method of Point class.
* Add the doc of clear method of Point3D class.
* Remove the doc of the methods of Fn class. These remains wrongly.
* Remove the doc of memmove_byte, memmove_double, memmove_float, memmove_int, memmove_long, memmove_short, new_array_proto
memset_byte, memset_double, memset_float, memset_int, memset_long, memset_short, memset_object, memcpy_short, memcpy_long
memcpy_int, memcpy_float, memcpy_double, memcpy_byte, equals_array_string, equals_array_short, equals_array_object
equals_array_long, equals_array_int, equals_array_float, equals_array_double, equals_array_byte,
dump_array_unsigned_short, dump_array_unsigned_int, dump_array_unsigned_byte, dump_array_string,
dump_array_short, dump_array_object, dump_array_unsigned_short, dump_array_long, dump_array_int,
dump_array_float, dump_array_double, dump_array_byte, copy_array_string,
copy_array_short, copy_array_range_string, copy_array_range_short, copy_array_range_object,
copy_array_range_long, copy_array_range_int, copy_array_range_float, copy_array_range_double,
copy_array_range_byte, copy_array_object, copy_array_long, copy_array_int, copy_array_float,
copy_array_double, copy_array_byte in Fn class. This remained wrongly.
* Remove the doc of memmove, in Array class.
* Add the doc of Array->memmove_string, Array->memcpy_string.
* Fix the document that equals_byte, equals_short, equals_int, equals_long, equals_float, equals_double, equals_object, equals_string
throw exception.
[New Document]
* Add Fields section to Point class
* Add Super Class section to Point3D class
* Add Fields section to Point3D class
[Changes]
* Remove "SPVM/" from native file name.
* Array->equals_object can recieve undef equality checker, and check address equality.
* Add exception logic to memset_byte, memset_double, memset_float, memset_int, memset_long,
memset_object, memset_short, memset_string of Array class.
* Add exception logic to memcpy_object_address of Array class.
[Incompatible Changes]
* Change the following method definition of Array class. Sorry. This is my simple definition mistake.
[Before]
static method copy_range_object : object[] ($array : object[], $offset : int, $length : int) {
[After]
static method copy_range_object : object[] ($array : object[], $offset : int, $length : int, $cloner : Cloner);
The original behaivior can be used by copy_range_object_address.
* copy_range_string copies the value of the string, not address. This is my simple implement mistake.
The original behaivior can be used by copy_range_string_address.
* Remove Fn->memcpy_object, Fn->memmove_object. This remained wrongly.
* Rename Remove Fn->memcpy_object, Fn->memmove_object. This remained wrongly.
* Remove Array->dump_byte, Array->dump_short, Array->dump_int, Array->dump_long, Array->dump_float, Array->dump_double,
Array->dump_string Array->dump_object. Use the dump operator instead.
* The output of Array->dump_unsigned_byte, Array->dump_unsigned_short, Array->dump_unsigned_int, Array->dump_unsigned_long
is same as the dump operator except for the unsigned elements.
[Deprecation]
* Array->memcpy_object is deprecated. Use memcpy_object_address instead. This method will be removed at 0.9630.
* Array->memcpy_string is deprecated. Use memcpy_string_address instead. This method will be removed at 0.9630.
* Array->memmove_object is deprecated. Use memmove_object_address instead. This method will be removed at 0.9630.
* Array->memmove_string is deprecated. Use memmove_string_address instead. This method will be removed at 0.9630.
* Rename EqualityChecker::SameObject class to EqualityChecker::Address
0.9628 2022-07-25
[New Features]
* Add replace method to ByteList, ShortList, IntList, LongList, FloatList, DoubleList, StringList, List.
* Add memcpy_string, memmove_string to Array class.
* Add memset_string to Array class.
* Add equals_object_address method to Array class.
[Changes]
* The headding of module file that is generated by spvmdist command is changed.
[Before]
=head1 Field Methods
[After]
=head1 Fields
* Change the following ByteList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following ShortList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following IntList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following LongList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following FloatList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following DoubleList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Change the following List field definitions.
[Before]
has values : object[];
[After]
has values : ro string[];
* Change the following StringList field definitions.
[Before]
has values : byte[];
[After]
has values : ro byte[];
* Improve Array->memmove performance
* Improve ByteList exception messages.
* Improve ShortList exception messages.
* Improve IntList exception messages.
* Improve LongList exception messages.
* Improve FloatList exception messages.
* Improve DoubleList exception messages.
* Improve StringList exception messages.
* Improve List exception messages.
* Improve StringBuffer exception messages.
* Improve List exception messages.
* Improve the exception messages of Array class.
* memmove_object gets to throw an exception when the arguments is invalid.
* memcpy_object gets to throw an exception when the arguments is invalid.
[Bug Fix]
* Fix the StringList->remove bug.
[Document]
* Add Fields doc to Byte, Short, Int, Long, Float, Double, ByteList, ShortList, IntList, LongList, FloatList, DoubleList, List, StringBuffer class.
* Improve ByteList, ShortList, IntList, LongList, FloatList, DoubleList, StringList, List, StringBuffer, Array class doc.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove undocumented and untested grep method from StringList
0.962701 2022-07-25
[Test Fix]
* Fix the test that strerror test failed when EAGAIN is not defined.
0.9627 2022-07-22
[New Feature]
* Add new_string_array native API.
0.9626 2022-07-22
[New Features]
* Add the following native API
int32_t (*get_class_id_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* error, const char* file, int32_t line);
const char* (*strerror)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t errno_value, int32_t length);
[Changes]
* Improve destructor compile error message.
0.9625 2022-07-20
[New Features]
* Add Error::System class.
0.9624 2022-07-19
[New Features]
* Add the following replace method to StringBuffer class.
method replace : void ($offset : int, $length : int, $replace : string)
0.9623 2022-07-15
[New Features]
* Add CommandInfo class.
* Add Native API "SPVM_NATIVE_C_BASIC_TYPE_ID_COMMAND_INFO_CLASS" constant value.
* Add the following native APIs.
int32_t (*set_command_info_program_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_program_name);
int32_t (*set_command_info_argv)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj_argv);
[Changes]
* Change the test option of WriteMakefile of ExtUtils::MakeMaker that is generated by spvmdist command.
[Before]
test => {TESTS => 't/*.t'},
[After]
test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'},
* Add "NORECURS => 1" to the option of WriteMakefile of ExtUtils::MakeMaker that is generated by spvmdist command.
* Add "TEST_REQUIRES => {}" to the option of WriteMakefile of ExtUtils::MakeMaker that is generated by spvmdist command.
* Add "META_MERGE => {no_index => {directory => [],}}," to the option of WriteMakefile of ExtUtils::MakeMaker that is generated by spvmdist command.
[Bug Fix]
* Fix the bug that tyep type of the program name of the command line argument is "byte". This is fixed to "string".
* Fix the bug that tyep type of the argv of the command line argument is "byte[]". This is fixed to "string[]".
* Fix the bug that when any SPVM moudle are not yet loaded (only use SPVM(); or use SPVM;) and call SPVM exchange API, segfault occurs.
0.9622 2022-07-14
[New Features]
* Add the following native APIs.
void* (*new_memory_env)(SPVM_ENV* env, size_t byte_size);
void (*free_memory_env)(SPVM_ENV* env, void* block);
int32_t (*get_memory_blocks_count_env)(SPVM_ENV* env);
void* (*new_memory_stack)(SPVM_ENV* env, SPVM_VALUE* stack, size_t byte_size);
void (*free_memory_stack)(SPVM_ENV* env, SPVM_VALUE* stack, void* block);
int32_t (*get_memory_blocks_count_stack)(SPVM_ENV* env, SPVM_VALUE* stack);
[Changes]
* The file name "t/basic.t" that is generated by spvmdist command is renamed to "t/use_spvm_class.t".
* The .gitignore file that is generated by spvmdist command is changed to the following.
[Before]
blib/*
Makefile
Makefile.old
MYMETA.yml
MYMETA.json
pm_to_blib
.spvm_build
t/.spvm_build
core.*
core
SPVM-*
*.bak
*.BAK
*.tmp
[After]
blib/*
Makefile
Makefile.old
MYMETA.yml
MYMETA.json
pm_to_blib
.spvm_build
t/.spvm_build
core.*
core
SPVM-*
*.bak
*.BAK
*.tmp
*.o
*.bs
* spvmdist checks the class name is specified and doesn't contains "-".
* The count of created objects are managed by the stack of the environment.
[Document Bug Fix]
* Remove the description that "Module can contain multiple Classes". This was wrong.
* The type of second argument of native API alloc_memory_block_zero is size_t. int64_t was wrong.
0.9621 2022-07-13
[New Features]
* Add SPVM::Builder::LinkInfo create_link_command instance method.
* Add SPVM::Builder::LinkInfo output_type field method.
* Add SPVM::Builder::LinkInfo ld_optimize field method.
* Add SPVM::Builder::LinkInfo dynamic_lib_ldflags field method.
* Add SPVM::Builder::LinkInfo create_merged_ldflags method.
* Add SPVM::Builder::CompileInfo class.
* Add compile_info to SPVM::Builder::ObjectFileInfo.
* Add before_compile to SPVM::Builder::Config.
* Add global_before_compile to SPVM::Builder::Config::Exe.
[Changes]
* Improve MANIFES.SKIP that is generated by spvmdit.
[Before]
^blib/
^Makefile\$
^Makefile\.old\$
^MYMETA.yml\$
^MYMETA.json\$
^pm_to_blib\$
^\.spvm_build/
^t/\.spvm_build/
^SPVM-
^core\.
^core\$
\.bak\$
\.tmp\$
\.BAK\$
^\.git/
[After]
(^|\/)blib/
(^|\/)Makefile$
(^|\/)Makefile.old$
(^|\/)MYMETA.yml$
(^|\/)MYMETA.json$
(^|\/)pm_to_blib$
(^|\/).spvm_build/
(^|\/)t/.spvm_build/
(^|\/)SPVM-
(^|\/)core\.
(^|\/)core$
(^|\/)\.git/
\.bak$
\.tmp$
\.BAK$
\.o$
\.bs$
[Imcompative Changes]
* (This is undocumented feature)The return value of SPVM::LinkInfo to_string
is changed from the output file to the link command.
* (This feature is not work well from now)Remove non-worked global_cc_each,
global_ccflags_each, global_optimize_each from SPVM::Builder::CC.
* Remove cc_each, ccflags_each, optimize_each.
* Remove all field methods from SPVM::Builder::ObjectFileInfo.
[Document]
* Add the document of SPVM::Builder::LinkInfo to_string method.
* Add the doucment of Error class.
* Remove non-worked global_cc_each, global_ccflags_each, global_optimize_each doc.
0.9620 2022-07-09
[New Featres]
* Add Error class that class id is 1.
* Add a constant value SPVM_NATIVE_C_BASIC_TYPE_ID_ERROR_CLASS in native API.
* Add a constant value SPVM_NATIVE_C_CLASS_ID_ERROR in native API.
[Changes]
* Add [Changes] hedding to the Changes file that is generated by spvmdist.
* Non-native method must have its block.
[Imcompative Changes]
* Rename the following constant values of native API.
[Before]
SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_INT_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_LONG_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE_OBJECT
SPVM_NATIVE_C_BASIC_TYPE_ID_BOOL_OBJECT
[After]
SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_INT_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_LONG_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE_CLASS
SPVM_NATIVE_C_BASIC_TYPE_ID_BOOL_CLASS
* The numeric argument of the method call using exchange API must be a defined numeric or floating-point compatible value.
Otherwise an exception is thrown.
[Bug Fix]
* Fix the bug that the linker output twice to stdout and stderr. Suppress stdout.
[Incompatible Bug Fix]
* Fix a regression bug that SPVM_NATIVE_C_BASIC_TYPE_ID_BOO_OBJECT is chagned
to SPVM_NATIVE_C_BASIC_TYPE_ID_TYPE_CONVERSION_CONDITINAL_OBJECT wrongly.
0.9619 2022-07-07
[New Featres]
* Add --user-name option to spvmdist command.
* Add --user-email option to spvmdist command.
* Add new_c11 method to SPVM::Builder::Config
* Add new_gnu11 method to SPVM::Builder::Config
* Add new_cpp14 method to SPVM::Builder::Config
* Add new_cpp17 method to SPVM::Builder::Config
[Changes]
* spvm_dist command add date information to the generated documents.
* Need Time::Piece 1.12
* Removed --output_dir option of spvmdist command from document. This was removed in past.
[Document Fix]
* Add new_gnu99 method to SPVM::Builder::Config
0.9618 2022-07-05
[CHANGES]
* All output of compiler and linker print to stderr.
0.9617 2022-07-05
[New Featres]
* Add spvm_warn to native API
[CHANGES]
* "use ModuleName" is added to the test case class that is generated by spvmdist command
[BUG FIX]
* Fix the bug that quiet decting order bug.
[NON BACKWORD COMPATIBLE CHANGES]
* The default value of quiet and force of SPVM::Builder::Config become undef.
undef means don't determin quiet and force in SPVM::Builder::Config.
0.9616 2022-07-01
[New Featres]
* Add to_bin method to SPVM::BlessedObject::String.
[CHANGES]
* Removed "Bug Report" and "Support" section from the output of spvmdist command.
[NON BACKWORD COMPATIBLE CHANGES]
* If a Perl scalar value is passed to SPVM string type, sv_utf8_encode don't be performed
because this is needed to pass 8bit character(128-255) such as "\xff" to SPVM as it is.
0.9615 2022-06-30
[CHANGES]
* Improve the pod that spvmdist generates.
[BUG FIX]
* Fix the bug that SPVM::Builder::Config doesn't use SPVM::Builder::Resource.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove unused and undocumented protected descriptor.
0.9614 2022-06-29
[CHANGES]
* The parent class must be a class type and non-pointer type.
* The name of the parant class must be different from the name of the class.
* The all super classes must be different from its own class. Recursive inheritance isn't allowed
* Remove MANIFEST from .gitignore that is generated by spvmdist.
* lib_dirs of SPVM::Builder::Config is always added to link command.
* Add SPVM::Builder::LibInfo module.
* libs, add_libs, add_static_libs of SPVM::Builder::Config can receive SPVM::Builder::LibInfo object.
* Add lib_infos to SPVM::Builder::LinkInfo.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove non-documented lib_link_abs from SPVM::Builder::Config.
* native library is linked as relative path, not absolute pass by default.
* Remove add_dynamic_libs from SPVM::Builder::Config.
* Remove type option of the hash reference of add_libs method of SPVM::Builder::Config.
* libs, add_libs, add_static_libs of SPVM::Builder::Config can't receive a hash reference.
* object_infos of SPVM::Builder::LinkInfo don't contains library files.
0.9613 2022-06-27
[CHANGE]
* Fix descriptor error message.
* Fields alignment size become the bigger byte size of sizeof(void*) and sizeof(int64_t).
* Fields alignment rule become the same as C language.
* Improve compilation error messages.
* Add clear method to Point class.
* Add Point3D class.
* Add the inheritance feature.
Add extends keyword.
Add SUPER:: method call.
[BUG FIX]
* Fix the bug that the name of method call doesn't distinguish class methods and instance methods.
[NON BACKWORD COMPATIBLE CHANGES]
* Change the definitions of the following native API.
[Beofre]
int32_t (*check_runtime_assignability)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t cast_basic_type_id, int32_t cast_type_dimension, void* object);
[After]
int32_t (*isa)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t cast_basic_type_id, int32_t cast_type_dimension);
* Change the definitions of the following native API.
[Beofre]
int32_t (*check_runtime_assignability_array_element)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, void* element);
[After]
int32_t (*elem_isa)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, void* element);
0.9612 2022-06-23
[CHANGE]
* set_error_code throw an exception when the value is not more than or equal to 1.
* Add error operator to check the code of the excetpion
0.961101 2022-06-22
[NON BACKWORD COMPATIBLE CHANGES]
* Fixed rest bugs that Remove Time->timegm and Time->timelocal because of Windows/MinGW compatibility.
0.9611 2022-06-22
[NON BACKWORD COMPATIBLE CHANGES]
* Remove Time->timegm and Time->timelocal because of Windows/MinGW compatibility.
Use CPAN's SPVM::Time::Local module instead.
0.9610 2022-06-22
[CHANGE]
* Add error_code operator
* Add set_error_code operator
* exception become stack variable from env variable.
* native mortal stack become stack variable from env variable.
[NON BACKWORD COMPATIBLE CHANGES]
* Change the definitions of the following native APIs
[Before]
int32_t (*call_class_method)(SPVM_ENV* env, int32_t method_id, SPVM_VALUE* args);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, const char* class_name, const char* method_name, const char* signature, SPVM_VALUE* stack_unused, const char* file, int32_t line);
int32_t (*call_instance_method)(SPVM_ENV* env, int32_t method_id, SPVM_VALUE* args);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, void* object, const char* method_name, const char* signature, SPVM_VALUE* stack_unused, const char* file, int32_t line);
int32_t (*call_spvm_method)(SPVM_ENV* env, int32_t method_id, SPVM_VALUE* args);
[After]
int32_t (*call_class_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id);
int32_t (*call_class_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name, const char* signature, const char* file, int32_t line);
int32_t (*call_instance_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id);
int32_t (*call_instance_method_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* method_name, const char* signature, const char* file, int32_t line);
int32_t (*call_spvm_method)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t method_id);
* Change the definitions of the following native API
[Before]
void (*call_init_blocks)(SPVM_ENV* env);
[After]
void (*call_init_blocks)(SPVM_ENV* env, SPVM_VALUE* stack);
* Native API new_env don't call call_init_blocks.
* Native API free_env and free_env_prepared don't call cleanup_global_vars.
* The following depracated methods are removed.
Fn->copy_array_byte is removed. Use Array->copy_byte instead
Fn->copy_array_double is removed. Use Array->copy_double instead
Fn->copy_array_float is removed. Use Array->copy_float instead
Fn->copy_array_int is removed. Use Array->copy_int instead
Fn->copy_array_long is removed. Use Array->copy_long instead
Fn->copy_array_object is removed. Use Array->copy_object instead
Fn->copy_array_range_byte is removed. Use Array->copy_range_byte instead
Fn->copy_array_range_double is removed. Use Array->copy_range_double instead
Fn->copy_array_range_float is removed. Use Array->copy_range_float instead
Fn->copy_array_range_int is removed. Use Array->copy_range_int instead
Fn->copy_array_range_long is removed. Use Array->copy_range_long instead
Fn->copy_array_range_object is removed. Use Array->copy_range_object instead
Fn->copy_array_range_short is removed. Use Array->copy_range_short instead
Fn->copy_array_range_string is removed. Use Array->copy_range_string instead
Fn->copy_array_string is removed. Use Array->copy_tring instead
Fn->dump_array_byte is removed. Use Array->dump_byte instead
Fn->dump_array_double is removed. Use Array->dump_double instead
Fn->dump_array_float is removed. Use Array->dump_float instead
Fn->dump_array_int is removed. Use Array->dump_int instead
Fn->dump_array_long is removed. Use Array->dump_long instead
Fn->dump_array_object is removed. Use Array->dump_object instead
Fn->dump_array_short is removed. Use Array->dump_short instead
Fn->dump_array_string is removed. Use Array->dump_string instead
Fn->dump_array_unsigned_byte is removed. Use Array->dump_unsigned_byte instead
Fn->dump_array_unsigned_int is removed. Use Array->dump_unsigned_int instead
Fn->dump_array_unsigned_long is removed. Use Array->dump_unsigned_long instead
Fn->dump_array_unsigned_short is removed. Use Array->dump_unsigned_short instead
Fn->equals_array_byte is removed. Use Array->equals_byte instead
Fn->equals_array_double is removed. Use Array->equals_double instead
Fn->equals_array_float is removed. Use Array->equals_float instead
Fn->equals_array_int is removed. Use Array->equals_int instead
Fn->equals_array_long is removed. Use Array->equals_long instead
Fn->equals_array_object is removed. Use Array->equals_object instead
Fn->equals_array_short is removed. Use Array->equals_short instead
Fn->equals_array_string is removed. Use Array->equals_string instead
Fn->memcpy_byte is removed. Use Array->memcpy_byte instead
Fn->memcpy_double is removed. Use Array->memcpy_double instead
Fn->memcpy_float is removed. Use Array->memcpy_float instead
Fn->memcpy_int is removed. Use Array->memcpy_int instead
Fn->memcpy_long is removed. Use Array->memcpy_long instead
Fn->memcpy_short is removed. Use Array->memcpy_short instead
Fn->memmove_byte is removed. Use Array->memmove_byte instead
Fn->memmove_double is removed. Use Array->memmove_double instead
Fn->memmove_float is removed. Use Array->memmove_float instead
Fn->memmove_int is removed. Use Array->memmove_int instead
Fn->memmove_long is removed. Use Array->memmove_long instead
Fn->memmove_short is removed. Use Array->memmove_short instead
Fn->memset_byte is removed. Use Array->memset_byte instead
Fn->memset_double is removed. Use Array->memset_double instead
Fn->memset_float is removed. Use Array->memset_float instead
Fn->memset_int is removed. Use Array->memset_int instead
Fn->memset_long is removed. Use Array->memset_long instead
Fn->memset_object is removed. Use Array->memset_object instead
Fn->memset_short is removed. Use Array->memset_short instead
Fn->new_array_proto is removed. Use Array->new_proto instead
Fn->sprintf is removed. Use Format->sprintf instead
* Change the definitions of the following native APIs
[Before]
int32_t (*check_runtime_assignability)(SPVM_ENV* env, int32_t cast_basic_type_id, int32_t cast_type_dimension, void* object);
int32_t (*check_runtime_assignability_array_element)(SPVM_ENV* env, void* array, void* element);
void* (*new_object_raw)(SPVM_ENV* env, int32_t basic_type_id);
void* (*new_object)(SPVM_ENV* env, int32_t basic_type_id);
void* (*new_byte_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_byte_array)(SPVM_ENV* env, int32_t length);
void* (*new_short_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_short_array)(SPVM_ENV* env, int32_t length);
void* (*new_int_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_int_array)(SPVM_ENV* env, int32_t length);
void* (*new_long_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_long_array)(SPVM_ENV* env, int32_t length);
void* (*new_float_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_float_array)(SPVM_ENV* env, int32_t length);
void* (*new_double_array_raw)(SPVM_ENV* env, int32_t length);
void* (*new_double_array)(SPVM_ENV* env, int32_t length);
void* (*new_object_array_raw)(SPVM_ENV* env, int32_t basic_type_id, int32_t length);
void* (*new_object_array)(SPVM_ENV* env, int32_t basic_type_id, int32_t length);
void* (*new_muldim_array_raw)(SPVM_ENV* env, int32_t basic_type_id, int32_t element_dimension, int32_t length);
void* (*new_muldim_array)(SPVM_ENV* env, int32_t basic_type_id, int32_t element_dimension, int32_t length);
void* (*new_mulnum_array_raw)(SPVM_ENV* env, int32_t basic_type_id, int32_t length);
void* (*new_mulnum_array)(SPVM_ENV* env, int32_t basic_type_id, int32_t length);
void* (*new_string_nolen_raw)(SPVM_ENV* env, const char* bytes);
void* (*new_string_nolen)(SPVM_ENV* env, const char* bytes);
void* (*new_string_raw)(SPVM_ENV* env, const char* bytes, int32_t length);
void* (*new_string)(SPVM_ENV* env, const char* bytes, int32_t length);
void* (*new_pointer_raw)(SPVM_ENV* env, int32_t basic_type_id, void* pointer);
void* (*new_pointer)(SPVM_ENV* env, int32_t basic_type_id, void* pointer);
void* (*concat_raw)(SPVM_ENV* env, void* string1, void* string2);
void* (*concat)(SPVM_ENV* env, void* string1, void* string2);
void* (*new_stack_trace_raw)(SPVM_ENV* env, void* exception, int32_t method_id, int32_t line);
void* (*new_stack_trace)(SPVM_ENV* env, void* exception, int32_t method_id, int32_t line);
int32_t (*length)(SPVM_ENV* env, void* array);
int8_t* (*get_elems_byte)(SPVM_ENV* env, void* array);
int16_t* (*get_elems_short)(SPVM_ENV* env, void* array);
int32_t* (*get_elems_int)(SPVM_ENV* env, void* array);
int64_t* (*get_elems_long)(SPVM_ENV* env, void* array);
float* (*get_elems_float)(SPVM_ENV* env, void* array);
double* (*get_elems_double)(SPVM_ENV* env, void* array);
void* (*get_elem_object)(SPVM_ENV* env, void* array, int32_t index);
void (*set_elem_object)(SPVM_ENV* env, void* array, int32_t index, void* value);
int8_t (*get_field_byte)(SPVM_ENV* env, void* object, int32_t field_id);
int16_t (*get_field_short)(SPVM_ENV* env, void* object, int32_t field_id);
int32_t (*get_field_int)(SPVM_ENV* env, void* object, int32_t field_id);
int64_t (*get_field_long)(SPVM_ENV* env, void* object, int32_t field_id);
float (*get_field_float)(SPVM_ENV* env, void* object, int32_t field_id);
double (*get_field_double)(SPVM_ENV* env, void* object, int32_t field_id);
void* (*get_field_object)(SPVM_ENV* env, void* object, int32_t field_id);
void (*set_field_byte)(SPVM_ENV* env, void* object, int32_t field_id, int8_t value);
void (*set_field_short)(SPVM_ENV* env, void* object, int32_t field_id, int16_t value);
void (*set_field_int)(SPVM_ENV* env, void* object, int32_t field_id, int32_t value);
void (*set_field_long)(SPVM_ENV* env, void* object, int32_t field_id, int64_t value);
void (*set_field_float)(SPVM_ENV* env, void* object, int32_t field_id, float value);
void (*set_field_double)(SPVM_ENV* env, void* object, int32_t field_id, double value);
void (*set_field_object)(SPVM_ENV* env, void* object, int32_t field_id, void* value);
int8_t (*get_class_var_byte)(SPVM_ENV* env, int32_t pkgvar_id);
int16_t (*get_class_var_short)(SPVM_ENV* env, int32_t pkgvar_id);
int32_t (*get_class_var_int)(SPVM_ENV* env, int32_t pkgvar_id);
int64_t (*get_class_var_long)(SPVM_ENV* env, int32_t pkgvar_id);
float (*get_class_var_float)(SPVM_ENV* env, int32_t pkgvar_id);
double (*get_class_var_double)(SPVM_ENV* env, int32_t pkgvar_id);
void* (*get_class_var_object)(SPVM_ENV* env, int32_t pkgvar_id);
void (*set_class_var_byte)(SPVM_ENV* env, int32_t pkgvar_id, int8_t value);
void (*set_class_var_short)(SPVM_ENV* env, int32_t pkgvar_id, int16_t value);
void (*set_class_var_int)(SPVM_ENV* env, int32_t pkgvar_id, int32_t value);
void (*set_class_var_long)(SPVM_ENV* env, int32_t pkgvar_id, int64_t value);
void (*set_class_var_float)(SPVM_ENV* env, int32_t pkgvar_id, float value);
void (*set_class_var_double)(SPVM_ENV* env, int32_t pkgvar_id, double value);
void (*set_class_var_object)(SPVM_ENV* env, int32_t pkgvar_id, void* value);
void* (*get_pointer)(SPVM_ENV* env, void* pointer_object);
void (*set_pointer)(SPVM_ENV* env, void* pointer_object, void* pointer);
void* (*get_exception)(SPVM_ENV* env);
int32_t (*set_exception)(SPVM_ENV* env, void* exception);
int32_t (*get_ref_count)(SPVM_ENV* env, void* object);
void (*inc_ref_count)(SPVM_ENV* env, void* object);
void (*dec_ref_count)(SPVM_ENV* env, void* object);
int32_t (*enter_scope)(SPVM_ENV* env);
int32_t (*push_mortal)(SPVM_ENV* env, void* object);
void (*leave_scope)(SPVM_ENV* env, int32_t scope_id);
int32_t (*remove_mortal)(SPVM_ENV* env, int32_t scope_id, void* remove_object);
int32_t (*is_type)(SPVM_ENV* env, void* object, int32_t basic_type_id, int32_t type_dimension);
int32_t (*is_object_array)(SPVM_ENV* env, void* object);
int32_t (*get_object_basic_type_id)(SPVM_ENV* env, void* object);
int32_t (*get_object_type_dimension)(SPVM_ENV* env, void* object);
int32_t (*weaken)(SPVM_ENV* env, void** object_address);
int32_t (*isweak)(SPVM_ENV* env, void** object);
void (*unweaken)(SPVM_ENV* env, void** object_address);
void* (*get_type_name_raw)(SPVM_ENV* env, void* object);
void* (*get_type_name)(SPVM_ENV* env, void* object);
const char* (*get_chars)(SPVM_ENV* env, void* string_object);
int32_t (*die)(SPVM_ENV* env, const char* message, ...);
void* (*new_object_by_name)(SPVM_ENV* env, const char* class_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*new_pointer_by_name)(SPVM_ENV* env, const char* class_name, void* pointer, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_byte_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int8_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_short_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int16_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_int_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_long_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int64_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_float_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, float value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_double_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, double value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_object_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, const char* signature, void* value, int32_t* exception_flag, const char* file, int32_t line);
int8_t (*get_field_byte_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int16_t (*get_field_short_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int32_t (*get_field_int_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int64_t (*get_field_long_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
float (*get_field_float_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
double (*get_field_double_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, void* object, const char* class_name, const char* field_name, const char* signature, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_byte_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int8_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_short_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int16_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_int_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_long_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int64_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_float_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, float value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_double_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, double value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_object_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, const char* signature, void* value, int32_t* exception_flag, const char* file, int32_t line);
int8_t (*get_class_var_byte_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int16_t (*get_class_var_short_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int32_t (*get_class_var_int_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int64_t (*get_class_var_long_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
float (*get_class_var_float_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
double (*get_class_var_double_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*get_class_var_object_by_name)(SPVM_ENV* env, const char* class_name, const char* class_var_name, const char* signature, int32_t* exception_flag, const char* file, int32_t line);
const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, void* obj, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*dump_raw)(SPVM_ENV* env, void* object);
void* (*dump)(SPVM_ENV* env, void* object);
int32_t (*get_bool_object_value)(SPVM_ENV* env, void* bool_object);
void (*cleanup_global_vars)(SPVM_ENV* env);
void (*make_read_only)(SPVM_ENV* env, void* string);
int32_t (*is_read_only)(SPVM_ENV* env, void* string);
int32_t (*is_array)(SPVM_ENV* env, void* object);
int32_t (*is_string)(SPVM_ENV* env, void* object);
int32_t (*is_numeric_array)(SPVM_ENV* env, void* object);
int32_t (*is_mulnum_array)(SPVM_ENV* env, void* object);
int32_t (*get_elem_byte_size)(SPVM_ENV* env, void* array);
void* (*new_array_proto_raw)(SPVM_ENV* env, void* array, int32_t length);
void* (*new_array_proto)(SPVM_ENV* env, void* array, int32_t length);
void* (*copy_raw)(SPVM_ENV* env, void* object);
void* (*copy)(SPVM_ENV* env, void* object);
void (*shorten)(SPVM_ENV* env, void* string, int32_t new_length);
int32_t (*has_interface)(SPVM_ENV* env, void* object, int32_t interface_basic_type_id);
void (*print)(SPVM_ENV* env, void* string);
void (*print_stderr)(SPVM_ENV* env, void* string);
[After]
void* (*get_type_name_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void* (*get_type_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*check_runtime_assignability)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t cast_basic_type_id, int32_t cast_type_dimension, void* object);
int32_t (*check_runtime_assignability_array_element)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, void* element);
void* (*new_object_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
void* (*new_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id);
void* (*new_byte_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_byte_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_short_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_short_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_int_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_int_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_long_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_long_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_float_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_float_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_double_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_double_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t length);
void* (*new_object_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
void* (*new_object_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
void* (*new_muldim_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
void* (*new_muldim_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t element_dimension, int32_t length);
void* (*new_mulnum_array_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
void* (*new_mulnum_array)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, int32_t length);
void* (*new_string_nolen_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes);
void* (*new_string_nolen)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes);
void* (*new_string_raw)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes, int32_t length);
void* (*new_string)(SPVM_ENV* env, SPVM_VALUE* stack, const char* bytes, int32_t length);
void* (*new_pointer_raw)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
void* (*new_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t basic_type_id, void* pointer);
void* (*concat_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* string1, void* string2);
void* (*concat)(SPVM_ENV* env, SPVM_VALUE* stack, void* string1, void* string2);
void* (*new_stack_trace_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_id, int32_t line);
void* (*new_stack_trace)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception, int32_t method_id, int32_t line);
int32_t (*length)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
int8_t* (*get_elems_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
int16_t* (*get_elems_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
int32_t* (*get_elems_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
int64_t* (*get_elems_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
float* (*get_elems_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
double* (*get_elems_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
void* (*get_elem_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t index);
void (*set_elem_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t index, void* value);
int8_t (*get_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
int16_t (*get_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
int32_t (*get_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
int64_t (*get_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
float (*get_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
double (*get_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
void* (*get_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id);
void (*set_field_byte)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, int8_t value);
void (*set_field_short)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, int16_t value);
void (*set_field_int)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, int32_t value);
void (*set_field_long)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, int64_t value);
void (*set_field_float)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, float value);
void (*set_field_double)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, double value);
void (*set_field_object)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t field_id, void* value);
int8_t (*get_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
int16_t (*get_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
int32_t (*get_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
int64_t (*get_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
float (*get_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
double (*get_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
void* (*get_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id);
void (*set_class_var_byte)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, int8_t value);
void (*set_class_var_short)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, int16_t value);
void (*set_class_var_int)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, int32_t value);
void (*set_class_var_long)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, int64_t value);
void (*set_class_var_float)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, float value);
void (*set_class_var_double)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, double value);
void (*set_class_var_object)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t pkgvar_id, void* value);
void* (*get_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* pointer_object);
void (*set_pointer)(SPVM_ENV* env, SPVM_VALUE* stack, void* pointer_object, void* pointer);
void* (*get_exception)(SPVM_ENV* env, SPVM_VALUE* stack);
int32_t (*set_exception)(SPVM_ENV* env, SPVM_VALUE* stack, void* exception);
int32_t (*get_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*inc_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*dec_ref_count)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*enter_scope)(SPVM_ENV* env, SPVM_VALUE* stack);
int32_t (*push_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*leave_scope)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t scope_id);
int32_t (*remove_mortal)(SPVM_ENV* env, SPVM_VALUE* stack, int32_t scope_id, void* remove_object);
int32_t (*is_type)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t basic_type_id, int32_t type_dimension);
int32_t (*is_object_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_object_basic_type_id)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_object_type_dimension)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*weaken)(SPVM_ENV* env, SPVM_VALUE* stack, void** object_address);
int32_t (*isweak)(SPVM_ENV* env, SPVM_VALUE* stack, void** object);
void (*unweaken)(SPVM_ENV* env, SPVM_VALUE* stack, void** object_address);
const char* (*get_chars)(SPVM_ENV* env, SPVM_VALUE* stack, void* string_object);
int32_t (*die)(SPVM_ENV* env, SPVM_VALUE* stack, const char* message, ...);
void* (*new_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*new_pointer_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, void* pointer, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int8_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int16_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int64_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, float value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, double value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, const char* signature, void* value, int32_t* exception_flag, const char* file, int32_t line);
int8_t (*get_field_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int16_t (*get_field_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int32_t (*get_field_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
int64_t (*get_field_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
float (*get_field_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
double (*get_field_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*get_field_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, const char* class_name, const char* field_name, const char* signature, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int8_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int16_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int64_t value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, float value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, double value, int32_t* exception_flag, const char* file, int32_t line);
void (*set_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, const char* signature, void* value, int32_t* exception_flag, const char* file, int32_t line);
int8_t (*get_class_var_byte_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int16_t (*get_class_var_short_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int32_t (*get_class_var_int_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
int64_t (*get_class_var_long_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
float (*get_class_var_float_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
double (*get_class_var_double_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*get_class_var_object_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* class_var_name, const char* signature, int32_t* exception_flag, const char* file, int32_t line);
const char* (*get_field_string_chars_by_name)(SPVM_ENV* env, SPVM_VALUE* stack, void* obj, const char* class_name, const char* field_name, int32_t* exception_flag, const char* file, int32_t line);
void* (*dump_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void* (*dump)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_bool_object_value)(SPVM_ENV* env, SPVM_VALUE* stack, void* bool_object);
void (*cleanup_global_vars)(SPVM_ENV* env, SPVM_VALUE* stack);
void (*make_read_only)(SPVM_ENV* env, SPVM_VALUE* stack, void* string);
int32_t (*is_read_only)(SPVM_ENV* env, SPVM_VALUE* stack, void* string);
int32_t (*is_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*is_string)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*is_numeric_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*is_mulnum_array)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
int32_t (*get_elem_byte_size)(SPVM_ENV* env, SPVM_VALUE* stack, void* array);
void* (*new_array_proto_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t length);
void* (*new_array_proto)(SPVM_ENV* env, SPVM_VALUE* stack, void* array, int32_t length);
void* (*copy_raw)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void* (*copy)(SPVM_ENV* env, SPVM_VALUE* stack, void* object);
void (*shorten)(SPVM_ENV* env, SPVM_VALUE* stack, void* string, int32_t new_length);
int32_t (*has_interface)(SPVM_ENV* env, SPVM_VALUE* stack, void* object, int32_t interface_basic_type_id);
void (*print)(SPVM_ENV* env, SPVM_VALUE* stack, void* string);
void (*print_stderr)(SPVM_ENV* env, SPVM_VALUE* stack, void* string);
* Native API exception_object is renamed to reserved16
* Native API native_mortal_stack is renamed to reserved17
* Native API native_mortal_stack_top is renamed to reserved18
* Native API native_mortal_stack_capacity is renamed to reserved19
0.9609 2022-06-19
[CHANGE]
* Improve error messages of compilation.
* Improve Time::Info document.
* Improve Changes of spvmdist command.
* Improve Time doucment.
* Add Sort class.
* Improve exception messages of Sort class.
* Add the following method to Sort class
sort_byte_asc
sort_byte_desc
sort_double_asc
sort_double_desc
sort_float
sort_float_asc
sort_int_asc
sort_int_desc
sort_long_asc
sort_long_desc
sort_short_asc
sort_short_desc
sort_string_asc
sort_string_desc
* Time->timegm is implemented using timegm on UNIX/Linux or _mkgmtime on Windows.
* Add Array class.
* Add Format class.
[DEPRECATION]
* The following methods are depracated.
Fn->copy_array_byte is deprecated. Use Array->copy_byte instead
Fn->copy_array_double is deprecated. Use Array->copy_double instead
Fn->copy_array_float is deprecated. Use Array->copy_float instead
Fn->copy_array_int is deprecated. Use Array->copy_int instead
Fn->copy_array_long is deprecated. Use Array->copy_long instead
Fn->copy_array_object is deprecated. Use Array->copy_object instead
Fn->copy_array_range_byte is deprecated. Use Array->copy_range_byte instead
Fn->copy_array_range_double is deprecated. Use Array->copy_range_double instead
Fn->copy_array_range_float is deprecated. Use Array->copy_range_float instead
Fn->copy_array_range_int is deprecated. Use Array->copy_range_int instead
Fn->copy_array_range_long is deprecated. Use Array->copy_range_long instead
Fn->copy_array_range_object is deprecated. Use Array->copy_range_object instead
Fn->copy_array_range_short is deprecated. Use Array->copy_range_short instead
Fn->copy_array_range_string is deprecated. Use Array->copy_range_string instead
Fn->copy_array_string is deprecated. Use Array->copy_tring instead
Fn->dump_array_byte is deprecated. Use Array->dump_byte instead
Fn->dump_array_double is deprecated. Use Array->dump_double instead
Fn->dump_array_float is deprecated. Use Array->dump_float instead
Fn->dump_array_int is deprecated. Use Array->dump_int instead
Fn->dump_array_long is deprecated. Use Array->dump_long instead
Fn->dump_array_object is deprecated. Use Array->dump_object instead
Fn->dump_array_short is deprecated. Use Array->dump_short instead
Fn->dump_array_string is deprecated. Use Array->dump_string instead
Fn->dump_array_unsigned_byte is deprecated. Use Array->dump_unsigned_byte instead
Fn->dump_array_unsigned_int is deprecated. Use Array->dump_unsigned_int instead
Fn->dump_array_unsigned_long is deprecated. Use Array->dump_unsigned_long instead
Fn->dump_array_unsigned_short is deprecated. Use Array->dump_unsigned_short instead
Fn->equals_array_byte is deprecated. Use Array->equals_byte instead
Fn->equals_array_double is deprecated. Use Array->equals_double instead
Fn->equals_array_float is deprecated. Use Array->equals_float instead
Fn->equals_array_int is deprecated. Use Array->equals_int instead
Fn->equals_array_long is deprecated. Use Array->equals_long instead
Fn->equals_array_object is deprecated. Use Array->equals_object instead
Fn->equals_array_short is deprecated. Use Array->equals_short instead
Fn->equals_array_string is deprecated. Use Array->equals_string instead
Fn->memcpy_byte is deprecated. Use Array->memcpy_byte instead
Fn->memcpy_double is deprecated. Use Array->memcpy_double instead
Fn->memcpy_float is deprecated. Use Array->memcpy_float instead
Fn->memcpy_int is deprecated. Use Array->memcpy_int instead
Fn->memcpy_long is deprecated. Use Array->memcpy_long instead
Fn->memcpy_short is deprecated. Use Array->memcpy_short instead
Fn->memmove_byte is deprecated. Use Array->memmove_byte instead
Fn->memmove_double is deprecated. Use Array->memmove_double instead
Fn->memmove_float is deprecated. Use Array->memmove_float instead
Fn->memmove_int is deprecated. Use Array->memmove_int instead
Fn->memmove_long is deprecated. Use Array->memmove_long instead
Fn->memmove_short is deprecated. Use Array->memmove_short instead
Fn->memset_byte is deprecated. Use Array->memset_byte instead
Fn->memset_double is deprecated. Use Array->memset_double instead
Fn->memset_float is deprecated. Use Array->memset_float instead
Fn->memset_int is deprecated. Use Array->memset_int instead
Fn->memset_long is deprecated. Use Array->memset_long instead
Fn->memset_object is deprecated. Use Array->memset_object instead
Fn->memset_short is deprecated. Use Array->memset_short instead
Fn->new_array_proto is deprecated. Use Array->new_proto instead
Fn->sprintf is deprecated. Use Format->sprintf instead
[BUG FIX]
* Fix the bug that logical and operater and logical or operator don't return the evaluated value.
[SPECIFICATION BUG FIX]
* Fix the specification bug that logical and operater and logical or operator don't return the evaluated value.
[NON BACKWORD COMPATIBLE CHANGES]
* The following methods are moved from Fn class to Sort class.
sort_byte
sort_double
sort_float
sort_int
sort_long
sort_object
sort_short
sort_string
0.9608 2022-06-16
[CHANGE]
* Add "--genlib" option to "spvmdist" command.
* Add "--print-dependent-resources" and "-p" options to "spvmcc" command.
[BUG FIX]
* Fix the bug that spvmcc don't set @INC to the value of -I.
* Fix many bugs of the resource sysmtem of "spvmcc" command.
[NON BACKWORD COMPATIBLE CHANGES]
* remove "dynamic-lib" option form "spvmcc" command.
* remove "static-lib" option form "spvmcc" command.
0.9607 2022-06-15
[CHANGE]
* Add the following methods to Fn class
static method memset_byte : void ($dest : byte[], $dest_offset : int, $value : byte, $length : int)
static method memset_double : void ($dest : double[], $dest_offset : int, $value : double, $length : int)
static method memset_float : void ($dest : float[], $dest_offset : int, $value : float, $length : int)
static method memset_int : void ($dest : int[], $dest_offset : int, $value : int, $length : int)
static method memset_long : void ($dest : long[], $dest_offset : int, $value : long, $length : int)
static method memset_short : void ($dest : short[], $dest_offset : int, $value : short, $length : int)
static method memset_object : void ($dest : object[], $dest_offset : int, $value : object, $length : int)
static method memcpy_object : void ($dest : object[], $dest_offset : int, $source : object[], $source_offset : int, $length : int)
static method memmove_object : void ($dest : object[], $dest_offset : int, $source : object[], $source_offset : int, $length : int)
* Add class_id operator.
* Add "get_resource" method to "SPVM::Builder::Config" module.
* Add "get_resource_names" method to "SPVM::Builder::Config" module.
* Add "builder_include_dir" field to "SPVM::Builder::Config" module.
* Add "file_optional" field to "SPVM::Builder::Config" module.
* Add "own_include_dir" field to "SPVM::Builder::Config" module.
* Add "own_src_dir" field to "SPVM::Builder::Config" module.
* Add "lib_link_abs" field to "SPVM::Builder::Config" module.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove "add_resources" and use from "SPVM::Builder::Config" module. Instead, use "use_resource" method.
* Remove "resources" method from "SPVM::Builder::Config" module. Intead, use "get_resource" method and "get_resource_names" methods.
* The default value of "include_dirs" of "SPVM::Builder::Config" module becomes an empty array reference.
* "new" method of "SPVM::Builder::Config" module must need "file" option.
* Remove "search_lib_dirs_from_config_libpth" from "SPVM::Builder::Config" module.
* Remove "get_include_dir", "get_lib_dir", "get_src_dir", "search_lib_dirs_from_cc_info"
"search_include_dirs_from_config_incpth", "to_hash" from "SPVM::Builder::Config" module.
0.9606 2022-06-13
[CHANGE]
* Add build_dynamic_lib_dist_precompile method to SPVM::Builder::API.
This is same as build_shared_lib_dist_precompile method.
build_shared_lib_dist_precompile method is remained for backwards compatibility.
* Add build_dynamic_lib_dist_native method to SPVM::Builder::API.
This is same as build_shared_lib_dist_native method.
build_shared_lib_dist_native method is remained for backwards compatibility.
* Add config field to SPVM::Builder::ObjectFileInfo.
* Add config field to SPVM::Builder::LinkInfo.
* Add output_type field to SPVM::Builder::Config.
* Add lib_type field to SPVM::Builder::ObjectFileInfo.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove is_exe method from SPVM::Builder::Config.
* Remove is_resource field from SPVM::Builder::ObjectFileInfo.
* Remove is_exe field from SPVM::Builder::ObjectFileInfo.
* Remove is_exe field from SPVM::Builder::LinkInfo.
* Remove is_lib_file field from SPVM::Builder::ObjectFileInfo.
* Rename SPVM::Builder::ObjectFileInfo's "object_file" field to "file".
0.9605 2022-06-10
[CHANGE]
* switch statement can have only default statement.
* switch statement don't need to have case statements.
* The values of the case statements can't be duplicated.
* Perform unary numeric widening conversion to the condition of switch statement.
* "break" statement can be ommited.
* Improve the messages of the compilation errors.
* Add the following functions to Fn class
static method BYTE_MAX : byte ()
static method BYTE_MIN : byte ()
static method SHORT_MAX : short ()
static method SHORT_MIN : short ()
static method INT_MAX : int ()
static method INT_MIN : int ()
static method LONG_MAX : long ()
static method LONG_MIN : long ()
static method UBYTE_MAX : byte ()
static method USHORT_MAX : short ()
static method UINT_MAX : int ()
static method ULONG_MAX : long ()
static method FLOAT_MAX : float ()
static method FLOAT_MIN : float()
static method DOUBLE_MAX : double ()
static method DOUBLE_MIN : double ()
* Add SPVM::Builder::Resource module
* Add use_resource method to SPVM::Builder::Config
* Resource system is separated from SPVM moudle system
* Resource doesn't need native module file.
* Add --resource option to spvmdist.
0.9604 2022-06-08
[NON BACKWORD COMPATIBLE CHANGES]
* Remove Unicode module. Unicode module becomes CPAN module.
* Remove Regex module. Regex module becomes CPAN module.
0.9603 2022-06-07
[CHANGE]
* Add --no-pm-file option to spvmdist command
* Add Fn->is_hex_digit.
* Add Fn->contains.
* Add Fn->get_next_code_point.
* Add Fn->look_next_code_point.
* Generate Foo.native/src/.gitkeep and Foo.native/include/.gitkeep in "--native" option of "spvmdist".
* Fn class doesn't depend on Regex and Unicode class.
* Add MANIFEST to .gitignore file that is generated by "spvmdist".
* Add basic test SPVM module file to the files that are generated by "spvmdist".
[BUG FIX]
* Fix the name argument of Makefile.PL that is generated by "spvmdist" command.
* Fix the bug that t/basic.t that is generated by "spvmdist" command fails.
* Fix the bug that MANIFEST.SKIP that "spvmdist" command generates is wrong.
* Fix the bug that Makefile.PL that "spvmdist" command generates is wrong.
[NON BACKWORD COMPATIBLE CHANGES]
* Rename SPVM::Builder::Generator::Dist to SPVM::Dist.
* Remove Fn->replace.
* Remove Fn->match.
* "SPVM-" prefix is added to the default output directory of "spvmdist" command.
0.9602 2022-06-07
[CHANGE]
* Improve compilation error messages.
* add "spvmdist" command.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove "spvmgenlib" command. The important fetures are merged into "spvmdist"
[Before]
spvmgenlib --module-dir t/default/lib/SPVM TestCase::CompileError::Foo
[After]
spvmdist -f --only-lib-files TestCase::CompileError::Foo t/default/lib
0.9601 2022-06-01
[CHANGE]
* Regex class support "i" (ignore case) option.
* Logical operator can be used as operands.
my $ret = !1;
my $ret = 1 && 1;
my $ret = 1 || 1;
[NON BACKWORD COMPATIBLE CHANGES]
* Change ByteList->new method definition
[Before]
static method new : ByteList ($array : byte[])
[After]
static method new : ByteList ($array : byte[]...)
* Change DoubleList->new method definition
[Before]
static method new : DoubleList ($array : double[])
[After]
static method new : DoubleList ($array : double[]...)
* Change FloatList->new method definition
[Before]
static method new : FloatList ($array : float[])
[After]
static method new : FloatList ($array : float[]...)
* Change Hash->new method definition
[Before]
static method new : Hash ($key_values : object[])
[After]
static method new : Hash ($key_values : object[]...)
* Change IntList->new method definition
[Before]
static method new : IntList ($array : int[])
[After]
static method new : IntList ($array : int[]...)
* Change List->new method definition
[Before]
static method new : List ($array : object[])
[After]
static method new : List ($array : object[]...)
* Change LongList->new method definition
[Before]
static method new : LongList ($array : long[])
[After]
static method new : LongList ($array : long[]...)
* Change ShortList->new method definition
[Before]
static method new : ShortList ($array : short[])
[After]
static method new : ShortList ($array : short[]...)
* Change StringList->new method definition
[Before]
static method new : StringList ($array : string[])
[After]
static method new : StringList ($array : string[]...)
* Change Regex->new method definition
[Before]
static method new : Regex ($re_str : string)
[After]
static method new : Regex ($re_str_and_options : string[]...)
[BUG FIX]
* Fix the bug that the tests of FreeBSD 9.1 fail.
0.96 2022-05-25
[CHANGE]
* This is major version up from 0.95xx. SPVM language becomes a little more stable in my opinion.
* Support die statement without the operand again. This was remove at 0.9504(2021-02-10).
die;
* Add Fn->match method
* Simplify the compilation error messages of the character literal
* Support brace in the hexadecimal escape character
'\x{A}'
'\x{6A}'
"Foo \x{A} Bar"
* Support single character in the hexadecimal escape character
'\xA'
"Foo \xA Bar"
* Improve the compilation error message of the Unicode escape character.
* Add the "cap1", "cap2", "cap3", "cap4", "cap5", "cap6", "cap7", "cap8", "cap9", "cap10" methods
to Regex class. These are corresponding to Perl's $1, $2, $3 ... $10.
* Improve the compilation error messages of variable expansion.
[BUG FIX]
* Fix bug that Regex don't work well in the following case.
my $result = Fn->replace("xyzAAAxyzAAA", "A+", "BBB", "g");
* Fix the bug that variable expansion doesn' support the arrow between braces or brackets such as "$minimals->[1]->{x}".
[SPECIFICATION FIX]
* Add string literal escape character \$
* Hexadecimal escape charcter represents any value of byte type
[NON BACKWORD COMPATIBLE CHANGES]
* The unicode copde point of Unicode escape character must be a Unicode scalar value.
0.9517 2022-05-19
[CHANGE]
* Numeric literal error messages.
* Add "is_unicode_scalar_value" method to Unicode module.
* Add "chr" method to Fn module.
* Add "ord" method to Fn module.
* Add "%lx" specifier to Fn->sprintf method.
* Add "%lX" specifier to Fn->sprintf method.
* Support any precision of %f of Fn->sprintf.
* Add "repeat" method to Fn module.
* Float object can be passed to Fn->srpintf "%f" and "%g" specifier.
* Int object can be passed to Fn->srpintf "%c" specifier.
[BUG FIX]
* Fix the bug Github #212. Tests fail when perl is built with -DDEBUGGING set in ccflags [rt.cpan.org #142336].
* Fix the bug that integer literal octal natation 0_123 is interpretted as 123, not 0123.
* Fix the bug that switch statement jump the wrong position when default statement doesn't exist.
[SPECIFICATION FIX]
* "+" just before integer literal is tokenized as an unary operator.
* C<-> can be at the beginning of integer literal of hex, octet, binary notations.
[NON BACKWORD COMPATIBLE CHANGES]
* Fn->sprintf("%+5u", 123) become " 123" from " +123". This becomes same as the result of Perl sprintf.
* Fn->sprintf("%+5lu", 123) become " 123" from " +123". This becomes same as the result of Perl sprintf "%u".
* Remove Fn->sprintf %U specifier because I relalize %U has different meaning in Perl sprintf.
Use %c instead of %U.
0.9516 2022-05-11
[CHANGE]
* Improve symbol name checking.
* The string literal of the left operand of the fat camma can't contains \"::\"
* Add no_precompile field to SPVM::Builder::Config::Exe.
* Add no_compiler_api field to SPVM::Builder::Config::Exe.
* Add dynamic_lib field to SPVM::Builder::Config::Exe.
* Add static_lib field to SPVM::Builder::Config::Exe.
* Add SPVM::Document::NativeMethod document. Native methods of SPVM::Document::NativeAPI is moved to this document.
* Improve the messages of class name compilation errors.
* Improve the messages of method name compilation errors.
* Improve the messages of field name compilation errors.
[BUG FIX]
* Fix the bug that local variable can contain "::".
* Fix the bug that the method name of the method definition can contain "::".
[NON BACKWORD COMPATIBLE CHANGES]
* Remove "any_object_basic_type_id" native API. ID 155 is reused by "free_env_prepared" native API.
* Remove "string_basic_type_id" native API. ID 162 is reused by "cleanup_global_vars" native API.
0.9515 2022-05-09
[CHANGE]
* Add cloneable_clone to Point class.
* Point class has Cloneable interface.
* Interface can have interface statment.
* Interface type and callback type can be assign to interface type that has the interface.
* Interface type and callback type can be assign to callback type that has the callback.
* Allow type cast from interface type to callback type
* Allow type cast from callback type to interface type
* Improve calling method error messages.
* The "has_impl" operator can check anon method
if (has_impl $interface) {
}
[BUG FIX]
* Fix the bug that has_impl can specify not found method.
* Interface can have interface guarantees
* Fix the bug that switch statement is wrong behaivior when the count of case statements is greater than 255.
* Fix the bug that "has_impl" operator can't do precompile.
[NON BACKWORD COMPATIBLE CHANGES]
* Revert 0.9514 Methods of interfaces must have the names.
* implement statement is renamed to interface statement.
* A interface type must have one required method.
* A callback type must have one required method.
* A class must have the required methods defined in the interface classes.
* Remove callback_t. The feature of callback_t is merged into interface_t.
* Add the following native APIs
"free_env_prepared", "get_class_var_id_cache", "get_field_id_cache", "get_method_id_cache"
"check_runtime_assignability_array_element", "check_runtime_assignability",
"free_env_raw", "new_env_raw", "allocator", "api",
* Remove SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CALLBACK
* Change ID of SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_ANY_OBJECT from 10 to 9
* Remove "byte_object_basic_type_id" native API. ID 9 is reused by "api" native API.
* Remove "short_object_basic_type_id" native API. ID 10 is reused by "allocator" native API.
* Remove "int_object_basic_type_id" native API. ID 11 is reused by "new_env_raw" native API.
* Remove "long_object_basic_type_id" native API. ID 12 is reused by "free_env_raw" native API.
* Remove "float_object_basic_type_id" native API. ID 13 is reused by "check_runtime_assignability" native API.
* Remove "double_object_basic_type_id" native API. ID 14 is reused by "check_runtime_assignability_array_element" native API.
* Remove "has_callback" native API. ID 106 is reused Y_CALLBACK
* Change ID of SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_ANY_OBJECT from 10 to 9
* Remove "byte_object_basic_type_id" native API. ID 9 is reused by "api" native API.
* Remove "short_object_basic_type_id" native API. ID 10 is reused by "allocator" native API.
* Remove "int_object_basic_type_id" native API. ID 11 is reused by "new_env_raw" native API.
* Remove "long_object_basic_type_id" native API. ID 12 is reused by "free_env_raw" native API.
* Remove "float_object_basic_type_id" native API. ID 13 is reused by "check_runtime_assignability" native API.
* Remove "double_object_basic_type_id" native API. ID 14 is reused by "check_runtime_assignability_array_element" native API.
* Remove "has_callback" native API. ID 106 is reused by "is_object_array" native API.
* Remove "no_symbol_cache_flag" native API. ID 176 is reused by "get_method_id_cache" native API.
* Remove "set_no_symbol_cache_flag" native API. ID 177 is reused by "get_field_id_cache" native API.
* Remove "get_class_var_id_cache" native API. ID 178 is reused by "get_class_var_id_cache" native API.
* "has_implemenet" operator is renamed to "has_impl".
0.9514 2022-05-02
[CHANGE]
* Add no_compiler_api to SPVM::Builder::Config::Exe
* Add no_precompile to SPVM::Builder::Config::Exe
* Add dynamic_lib to SPVM::Builder::Config::Exe
* Add static_lib to SPVM::Builder::Config::Exe
* Improve resource system. Don't use ar command.
* Add to_string method to Point class.
* Point class has Stringable interface.
* Add the following Native API constant values of basic type ids.
0 SPVM_NATIVE_C_BASIC_TYPE_ID_UNKNOWN
1 SPVM_NATIVE_C_BASIC_TYPE_ID_UNDEF
2 SPVM_NATIVE_C_BASIC_TYPE_ID_VOID
3 SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE
4 SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT
5 SPVM_NATIVE_C_BASIC_TYPE_ID_INT
6 SPVM_NATIVE_C_BASIC_TYPE_ID_LONG
7 SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT
8 SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE
9 SPVM_NATIVE_C_BASIC_TYPE_ID_STRING
10 SPVM_NATIVE_C_BASIC_TYPE_ID_ANY_OBJECT
11 SPVM_NATIVE_C_BASIC_TYPE_ID_BYTE_OBJECT
12 SPVM_NATIVE_C_BASIC_TYPE_ID_SHORT_OBJECT
13 SPVM_NATIVE_C_BASIC_TYPE_ID_INT_OBJECT
14 SPVM_NATIVE_C_BASIC_TYPE_ID_LONG_OBJECT
15 SPVM_NATIVE_C_BASIC_TYPE_ID_FLOAT_OBJECT
16 SPVM_NATIVE_C_BASIC_TYPE_ID_DOUBLE_OBJECT
17 SPVM_NATIVE_C_BASIC_TYPE_ID_BOOL_OBJECT
* Add the following Native API constant values of basic type categories.
0 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNKNOWN
1 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_NOT_FOUND_CLASS
2 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_UNDEF
3 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_VOID
4 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_NUMERIC
5 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_MULNUM
6 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_STRING
7 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS
8 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE
9 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CALLBACK
10 SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_ANY_OBJECT
* Add SPVM Precompile Native APIs. The document is SPVM::Document::NativeAPI::Precompile.
* Add SPVM String Buffer Native APIs. The document is SPVM::Document::NativeAPI::StringBuffer.
* Add SPVM Allocator Native APIs. The document is SPVM::Document::NativeAPI::Allocator.
* Improve SPVM::Document::NativeAPI::Compiler.
* Improve SPVM::Document::NativeAPI::Runtime.
* Improve type cast error messages.
* Improve dump test
[Before]
object_value => {
byte_value => 0,
short_value => 0,
int_value => 0,
long_value => 0,
float_value => 0,
double_value => 0,
string_value => undef,
int_array => undef,
object_value => undef
} : TestCase::DumpTest1 (0x55f472a79f30)
[After]
object_value => TestCase::DumpTest1 (0x55f472a79f30) {
byte_value => 0,
short_value => 0,
int_value => 0,
long_value => 0,
float_value => 0,
double_value => 0,
string_value => undef,
int_array => undef,
object_value => undef
}
* Allow same mulnum type cast
my $z_src : Complex_2d;
my $z_dist = (Complex_2d)$z_src;
* Allow same reference type cast
my $num = 3;
my $num_ref : int* = \$num;
my $num_ref2 = (int*)$num_ref;
[BUG FIX]
* Fix the bug that multi-dimensional array can't assing to any object array "object[]".
* Fix the bug that SPVM::Builder::Util::API::create_make_rule_native can't detect native file extension.
* Fix the bug that unboxing type conversion doesn't throw the exception.
* Fix the bug that type cast to numeric array compilation error is wrong.
* Improve the message of type cast compilation error.
* Fix type cast many bugs.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove -O|--optimize option from spvmcc.
* Remove --dynamic-lib option from spvmcc.
* Remove --static-lib option from spvmcc.
* Methods of interfaces must have the names.
0.9513 2021-04-23
[NON BACKWORD COMPATIBLE CHANGES]
* Remove Fn->srand because this method is not thread safe.
* Change Fn->crand arguments because this method become thread safe.
[Before]
static method crand : int ();
[After]
static method crand : int ($seed : int*);
* Change Fn->rand arguments because this method become thread safe.
[Before]
static method rand : double ()
[After]
static method rand : double ($seed : int*)
0.9512 2021-04-21
[CHANGE]
* Add Point module.
* Improve method call error message.
* Add --dynamic-lib option to spvmcc. spvmcc can create a dynamic library.
* Add --static-lib option to spvmcc. spvmcc can create a static library.
* Cache method id, field id, class variable id in precompile.
[NON BACKWORD COMPATIBLE CHANGES]
* new_stack_trace_raw and new_stack_trace don't need file argument. File name got from class information.
new_stack_trace_raw and new_stack_trace receive method id.
[Before]
void* (*new_stack_trace_raw)(SPVM_ENV* env, void* exception, const char* class_name, const char* method_name, const char* file, int32_t line);
void* (*new_stack_trace)(SPVM_ENV* env, void* exception, const char* class_name, const char* method_name, const char* file, int32_t line);
[After]
void* (*new_stack_trace_raw)(SPVM_ENV* env, void* exception, int32_t method_id, int32_t line);
void* (*new_stack_trace)(SPVM_ENV* env, void* exception, int32_t method_id, int32_t line);
* Rename SPVM::Comparator::Object module to SPVM::Comparator module.
* Native API "alloc_memory_block_zer" allocs memory for the envrironment, instead of the runtime
* Native API "free_memory_block" frees memory for the envrironment, instead of the runtime
* Native API "get_memory_blocks_count" gets the count of memory blocks for the envrironment, instead of the runtime
0.9511 2021-04-18
[CHANGE]
* Support cast from class muldim array to interface muldim array
* Support cast from class muldim array to callback muldim array
* Add postfix type cast syntax
$num->(string)
This is same as
(string)$num;
* Improve field access error message.
* Move compiler native APIs from env->compier_xxx to env->api->compiler->xxx.
// Compiler API
void* compiler_api = env->api->compiler;
// New compiler
void* compiler = compiler_api->new_compiler();
// Compile SPVM
int32_t status = compiler_api->compile_spvm(compiler, "MyClass");
// Free compiler
compiler_api->free_compiler(compiler);
* Move the following native APIs to env->api->runtime->xxx.
get_precompile_method_address
set_native_method_address
set_precompile_method_address
get_method_id_without_signature
get_method_id_without_signature
get_constant_string_value
// Runtime API
void* runtime_api = env->api->runtime;
// New runtime
void* runtime = runtime_api->new_runtime();
// Free runtime
runtime_api->free_runtime(runtime);
* Add SPVM::Document::NativeAPI::Compiler document.
* Add SPVM::Document::NativeAPI::Runtime document.
* Improve English syntax of error messages.
[BUG FIX]
* Fix the bug that dump weaken objects.
* Fix the bug of isweak operator compile checking.
[NON BACKWORD COMPATIBLE CHANGES]
* Internally used Native APIs object_type_category_offset become always NULL.
* Remove native APIs from env->compier_xxx. This APIs is moved to compiler native APIs.
* Remove the following native APIs
get_precompile_method_address
set_native_method_address
set_precompile_method_address
get_method_id_without_signature
get_method_id_without_signature
get_constant_string_value
* Native API "is_object_array" ID becomes 186
* Remove the following compiler APIs.
int32_t (*get_methods_length)(void* compiler, int32_t class_id);
int32_t (*get_method_id)(void* compiler, int32_t class_id, int32_t method_index_of_class);
int32_t (*get_method_id_by_name)(void* compiler, const char* class_name, const char* method_name);
const char* (*get_method_name)(void* compiler, int32_t method_id);
const char* (*get_method_signature)(void* compiler, int32_t method_id);
int32_t (*is_anon_method)(void* compiler, int32_t method_id);
int32_t (*is_init_block_method)(void* compiler, int32_t method_id);
int32_t (*is_native_method)(void* compiler, int32_t method_id);
int32_t (*is_precompile_method)(void* compiler, int32_t method_id);
const char* (*get_class_module_file)(void* compiler, int32_t class_id);
int32_t (*get_class_id)(void* compiler, const char* class_name);
int32_t (*get_classes_length)(void* compiler);
const char* (*get_class_name)(void* compiler, int32_t class_id);
int32_t (*is_anon_class)(void* compiler, int32_t class_id);
int32_t (*get_method_class_id)(void* compiler, int32_t method_id);
* Reorder compiler native APIs.
0.9510 2021-04-05
[CHANGE]
* Add alias syntax
* Improve the error messages of object-to-numeric type conversion
* Add type comment syntax
* Support cast from class array to interface array
* Support cast from class array to callback array
[BUG FIX]
* Fix the bug that the runtime is not freed.
* Fix the bug that SPVM::new_object_array can't recieve object[] type correctly.
* Fix the bug that Exchange API call_spvm_method can recieve from object[] to element[].
* Fix the bug that spvmcc "-B|--build-dir" option is ignored.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove implicte type convertion Perl array reference to SPVM object and element[]
This is a bug fix because the right convesion is impossible,
but the following code raise an exception, and the code must be rewirtten.
[Before]
my $list = SPVM::List->new([]);
[After]
my $list = SPVM::List->new(SPVM::new_object_array("Int[]", []));
* The type of argument of Hash->new is changed. Sorry, this is merely my bad mistake. The type of value of hash is any object type.
[Before]
static method new : Hash ($key_values : element[]);
[After]
static method new : Hash ($key_values : object[]);
* Remove oarray type that is deprecated at 0.9509.
* The feature of element[] type is merged to object[] type and remove element[] type.
0.9509 2021-03-23
[DEPRECATIONS]
* oarray type is deprecated. oarray type will be removed at 0.9510.
[WARNINGS]
* Interfaces and IDs of Native APIs that is added after 0.9506+(181+) will be changed many times.
because I realize Native APIs that compile SPVM are not yet implemented correctly in tests.
[BUG FIX]
* Fix the bug that spvmcc can't detect the change of config file.
[CHANGE]
* Add element[] type. This is same as oarray type, but element[] type has correct type dimension.
* Add Fn->is_numeric_array, Fn->is_mulnum_array doc.
* Add Fn->is_object_array
* Add is_object_array native API.
* Native API get_elem_byte_size uses only runtime information
* Native API has_callback uses only runtime information
* Native API has_interface uses only runtime information
* Separate compiler allocator and runtime allocator.
The memory allocated at compile time is freed just before runtime.
* Add get_method_id_without_signature native API.
* Add get_constant_string_value native API.
* Add compiler_build_runtime_info native API.
* Rename compiler_build_runtime_info to compiler_build_runtime native API.
* Change Native API "compiler_build_runtime" argument and return values.
[NON BACKWORD COMPATIBLE CHANGES]
* oarray type signature change from oarray to element[].
For this reason, 0.9510 don't have binary compatibility of precompiled source from 0.9509
* Rename Internal native API "compiler" field to "runtime_info"
because in this release SPVM compiler and runtime is completly separated.
I think the effect is litte because this is internal field.
* Rename native API new_compiler to compiler_new
becuae this is my mistake and compiler API shoud start compiler_.
This has a litte effect over 0.9506+.
* The native API compiler methods is changed to runtime methods
because I realize setting and getting native/precompile address
should be done at only runtime. This has a litte effect over 0.9506+.
Change Native API compiler_get_native_method_address to get_native_method_address
Change Native API compiler_set_native_method_address to set_native_method_address
Change Native API compiler_get_precompile_method_address to get_precompile_method_address
Change Native API compiler_set_precompile_method_address to set_precompile_method_address
* Internally used "memory_blocks_count" native API is no more used. The count of memory blocks is managed in "runtime_info".
Because this is internal used, the effect is little.
* Change the following Native APIs. First argument don't receive env.
[Before]
SPVM_ENV* (*new_env_raw)(SPVM_ENV* env);
void* (*compiler_new)(SPVM_ENV* env);
void (*compiler_free)(SPVM_ENV* env, void* compiler);
void (*compiler_set_start_line)(SPVM_ENV* env, void* compiler, int32_t start_line);
int32_t (*compiler_get_start_line)(SPVM_ENV* env, void* compiler);
void (*compiler_set_start_file)(SPVM_ENV* env, void* compiler, const char* start_file);
const char* (*compiler_get_start_file)(SPVM_ENV* env, void* compiler);
void (*compiler_add_module_dir)(SPVM_ENV* env, void* compiler, const char* module_dir);
int32_t (*compiler_get_module_dirs_length )(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_module_dir )(SPVM_ENV* env, void* compiler, int32_t module_dir_id);
int32_t (*compiler_compile_spvm)(SPVM_ENV* env, void* compiler, const char* class_name);
int32_t (*compiler_get_error_messages_length)(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_error_message)(SPVM_ENV* env, void* compiler, int32_t index);
int32_t (*compiler_get_class_id)(SPVM_ENV* env, void* compiler, const char* class_name);
int32_t (*compiler_get_classes_length)(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_class_name)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_is_anon_class)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_get_methods_length)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_get_method_id)(SPVM_ENV* env, void* compiler, int32_t class_id, int32_t method_index_of_class);
int32_t (*compiler_get_method_id_by_name)(SPVM_ENV* env, void* compiler, const char* class_name, const char* method_name);
const char* (*compiler_get_method_name)(SPVM_ENV* env, void* compiler, int32_t method_id);
const char* (*compiler_get_method_signature)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_anon_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_init_block_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_native_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_precompile_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
[After]
SPVM_ENV* (*new_env_raw)();
void* (*compiler_new)();
void (*compiler_free)(void* compiler);
void (*compiler_set_start_line)(void* compiler, int32_t start_line);
int32_t (*compiler_get_start_line)(void* compiler);
void (*compiler_set_start_file)(void* compiler, const char* start_file);
const char* (*compiler_get_start_file)(void* compiler);
void (*compiler_add_module_dir)(void* compiler, const char* module_dir);
int32_t (*compiler_get_module_dirs_length )(void* compiler);
const char* (*compiler_get_module_dir )(void* compiler, int32_t module_dir_id);
int32_t (*compiler_compile_spvm)(void* compiler, const char* class_name);
int32_t (*compiler_get_error_messages_length)(void* compiler);
const char* (*compiler_get_error_message)(void* compiler, int32_t index);
int32_t (*compiler_get_class_id)(void* compiler, const char* class_name);
int32_t (*compiler_get_classes_length)(void* compiler);
const char* (*compiler_get_class_name)(void* compiler, int32_t class_id);
int32_t (*compiler_is_anon_class)(void* compiler, int32_t class_id);
int32_t (*compiler_get_methods_length)(void* compiler, int32_t class_id);
int32_t (*compiler_get_method_id)(void* compiler, int32_t class_id, int32_t method_index_of_class);
int32_t (*compiler_get_method_id_by_name)(void* compiler, const char* class_name, const char* method_name);
const char* (*compiler_get_method_name)(void* compiler, int32_t method_id);
const char* (*compiler_get_method_signature)(void* compiler, int32_t method_id);
int32_t (*compiler_is_anon_method)(void* compiler, int32_t method_id);
int32_t (*compiler_is_init_block_method)(void* compiler, int32_t method_id);
int32_t (*compiler_is_native_method)(void* compiler, int32_t method_id);
int32_t (*compiler_is_precompile_method)(void* compiler, int32_t method_id);
0.9508 2021-03-04
[CHANGE]
* Add "get_constant_string" native API.
* SPVM::Builder can detect the changed of SPVM::Builder modules and SPVM core header files and source files in all places.
* Native API's no_symbol_cache_flag, set_no_symbol_cache_flag, get_no_symbol_cache_flag are currently unused.
By this, the peformance of calling methods is down, however, I plan to fix the performance in the future release.
* Reduce memory usage from about 24MB to 9.5MB on 64 bit environment by free memories that is created at compile time.
0.9507 2021-02-24
[CHANGE]
* SPVM don't support nmake. Already nmake test always fails until now.
* Add "index_len" method to the "Fn" module.
* Add "rindex_len" method to the "Fn" module.
[BUG FIX]
* Fix the bug that spvmcc can't detect the changes of the SPVM core header files.
0.9506 2021-02-22
[CHANGE]
* Add no_symbol_cache_flag, set_no_symbol_cache_flag, get_no_symbol_cache_flag native APIs
* Precompile and native method of SPVM core become reentrant if no_symbol_cache_flag is set.
* Fix precompile exception bugs when symbols is not found.
* Add print, print_stderr native APIs.
* env is not managed by SPVM memory allocator because env must exist before the compiler is created.
* Add the following native APIs for the compilation of SPVM
SPVM_ENV* (*new_env_raw)(SPVM_ENV* env);
void (*free_env_raw)(SPVM_ENV* env);
int32_t (*init_env)(SPVM_ENV* env);
void (*call_init_blocks)(SPVM_ENV* env);
void (*cleanup_global_vars)(SPVM_ENV* env);
void* (*new_compiler)(SPVM_ENV* env);
void (*compiler_free)(SPVM_ENV* env, void* compiler);
void (*compiler_set_start_line)(SPVM_ENV* env, void* compiler, int32_t start_line);
int32_t (*compiler_get_start_line)(SPVM_ENV* env, void* compiler);
void (*compiler_set_start_file)(SPVM_ENV* env, void* compiler, const char* start_file);
const char* (*compiler_get_start_file)(SPVM_ENV* env, void* compiler);
void (*compiler_add_module_dir)(SPVM_ENV* env, void* compiler, const char* module_dir);
int32_t (*compiler_get_module_dirs_length )(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_module_dir )(SPVM_ENV* env, void* compiler, int32_t module_dir_id);
int32_t (*compiler_compile_spvm)(SPVM_ENV* env, void* compiler, const char* class_name);
int32_t (*compiler_get_error_messages_length)(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_error_message)(SPVM_ENV* env, void* compiler, int32_t index);
int32_t (*compiler_get_class_id)(SPVM_ENV* env, void* compiler, const char* class_name);
int32_t (*compiler_get_classes_length)(SPVM_ENV* env, void* compiler);
const char* (*compiler_get_class_name)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_is_anon_class)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_get_methods_length)(SPVM_ENV* env, void* compiler, int32_t class_id);
int32_t (*compiler_get_method_id)(SPVM_ENV* env, void* compiler, int32_t class_id, int32_t method_index_of_class);
int32_t (*compiler_get_method_id_by_name)(SPVM_ENV* env, void* compiler, const char* class_name, const char* method_name);
const char* (*compiler_get_method_name)(SPVM_ENV* env, void* compiler, int32_t method_id);
const char* (*compiler_get_method_signature)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_anon_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_init_block_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_native_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
int32_t (*compiler_is_precompile_method)(SPVM_ENV* env, void* compiler, int32_t method_id);
void* (*compiler_get_native_method_address)(SPVM_ENV* env, void* compiler, int32_t method_id);
void* (*compiler_get_precompile_method_address)(SPVM_ENV* env, void* compiler, int32_t method_id);
void (*compiler_set_native_method_address)(SPVM_ENV* env, void* compiler, int32_t method_id, void* address);
void (*compiler_set_precompile_method_address)(SPVM_ENV* env, void* compiler, int32_t method_id, void* address);
[BUG FIX]
* Fix the line and the position of character in case that a compilation error occurs and some space character exists.
* Fix caching bug that the change of SPVM::Builder::Exe can't be detected.
0.9505 2021-02-16
[CHANGE]
* Improve the error message of getting and setting fields.
* Detect the change of the SPVM core precompile source code in precompile.
* Precompile methods is fallbacked to non-precompile methods
* Add interface feature
* spvmgenlib command generate main method instead of sum and print "Hello World!"
* Add Cloneable module.
[BUG FIX]
* Fix bug that is_read_only doesn't set condition flag.
* Fix bug that $self->set_x($self->x) become compile error.
[NON BACKWORD COMPATIBLE CHANGES]
* spvmgenlib command doesn't generate native module by default
--native-language option is needed.
[Before]
spvmgenlib MyLib
[After]
spvmgenlib MyLib --native-language c
0.9504 2021-02-10
[CHANGE]
* Add the make_read_only native API.
* Add the is_read_only native API.
* Add make_read_only statement.
* Add is_read_only operator.
* The string created by string literal become read-only.
* Read-only string can't be converted to mutable string.
* The key of Hash module become read-only string.
* Add native APIs
is_array
is_string
is_numeric_array
is_mulnum_array
* Add the "get_elem_byte_size" native API.
* Add the "new_array_proto" native API.
* Fn->new_array_proto throw an exception when the length is lower than 0.
* Add the "copy" native API.
* Add Fn->is_array, Fn->is_numeric_array, Fn->is_mulnum_array
* Add "new_array_proto_raw", "copy_raw" native APIs
* Add copy operator
* Add the "shorten" native API.
* Add Fn->shorten.
* Add Fn->chomp.
* Add Fn->memcpy.
* Add Fn->memmove.
[BUG FIX]
* Fix the bug that Fn->new_array_proto doesn't create multi numeric array and number array correctly.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove the syntax of no operand of warn and die statement.
This is not documented, but was defined in parsing syntax.
0.9503 2021-02-08
[CHANGE]
* Add divui, divul, remui, remul operators.
* Add new_string_len operator.
0.9502 2021-02-07
[CHANGE]
* SPVM::Document::LanguageSpecification becomes POD instead of HTML
* SPVM::Document::Tutorial becomes POD instead of HTML
* Add native api "string_basic_type_id"
[NON BACKWORD COMPATIBLE CHANGES]
* The keys of Hash module is copied defensively.
If you check the equality of the keys using == operator,
Please change eq operator instead.
0.9501 2021-02-04
[CHANGE]
* Improve compilation error messages. All method expressions is Foo->bar.
* Improve compilation error messages. All field expressions is Foo->{bar}.
* Improve compilation error messages. All class variable expressions is $Foo::Bar.
* Improve a assignment compilation error messege. "argument 2" -> "2th argument".
* Use native api "get_chars" more instead of "get_elems_byte" in the right places.
* Add mutable type qualifier.
* Improve a compilation error messege when the class is not finished at the end of the file.
* Add "value" method to StringBuffer class.
[NON BACKWORD COMPATIBLE CHANGES]
* string type become mutable using mutable type qualifir.
This means string is no more immutable.
Sorry. This is big change. If necessary, a defensive copy is needed.
The reason of this change is that I wanted to avoid slowing the performance of string processing.
I found this performance problem when I do tests of socket read/write using StringBuffer module.
* Remove srand initialization because Fn module depend on Time module.
Fn module should be caintan only number, string, and array utilities.
Plese call srand manually
Fn->srand(Time->time());
0.9500 2021-02-01
[CHANGE]
* Add SPVM::Builder::LinkInfo.
* Add is_lib_file field to SPVM::Builder::ObjectFileInfo.
* Add is_native_source to SPVM::Builder::ObjectFileInfo.
* ccflags field of SPVM::Builder::ObjectFileInfo has the default value [].
* Add utf32_to_utf16 method to Unicode module again.
* Add utf16_to_utf32 method to Unicode module again.
* Add utf16_to_utf8 method to Unicode module again.
* Add ERROR_INVALID_UTF8 method to Unicode module again.
[NON BACKWORD COMPATIBLE CHANGES]
* The second argument of before_link callback of SPVM::Builder::Config is changed.
[Before]
An array reference of SPVM::Builder::ObjectFileInfo objects
[After]
A SPVM::Builder::LinkInfo object
0.9133 2021-01-31
[CHANGE]
* byte[] object is available in eq, ne, gt, ge, lt, le, cmp . operators.
* Add the link to spvmgenlib command to the doc of SPVM.pm and the doc of SPVM::Document::NativeAPI
[FIX BUG]
* Fix the messages of the compilation errors of eq, ne, gt, ge, lt, le, cmp operator.
* Fix the bug that instance method signatures don't add "self" to the top of the arguments
[FIX DOCUMENT BUG]
* Add the document of get_bool_object_value of Native APIs.
0.9132 2021-01-28
[CHANGE]
* SPVM::Builder::Config::Exe default ldflags become empty list.
[FIX BUG]
* Fix the bug that spvmcc doesn't use libs, ldflags, lib_dirs fields.
* Fix the bug that spvmcc doesn't cache the executable file.
[FIX DOCUMENT BUG]
* Fix SPVM::Document::NativeAPI.
Fix from call_spvm_method_by_name to call_class_method_by_name
Fix from call_callback_method_by_name to call_instance_method_by_name
0.9131 2021-01-27
[CHANGE]
* Add build_shared_lib_dist_precompile to SPVM::Builder::API
* Add build_shared_lib_dist_native to SPVM::Builder::API
* Add build_dir option to new method of SPVM::Builder::API.
[BUG FIX]
* Fix the bug that build_shared_lib_dist of SPVM::Builder don't output the compilation error messages.
* Fix the bug that SPVM compilation error raise unexpected exception.
[NON BACKWORD COMPATIBLE CHANGES]
* create_make_rule_native of SPVM::Builder::Util::API doesn't use private API.
* create_make_rule_precompile of SPVM::Builder::Util::API doesn't use private API.
0.9130 2021-01-27
[CHANGE]
* Compilation error messages is saved as strings.
* Add SPVM::Builder::Util::API module for the public APIs of SPVM::Builder::Util.
SPVM::Builder::Util become a private module of SPVM. Please rewrite the codes.
[Before]
SPVM::Builder::Util::create_make_rule_native('Foo');
SPVM::Builder::Util::create_make_rule_precompile('Foo');
[After]
SPVM::Builder::Util::API::create_make_rule_native('Foo');
SPVM::Builder::Util::API::create_make_rule_precompile('Foo');
* Add SPVM::Builder::API module for the public APIs of SPVM::Builder.
* Add optimize_each field to SPVM::Builder::Config
* Add global_cc_each field to SPVM::Builder::Config::Exe
* Add global_ccflags_each field to SPVM::Builder::Config::Exe
* Add global_optimize_each field to SPVM::Builder::Config::Exe
* Add global_cc_each field to SPVM::Builder::CC
* Add global_ccflags_each field to SPVM::Builder::CC
* Add global_optimize_each field to SPVM::Builder::CC
* SPVM::Builder::CC uses global_cc_each, global_ccflags_each, global_optimize_each field.
* Add is_exe method to SPVM::Builder::Config and SPVM::Builder::Config::Exe.
* Add before_link field to SPVM::Builder::Config
* Execute a before_link field callback before the link in SPVM::Bulder::CC link method.
* Execute a before_link field callback before the link in SPVM::Bulder::Exe link method.
* Add SPVM::Builder::ObjectFileInfo module
[BAG FIX]
* Fix the bug that SPVM::Builder::Config::Exe return SPVM::Builder::Config object and SPVM::Builder::Config doesn't support inheritance.
[NON BACKWORD COMPATIBLE CHANGES]
* Change cc_each second argument of SPVM::Builder::Config from each source file to optional argument as hash reference
- source_file
- class_name
* Change ccflags_each second argument of SPVM::Builder::Config from each source file to optional argument as hash reference
- source_file
- class_name
- cc
* Remove global_ccflags fields of SPVM::Builder::Config::Exe. Please use global_ccflags_each instead.
* Remove add_global_ccflas method of SPVM::Builder::Config::Exe. Please use global_ccflags_each instead.
0.9129 2021-01-25
[CHANGE]
* Improve the error messages of character literals.
[FIX BUGS]
* Fix the bug that \b is escaped to ASCII Code 8 BS in the charater literal.
\b is a raw escape charater in the string literal. In document, \b is both escaped to ASCII Code 8 BS and \b is raw escape charater.
It is right that \b is a raw escape charater.
* Fix the bug that the uname of the platform can't be detected in Makefile.PL.
[NON BACKWORD COMPATIBLE CHANGES]
* Sorry. \b is not supported in the character literal. Please replace \b with \x08.
0.9128 2021-01-24
[CHANGE]
* Add spvmlibgen command and SPVM::Builder::Generator::Lib.
* Currently SPVM doesn't support Alpine Linux because segmentation fault occurs
due to incompatibility with glibc.
If you want to use SPVM on Alpine Linux,
please join SVPM project to fix the problems
[FIX BUGS]
* Fix the bug that "spvmcc -v" doesn't display the version.
0.9127 2021-01-22
[CHANGE]
* Improve "invalid method descriptor" error message.
* Improve exception stack trace error message.
[NON BACKWORD COMPATIBLE CHANGES]
* Change main method arguments that spvmcc boots
[Before]
static method main : int ($args : string[]) {
[After]
static method main : int ($start_file : string, $args : string[]) {
* Remove spvm command because perl command is enough. I realized spvm command is not needed now.
#!/usr/bin/perl
use strict;
use warnings;
use SPVM 'MyExe';
SPVM::MyExe->main($0, \@ARGV);
0.9126 2021-01-21
[FIX BUGS]
* Fix bugs that when native config file is not found, an exeption doesn't occur.
* Fix the bug that spvmcc don't see the config file when compile sources for own.
* Fix the bug that spvmcc don't see "force" option in the config file when source files are created.
[CHANGE]
* Add global_ccflags to SPVM::Builder::CC.
* module_dirs, build_dir of SPVM::Builder::Exe is saved to SPVM::Builder object.
* Add spvm command.
* Improve module not found error message.
* spvmcc bootstrap sources can detect the dependencies.
* the executable file created by spvmcc is cached.
* Add -c|--config option to spvmcc command.
The value is a config file that return SPVM::Builder::Config::Exe object.
[NON BACKWORD COMPATIBLE CHANGES]
* spvmcc -I option doesn't add "/SPVM" after the directory names.
0.9125 2021-01-19
[FIX BUGS]
* Fix the bug that clang is not detected.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove --ccflags, --lddlflags option of spvmcc
because these config is done in SPVM::Builder::Config::Exe.
* Remove extra_compiler_flags, extra_linker_flags from SPVM::Builder::Exe.
* Rename module_name of SPVM::Builde::Exe to class_name.
0.9124 2021-01-19
[CHANGES]
* The path of native config file are decided from the native module name.
* Simplify the cache logic to create precompile c source file.
* Unicode module use own utf8proc library(spvm_utf8proc) instead of original utf8proc library.
[FIX BUGS]
* Fix the bug that spvmcc --force option is ignored in creating precompile c source.
* Suppress Unicode module compile time warnings.
0.9123 2021-01-18
[CHANGES]
* SPMV standard modules and precompile source is compiled as gnu99 instead of c99
because gnu99 is more widely assumed in the exsiting C libraries than c99.
* new_cpp, new_cpp11 methods of SPVM::Builder::Config use the clang++ linker if the Perl itself was compiled by clang.
[NON BACKWORD COMPATIBLE CHANGES]
* Remove native/lib directory from the directories that libraries are searched for at runtime
because generally libraries exists in the system, not the module sources.
* Resoruce modules must be loaded as SPVM modules.
[FIX BUGS]
* Fix the bug that C++ native module can't find the symbol.
The reason of this is 0.9122 "new_cpp, new_cpp11 methods of SPVM::Builder::Config
use the clang++ compiler if the Perl itself was compiled by clang."
0.9122 2021-01-17
[CHANGES]
* new_cpp, new_cpp11 methods of SPVM::Builder::Config use the linker that linked Perl itself.
* new_cpp, new_cpp11 methods of SPVM::Builder::Config use the clang++ compiler if the Perl itself was compiled by clang.
[FIX BUGS]
* Fix the bug that C++ native API tests fail on FreeBSD.
0.9121 2021-01-15
[CHANGES]
* Improve the error messages that instance methods are called as class methods,
and class methods are called as instance methods
* Simplify the Makefile created by SPVM::Builder::Util::create_make_rule_native
and SPVM::Builder::Util::create_make_rule_precompile
[FIX BUGS]
* Fix the bug that the current class syntax "&_foo" becomes a compilation error.
* Fix the cache bug that when SPVM module file is updated, the shared library is not created.
* Fix the test bug that copmile cache test fails.
0.9120 2021-01-14
[CHANGES]
* Native and precompile shared object files are cached.
0.9119 2021-01-14
[CHANGES]
* Suppress clang 12+ -Wcompound-token-split-by-macro warnings in perl.h when compiling SPVM.xs
[NON BACKWORD COMPATIBLE CHANGES]
* This is interface bug fix required. The effect is little.
[Before]
void* (*alloc_memory_block_zero)(SPVM_ENV* env, int64_t byte_size);
[After]
void* (*alloc_memory_block_zero)(SPVM_ENV* env, size_t byte_size);
[FIX BUGS]
* Fix pointer class test bugs.
0.9118 2021-01-13
[CHANGES]
* Add cc_each, ccflags_each methods to SPVM::Builder::Config.
* Add new_gnu99 method to SPVM::Builder::Config.
* Remove perllib $Config{bin} dependency of creating Windows DLL.
* Improve resource not found messages.
* Output build commands in build_shared_lib_dist method.
* Don't create ar file in precompile.
[FIX BUGS]
* Fix the document that ccflags and ldflags of SPVM::Builder::Config default value is empty string.
The right description is an array reference that has default values.
* Fix the bug that SPVM::Builder::CC can't load resource include directories.
* Fix the bug that mac output ar warnings.
0.9117 2021-01-12
[CHANGES]
* ar file don't contains static link files.
* ar file don't contains SPVM module object file.
* Add checking resource symbol duplication. SPVM depends on nm command.
* Improve resource system. It resolve the depenedent resources,
and become more safety adding symbol duplication checking and the depenent file created time checking.
0.9116 2021-01-11
[FIX BUGS]
* Fix the bugs that C++ code can't be compiled
[CHANGES]
* Add "ext" field of SPVM::Builder::Config again for the SPVM native source extension.
0.9115 2021-01-11
[NON BACKWORD COMPATIBLE CHANGES]
* Revert most of 0.9114 Changes
Revert: Add file, file_optional, native_include_dir,
native_src_dir native_lib_dir, native_bin_dir
fields to SPVM::Builder::Config.
Revert: Need file field new, new_c, new_c99, new_cpp, new_cpp11 of SPVM::Builder::Config
0.9114 2021-01-10
[FIX BUGS]
* new_c, new_c99, new_cpp, new_cpp11 of SPVM::Builder::Config pass
arguments to new of SPVM::Builder::Config.
[CHANGES]
* Add file, file_optional, native_include_dir,
native_src_dir native_lib_dir, native_bin_dir
fields to SPVM::Builder::Config.
[NON BACKWORD COMPATIBLE CHANGES]
* Need file field new, new_c, new_c99, new_cpp, new_cpp11 of SPVM::Builder::Config
[Now Runtime Exception]
my $config = SPVM::Config->new;
[New Code]
my $config = SPVM::Config->new(file => __FILE__);
0.9113 2021-01-09
[CHANGES]
* Add "use" method to SPVM::Builder::Config. This method is the alias for "add_resources".
* Remove "ext" field of SPVM::Builder::Config because source files was needed to be specifed.
* Need Test::More 0.92+ to do tests.
* Rename sources field of SPVM::Builder::Config to source_files.
* Rename add_sources method of SPVM::Builder::Config to add_source_files.
0.9112 2021-01-07
[BUGS]
* Fix a unweaken memory leak bug.
0.9111 2021-01-07
[CHANGES]
* Improve compile error message "Can't locate ...".
[Before]
Can't locate Foo/Bar.spvm in @INC ...
[After]
Can't locate Foo/Bar.spvm to load Foo::Bar class in @INC ...
* Improve compile error message "... is different from". And this message is output only once.
[Before]
Class name "ClassNameDifferntFromModuleNameXXXXXXX" is different from
the class name corresponding to the module file "TestCase::CompileError::Class::ClassNameDifferntFromModuleName"
[After]
Wrong class name "ClassNameDifferntFromModuleNameXXXXXXX".
The class name must be "TestCase::CompileError::Class::ClassNameDifferntFromModuleName"
[BUGS]
* Fix the bugs that variable names can contain ":::".
* Fix the bugs that the type conversion from multi numrci type to object type is allowed.
* Fix the bugs that when class is not found in static method call, a segmentation fault occurs.
0.9110 2021-01-07
[CHANGES]
* Current class "cur->" is changed to "&"
[Before]
cur->sum(1, 2)
[After]
&sum(1, 2)
0.9109 2021-01-06
[CHANGES]
* SPVM is compiled as GNU99 instead of C99
SPVM source codes is pure C99, but is not pure C99.
Some platforms can't compile SPVM.xs that contains perl.h as C99.
0.9108 2021-01-06
[CHANGES]
* SPVM::get_exception return SPVM::BlessedObject::String
* SPVM::set_exception can receive a SPVM::BlessedObject::String object
* SPVM::new_byte_array_from_string encode the string using utf8::encode instead of Encode::encode('UTF-8', ...)
* Don't use hex floating point literal and %a specifier of sprintf
because it seems that some compilers don't support this C99 syntax.
0.9107 2021-01-05
[CHANGES]
* Native API new_env call INIT blocks.
* Add SPVM::Builder::Exe again. This is revert of 0.9019.
[BUGS]
* Fix string buffer memory allocate edge case bug.
0.9106 2021-01-04
[BUGS]
* Fix the memory blocks count in runtime environment.
0.9105 2021-01-03
[CHANGES]
* SPVM::get_memory_blocks_count and native api's get_memory_blocks_count return
the count of memory blocks created by the runtime environment. This is revert of 0.9103
0.9104 2021-01-02
[CHANGES]
* SPVM gcc option is simplified.
0.9103 2021-01-01
[CHANGES]
* Fix the bug that old string buffers of the compiler isn't freed when new memory is allocated.
* SPVM::get_memory_blocks_count and native api's get_memory_blocks_count return
all count of memory blocks created by the SPVM compiler and runtime.
[BUG FIX]
* Fix memory leaks of the compiler
* Fix memory leaks of class variables
0.9102 2021-12-24
[CHANGES]
* Upgrads ppport.h to fix Perl 5.8.7 compilation errors.
0.9101 2021-12-24
[CHANGES]
* The argument of exchange API calling method support the conversion from Perl array reference to SPVM multi numeric array.
0.9021 2021-12-24
[CHANGES]
* Reference symbol is changed from & to *.
0.9020 2021-12-23
[CHANGES]
* Remove Windows library searching path from ldflags of SPVM::Builder::Config
* Add exported_funcs field and add_exported_funcs method to SPVM::Builder::Config, and add the logic of adding exported functions.
* Add get_src_dir, get_include_dir, get_lib_dir to SPVM::Builder::Config.
* Create static library for SPVM natvie module
* Static resource is linked instead of dynamic resource.
* Remove function call syntax and function import syntax. You don't call static method without full qualified name.
This is because SPVM after version 1.0 want to keep backword compatible when new keywords is added.
* Add current package syntax "cur"
You can call the class method using "cur" keyword
class Foo {
static method test : void () {
# This means Foo->sum(1, 2)
my $ret = cur->sum(1, 2);
}
static method sum : int ($num1 : int, $num2 : int) {
return $num1 + $num2;
}
}
* Add class alias syntax
use Foo::Bar::Baz as FBB;
FBB->new;
0.9019 2021-12-21
[CHANGES]
* Rename SPVM::Builder::Config's get_libs, set_libs, unshift_libs, push_libs method to get_runtime_libs, set_runtime_libs, unshift_runtime_libs, push_runtime_libs
and don't add libraries to linker flags of linker.
* remove SPVM::Builder::Exe and spvmcc command again because one executable that is portable and work correctly without function conflicts is impossible after long thinking.
The implementation before removing is saved at the following branch.
https://github.com/yuki-kimoto/SPVM/releases/tag/before_remove_exe_20211216
* SPVM::Builder::Config "ccflags" default becomes empty string except for Windows. Windows is "-fPIC"
* Remove delete_std and get_std of SPVM::Builder::Config
* SPVM::Builder::CC->compile don't depend on Perl compiled environment.
* add SPVM_CC_DEBUG enviroment variable to print SVPM::Builder::CC compile and link outputs to stderr.
* Remove get_cccdlflags, set_cccdlflags, append_cccdlflags, prepend_cccdlflags of SPVM::Builder::Config
* Remove get_archlibexp, set_archlibexp of SPVM::Builder::Config
* remove get_shrpenv, and set_shrpenv. shrpenv config is not used when linking
* SPVM::Builder::CC->link don't depend on Perl compiled environment as possible.
* remove set_config and get_config of SPVM::Builder::Config
* remove replace_all_config of SPVM::Builder::Config
* to_hash of SPVM::Builder::Config return the content of SPVM::Builder::Config instead of ExtUtils::CBuilder config.
* add search_lib_dirs_from_cc_info of SPVM::Builder::Config
* add ext, cc, ccflags, include_dirs, ld, lddlflags, lib_dirs, runtime_lib_dirs, optimize,
quiet, search_lib_dirs_cb, force_compile fields to SPVM::Config
* remove set_ext, set_cc, set_ccflags, set_include_dirs, set_ld, set_lddlflags, set_lib_dirs, set_runtime_lib_dirs, set_optimize,
set_quiet, set_search_lib_dirs_cb, set_force_compile of SPVM::Config
* remove get_ext, get_cc, get_ccflags, get_include_dirs, get_ld, get_lddlflags, get_lib_dirs, get_runtime_lib_dirs, get_optimize,
get_quiet, get_search_lib_dirs_cb, get_force_compile of SPVM::Config
* remove unshift_lib_dirs, unshift_include_dirs, prepend_ccflags, prepend_lddlflags
* remove prepend_ccflags, prepend_lddlflags
* ccflags, lddlflags of SPVM::Builder::Config become an array reference
* runtime dynamic libraries are loaded from lib_dirs of SPVM::Builder::Config of each class.
* rename apeend_ccflags to add_ccflags, append_lddlflags to add_lddlflags
* rename push_include_dirs to add_include_dirs, push_lib_dirs to add_lib_dirs, push_libs to add_libs, push_runtime_libs to add_libs
* add_ccflags and add_lddlflags can receive list of SPVM::Builder::Config
* remove unshift_lib_dirs, unshift_include_dirs of SPVM::Builder::Config
* add add_libs to SPVM::Builder::Config
* SPVM::Builder::Config->new supports default values
* Add SPVM_CC_FORCE enviroment variables.
* Rename force_compile field of SPVM::Builder::Config to force.
* Add ld_optimize field of SPVM::Builder::Config.
* Add libs field to SPVM::Builder::Config
* Add add_static_libs and add_dynamic_libs methods to SPVM::Builder::Config
* Rename lddlflags field to ldflags, add_lddlflags method to add_ldflags
* remove runtime_libs filed field, add_runtime_libs method of SPVM::Builder::Config.
The runtime linking is resolved at compile time using absolute path.
* Add search_include_dirs_from_config_incpth, search_lib_dirs_from_config_libpth methods to SPVM::Builder::Config.
* Add resources field and add add_resources method to SPVM::Builder::Config, and implement resouce system of SPVM::Builder::CC
* A compile error raises an exception. A link error raises an exception.
* Add sources field and add_sources method to SPVM::Builder::Config. Only specified source files are compiled.
[BUG FIX]
* add push_lib_dirs of SPVM::Builder::Config. This is documented but doesn't exist.
0.9018 2021-12-11
[CHANGES]
* Depends on ExtUtils::CBuilder for Perl 5.8
[BUG FIXES]
* Fix bugs that tests of SPVM fails in some old Perl version.
0.9017 2021-12-11
[CHANGES]
* The parts of Makefile created by SPVM::Builder::Util::create_class_make_rule() become
more compatible the Makefile created by ExtUtils::MakeMaker.
This will maybe fix the fail of solaris make.
[BUG FIXES]
* Fix bugs that Fn->substr method is changed to Fn->methodstr by a mistake
* Fix a bug that the return type of Fn->abs method was double. This become int type
* Fix a bug that the return type of Fn->labs method was double. This become long type
0.9016 2021-12-08
[CHANGES]
* In Exchange API call method argument Perl refenrece to SPVM numeric reference convision,
the Perl reference must be scalar reference which referenced value is non-ref scalar.
* exchange api $string->to_string become croak if sv_utf8_docede fails.
* exchange api $array->to_elemes in string[] set SPVM::Blessed::String object as the element.
* add abs method to Fn module
* add labs method to Fn module
* add powi method to Fn module
* add powl method to Fn module
* remove SPVM::Math module from core. SPVM::Math is planed to be used as a CPAN module.
* Support many OSs again. SPVM want to support OSs that Perl supports as possible.
[BUGFIXES]
* None
0.9015 2021-09-24
[CHANGES]
* Bool module become embdded in SPVM core source
* rename Bool->true to Bool->TRUE
* rename Bool->false to Bool->FALSE
* add true keyword which means Bool->TRUE
* add false keyword which menas Bool->FALSE
* add bool context for Bool type.
if (Bool->TRUE) { # run }
if (Bool->FALSE) { # not run }
[BUGFIXES]
* None
0.9014 2021-09-21
[CHANGES]
* native api get_instance_method_id return -1 if the method is class method
* native api get_class_method_id return -1 if the method is not class method
* add native api get_instance_method_id_static
[BUGFIXES]
* None
0.9013 2021-09-14
[CHANGES]
* remove sub and self keyword and add method and static keyword. Sorry.
[Before]
sub foo : void ($self : self) {}
sub bar: void () {}
[After]
method foo : void () {}
static method bar : void () {}
* rename native api get_method_id_by_object to get_instance_method_id
* rename native api get_method_id to get_class_method_id
* Native api method signature don't need self.
[Before]
"int(self,long)"
[After]
"int(long)
* rename native api call_callback_method_by_name to call_instance_method_by_name
* rename native api call_spvm_method_by_name to call_class_method_by_name
* add native api call_class_method. This is alias for call_spvm_method
* add native api call_instance_method. This is alias for call_spvm_method
[BUGFIXES]
* None
0.9012 2021-09-10
[CHANGES]
* Exchange API call method string arugment copy count is reduced
* Remove SPVM::Unicode UTF-16 related methods because I concentrate UTF-8 and Unicode
* The name of SPVM module must start SPVM::, otherwise a compile error occurs.
For this, Many documents of tutorial, examples, etc are changed. Sorry.
* If the name is package name which start with upper case and the name is not start "SPVM::",
add "SPVM::" to the package name
* If a packag variable access contains :: and start with $ + upper case, and the name is not start "$SPVM::",
insert "SPVM::" to the package name after $
* Improve error message when package name is different from the package name corresponding to the module file
* use SPVM MODULE_NAME add "SPVM::" to the top of the module name if the module name does not t start with "SPVM::".
* Perl package name "SPVM::Foo" become correspoinding to SPVM class name "Foo".
This is big change because all SPVM::Foo in SPVM program must be rewriten to Foo. Sorry.
However, short name is good. SPVM::Sort->foo becomes Sort->foo
* create Fn module, remove NumberUtil, StringUtil, ArrayUtil modules. the funtions is moved to Fn module. Sorry.
However, short name is good. Fn->join(',', ["abc", "de"])
* package keyword is renamed to class. And all of the part of the methods and things which contains "package" is replaced to "class". Sorry
* Static method concept is changed to Class method
* Lexical Variable concept is changed to Local Variable for other language users.
* Lexical Analysis concept is changed to Tokenizing
* Native function prefix is changed to SPVM__ from SPNATIVE__. Sorry.
* Precompile function prefix is changed to SPVMPRECOMPILE__ from SPPRECOMPILE.
* SPVM::Builder::Exe target_class_name field is renamed to module_name
[BUGFIXES]
* None
0.9011 2021-08-31
[CHANGES]
* None
[BUGFIXES]
* Fix excnahge API any object return value bug
0.9010 2021-08-25
[CHANGES]
* improve SPVM::Document::ExchangeAPI
* add SPVM::Bool module
* add SPVM::BlessedObject::Array overloding array dereference
[BUGFIXES]
* None
0.9009 2021-06-29
- Native API get_basic_type_id performance become O(1)
- Native API get_field_id performance become O(1)
- Native API get_package_var_id performance become O(1)
- Native API get_method_id performance become O(1)
0.9008 2021-06-28
- SPVM drop support OpenBSD because I can't fix OpenBSD bugs by myself
http://matrix.cpantesters.org/?dist=SPVM%200.9006
- SPVM drop support solaris because I can't fix make error by myself
http://www.cpantesters.org/cpan/report/6b54513a-c10b-11eb-bc66-57723b537541
- SPVM support only 64bit System
- SPVM support only Windows 10+
- Change The all internal subroutine word is changed to method
- Change The all word of Subroutine is changed to Method
- rename Native API call_sub to call_spvm_method
- rename Native PAI call_sub_by_name to call_spvm_method_by_name
- rename Native API get_sub_id to get_method_id
- rename Native API get_sub_id_by_object to get_method_id_by_object
- rename Native API call_poly_sub_by_name to call_callback_method_by_name
0.9007 2021-06-17
- fix Mac OS warnings "ld: warning: directory not found for option" in precompile
0.9006 2021-06-11
- fix array init {} bugs that {foo => SPVM::Int->new(5)} was segfault
0.9005 2021-05-27
- add SPVM::Regex "." regular expression character.
- add SPVM::Regex single line mode option "s"
- add SPVM::Regex ascii mode and don't support \d, \D, \w, \W, \s, \S without ascii mode option
- Fix SPVM::Math->pi and SPVM::Math->e tests. Values is compared as numbers instead of strings
0.9004 2021-05-26
- remove escape charcter \b of string literal
- add raw escape character of string literal
\p
\P
\X
\g
\k
\K
\v
\V
\h
\H
\R
\b
\B
\A
\Z
\z
\G
\N
\1, \2, \3, \4, \5, \6, \7, \8, \9
0.9003 2021-05-21
- add SPVM::StringUtil->hex method
- rename SPVM::Regex->caps method to SPVM::Regex->captures
0.9002 2021-05-20
- add SPVM::StringUtil->trim_ascii_space method
- fix memory blocks count internal bugs
- fix Windows unexpected native api memory bug about get_field_object. I don't know the reason, but it was maybe type problem.
0.9001 2021-05-11
- remove SPVM::Time->strptime because this method is too complex as version 1.0 core module.
- remove SPVM::Time->strftime because this method is too complex as version 1.0 core module.
- add SPVM::Document::Benchmark. This document was on github pages and is moved to CPAN.
- add SPVM::Document::Tutorial. This document was on github pages and is moved to CPAN.
- add SPVM::Document::NativeAPI. This document was on github pages and is moved to CPAN.
- add SPVM::Document::LanguageSpecification. This document was on github pages and is moved to CPAN.
0.0952 2021-05-10
- fix PI and E tests again. This is fix the mistake of
[0.0951] and
[0.0950] - fix PI and E tests because in long double environment is different from SPVM and Perl.
0.0951 2021-05-07
- add dump native api
- add dump_raw native api
- add dump operator
- fix PI and E tests again. This is fix the mistake of
[0.0950] - fix PI and E tests because in long double environment is different from SPVM and Perl.
0.0950 2021-05-06
- fix SPVM::Math->expm1f bug that internally call expm1 instead of expm1f
- fix SPVM::Math->floorf bug that internally call floor instead of floorf
- fix SPVM::Math->log10f bug that internally call log10 instead of log10f
- fix PI and E tests because in long double environment is different from SPVM and Perl
0.0949 2021-04-30
- remove SPVM::Sort. This is 0.0947 change, but I forgot to remove SPVM::Sort.
- rename SPVM::Hash->newa to SPVM::Hash->new. Original SPVM::Hash->new is removed.
- SPVM::ByteList->new can receive undef.
- SPVM::ShortList->new can receive undef.
- SPVM::IntList->new can receive undef.
- SPVM::LongList->new can receive undef.
- SPVM::FloatList->new can receive undef.
- SPVM::DoubleList->new can receive undef.
- SPVM::StringList->new can receive undef.
- SPVM::List->new can receive undef.
- SPVM::Hash->new can receive undef.
- remove SPVM::StringBuffer->index
- remove SPVM::StringBuffer->substr
- remove SPVM::IO::Stdout
- remove SPVM::IO::Stderr
- SPVM::StringUtil->copy_string can receive undef
- remove SPVM::StringBuffer->push_range
- remove SPVM::StringBuffer->capacity
- remove SPVM::StringBuffer->new_opt
- SPVM::ByteList->resize added elements are set to 0 always
- SPVM::ShortList->resize added elements are set to 0 always
- SPVM::IntList->resize added elements are set to 0 always
- SPVM::LongList->resize added elements are set to 0 always
- SPVM::FloatList->resize added elements are set to 0 always
- SPVM::DoubleList->resize added elements are set to 0 always
- add SPVM::StringList->resize
- add SPVM::StringBuffer->resize
- remove SPVM::StringBuffer->clear
- remove SPVM::StringBuffer->capacity
- remove SPVM::StringBuffer->new_opt
0.0948 2021-04-28
- remove SPVM::StringUtil->replace
- remove SPVM::StringUtil->replace_all
- remove SPVM::StringUtil->chomp_crlf
- rename SPVM::StringUtil->chomp_lf to SPVM::StringUtil->chompr
- rename the following SPVM::StringUtil methods
isalnum to is_alnum
isalpha to is_alpha
isalpha to is_alpha
iscntrl to is_cntrl
isdigit to is_digit
isgraph to is_graph
islower to is_lower
isprint to is_print
isprint to is_print
ispunct to is_punct
isspace to is_space
isupper to is_upper
isxdigit to is_xdigit
tolower to to_lower
toupper to to_upper
strtoi to to_int_with_base
strtol to to_long_with_base
strtof to to_float
strtod to to_double
- add SPVM::StringUtil->to_int
- add SPVM::StringUtil->to_long
- remove SPVM::ByteList->new_capacity
- remove SPVM::ShortList->new_capacity
- remove SPVM::IntList->new_capacity
- remove SPVM::LongList->new_capacity
- remove SPVM::FloatList->new_capacity
- remove SPVM::DoubleList->new_capacity
- remove SPVM::StringList->new_capacity
- remove SPVM::List->new_capacity
- remove SPVM::List->splice
- remove SPVM::ByteList->capacity
- remove SPVM::ShortList->capacity
- remove SPVM::IntList->capacity
- remove SPVM::LongList->capacity
- remove SPVM::FloatList->capacity
- remove SPVM::DoubleList->capacity
- remove SPVM::StringList->capacity
- remove SPVM::List->capacity
- remove SPVM::ByteList->values
- remove SPVM::ShortList->values
- remove SPVM::IntList->values
- remove SPVM::LongList->values
- remove SPVM::FloatList->values
- remove SPVM::DoubleList->values
- remove SPVM::StringList->values
- remove SPVM::List->values
- revert [0.0940]add norw package variable descriptor
- revert [0.0940]add norw field descriptor
- revert [0.0940]rw become package variable declaration default
- revert [0.0940]rw become field declaration default
- add SPVM::ByteList->set_array
- add SPVM::ShortList->set_array
- add SPVM::IntList->set_array
- add SPVM::LongList->set_array
- add SPVM::FloatList->set_array
- add SPVM::DoubleList->set_array
- add SPVM::StringList->set_array
- add SPVM::List->set_array
0.0947 2021-04-27
- array equals methods return 1 if both arrays is undef. return 0 if only one one arrays is undef.
equals_byte_array
equals_short_array
equals_int_array
equals_long_array
equals_float_array
equals_double_array
equals_string_array
equals_object_array
- rename SPVM::ArrayUtil->slice_byte to SPVM::ArrayUtil->copy_array_range_byte
- rename SPVM::ArrayUtil->slice_short to SPVM::ArrayUtil->copy_array_range_short
- rename SPVM::ArrayUtil->slice_int to SPVM::ArrayUtil->copy_array_range_int
- rename SPVM::ArrayUtil->slice_long to SPVM::ArrayUtil->copy_array_range_long
- rename SPVM::ArrayUtil->slice_float to SPVM::ArrayUtil->copy_array_range_float
- rename SPVM::ArrayUtil->slice_double to SPVM::ArrayUtil->copy_array_range_double
- rename SPVM::ArrayUtil->slice_string to SPVM::ArrayUtil->copy_array_range_string
- rename SPVM::ArrayUtil->slice_object to SPVM::ArrayUtil->copy_array_range_object
- fix bug that import subroutine is not checked the existance
- rename SPVM::Sort->sortb to SPVM::Sort->sort_byte
- rename SPVM::Sort->sorts to SPVM::Sort->sort_short
- rename SPVM::Sort->sorti to SPVM::Sort->sort_int
- rename SPVM::Sort->sortl to SPVM::Sort->sort_long
- rename SPVM::Sort->sortf to SPVM::Sort->sort_float
- rename SPVM::Sort->sortd to SPVM::Sort->sort_double
- rename SPVM::Sort->sorto to SPVM::Sort->sort_object
- move SPVM::Sort->sort_byte to SPVM::ArrayUtil->sort_byte
- move SPVM::Sort->sort_short to SPVM::ArrayUtil->sort_short
- move SPVM::Sort->sort_int to SPVM::ArrayUtil->sort_int
- move SPVM::Sort->sort_long to SPVM::ArrayUtil->sort_long
- move SPVM::Sort->sort_float to SPVM::ArrayUtil->sort_float
- move SPVM::Sort->sort_double to SPVM::ArrayUtil->sort_double
- move SPVM::Sort->sort_object to SPVM::ArrayUtil->sort_object
- remove SPVM::Sort
- add SPVM::ArrayUtil->sort_string
- add SPVM::Comparator::String
- remove SPVM::StringUtil->contains in favor of SPVM::StringUtil->index
0.0946 2021-04-23
- Create SPVM::ArrayUtil module
- move the following SPVM::Util methods to SPVM::ArrayUtil
copy_object_array
copy_byte_array
copy_short_array
copy_int_array
copy_long_array
copy_float_array
copy_double_array
equals_object_array
copy_string_array
equals_byte_array
equals_short_array
equals_int_array
equals_long_array
equals_float_array
equals_double_array
equals_string_array
dump_byte_array
dump_short_array
dump_int_array
dump_long_array
dump_unsigned_byte_array
dump_unsigned_short_array
dump_unsigned_int_array
dump_unsigned_long_array
dump_float_array
dump_double_array
memcpy_byte
memcpy_short
memcpy_int
memcpy_long
memcpy_float
memcpy_double
memmove_byte
memmove_short
memmove_int
memmove_long
memmove_float
memmove_double
new_object_array_proto
slice_byte
slice_short
slice_int
slice_long
slice_float
slice_double
- move the following SPVM::Util methods to SPVM::StringUtil
split
chomp_lf
chomp_crlf
copy_str
index
isalnum
isalpha
isblank
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
tolower
toupper
is_perl_space
is_perl_word
join
lc
lcfirst
replace
replace_all
strtoi
strtol
strtof
strtod
uc
ucfirst
rindex
contains
- remove SPVM::Util->join_object in favor of SPVM::ArrayUtil->dump_object_array
- add SPVM::ArrayUtil->dump_object_array
- rename SPVM::ArrayUtil->copy_str to SPVM::ArrayUtil->copy_string
- rename SPVM::Util to SPVM::NumberUtil
- fix bug that le operator means lt.
- in eq, ne, gt, ge, lt, le string comparison, undef is treated as most small value
and these string comparison operators don't throw a exception.
- add SPVM::ArrayUtil->dump_array_string
- add SPVM::ArrayUtil->slice_array_string
- SPVM::ArrayUtil->copy_byte_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_short_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_int_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_long_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_float_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_double_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_string_array return undef if the argument is undef.
- SPVM::ArrayUtil->copy_object_array return undef if the argument is undef.
0.0945 2021-04-22
- rename SPVM::Byte->val to SPVM::Byte->value
- rename SPVM::Short->val to SPVM::Short->value
- rename SPVM::Int->val to SPVM::Int->value
- rename SPVM::Long->val to SPVM::Long->value
- rename SPVM::Float->val to SPVM::Float->value
- rename SPVM::Double->val to SPVM::Double->value
- move SPVM::Util->PI to SPVM::Math->PI
- move SPVM::Util->E to SPVM::Math->E
- remove SPVM::Math->pi
- move SPVM::Util->abs to SPVM::Math->abs
- move SPVM::Util->labs to SPVM::Math->labs
0.0944 2021-04-21
- Logical Operator become non-expression.
- rename SPVM::Util->copy_barray to SPVM::Util->copy_byte_array
- rename SPVM::Util->equals_barray to SPVM::Util->equals_byte_array
- rename SPVM::Util->copy_sarray to SPVM::Util->copy_short_array
- rename SPVM::Util->equals_sarray to SPVM::Util->equals_short_array
- rename SPVM::Util->copy_iarray to SPVM::Util->copy_int_array
- rename SPVM::Util->equals_iarray to SPVM::Util->equals_int_array
- rename SPVM::Util->copy_larray to SPVM::Util->copy_long_array
- rename SPVM::Util->equals_larray to SPVM::Util->equals_long_array
- rename SPVM::Util->copy_farray to SPVM::Util->copy_float_array
- rename SPVM::Util->equals_farray to SPVM::Util->equals_float_array
- rename SPVM::Util->copy_darray to SPVM::Util->copy_double_array
- rename SPVM::Util->equals_darray to SPVM::Util->equals_double_array
- rename SPVM::Util->copy_strarray to SPVM::Util->copy_string_array
- rename SPVM::Util->equals_strarray to SPVM::Util->equals_string_array
- rename SPVM::Util->copy_oarray to SPVM::Util->copy_object_array
- rename SPVM::Util->equals_oarray to SPVM::Util->equals_object_array
- rename SPVM::Util->sliceb to SPVM::Util->slice_byte
- rename SPVM::Util->slices to SPVM::Util->slice_short
- rename SPVM::Util->slicei to SPVM::Util->slice_int
- rename SPVM::Util->slicel to SPVM::Util->slice_long
- rename SPVM::Util->slicef to SPVM::Util->slice_float
- rename SPVM::Util->sliced to SPVM::Util->slice_double
- rename SPVM::Util->sliceo to SPVM::Util->slice_object
- remove SPVM::Util->reverseb
- remove SPVM::Util->reverses
- remove SPVM::Util->reversei
- remove SPVM::Util->reversel
- remove SPVM::Util->reversef
- remove SPVM::Util->reversed
- remove SPVM::Util->reverseo
- rename SPVM::Util->memcpyb to SPVM::Util->memcpy_byte
- rename SPVM::Util->memcpys to SPVM::Util->memcpy_short
- rename SPVM::Util->memcpyi to SPVM::Util->memcpy_int
- rename SPVM::Util->memcpyl to SPVM::Util->memcpy_long
- rename SPVM::Util->memcpyf to SPVM::Util->memcpy_float
- rename SPVM::Util->memcpyd to SPVM::Util->memcpy_double
- rename SPVM::Util->memmoveb to SPVM::Util->memmove_byte
- rename SPVM::Util->memmoves to SPVM::Util->memmove_short
- rename SPVM::Util->memmovei to SPVM::Util->memmove_int
- rename SPVM::Util->memmovel to SPVM::Util->memmove_long
- rename SPVM::Util->memmovef to SPVM::Util->memmove_float
- rename SPVM::Util->memmoved to SPVM::Util->memmove_double
- remove SPVM::Util->joinb
- remove SPVM::Util->joins
- remove SPVM::Util->joini
- remove SPVM::Util->joinl
- remove SPVM::Util->joinf
- remove SPVM::Util->joind
- add SPVM::Util->dump_byte_array
- add SPVM::Util->dump_short_array
- add SPVM::Util->dump_int_array
- add SPVM::Util->dump_long_array
- add SPVM::Util->dump_float_array
- add SPVM::Util->dump_double_array
- add SPVM::Util->dump_unsigned_byte_array
- add SPVM::Util->dump_unsigned_short_array
- add SPVM::Util->dump_unsigned_int_array
- add SPVM::Util->dump_unsigned_long_array
- add SPVM::Util->UINT8_MAX
- add SPVM::Util->UINT16_MAX
- add SPVM::Util->UINT32_MAX
- add SPVM::Util->UINT64_MAX
- rename SPVM::ArrayUtil->dump_byte_array to SPVM::ArrayUtil->dump_array_byte
- rename SPVM::ArrayUtil->dump_short_array to SPVM::ArrayUtil->dump_array_short
- rename SPVM::ArrayUtil->dump_int_array to SPVM::ArrayUtil->dump_array_int
- rename SPVM::ArrayUtil->dump_long_array to SPVM::ArrayUtil->dump_array_long
- rename SPVM::ArrayUtil->dump_float_array to SPVM::ArrayUtil->dump_array_float
- rename SPVM::ArrayUtil->dump_double_array to SPVM::ArrayUtil->dump_array_double
- rename SPVM::ArrayUtil->dump_object_array to SPVM::ArrayUtil->dump_array_object
- rename SPVM::ArrayUtil->dump_unsigned_byte_array to SPVM::ArrayUtil->dump_array_unsigned_byte
- rename SPVM::ArrayUtil->dump_unsigned_short_array to SPVM::ArrayUtil->dump_array_unsigned_short
- rename SPVM::ArrayUtil->dump_unsigned_int_array to SPVM::ArrayUtil->dump_array_unsigned_int
- rename SPVM::ArrayUtil->dump_unsigned_long_array to SPVM::ArrayUtil->dump_array_unsigned_long
- rename SPVM::ArrayUtil->copy_byte_array to SPVM::ArrayUtil->copy_array_byte
- rename SPVM::ArrayUtil->copy_short_array to SPVM::ArrayUtil->copy_array_short
- rename SPVM::ArrayUtil->copy_int_array to SPVM::ArrayUtil->copy_array_int
- rename SPVM::ArrayUtil->copy_long_array to SPVM::ArrayUtil->copy_array_long
- rename SPVM::ArrayUtil->copy_float_array to SPVM::ArrayUtil->copy_array_float
- rename SPVM::ArrayUtil->copy_double_array to SPVM::ArrayUtil->copy_array_double
- rename SPVM::ArrayUtil->copy_string_array to SPVM::ArrayUtil->copy_array_string
- rename SPVM::ArrayUtil->copy_object_array to SPVM::ArrayUtil->copy_array_object
- rename SPVM::ArrayUtil->equals_byte_array to SPVM::ArrayUtil->equals_array_byte
- rename SPVM::ArrayUtil->equals_short_array to SPVM::ArrayUtil->equals_array_short
- rename SPVM::ArrayUtil->equals_int_array to SPVM::ArrayUtil->equals_array_int
- rename SPVM::ArrayUtil->equals_long_array to SPVM::ArrayUtil->equals_array_long
- rename SPVM::ArrayUtil->equals_float_array to SPVM::ArrayUtil->equals_array_float
- rename SPVM::ArrayUtil->equals_double_array to SPVM::ArrayUtil->equals_array_double
- rename SPVM::ArrayUtil->equals_string_array to SPVM::ArrayUtil->equals_array_string
- rename SPVM::ArrayUtil->equals_object_array to SPVM::ArrayUtil->equals_array_object
- rename SPVM::ArrayUtil->new_object_array_proto to SPVM::ArrayUtil->new_array_proto
0.0943 2021-04-19
- add <=> and cmp operator
- add {} array init syntax
- remove SPVM::Sort->sortstr
- change the definition of the following SPVM::Sort functions.
[Before]
sub sortb : void ($nums : byte[])
[After]
[Before]
sub sorts : void ($nums : short[])
[After]
sub sorts : void ($nums : short[], $offset : int, $length : int, $comparator : SPVM::Comparator::Short)
[Before]
sub sorti : void ($nums : int[])
[After]
sub sorti : void ($nums : int[], $offset : int, $length : int, $comparator : SPVM::Comparator::Int)
[Before]
[After]
sub sortl : void ($nums : long[], $offset : int, $length : int, $comparator : SPVM::Comparator::Long)
[Before]
sub sub sortf : void ($nums : float[])
[After]
sub sub sortf : void ($nums : float[], $offset : int, $length : int, $comparator : SPVM::Comparator::Float)
[Before]
[After]
sub sortd : void ($nums : double[], $offset : int, $length : int, $comparator : SPVM::Comparator::Double)
[Before]
sub sorto : void ($objs : oarray, $comparator : SPVM::Comparator::Object)
[After]
sub sorto : void ($objs : oarray, $offset : int, $length : int, $comparator : SPVM::Comparator::Object)
- remove SPVM::Comparator
- add SPVM::Comparator::Byte
- add SPVM::Comparator::Short
- add SPVM::Comparator::Int
- add SPVM::Comparator::Long
- add SPVM::Comparator::Float
- add SPVM::Comparator::Double
- add SPVM::Comparator::Object
0.0942 2021-04-15
- add ref operator to get object type name
- remove SPVM::Util->get_type_name. use ref operator instead of this.
0.0941 2021-04-14
- add SPVM::Hash->newa again. argument become oarray type
sub newa : SPVM::Hash ($key_values : oarray)
0.0940 2021-04-13
- add norw package variable descriptor
- add norw field descriptor
- rw become package variable declaration default
- rw become field declaration default
0.0939 2021-04-13
- fix bug that oarray element can't assign undef
- Change SPVM::List values type from object[] to oarray.
- Change SPVM::List new definition
[before]
sub new : SPVM::List ($objects : object[])
[after]
sub new : SPVM::List ($objects : oarray)
- Change SPVM::List new_len definition
[before]
sub new_len : SPVM::List ($length : int)
[after]
sub new_len : SPVM::List ($proto_array : oarray, $length : int)
- Change SPVM::List new definition
[before]
sub to_array : object[] ($self : self)
[after]
sub to_array : oarray ($self : self)
- add any_object_basic_type_id native api
0.0938 2021-04-09
- fix bug that segfault occur in SPVM::Builder->build_shared_lib_dist in syntax error
- add SPVM::List->resize method
- add SPVM::ByteList->resize method
- add SPVM::ShortList->resize method
- add SPVM::IntList->resize method
- add SPVM::LongList->resize method
- add SPVM::FloatList->resize method
- add SPVM::DoubleList->resize method
0.0937 2021-04-06
- fix accessor get chain bug
0.0936 2021-04-03
- fix bug that when variable argument is empty, compile error occur.
0.0935 2021-04-02
- add the following native APIs
new_object_by_name,
new_pointer_by_name,
set_field_byte_by_name,
set_field_short_by_name,
set_field_int_by_name,
set_field_long_by_name,
set_field_float_by_name,
set_field_double_by_name,
set_field_object_by_name,
get_field_byte_by_name,
get_field_short_by_name,
get_field_int_by_name,
get_field_long_by_name,
get_field_float_by_name,
get_field_double_by_name,
get_field_object_by_name,
set_package_var_byte_by_name,
set_package_var_short_by_name,
set_package_var_int_by_name,
set_package_var_long_by_name,
set_package_var_float_by_name,
set_package_var_double_by_name,
set_package_var_object_by_name,
get_package_var_byte_by_name,
get_package_var_short_by_name,
get_package_var_int_by_name,
get_package_var_long_by_name,
get_package_var_float_by_name,
get_package_var_double_by_name,
get_package_var_object_by_name,
call_sub_by_name,
call_poly_sub_by_name,
get_field_string_chars_by_name,
- rename native api get_method_sub_id to get_sub_id_by_object
- remove the following native macro
SPVM_SUCCESS
SPVM_EXCEPTION
SPVM_NEW_OBJECT
SPVM_NEW_POINTER
SPVM_SET_PACKAGE_VAR_BYTE
SPVM_SET_PACKAGE_VAR_SHORT
SPVM_SET_PACKAGE_VAR_INT
SPVM_SET_PACKAGE_VAR_LONG
SPVM_SET_PACKAGE_VAR_FLOAT
SPVM_SET_PACKAGE_VAR_DOUBLE
SPVM_SET_PACKAGE_VAR_OBJECT
SPVM_GET_PACKAGE_VAR_BYTE
SPVM_GET_PACKAGE_VAR_SHORT
SPVM_GET_PACKAGE_VAR_INT
SPVM_GET_PACKAGE_VAR_LONG
SPVM_GET_PACKAGE_VAR_INT
SPVM_GET_PACKAGE_VAR_LONG
SPVM_GET_PACKAGE_VAR_FLOAT
SPVM_GET_PACKAGE_VAR_DOUBLE
SPVM_GET_PACKAGE_VAR_OBJECT
SPVM_SET_FIELD_BYTE
SPVM_SET_FIELD_SHORT
SPVM_SET_FIELD_INT
SPVM_SET_FIELD_LONG
SPVM_SET_FIELD_FLOAT
SPVM_SET_FIELD_DOUBLE
SPVM_SET_FIELD_OBJECT
SPVM_GET_FIELD_BYTE
SPVM_GET_FIELD_SHORT
SPVM_GET_FIELD_INT
SPVM_GET_FIELD_LONG
SPVM_GET_FIELD_INT
SPVM_GET_FIELD_LONG
SPVM_GET_FIELD_FLOAT
SPVM_GET_FIELD_DOUBLE
SPVM_GET_FIELD_OBJECT
0.0934 2021-03-29
- add Add unsigned format for sprintf. %lu and %u.
- fix msys2 t/ext fail bug.
- fix spvmcc bug that if module name contain ::, compile fail.
0.0933 2021-02-10
- Don't support old OpenBSD before 6.8.
0.0932 2021-02-08
- spvmcc -I option module path order become top
0.0931 2021-02-06
- SPVM::Config extra_compiler_flag related methods is removed
because I want to use extra_compiler_flag for spvmcc --ccflags option for future
- SPVM::Config extra_linker_flag related methods is removed
because I want to use extra_linker_flag for spvmcc --lddlflags option for future
- implement spvmcc -O option
- add --ccflags option to spvmcc
- add --lddlflags option to spvmcc
- add -f or --force option to spvmcc to compile and link force
- package part name must be start with lower case
(Invalid package name example) Foo::bar
because I want to use internal anon sub package name for this. Foo::anonsub_11_23
- fix bug anon sub code is not precompile if package have precompile descriptor
- exception message become more perlish
(Exception Message Example)
TestCase::OArray->basic called at t/default/lib/TestCase/OArray.spvm line 54
- add [CompileError] to compile error message
0.0930 2021-01-28
- remove subroutine precompile descriptor. SPVM become only support whole package precompile.
- add SPVM::Builder::Exe again. This is more stable before SPVM::Builder::Exe because compiler and runtime and SPVM module sources is embeded to exe files directry.
- add spvmcc again
- remove SPVM::Byte, SPVM::Short, SPVM::Int, SPVM::Long, SPVM::Float, SPVM::Double source codes in module directry
because this is embded into compiler to run SPVM independent from moduel sources.
0.0929 2020-12-23
- remove cproj, cprojf from SPVM::Math because windows and macOS have a bug that right value don't return.
- internal anon sub package name become unique
- Package name must be same as the package name corresponding to module file.
- fix duplicated anon sub package name adding
0.0928 2020-12-09
- add get_chars function to native api
- rename native api new_string_raw to new_string_nolen_raw and the argument string must be const string.
- rename native api new_string to new_string_nolen and the argument string must be const string.
- rename native api new_string_len_raw to new_string_raw.
- rename native api new_string_len to new_string.
0.0927 2020-11-20
- add SPVM::BlessedObject::String corresponding to SPVM string type
- If argument type is string, the value is non ref scalar, the value is coverted to string object
- If argument type is strgin array, the element value is non ref scalar, the value is converted to string object
- If return value is string object, the object itself is return.
0.0926 2020-11-06
- add SPVM::new_byte_array_unsigned, SPVM::new_short_array_unsigned, SPVM::new_int_array_unsigned, SPVM::new_long_array_unsigned
0.0925 2020-11-05
- [revert]SPVM::Hash->newa is rename to new, and original new is renamed to new_empty
because SPVM::Hash->new(["foo" => SPVM::Int->new(4)]) is not good interface from Perl code.
I feel the following is more good code because Perl code and SPVM code is exactly same.
my $hash = SPVM::Hash->new;
$hash->set_int(5);
- add SPVM::Hash method
set_byte, set_short, set_int, set_long, set_float, set_double, get_byte, get_short, get_int, get_long, get_float, get_double
- SPVM::Hash->max_load_factor field become private
- SPVM::Hash->set_max_load_factor method is removed
- SPVM::Hash->load_factor method become private
- SPVM::Hash->new_opt method become private
- SPVM::Hash->murmur_hash become private
- remove SPVM::Hash newa method to avoid complexity bugs in object type conversion
- SPVM::StringBuffer->new_opt recieve SPVM::Hash object as options
- SPVM::Hash->keys return the string object itself instead of the copies because string become immutable in latest release
- remove SPVM::Hash->each method because I feel internal iterator is not good.
0.0924 2020-10-16
- fix echange api string return value bug
- add real string type. before this relese runtime string type is same as byte[] type, but in this release string type is string type in also runtime
- implicite conversion from byte[] to string become occur compile error
- type conversion from byte[] to string become copy instead of reference copy
- type conversion from string[] to byte become copy instead of reference copy
0.0923 2020-10-14
- add SPVM::BlessedObject::Array set method
- add SPVM::BlessedObject::Array get method
- add SPVM::ByteList->new_len
- add SPVM::ShortList->new_len
- add SPVM::IntList->new_len
- add SPVM::LongList->new_len
- add SPVM::FloatList->new_len
- add SPVM::DoubleList->new_len
- add SPVM::StringList->new_len
- add SPVM::List->new_len
- SPVM::ByteList->newa is rename to new, and original new is removed
- SPVM::ShortList->newa is rename to new, and original new is removed
- SPVM::IntList->newa is rename to new, and original new is removed
- SPVM::LongList->newa is rename to new, and original new is removed
- SPVM::FloatList->newa is rename to new, and original new is removed
- SPVM::DoubleList->newa is rename to new, and original new is removed
- SPVM::StringList->newa is rename to new, and original new is removed
- SPVM::List->newa is rename to new, and original new is removed
- SPVM::Hash->newa is rename to new, and original new is renamed to new_empty
- fix SPVM::ByteList capacity bug
- fix SPVM::ShortList capacity bug
- fix SPVM::IntList capacity bug
- fix SPVM::LongList capacity bug
- fix SPVM::FloatList capacity bug
- fix SPVM::DobuleList capacity bug
- fix SPVM::List capacity bug
- fix SPVM::StringList capacity bug
0.0922 2020-10-12
- add SPVM::new_byte_array_len
- add SPVM::new_short_array_len
- add SPVM::new_int_array_len
- add SPVM::new_long_array_len
- add SPVM::new_float_array_len
- add SPVM::new_double_array_len
- add SPVM::new_object_array_len
0.0921 2020-10-12
- fix bug that in exchange api, any object return type is wrong.
0.0920 2020-10-12
- rename SPVM::get_length to SPVM::length
- rename SPVM ExchangeAPI get_length to length
0.0919 2020-10-12
- rename SPVM::ObjectList to SPVM::List because this is maybe Perl to SPVM offten used interface, short name is good.
0.0918 2020-10-07
- SPVM::Util->rand is renamed to crand because perl rand is different from C rand.
- add SPVM::Util->rand. This is same as Perl rand(0 <= random_number < 1)
- fix anon subroutine redefine warnings.
0.0917 2020-10-06
- fix bug that when a module contains multi packages, Perl Package is not created for after seconds packages
0.0916 2020-10-05
- SPVM::Util->rand function don't need argument
- add SPVM::Util->srand static method
- remove SPVM::Util->random static method
- add SPVM::Util->RAND_MAX static method
0.0915 2020-10-05
- add precompile package descriptor
0.0914 2020-09-26
- Class method is renamed to Static method. This is only SPVM document changing.
- Matrix modules is removed from SPVM core, and moved to SPVM::AI::Util of CPAN module.
- Big array test become private tests because not understandable memory error occured in some environment.
0.0913 2020-09-23
- add SPVM::Matrix::Util
- SPVM::Matrix::Float methods is moved to SPVM::Matrix::Util
- SPVM::Matrix::Double methods is moved to SPVM::Matrix::Util
0.0912 2020-09-14
- rename SPVM::Complex_2d x to re
- rename SPVM::Complex_2d y to im
- rename SPVM::Complex_2f x to re
- rename SPVM::Complex_2f y to im
- rename SPVM::Matrix::Double col to columns_length
- rename SPVM::Matrix::Double row to rows_length
- rename SPVM::Matrix::Float col to columns_length
- rename SPVM::Matrix::Float row to rows_length
0.0911 2020-09-04
- add complex functions to SPVM::Math
native sub cacos : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub cacosf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub casin : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub casinf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub catan : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub catanf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub ccos : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub ccosf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub csin : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub csinf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub ctan : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub ctanf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub cacosh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub cacoshf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub casinh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub casinhf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub catanh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub catanhf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub ccosh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub ccoshf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub csinh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub csinhf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub ctanh : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub ctanhf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub cexp : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub cexpf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub clog : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub clogf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub cabs : double ($z : SPVM::Complex_2d);
native sub cabsf : float ($z : SPVM::Complex_2f);
native sub cpow : SPVM::Complex_2d ($z1 : SPVM::Complex_2d, $z2 : SPVM::Complex_2d);
native sub cpowf : SPVM::Complex_2f ($z1 : SPVM::Complex_2f, $z2 : SPVM::Complex_2f);
native sub csqrt : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub csqrtf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub carg : double ($z : SPVM::Complex_2d);
native sub cargf : float ($z : SPVM::Complex_2f);
native sub conj : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub conjf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
native sub cproj : SPVM::Complex_2d ($z : SPVM::Complex_2d);
native sub cprojf : SPVM::Complex_2f ($z : SPVM::Complex_2f);
- Fix bug that not support Alpine Linux
- SPVM::Math->pi become constant value.
0.0910 2020-08-31
- add new_c method to SPVM::Builder::Config
- add new_cpp11 method to SPVM::Builder::Config
- fix C++ SPVM_DIE type conversion bug
0.0909 2020-08-26
- remove SPVM::IO::File, SPVM::IO::File::Handle because File I/O is a little complex for SPVM project and has many bugs.
- add complex examples
- remove no needed module documents
0.0908 2020-08-20
- add complex, complexf to SPVM::Math
- move complex function from SPVM::Util to SPVM::Math
- remove complex int, long complex functions
- remove complex absolute, conjunction functions
- Not support Alpine Linux because Alpine Linux tests fail in current SPVM
- precompile C source code floating point constant become hex expression
0.0907 2020-08-16
- add caddi, caddl, caddf, caddd to SPVM::Util
- add csubi, csubl, csubf, csubd to SPVM::Util
- add cmuli, cmull, cmulf, cmuld to SPVM::Util
- add cdivi, cdivl, cdivf, cdivd to SPVM::Util
- add cscamuli, cscamull, cscamulf, cscamuld to SPVM::Util
- add cabsi, cabsl, cabsf, cabsd to SPVM::Util
- add cconi, cconl, cconf, ccond to SPVM::Util
0.0906 2020-08-10
- add add,sub,scamul,mul,new_ident,new_zero method to SPVM::Matrix::* class.
0.0905 2020-08-08
- remove SPVM::NDArray and related modules because SPVM::NDArray is too big and complex for SPVM Core Modules.
- add SPVM::Matrix related modules.
0.0904 2020-07-30
- fix bug that segfault occur when new a package which don't have subroutines
0.0903 2020-07-17
- fix big size array tests
0.0902 2020-07-17
- fix array big size test bugs
- change Perl version requirement from v5.10 to v5.8.7
0.0901 2020-07-15
- add SPVM::get_length function
- add SPVM::BlessedObject::get_length
- SPVM Native API env->new_env return NULL if this method don't alloc memory
- SPVM Native API env->call_sub set exception if this method alloc memory for call stack
- SPVM Native API env->push_mortal return 1 if this method alloc memory for mortal stack
- SPVM Native API env->alloc_memory_block_zero return NULL if this method alloc memory
- SPVM Native API env->dec_ref_count become not exit at invalid status
- SPVM Native API env->weaken return 1 if memory allocation fail
0.09 2020-07-13
- env is created once before runtime
0.0710 2020-07-10
- improve compile internal logic effective
- skip the file which not have specified extension in Foo.native/src directory
0.0709 2020-07-10
- BIGIN keyword is renamed to INIT because the process is just before runtime.
- runtime internal is clenup and simplified. runtime and constant_pool structure is removed.
- add memory_blocks_count field to SPVM_ENV
- file name \ is replaced to /
- remove SPVM::Math->FP_NORMAL, SPVM::Math->FP_SUBNORMAL, SPVM::Math->isnormal, SPVM::Math->isnormalf because it is not portable Windows and Linux.
- use C99 llround, llroundd in SPVM::Math->lround, SPVM::Math->lroundf
- fix bug that print and warn can't receive byte[] type
0.0708 2020-07-06
- SPVM don't need the following manually initialization in Perl script because SPVM is compiled at each time to call import method.
# Don't needed the following statement
UNITCHECK { SPVM::init() }
0.0707 2020-07-06
- rename SPVM::Builder::Config::add_include_dirs to unshift_include_dirs
- add SPVM::Builder::Config::push_include_dirs
- rename SPVM::Builder::Config::add_lib_dirs to unshift_lib_dirs
- add SPVM::Builder::Config::push_lib_dirs
- rename SPVM::Builder::Config::use_lib to unshift_libs
- add SPVM::Builder::Config::push_libs
- rename SPVM::Builder::Config::add_extra_compiler_flags to append_extra_compiler_flags
- add SPVM::Builder::Config::prepend_extra_compiler_flags
- rename SPVM::Builder::Config::add_extra_linker_flags to append_extra_linker_flags
- rename SPVM::Builder::Config::add_ccflags to append_ccflags
- rename SPVM::Builder::Config::add_lddlflags to append_lddlflags
- add SPVM::Builder::Config::prepend_extra_linker_flags
- add SPVM::Builder::Config::prepend_ccflags
- add SPVM::Builder::Config::prepend_lddlflags
- add SPVM::Builder::Config::get_cccdlflags
- add SPVM::Builder::Config::set_cccdlflags
- add SPVM::Builder::Config::append_cccdlflags
- add SPVM::Builder::Config::prepend_cccdlflags
- add SPVM::Builder::Config::get_archlibexp
- add SPVM::Builder::Config::set_archlibexp
- add SPVM::Builder::Config::get_shrpenv
- add SPVM::Builder::Config::set_shrpenv
0.0706 2020-06-29
- SPVM need manually initialization in Perl script because SPVM is not compiled some environment require, do, Mojo morbo, Mojo hypnotoad, mod_perl, etc
UNITCHECK { SPVM::init() }
- Increased Perl version requirement to 5.10.0 because UNITCHECK is needed for SPVM.
0.0705 2020-06-28
- remove SPVM::Builder::quiet method
- SPVM::Builder::Config quiet field default become 1
- add get_lib_dirs to SPVM::Builder::Config
- add set_lib_dirs to SPVM::Builder::Config
- add add_lib_dirs to SPVM::Builder::Config
- remove -L<lib_dir> from lddlflags and add to lib_dir field
- lib_dir values is added before extra_linker_flags
- rename SPVM::Builder::Config::add_include_dir to add_include_dirs
- renmae SPVM::Builder::Config::add_lib_dir to add_lib_dirs
- add_include_dirs become add arguments to first of elements.
- SPVM::Builder::Config::add_lib_dirs become add arguments to first of elements.
- SPVM::Builder::Config::add_libs become add arguments to first of elements.
- rename SPVM::Builder::Config::add_libs to use_lib, and library is added after last element
0.0704 2020-06-26
- rename SPVM::Builder::Config::set_no_cache to set_force_compile
- rename SPVM::Builder::Config::get_no_cache to get_force_compile
- add native source dependency cache system
0.0703 2020-06-24
- fixed broken test by using different perl version
0.0702 2020-06-24
- add document of SPVM::Builder::Config::add_extra_compiler_flags
- add document of SPVM::Builder::Config::add_extra_linker_flags
- add document of SPVM::Builder::Config::set_extra_compiler_flags
- add document of SPVM::Builder::Config::get_extra_compiler_flags
- add document of SPVM::Builder::Config::set_extra_linker_flags
- add document of SPVM::Builder::Config::get_extra_linker_flags
- add SPVM::Builder::Config::set_include_dirs
- add SPVM::Builder::Config::get_include_dirs
- add SPVM::Builder::Config::add_include_dirs
- add set_no_cache and get_no_cache
- remove set_cache and get_cache
- Support native source code and include files
Foo.native/include
Foo.native/src
- Improve native include file and source file compile condition
0.0701 2020-02-19
- add SPVM::NDArray::Byte
- add SPVM::NDArray::Short
- add SPVM::NDArray::Int
- add SPVM::NDArray::Long
- add SPVM::NDArray::Float
- add SPVM::NDArray::Double
- add SPVM::NDArray::String
- fix module load bug
- change SPVM::Complex_2x(x is b, s, i, l, f, and d) field name re to x, im to y,
- add SPVM::Quaternion_4x((x is b, s, i, l, f, and d).
- add SPVM::NDArray::ComplexX(X is Byte, Short, Int, Long, Float, Double)
- add SPVM::NDArray::QuaternionX(X is Byte, Short, Int, Long, Float, Double)
- remove complex operation(+, -, * , /)
- don't load SPVM::Complex_2f, SPVM::Complex_2d by default
- remove complex function in SPVM::Util
0.07 2020-01-30
- remove fileno, set_binmode methods because file nomber is not portable.
- add warn and print empty string and undef spec
- rename SPVM::EqualityChecker::Address to SPVM::EqualityChecker::SameObject]
- SPVM::IO::File open mode is changed to <, >, >>, +<, +>, +>>
- add SPVM::IO::File unlink function
- add SPVM::IO::File rename function
- remove SPVM::IO::File putc
- remove SPVM::IO::File write
- change native api macro functions SPVM_GET_xxx to
#define SPVM_GET_FIELD_BYTE(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_SHORT(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_INT(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_LONG(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_FLOAT(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_DOUBLE(env, obj, package_name, sub_name, value_address, file, line)
#define SPVM_GET_FIELD_OBJECT(env, obj, package_name, sub_name, signature, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_BYTE(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_SHORT(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_INT(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_LONG(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_FLOAT(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_DOUBLE(env, package_name, package_var_name, value_address, file, line)
#define SPVM_GET_PACKAGE_VAR_OBJECT(env, package_name, package_var_name, signature, value_address, file, line)
- change native api macro functions SPVM_NEW_POINTER to
SPVM_NEW_POINTER(env, package_name, pointer, object_address, file, line)
- change native api macro functions SPVM_NEW_OBJECT to
SPVM_NEW_OBJECT(env, package_name, object_address, file, line)
- remove typedef in spvm_native.h
typedef int8_t SPVM_VALUE_byte;
typedef int16_t SPVM_VALUE_short;
typedef int32_t SPVM_VALUE_int;
typedef int64_t SPVM_VALUE_long;
typedef float SPVM_VALUE_float;
typedef double SPVM_VALUE_double;
typedef void* SPVM_VALUE_object;
0.0445 2020-01-07
- Web and Network module is separated to separate SPVM::Webkit to https://github.com/yuki-kimoto/SPVM-Webkit
- remove SPVM::Builder::Exe and spvmcc because this logic is planed to separate to outer module after version 1.0.
- SPVM_BUILD_DIR environment variable must be set for precompile and native subroutine in runtime
0.0444 2019-12-25
- remove SPVM::Errno for portability
- allow last camma in sub names, sub routine arguments definition
- remove no needed SPVM::IO::File::EOF
- rename SPVM::FileHandle to SPVM::IO::FileHandle
- rename chompr to chomp_lf
- add chomp_crlf
- add SPVM::IO::Stdout
- add SPVM::IO::Stderr
- rename native and exchange api new_barray to new_byte_array
- rename native and exchange api new_sarray to new_short_array
- rename native and exchange api new_iarray to new_int_array
- rename native and exchange api new_larray to new_long_array
- rename native and exchange api new_farray to new_float_array
- rename native and exchange api new_darray to new_double_array
- rename native and exchange api new_oarray to new_object_array
- rename native and exchange api new_marray to new_muldim_array
- rename native and exchange api new_varray to new_mulnum_array
- allow Foo contains use Foo.
- print become stateiment instead of function
- rename SPVM::IO::Select to SPVM::HTTP::Select, SPVM::IO::ClientSocketTCP to SPVM::HTTP::ClientSocketTCP
0.0443 2019-11-08
- warn become keyword and add file and line number to the last of the message.
- rename many Native APIs
0.0442 2019-10-21
- add ctype.h function to SPVM::CORE
isalnum
isalpha
isblank
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigi
tolower
toupper
- add SPVM::CORE random method
- move strerror to SPVM::Errno
- strerror become thread safe
- Windows has no SIGPIPE
0.0441 2019-10-11
- add pi method to SPVM::Math
- cleanup SPVM::Unicode. Many methods is remaned.
- cleanup SPVM::JSON. Many options is removed.
- cleanup SPVM::Regex.
- SPVM::Regex::caps method return captured string array.
- SPVM::Regex::remove match_end method
- add SPVM::Regex::match_length method
- SPVM::Regex::replace method is separated to replace and replace_cb
- SPVM::Regex::replace_all method is separated to replace_all and replace_all_cb
- SPVM::Regex::match_offset is merged to SPVM::Regex::match
- remove call_sub_depth and remove deep recursion check.
- rename chomp to chompr
- renmae complex_array to complex_darray
- rename complex to complexd
- move SPVM::CORE::copy_oarray to SPVM::Util::copy_oarray.
- add SPVM::Cloner
- SPVM::Util::copy_oarray do deep clone using SPVM::Cloner.
- SPVM::Stringer argument change ($self : self) to ($self : self, $obj : object)
- add SPVM::Regex::Replacer and use this in SPVM::Regex::replace_cb and SPVM::Regex::replace_all_cb method
- subroutine belongging to package with callback_t descriptor must be anon subroutine.
- add SPVM::EqualityChecker
- add SPVM::EqualityChecker::Address
- SPVM::CORE::equals_oarray is moved to SPVM::Util and recieve SPVM::EqualityChecker as third argument
0.0440 2019-09-06
- Rename SPVM::Data to SPVM::BlessedObject
- Rename SPVM::Data::Array to SPVM::BlessedObject::Array
- Rename SPVM::Data::Package to SPVM::BlessedObject::Package
- remove SPVM::Util->split 3rd argument
- rename SPVM::Time->mktime to SPVM::Time->timelocal
- fix SPVM::Regex character class negation bug
- fix SPVM::Regex * capture bugs
- SPVM::Regex caps start index become 0
- remove to_iarray and to_strarray from SPVM::List
- rename SPVM::List to SPVM::ObjectList
- rename SPVM::ObjectList::new_with_capacity to new_capacity
- add SPVM::ByteList::new_capacity
- add SPVM::ShortList::new_capacity
- add SPVM::IntList::new_capacity
- add SPVM::LongList::new_capacity
- add SPVM::FloatList::new_capacity
- add SPVM::DoubleList::new_capacity
- add SPVM::StringList::new_capacity
- add SPVM::ByteList::capacity
- add SPVM::ShortList::capacity
- add SPVM::IntList::capacity
- add SPVM::LongList::capacity
- add SPVM::FloatList::capacity
- add SPVM::DoubleList::capacity
- add SPVM::StringList::capacity
- add SPVM::ObjectList::capacity
- add insert, remove method to SPVM::ByteList, SPVM::ShortList, SPVM::IntList, SPVM::LongList, SPVM::FloatList, SPVM::DoubleList, SPVM::StringList, SPVM::ObjectList
0.0439 2019-08-05
- rename runtime_type to runtime_type_category
- fix IO::Socket connect with IP address bug
- cleanup SPVM::MIME::Base64 interface
package SPVM::MIME::Base64 {
sub new : SPVM::MIME::Base64 () {
return new SPVM::MIME::Base64;
}
native sub encode : string ($self : self, $string : string);
native sub decode : string ($self : self, $string : string);
}
- refactoring SPVM::StringBuffer
- rename SPVM::IO::Socket to SPVM::IO::ClientSocketTCP
0.0438 2019-06-22
- add SPVM::CORE::isdigit function
- add SPVM::CORE::ispspace function
- add SPVM::CORE::ispword function
- fix while condition my memmory id wrong bug
- fix "aaa\\" can't parsing bug
- allow "aaa$" in string literal
- support variable expansion field access, array constant index access, dereference, exception variable, package variable
- \r\n is converted to \n in source code parsing
- \r is converted to \n in source code parsing
- support private enum
private enum {
ONE,
TOW
}
- fix multi line string literal line number bug
0.0437 2019-06-10
- rename SPVM::List->new_with_array to newa
- rename SPVM::Hash->new_with_array to newa
- rename SPVM::ByteList->new_with_array to newa
- rename SPVM::ShortList->new_with_array to newa
- rename SPVM::IntList->new_with_array to newa
- rename SPVM::LongList->new_with_array to newa
- rename SPVM::FloatList->new_with_array to newa
- rename SPVM::DoubleList->new_with_array to newa
- remove SPVM::Hash->new_with_capacity
- add SPVM::Hash->new_opt
- add SPVM::Util;
- move SPVM::CORE::joino to SPVM::Util
- move SPVM::CORE::split to SPVM::Util
- add SPVM::Sort;
- move SPVM::CORE::sortb, sorts, sorti, sortl, sortf, sortd, sorto to SPVM::Sort
- If SPVM::call_sub argument is array of any object and element is non-ref scalar, it is encoded to UTF-8 and converted to byte[]
- add SPVM::Unistd
- move SPVM::CORE::sleep to SPVM::Unistd
- fix siwtch and for block bug.
- remove SPVM::hash function
- Last statement of case block must be break statement
- allow byte and short value to place if condition
0.0436 2019-06-06
- allow switch case byte constant. byte constant is converted to int constant.
- add $ to string escape character
- fix switch no default statement bug
- case statement need block if your want to write statements.
- default statement need block if your want to write statements.
- switch statement only have case stetement and last of default statement
- add break statement to escape from switch block, and last is only used to escape from loop block
- Try to show NA in CPAN testers again
In Makefile.PL, add the following lines
warn "SPVM don't support NetBSD 6, 5, 4, 3, 2, 1";
die "OS unsupported\n";
0.0435 2019-05-24
- Try to show NA in CPAN testers
- rename value_t package descriptor to mulnum_t
- chomp return value instead of replacing argument string
- remove utf8proc dependency of SPVM core
0.0434 2019-05-21
- add SPVM::StringList
- remove SPVM::list
- In any object array argument of SPVM::call_sub, array reference is converted to any object array
SPVM::List->newa([SPVM::Int->new(1), SPVM::Double->new(2.5), undef])
- Fix value fields 16 length bug.
- add complex double and float operation +, -, *, /
- rename new_dcomplex to complex
- rename new_fcomplex to complexf
- add SPVM::Unicode::uchar, u8, u16
- rename SPVM::Build::Config::new_default to new_c99
- fix Windows MinGW compile bugs
- remove SPVM::Time::Moment, SPVM::Time::Format
- remove getenv for Windows compatibility
- fix winsocket bugs and exe bugs
0.0433 2019-05-08
- Change IO::File::write, IO::Socket::write to
sub write : int ($self : self, $buffer : string, $legnth : int);
- add fileno to SPVM::IO::Socket
- add SPVM::IO::Select
- remove SPVM::set_exception_undef
- add SPVM::set_exception
- add SPVM::exception
- add shutdown, close to IO::Socket
- add SPVM::ByteList, SPVM::ShortList, SPVM::IntList, SPVM::LongList, SPVM::FloatList, SPVM::DoubleList
- remove SPVM::CORE::list function
- rename memcpy to memcpyb
- rename memmove to memmoveb
- add memcpys, memcpyi, memcpyl, memcpyf, memcpyd
- add memmoves, memmovei, memmovel, memmovef, memmoved
0.0432 2019-04-29
- Allow lower case package variable name and allow upper case lexical variable name
This is same implementation as Perl
0.0431 2019-04-27
- move time function to SPVM::Time module
because time module need to define _XOPEN_SOURCE for thread safe portability on unix/linux and Windows/minGW
- add Time::localtime, Time::gmtime
- add #define _XOPEN_SOURCE if needed
- add strftime, strptime, mktime, timegm to SPVM::Time
- remove fread, fwrite, fopen ,fclose, fseek, fgets, fgets_chomp, slurp_file. Thease functions is moved to SPVM::IO::File
- implement SPVM::IO::File
- add chomp function
- remove gets_chomp
- rename gets to readline
0.0430 2019-04-24
- add SPVM::hash function
- add SPVM::list function
- fix any object return value bug
0.0429 2019-04-23
- LICENSE is changed from MIT to same one as Perl.
because SPVM is cpan module and SPVM want to use glibc code.
- add rand function
- SPVM::call_sub can receive decoded string
- add stringify overload to SPVM::Data::Array
- SPVM::call_sub can receive numeric array
- SPVM::call_sub can receive string array
- add to_strs to SPVM::Data::Array
0.0428 2019-04-22
- rename new_list to list
- rename new_hash to hash
- add contains function
- add index function
- add memcpy function
- add memmove function
- add replace function
- add replace_all function
- fix native distribution make dependency bugs
- fix env->pkgvar_id segfault bugs
- rename SPVM::Socket to SPVM::IO::Socket
- add SPVM_BFIELD macro
- add SPVM_SFIELD macro
- add SPVM_IFIELD macro
- add SPVM_LFIELD macro
- add SPVM_FFIELD macro
- add SPVM_DFIELD macro
- add SPVM_OFIELD macro
- add SPVM_SET_BFIELD macro
- add SPVM_SET_SFIELD macro
- add SPVM_SET_IFIELD macro
- add SPVM_SET_LFIELD macro
- add SPVM_SET_FFIELD macro
- add SPVM_SET_DFIELD macro
- add SPVM_SET_OFIELD macro
- add SPVM_BPKGVAR macro
- add SPVM_SPKGVAR macro
- add SPVM_IPKGVAR macro
- add SPVM_LPKGVAR macro
- add SPVM_FPKGVAR macro
- add SPVM_DPKGVAR macro
- add SPVM_OPKGVAR macro
- add SPVM_SET_BPKGVAR macro
- add SPVM_SET_SPKGVAR macro
- add SPVM_SET_IPKGVAR macro
- add SPVM_SET_LPKGVAR macro
- add SPVM_SET_FPKGVAR macro
- add SPVM_SET_DPKGVAR macro
- add SPVM_SET_OPKGVAR macro
- add lc, uc, lcfirst, ucfirst functions
- rename interface_t to callback_t
0.0427 2019-04-17
- add getenv function
- add SPVM::Errno module
- Errno tests become more portable
- add strerror function
0.0426 2019-04-15
- --no-as-needed is not portable. so I remove it again.
- Create SPVM::Math module and math functions is moved to SPVM::Math.
0.0425 2019-04-12
- add dl_error message
- add -Wl,--no-as-needed for newer Ubuntu.
0.0424 2019-04-09
- add get_ext to SPVM::Builder::Config
- add set_ext to SPVM::Builder::Config
- config file is required always in native
- source extension become always one
- If config file modified time is newer than object file, compile is done
- fix FreeBSD getc bug. getc is replaced with fgetc
0.0423 2019-04-08
- SPVM_DIE don't need to write "at %s line %d"
0.0422 2019-04-06
- rename croak keyword to die
- rename cache of SPVM::Builder::Config to get_cache
- rename quiet of SPVM::Builder::Config to get_quiet
- rename SPVM_CROAK macro to SPVM_DIE
- SPVM_DIE can receive sprintf format
SPVM_DIE("Hello %s at %s line %d", "foo", "bar.c", __LINE__);
- dependency of dll is detected automatically
0.0421 2019-04-05
- add quiet to SPVM::Builder::Config
- add set_quiet to SPVM::Builder::Config
- add cache to SPVM::Builder::Config
- add set_cache to SPVM::Builder::Config
- fix spvm_build/include directory not detected bug
- add set_cache to SPVM::Builder::Config
- add new_cpp to SPVM::Builder::Config
- fix no needed object file is compiled bug
0.0420 2019-04-03
- fix before relase bugs
0.0419 2019-04-03
- add env->alloc_memory_block_zero
- add env->free_memory_block
- add socket modules
- support oarray argument from SPVM::call_sub
- change SPVM::new_oarray, SPVM::new_varray, SPVM::new_varray_from_bin first argument to array type
[Before]"Point"
[After]"Point[]"
- SPVM::new_marray is merged to SPVM::new_oarray
- add split core function
- add env->remove_mortal function
- add new_default method to SPVM::Builder::Config
0.0418 2019-03-01
- fix t/exe/exe.t bug
0.0417 2019-03-01
- add private and public descriptor to sub declaration
- add allow syntax to allow to accsess to private things.
allow TestCase::Allow;
- rename SPVM::Stringer::to_string to to_str
- fix spvmcc compile bugs
0.0416 2019-02-19
- native sub routine prefix is changed from SPVM_NATIVE_ to SPNATIVE__
// Before
int32_t SPVM_NATIVE_TestCase__Extension__bpkgvar_test(SPVM_ENV* env, SPVM_VALUE* stack) {
}
// After
int32_t SPNATIVE__TestCase__Extension__bpkgvar_test(SPVM_ENV* env, SPVM_VALUE* stack) {
}
- add refcnt keyword
- remove ref_count function
- temporary variable is freed after end of statement or end of condition
- reduce lexical variable memory area to minimal size
- fix isweak and unweaken bugs
- syntax tree become more assign statements
- comparison operator and logical operator become expression and return value
0.0415 2019-02-06
- remove weken array, unweaken array, isweak array because of array elements move operation performance
- add fgets
- add fgets_chomp
- Exception in destructor is changed to warning
- add ref_count core function
- fix precompile double, float constant precice and sign bug
0.0414 2019-01-29
- add sequencial operator
# $z is 3
my $z = (1, 2, 3);
- add env->set_pointer
- add fopen
- add fclose
- add fread
- add fwrite
- improve error message
- precompile anon sub is always compiled
- eval{ } need semicolon. Must be eval { };
- add chacaters position in compiler error message
Unexpected token "byte" at /home/kimoto/labo/SPVM/t/default/lib/TestCase/CompileError/Assign/ConstToNoConst.spvm line 5:30
- add slurp_file
- fix package var inline expansion bug
- remove SPVM::BuildDir module, and document SPVM_BUILD_DIR environment variable and default build directory become script diretory/spvm_build
- fix POSIX barewaord test bugs
0.0413 2019-01-22
- add replaceb
- add replaces
- add replacei
- add replacel
- add replacef
- add replaced
- add replaceo
- rename copy_byte_array to copy_barray
- rename copy_short_array to copy_sarray
- rename copy_int_array to copy_iarray
- rename copy_long_array to copy_larray
- rename copy_float_array to copy_farray
- rename copy_double_array to copy_darray
- rename copy_object_array to copy_oarray
- rename copy_string to copy_str
- add copy_strarray
- add equals_strarray
- fix bug SPVM::CORE is not basic type
- anon sub precompile have some bugs, so I suppress it for a while
0.0412 2019-01-17
- add oarray type to implement sort algorithm
- fix native and precompile file path bug
- add equals_barray core function
- add equals_sarray core function
- add equals_iarray core function
- add equals_larray core function
- add equals_farray core function
- add equals_darray core function
- add equals_oarray core function
- add sortb core function
- add sorts core function
- add sorti core function
- add sortl core function
- add sortf core function
- add sortd core function
- add sorto core function
- add reverseb core function
- add reverses core function
- add reversei core function
- add reversel core function
- add reversef core function
- add reversed core function
- add reverseo core function
- add sliceb core function
- add slices core function
- add slicei core function
- add slicel core function
- add slicef core function
- add sliced core function
- add sliceo core function
- add env->object_basic_type_id
- add env->object_type_dimension
- add SPVM::Stringer interface
- add joinb
- add joins
- add joini
- add joinl
- add joinf
- add joind
- add joino
0.0411 2019-01-16
- remove rest of list context @ error check becuase SPVM can not define list context correctly
0.0410 2019-01-16
- Fix realese of 0.0409
0.0409 2019-01-16
- remove new Foo[] {x, y, z} syntax. Use [(Foo)x, y, z] instead.
- Simplify native source file and config path
change Foo/Bar.native/Bar.c to Foo/Bar.native.c
change Foo/Bar.native/Bar.config to Foo/Bar.native.config
- add default include path spvm_build/include
- add default library path spvm_build/lib
- rename SPVM::Builder::C to SPVM::Builder::CC
0.0408 2019-01-11
- remove list context @ error check becuase SPVM can not define list context correctly
- fix string comparison operator undef occur exception
- add new_list core func
- add new_hash core func
- add to_iarray to SPVM::List
- add unweaken and isweak statement
- fat camma left name become string literal
x => 1, y => 2
0.0407 2019-01-08
- Change SPVM::Bool to SPVM::JSON::Bool
- rename interface descriptor to interface_t
- remove floating point x % y
- shift operation right operand is used directory
- isa operator can check any object type
- empty array init type become object[]
my $objects = [];
0.0406 2019-01-04
- add signbit CORE func
- add signbitf CORE func
- add specification some tests
0.0405 2018-12-28
- fix operator precidence. more perlish.
- can omit for init, inc part
for (;CONDITION;) {
}
- fix % operator error message seg fault bug
- support my declaration in while condition
while (my $num = 1) {
}
- add type_name core func
- fix native object return bug
- in runtime, string type become byte array type
- support isa numeric type and value type
- cast is done in (byte[])$string instead of copy
0.0404 2018-12-18
- support ascii escape '\x1F' syntax in character literal
- support string literal excape character '\0' '\a'
- support string literal ascii escape character
- support unicode escape in string literal "\N{U+3042}\N{U+3044}\N{U+3046}"
0.0403 2018-12-17
- fix line terminator
- add __LINE__
- add __FILE__
- add __PACKAGE__
- If . left and right is both constant string, concat them at compile time.
- SPVM::Bool::new_true is renamed to SPVM::Bool::TRUE and this become singleton
- SPVM::Bool::new_false is renamed to SPVM::Bool::FALSE and this become singleton
- add TRUE core function
- add FALSE core function
- add SPVM::Hash
0.0402 2018-12-07
- add package variable access native api
int8_t (*bpkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
int16_t (*spkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
int32_t (*ipkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
int64_t (*lpkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
float (*fpkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
double (*dpkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
void* (*opkgvar)(SPVM_ENV* env, int32_t pkgvar_id);
void (*set_bpkgvar)(SPVM_ENV* env, int32_t pkgvar_id, int8_t value);
void (*set_spkgvar)(SPVM_ENV* env, int32_t pkgvar_id, int16_t value);
void (*set_ipkgvar)(SPVM_ENV* env, int32_t pkgvar_id, int32_t value);
void (*set_lpkgvar)(SPVM_ENV* env, int32_t pkgvar_id, int64_t value);
void (*set_fpkgvar)(SPVM_ENV* env, int32_t pkgvar_id, float value);
void (*set_dpkgvar)(SPVM_ENV* env, int32_t pkgvar_id, double value);
void (*set_opkgvar)(SPVM_ENV* env, int32_t pkgvar_id, void* value);
- add is_type native api
int32_t (*is_type)(SPVM_ENV*, void* object, int32_t basic_type_id, int32_t type_dimension);
- add number-to-string convertion native api
void* (*i_to_str_raw)(SPVM_ENV* env, int32_t value);
void* (*i_to_str)(SPVM_ENV* env, int32_t value);
void* (*l_to_str_raw)(SPVM_ENV* env, int64_t value);
void* (*l_to_str)(SPVM_ENV* env, int64_t value);
void* (*f_to_str_raw)(SPVM_ENV* env, float value);
void* (*f_to_str)(SPVM_ENV* env, float value);
void* (*d_to_str_raw)(SPVM_ENV* env, double value);
void* (*d_to_str)(SPVM_ENV* env, double value);
- add public document 1.0 beta
- support hex floating point leteral
0.0401 2018-12-06
- fix windows dinamic link warnings
0.04 2018-12-06
- Change many native api names
void* exception_object;
void* native_mortal_stack;
void* native_mortal_stack_top;
void* native_mortal_stack_capacity;
void* runtime;
void* runtime_package_vars_heap_offset;
void* object_header_byte_size;
void* object_ref_count_offset;
void* object_basic_type_id_offset;
void* object_type_dimension_offset;
void* object_array_length_offset;
void* byte_object_basic_type_id;
void* short_object_basic_type_id;
void* int_object_basic_type_id;
void* long_object_basic_type_id;
void* float_object_basic_type_id;
void* double_object_basic_type_id;
int32_t (*memory_blocks_count)(SPVM_ENV* env);
void* (*new_env)(SPVM_ENV*);
void (*free_env)(SPVM_ENV*);
int32_t (*len)(SPVM_ENV*, void*);
int8_t* (*belems)(SPVM_ENV*, void*);
int16_t* (*selems)(SPVM_ENV*, void*);
int32_t* (*ielems)(SPVM_ENV*, void*);
int64_t* (*lelems)(SPVM_ENV*, void*);
float* (*felems)(SPVM_ENV*, void*);
double* (*delems)(SPVM_ENV*, void*);
void* (*oelem)(SPVM_ENV*, void*, int32_t index);
void (*set_oelem)(SPVM_ENV*, void*, int32_t index, void* value);
int32_t (*field_id)(SPVM_ENV*, const char*, const char*, const char*);
int8_t (*bfield)(SPVM_ENV*, void*, int32_t);
int16_t (*sfield)(SPVM_ENV*, void*, int32_t);
int32_t (*ifield)(SPVM_ENV*, void*, int32_t);
int64_t (*lfield)(SPVM_ENV*, void*, int32_t);
float (*ffield)(SPVM_ENV*, void*, int32_t);
double (*dfield)(SPVM_ENV*, void*, int32_t);
void* (*ofield)(SPVM_ENV*, void*, int32_t);
void* (*pointer)(SPVM_ENV*, void*);
void (*set_bfield)(SPVM_ENV*, void*, int32_t, int8_t);
void (*set_sfield)(SPVM_ENV*, void*, int32_t, int16_t);
void (*set_ifield)(SPVM_ENV*, void*, int32_t, int32_t);
void (*set_lfield)(SPVM_ENV*, void*, int32_t, int64_t);
void (*set_ffield)(SPVM_ENV*, void*, int32_t, float);
void (*set_dfield)(SPVM_ENV*, void*, int32_t, double);
void (*set_ofield)(SPVM_ENV*, void*, int32_t, void*);
int32_t (*sub_id)(SPVM_ENV*, const char*, const char*, const char*);
int32_t (*method_sub_id)(SPVM_ENV*, void* object, const char*, const char*);
int32_t (*basic_type_id)(SPVM_ENV*, const char*);
int32_t (*pkgvar_id)(SPVM_ENV* env, const char* package_name, const char* pkgvar_name, const char* signature);
int32_t (*field_offset)(SPVM_ENV*, int32_t);
void* (*new_obj_raw)(SPVM_ENV*, int32_t);
void* (*new_barray_raw)(SPVM_ENV*, int32_t);
void* (*new_sarray_raw)(SPVM_ENV*, int32_t);
void* (*new_iarray_raw)(SPVM_ENV*, int32_t);
void* (*new_larray_raw)(SPVM_ENV*, int32_t);
void* (*new_farray_raw)(SPVM_ENV*, int32_t);
void* (*new_darray_raw)(SPVM_ENV*, int32_t);
void* (*new_oarray_raw)(SPVM_ENV*, int32_t, int32_t);
void* (*new_marray_raw)(SPVM_ENV*, int32_t, int32_t, int32_t);
void* (*new_varray_raw)(SPVM_ENV*, int32_t, int32_t);
void* (*new_str_raw)(SPVM_ENV* env, const char* bytes, int32_t length);
void* (*new_pointer_raw)(SPVM_ENV*, int32_t basic_type_id, void* ptr);
void* (*new_obj)(SPVM_ENV*, int32_t);
void* (*new_barray)(SPVM_ENV*, int32_t);
void* (*new_sarray)(SPVM_ENV*, int32_t);
void* (*new_iarray)(SPVM_ENV*, int32_t);
void* (*new_larray)(SPVM_ENV*, int32_t);
void* (*new_farray)(SPVM_ENV*, int32_t);
void* (*new_darray)(SPVM_ENV*, int32_t);
void* (*new_oarray)(SPVM_ENV*, int32_t, int32_t);
void* (*new_marray)(SPVM_ENV*, int32_t, int32_t, int32_t);
void* (*new_varray)(SPVM_ENV*, int32_t, int32_t);
void* (*new_str)(SPVM_ENV* env, const char* bytes, int32_t length);
void* (*new_pointer)(SPVM_ENV* env, int32_t basic_type_id, void* ptr);
void* (*exception)(SPVM_ENV* env);
void (*set_exception)(SPVM_ENV* env, void* exception);
int32_t (*ref_count)(SPVM_ENV* env, void* object);
void (*inc_ref_count)(SPVM_ENV* env, void* object);
void (*dec_ref_count)(SPVM_ENV* env, void* object);
void (*weaken)(SPVM_ENV* env, void** object_address);
int32_t (*isweak)(SPVM_ENV* env, void** object);
void (*unweaken)(SPVM_ENV* env, void** object_address);
void* (*concat)(SPVM_ENV* env, void* string1, void* string2);
void* (*create_stack_trace)(SPVM_ENV* env, void* excetpion, const char* package_name, const char* sub_name, const char* file, int32_t line);
int32_t (*call_sub)(SPVM_ENV* env, int32_t sub_id, SPVM_VALUE* args);
int32_t (*enter_scope)(SPVM_ENV* env);
void (*push_mortal)(SPVM_ENV* env, void* object);
void (*leave_scope)(SPVM_ENV* env, int32_t original_mortal_stack_top);
int32_t (*has_interface)(SPVM_ENV*, void* object, int32_t interface_basic_type_id);
- Change many exchange api names
SPVM::new_barray
SPVM::new_sarray
SPVM::new_iarray
SPVM::new_larray
SPVM::new_farray
SPVM::new_darray
SPVM::new_oarray
$obj->to_elems
$obj->to_str
$obj->to_bin
0.0399 2018-12-05
- SPVM_value field is changed to
union SPVM_value {
int8_t bval;
int16_t sval;
int32_t ival;
int64_t lval;
float fval;
double dval;
void* oval;
int8_t* bref;
int16_t* sref;
int32_t* iref;
int64_t* lref;
float* fref;
double* dref;
};
- pointer descriptor is renamed to pointer_t
- revert function parenthes omit because not using core lib tests is fail
- SPVM::Bool is loaded by default
- SPVM::Bool, SPVM::Byte, SPVM::Short, SPVM::Int, SPVM::Long, SPVM::Float, SPVM::Double become immutable
0.0398 2018-12-04
- reduce object size by reducing weaken information
- env become thread safe
0.0397 2018-12-01
- add if require statement
if module loading is success, block is exists.
if (require Foo) {
}
0.0396 2018-11-30
- add BEGIN block
- change native api has_interface arguments
0.0395 2018-11-28
- sub id, field id, package var id, basic type id, package id become start 0
- valut_t type name rule is changed.
for example
Change SPVM::Point_d3 to SPVM::Point_3d
- fix int literal out of range seg fault bug.
- add rw, ro, rw descriptor to create field accessor
has x : rw int;
- add rw, ro, rw descriptor to create package variable accessor
our $FOO : rw int;
- setter and getter is inlined.
- package become private by default except for anon sub
- package variable become private by default
- field become private by default
- constant sub is inlined
- simple constructor is inlined
0.0394 2018-11-24
- reduce malloc count when object is created.
- reduce object fields memory size.
0.0393 2018-11-20
- add fat camma syntax
"x", 1, "y", 2
is same as
"x" => 1, "y" => 2
0.0392 2018-11-20
- add subroutine import syntax
use Foo (bar, baz);
- allow string index access
my $char = $string->[0];
0.0392 2018-11-19
- add copy_string;
- add copy_byte_array;
- add copy_short_array;
- add copy_int_array;
- add copy_long_array;
- add copy_float_array;
- add copy_double_array;
- add copy_object_array;
- add length keyword to get string length
- don't allow @$foo in list context
0.0391 2018-11-17
- field name become not conflict reserved words and core func names
- rename Native Interface to Native API
- rename SPVM::PerlAPI to SPVM::ExchangeAPI
- add SPVM::Data::Package
- add to_string to SPVM::Data::Array
- add SPVM::Data::String for SPVM string type
- add SPVM::new_string
- add SPVM::new_string_from_binary
0.0390 2018-11-16
- package variable must start upper case or contain ::
- add SPVM::List module
- add private private package variable
- fix constant pool cache bug
- support no parenthes sub
INT8_MAX
sin 0.5
- string relative operator can receive byte array
if ($bytes1 eq $bytes2) {
}
- concat operator can receive byte array
$bytes1 . $bytes2
- string type become real string type, instead of alias of const byte[]
- rename SPVM::new_byte_array_string to SPVM::new_byte_array_from_binary.
and recieve binary data instead of Perl internal string
- rename new_value_t_array to new_value_array
- add SPVM::new_value_array_from_binary
- remove SPVM::set_array_elements
- remove SPVM::set_array_elements_bin
- add new_multi_array
- rename SPVM::get_elements to SPVM::to_elements
- rename SPVM::get_elements_bin to SPVM::to_binary
- add to_elements to SPVM::Data::Array
- add to_binary to SPVM::Data::Array
- remove SPVM::to_elements
- remove SPVM::to_binary
0.0389 2018-11-13
- fix nested loop last bugs
- fix nested loop next bugs
- fix single quote escape sequence bug
0.0388 2018-11-10
- add table switch
- improve constant pool implementation
0.0387 2018-11-07
- improve compile error check logic and fix some bugs.
- SPVM don't support unnatural ccflags.
- add global string pool
0.0386 2018-11-03
- Extension can only allow one file.
- spvmmcc create one exe file not depend sharaed library.
0.0385 2018-11-02
- SPVM LICENSE is changed to MIT LICENSE
MIT License
Copyright (c) [2018] [Yuki Kimoto]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- support variable length argument subroutine
sub vaarg : void ($format : string, $nums : int[]...) { }
vaarg("ddd", 20, 30);
0.0384 2018-10-31
- remove ${$var} dereference syntax. use $$var always.
- allow brace in variable ${foo}.
- support variable expansion.
0.0383 2018-10-30
- remove array list syntax. This syntax is very unnatural.
[(1, 2), (3, 4)]
- change new_fcomplex_array definition
sub new_fcomplex_array : SPVM::Complex_f2[] ($re_values : float[], $im_values : float[]);
- change new_dcomplex_array definition
sub new_dcomplex_array : SPVM::Complex_d2[] ($re_values : double[], $im_values : double[]);
- fix do string bugs. use open and eval string to load config file.
0.0382 2018-10-29
- remove no needed runtime type check.
- change sub signature
[before](int)foo(int,int)
[after]foo:int(int,int)
- change field signature
[before](int)foo
[after]foo:int
- change package variable signature
[before](int)$FOO
[after]$FOO:int
- change get_package_var_id argument, and signature contain only type
[before]int32_t SPVM_RUNTIME_API_get_package_var_id(SPVM_ENV* env, const char* package_name, const char* signature);
[after]int32_t SPVM_RUNTIME_API_get_package_var_id(SPVM_ENV* env, const char* package_name, const char* package_var_name, const char* signature);
- change get_field_id argument, and signature contain only type
[before]int32_t SPVM_RUNTIME_API_get_field_id(SPVM_ENV* env, const char* package_name, const char* signature);
[after]int32_t SPVM_RUNTIME_API_get_field_id(SPVM_ENV* env, const char* package_name, const char* field_name, const char* signature);
- change get_sub_id argument, and signature contain only type
[before]int32_t SPVM_RUNTIME_API_get_sub_id(SPVM_ENV* env, const char* package_name, const char* signature);
[after]int32_t SPVM_RUNTIME_API_get_sub_id(SPVM_ENV* env, const char* package_name, const char* sub_name, const char* signature);
- change get_sub_id_method_call argument, and signature contain only type
[before]int32_t SPVM_RUNTIME_API_get_sub_id_method_call(SPVM_ENV* env, void* object, const char* signature);
[after]int32_t SPVM_RUNTIME_API_get_sub_id_method_call(SPVM_ENV* env, void* object, const char* field_name, const char* signature);
- support anon sub
my $comparator = sub : int ($self : self, $x1 : object, $x2 : object) {
...;
};
- remove new sub syntax.
- remove anon package syntax
- support anon sub capture variable
{
my $capture1 = 7;
my $capture2 = 10;
my $anon_sub = [$capture1 : int, $capture2 : int] sub : int ($self : self, $x1 : object, $x2 : object) {
print($capture1 . "\n");
print($capture2 . "\n");
$self->{capture1} = 5;
print($capture1 . "\n");
return -1;
};
$anon_sub->(undef, undef);
}
0.0381 2018-10-24
- remove directory path from runtime file name
- reduce runtime constant pool size
0.0380 2018-10-12
- improve call subroutine performance by reduce malloc count
- fix XS value reference bugs
0.0379 2018-10-08
- fix temporary variable memory position bugs
- fix string eq bugs
- fix remainder bugs
- fix right shift precompile bug
- fix left shift precompile bug
- fix right shift unsigned precompile bug
- fix bit and bugs
0.0378 2018-10-02
- fix exe compiler error library bugs
0.0377 2018-10-01
- fix exe compiler error bugs
0.0375 2018-09-26
- improve increment/decrement, can use array element, field access, package variable, deref
- allow value_t multi dimension array
0.0374 2018-09-24
- fix assign operator return value bugs
- support package variable relative name
0.0373 2018-09-21
- add unless statement
- change reference type syntax to
sub sum : double ($x_in : double, $x_in2 : double, $x_out : double&);
& is after type name.
- fix many weaken bugs
- add weaken $values->[$index] syntax
0.0372 2018-09-17
- add boxing and unboxing feature
0.0371 2018-09-14
- add automatically concat string convertion
- add automatically numeric type to string type convertion
0.0370 2018-09-14
- fix check object type null segumentation fault bug
- fix new array length is minus segfalt bug
- rename SPVM::Byte->set_value to SPVM::Byte->set_val
- rename SPVM::Short->set_value to SPVM::Short->set_val
- rename SPVM::Int->set_value to SPVM::Int->set_val
- rename SPVM::Long->set_value to SPVM::Long->set_val
- rename SPVM::Float->set_value to SPVM::Float->set_val
- rename SPVM::Double->set_value to SPVM::Double->set_val
- rename SPVM::Byte->get_value to SPVM::Byte->val
- rename SPVM::Short->get_value to SPVM::Short->val
- rename SPVM::Int->get_value to SPVM::Int->val
- rename SPVM::Long->get_value to SPVM::Long->val
- rename SPVM::Float->get_value to SPVM::Float->val
- rename SPVM::Double->get_value to SPVM::Double->val
- free runtime memory
- Interface must have only one method
- fix mortal stack bug. mortal stack is extended to count of PUSH_MORTAL opcode
- fix array init type bug
- fix type semantics. Can't assign Class[] to object[]
- fix narrowing convertion bug
- remove anon subroutine. This is mistake of class design
- add anon package syntax for which have one subroutine
my $comparator = sub compare : long ($self : self, $x1 : long, $x2 : long) {
return $x1 * $x2;
};
- isa can check interface
- can cast (object)
- can cast to interface
0.0369 2018-09-08
- fix hash key buffer memory bug.
- rename SPVM::Build to SPVM::Builder
- spvmcc command can create exe file
spvmcc TestCase::MyExe
# Entry point is main subroutine
package TestCase::MyExe {
sub main : int ($argv : string[]) {
my $test_num = 0;
}
}
0.0368 2018-09-03
- remove global runtime. SPVM become reentrant.
- more portable, remove all static and inline keywords.
0.0367 2018-09-01
- runtime don't need compiler information
- free compiler memory completly
- add SPVM::set_array_elements, SPVM::set_array_elements_bin, SPVM::get_array_elements, SPVM::get_array_elements_bin, SPVM::set_array_element, SPVM::get_array_element
- remove SPVM::Data::Array::set_element, remove SPVM::Data::Array::get_element, remove SPVM::Data::Array::to_elements, remove SPVM::Data::Array::set_bin
remove SPVM::Data::Array::set_elements, remove SPVM::Data::Array::to_bin, remove SPVM::Data::Array::to_string
0.0366 2018-08-09
- rename SPVM::Build::Setting to SPVM::Build::Config and many methods is added and changed.
0.0365 2018-08-01
- add reference type syntax to type\. You can write the double\ like.
sub sum : double ($x_in : double, $x_in2 : double, $x_out : &double);
- remove byte_ref, short_ref, int_ref, long_ref, float_ref, double_ref type
- add value ref type support.
For example, you can pass value type ref to subroutine.
sub pass_value_ref_double : void ($x_in1 : TestCase::Point_d3, $x_in2 : TestCase::Point_d3, $x_out : &TestCase::Point_d3) {
$x_out->{x} = $x_in1->{x} + $x_in2->{x};
$x_out->{y} = $x_in1->{y} + $x_in2->{y};
$x_out->{z} = $x_in1->{z} + $x_in2->{z};
}
sub test_pass_value_ref_double : int () {
my $point_out : TestCase::Point_d3;
my $point1 : TestCase::Point_d3;
$point1->{x} = 0.25;
$point1->{y} = 0.5;
$point1->{z} = 0.125;
my $point2 : TestCase::Point_d3;
$point2->{x} = 0.25;
$point2->{y} = 0.5;
$point2->{z} = 0.125;
pass_value_ref_double($point1, $point2, \$point_out);
if ($point_out->{x} == 0.5 && $point_out->{y} == 1 && $point_out->{z} == 0.25) {
return 1;
}
return 0;
}
- Perl function become can pass numeric reference and value reference to SPVM
{
my $point1 = {x => $BYTE_MIN, y => 1, z => 2};
my $value1 = 6;
my $point2 = {x => 3, y => 4, z => 5};
my $value2 = 7;
TestCase::PerlAPI->call_sub_value_ref_numeric_ref_mixed_arg(\$point1, \$value1, \$point2, \$value2);
is_deeply($point1, {x => $BYTE_MIN + 1, y => 2, z => 3});
is($value1, 7);
is_deeply($point2, {x => 4, y => 5, z => 6});
is($value2, 8);
}
0.0364 2018-07-28
- support numeric reference type
add byte_ref, short_ref, int_ref, long_ref, float_ref, double_ref type
add reference \ and derefence $$num syntax
sub main : int ($mvar : int) {
{
my $out : double;
ref_sum(0.25, 0.5, \$out);
print((string)$out);
}
{
my $num = 4;
my $num_ref = \$num;
my $num2 = $$num_ref;
$$num_ref = 5;
print((string)$num2);
print((string)$num);
}
}
sub ref_sum : double ($x_in1 : double, $x_in2 : double, $x_out : double_ref) {
$$x_out = $x_in1 + $x_in2;
}
0.0363 2018-07-26
- simplify anon package syntax. You don't need to write "new package { ... }".
my $point = package {
has x : int;
has y : int;
sub clear : void ($self : self) {
$self->{x} = 0;
$self->{y} = 0;
}
};
- Perl API call_sub support value type arguments
- add SPVM::new_object_array
- add SPVM::new_value_t_array
- remove SPVM::new_byte_array_bin
- remove SPVM::new_short_array_bin
- remove SPVM::new_int_array_bin
- remove SPVM::new_long_array_bin
- remove SPVM::new_float_array_bin
- remove SPVM::new_double_array_bin
- fix mortal stack length overflow bug
0.0362 2018-07-23
- improve precompiled source code with more typing
0.0361 2018-07-21
- add two anon sub syntax
[First] Package is Foo, sub name is anonymous
package Foo {
sub : int ($self : self, $x1 : int, $x2 : int) {
return $x1 + $x2;
}
}
[Second] Package is anonymous(Internaly named), sub name is anonymous
my $anon_sub = sub : int ($self : self, $x1 : int, $x2 : int) {
return $x1 + $x2;
}
- add SPVM::Comparator
This is used for object sort method
package SPVM::Comparator : interface {
sub : int ($self : self, $x1 : object, $x2 : object);
}
0.0360 2018-07-20
- Add Complex functions
add cadd
add csub
add cmul
add cdiv
add caddf
add csubf
add cmulf
add cdivf
add new_fcomplex function
add new_dcomplex function
add new_fcomplex_array function
add new_dcomplex_array function
fix array init multi dimention bugs
0.0359 2018-07-16
- SPVM::CORE become done native compile
- add join function
- fix const assignment bug
- support list syntax
my $nums = [(1, 2), (3, 4), (5, 6)];
- object have body field at offset 0. This will fix alignment bugs.
0.0358 2018-07-13
- add c source files and header files to distribution
- Core function is done inline-expansion in precompile
0.0357 2018-07-11
- value_t package must be end with [Prefix][FieldLength]
package TestCase::Complex_b2 : value_t {
has re : byte;
has im : byte;
}
package TestCase::Complex_s2 : value_t {
has re : short;
has im : short;
}
package TestCase::Complex_i2 : value_t {
has re : int;
has im : int;
}
package TestCase::Complex_l2 : value_t {
has re : long;
has im : long;
}
package TestCase::Complex_f2 : value_t {
has re : float;
has im : float;
}
package TestCase::Complex_d2 : value_t {
has re : double;
has im : double;
}
- support value_t array
my $nums1 = new TestCase::Complex_d2[10];
$nums1->[9]{re} = 5;
$nums1->[9]{im} = 9;
my $nums1_9_re = $nums1->[9]{re};
my $nums1_9_im = $nums1->[9]{im};
my $nums2 = $nums1->[9];
$nums1->[5] = $nums2;
- add SPVM::Complex_i2, SPVM::Complex_l2, SPVM::Complex_f2, SPVM::Complex_d2
0.0356 2018-07-07
- Support value_t package. This is value type.
package TestCase::Complex_double_2 : value_t {
has re : double;
has im : double;
}
0.0355 2018-07-05
- Symbol name can't conatain __
- Object alignment must be sizeof(SPVM_VALUE)
- rename strcut descripter to pointer
- rename env->new_struct to env->new_pointer
- rename env->get_struct to env->get_pointer
- remove object null check from env->get/set_xxx_field
- fix env->get/set_xxx_field bugs
- fix array store undef bug in precompile code
0.0354 2018-07-03
- Get and check field index in top of subroutine in precompile
- Get and check package variable id in top of subroutine in precompile
- Get and check sub id in top of subroutine in precompile
0.0353 2018-06-30
- env->get_sub_id receive package name and signature
[Before]
int32_t sub_id = env->get_sub_id(env, sub_abs_name);
[After]
int32_t sub_id = env->get_sub_id(env, package_name, signature);
Signature contains return type, subroutine name, and argument types
For example
(int)foo(double,long)
- rename env->get_field_rel_id to env->get_field_index and receive package name and signature
[Before]
int32_t field_index = env->get_field_rel_id(env, name);
[After]
int32_t field_index = env->get_field_index(env, package_name, signature);
Signature contains field type and field name
For example
(int)x
- add env->get_package_var_id
int32_t package_var_id = env->get_field_index(env, package_name, signature);
Signature contains package variable type and package variable name
For example
(int)$FOO
- improve exception logic
- improve precompile symbol name check
0.0352 2018-06-27
- Separate mortal API and raw API
raw API create object which reference count is zero.
mortal API create object which refernece count is one and pushed to mortal stack.
[Mortal API]
SPVM_RUNTIME_API_new_object
SPVM_RUNTIME_API_new_byte_array
SPVM_RUNTIME_API_new_short_array
SPVM_RUNTIME_API_new_int_array
SPVM_RUNTIME_API_new_long_array
SPVM_RUNTIME_API_new_float_array
SPVM_RUNTIME_API_new_double_array
SPVM_RUNTIME_API_new_object_array
SPVM_RUNTIME_API_new_multi_array
SPVM_RUNTIME_API_new_string
SPVM_RUNTIME_API_new_struct
[Raw API]
SPVM_RUNTIME_API_new_object_raw
SPVM_RUNTIME_API_new_byte_array_raw
SPVM_RUNTIME_API_new_short_array_raw
SPVM_RUNTIME_API_new_int_array_raw
SPVM_RUNTIME_API_new_long_array_raw
SPVM_RUNTIME_API_new_float_array_raw
SPVM_RUNTIME_API_new_double_array_raw
SPVM_RUNTIME_API_new_object_array_raw
SPVM_RUNTIME_API_new_multi_array_raw
SPVM_RUNTIME_API_new_string_raw
SPVM_RUNTIME_API_new_struct_raw
- Add enter_scope and leave_scope native.h
If you use enter_scope, return scope_id. and you create objects,
and use leave_scope, objects is automatically released.
{
// Enter scope
int32_t scope_id = env->enter_scope(env);
env->new_int_array(env, 3);
env->new_int_array(env, 3);
env->new_int_array(env, 3);
// Leave scope
env->leave_scope(env, scope_id);
}
- remove SPVM_NATIVE_SUB macro in spvm_native.h. Native function name become start with SPVM_NATIVE_
SPVM_NATIVE_SUB(My__Point__clear)
is changed to
SPVM_NATIVE_My__Point__clear
- add SPVM_SUCCESS and SPVM_EXCEPTION macro in native.h
SPVM Native Interface must return 0 in success, or 1 in exception,
This mean exception flag, but this is little difficult to keep in mind.
I add SPVM_SUCCESS and SPVM_EXCEPTION macro.
You can use them
return SPVM_SUCCESS
return SPVM_EXCEPTION;
0.0351 2018-06-23
- improve exception message
- create_exception_stack_trace become receive package_name, sub_name, file instead of sub_id
- LOOKUP_SWITCH opcode become 1 operation
- opcode become 64bit from 128bit
0.0350 2018-06-22
- improve solo SPVM tests command
You can run solo tests by the following commands. This comands is wrote in solo/README
# Normal run
yacc/bison.sh && perl Makefile.PL && make && perl solo/solo_Makefile.PL && make -f solo/Makefile && ./solo/spvm_main TestCase
# Debug run - Print AST, package information, operaion codes
yacc/bison.sh && perl Makefile.PL --OPTIMIZE=O --DEFINE=SPVM_DEBUG_DUMP --DEFINE=SPVM_DEBUG_OBJECT_COUNT && make && perl solo/solo_Makefile.PL && make -f solo/Makefile && ./solo/spvm_main TestCase
# Parser Debug run - Print yacc result
yacc/bison.sh && perl Makefile.PL --OPTIMIZE=O --DEFINE=SPVM_DEBUG_YACC && make && perl solo/solo_Makefile.PL && make -f solo/Makefile && ./solo/spvm_main TestCase
- use package relative id in field access, call sub, package variable access, type
0.0349 2018-06-15
- rename SPVM::Build::Base to SPVM::Build::CBuilder
- rename SPVM::Build::Native to SPVM::Build::CBuilder::Native
- rename SPVM::Build::Precompile to SPVM::Build::CBuilder::Precompile
- rename SPVM::Build::SPVMInfo to SPVM::Build::Info
- fix dynamic link library c func names
0.0348 2018-06-15
- add SPVM::Build::Setting
This module is to do setting ExtUtils::CBuilder. ExtUtils::CBuilder is used for native compile and precompile.
- fix config path bug
- add runtime allocator again to check objects count.
spvm_runtime_allocator.h
spvm_runtime_allocator.c
- fix native function name set_object_array_element, get_object_array_element. this name was wrong by wrong replacing.
- fix weaken memory broken bug
- add C/C++ struct/class binding features
add Native interface new_struct and get_struct
new_struct create object which have C/C++ struct/class
get_struct get struct/class from SPVM object
0.0347 2018-06-13
- fix bug : [rt.cpan.org #125541] System perl used in build process
I receive a advice
"
It seems that the system perl is used here (/usr/bin/perl),
not the perl used for building the distribution. Typically this can
be fixed by using something like $^X.
"
This bug is fixed by using $^X.
0.0346 2018-06-12
- fix Makefile.PL native and precompile make rule bug
The following output become printed to Makefile
dynamic :: spvm_native_SPVM__Example
spvm_native_SPVM__Example :: blib/lib/SPVM/Example.native/Example.so
blib/lib/SPVM/Example.native/Example.so :: lib/SPVM/Example.native/Example.c lib/SPVM/Example.spvm
perl -Mblib -MSPVM::Build -e "SPVM::Build->new(build_dir => 'spvm_build')->create_shared_lib_native_dist('SPVM::Example')"
dynamic :: spvm_precompile_SPVM__Example
spvm_precompile_SPVM__Example :: blib/lib/SPVM/Example.precompile/Example.so
blib/lib/SPVM/Example.precompile/Example.so :: lib/SPVM/Example.spvm
perl -Mblib -MSPVM::Build -e "SPVM::Build->new(build_dir => 'spvm_build')->create_shared_lib_precompile_dist('SPVM::Example')"
- fix INT64_MIN bugs
In native function, -9223372036854775808LL is changed to -9223372036854775808ULL
- fix INT32_MIN bugs
In native function, -2147483648L is changed to -2147483648UL
0.0345 2018-06-12
- Support precompile subroutine in distribution
In this version, spvm subroutine can be precompiled before runtime.
You can create precompiled shared library by the following command.
perl -MSPVM::Build -e "SPVM::Build->new(build_dir => 'spvm_build')->create_shared_lib_precompile_dist('Point')";
- remove len keyword and add scalar keyword
SPVM don't have scalar context and list context, but Perl have them.
In SPVM, you can get array by
@$values
syntax. but this confuse you sometime
because
foo(@$values);
is seem list expansion. This is always array length in SPVM.
Until now I provided len keyword , but this is not Perlish syntax.
From now I provide scalar keyword and another array syntax.
scalar @$values
You can write the following subroutine call
foo(scalar @$values);
- add SPVM_NATIVE_SUB macro to spvm_native, and SPVM native function defenition way is changed to the following
// My::Example::sin
int32_t SPVM_NATIVE_SUB(My__Example__sin) (SPVM_ENV* env, SPVM_VALUE* args) {
(void)env;
double value = sin(args[0].dval);
args[0].dval = value;
return 0;
}
SPVM_NATIVE_SUB macro automatically expand function name to SPVM_NATIVE_My__Example__sin.
This is very simple way to define native function.
Newbie only learn SPVM_NATIVE_SUB macro and replace package name : to _ and join package name and subroutine name with __.
0.0345 2018-06-10
- SPVM::Build can parse distribution module and get subrutine names from it
- rename compile descriptor to precompile
0.0344 2018-06-6
- Change native function return value.
native function return value must be set args[0], and return croak_flag.
0.0343 2018-06-05
- do inline expasion in subroutien of same precompile package
- SPVM module loading path become same as Perl. You don't need to create SPVM/ directory.
- remove SPVM::Math
- remove SPVM::TypeUtil
- Move SPVM::Math and SPVM::TypeUtil functions to CORE namespace
0.0342 2018-06-02
- remove SPVM::Native
- remove SPVM::Precompile
- add compile descriptor to precompile
- cleanup SPVM native and precompile build system
0.0340 2018-05-28
- rename byte_value to bval
- rename short_value to sval
- rename int_value to ival
- rename long_value to lval
- rename float_value to fval
- rename double_value to dval
- rename object_value to oval
- pointer_value, string_value, object_address_value is merged to oval
- rename SPVM_API_byte to SPVM_VALUE_byte
- rename SPVM_API_short to SPVM_VALUE_short
- rename SPVM_API_int to SPVM_VALUE_int
- rename SPVM_API_long to SPVM_VALUE_long
- rename SPVM_API_float to SPVM_VALUE_float
- rename SPVM_API_double to SPVM_VALUE_double
- rename SPVM_API_OBJECT to SPVM_VALUE_object
- rename SPVM_API to SPVM_ENV
- rename spvm_api.h to spvm_native.h
- rename $obj->get_elements to $obj->to_elements
- rename $obj->to_data to $obj->to_bin
- rename $obj->set_data to $obj->set_bin
- rename SPVM::new_byte_array_data to SPVM::new_byte_array_bin
- rename SPVM::new_short_array_data to SPVM::new_short_array_bin
- rename SPVM::new_int_array_data to SPVM::new_int_array_bin
- rename SPVM::new_long_array_data to SPVM::new_long_array_bin
- rename SPVM::new_float_array_data to SPVM::new_float_array_bin
- rename SPVM::new_double_array_data to SPVM::new_double_array_bin
- remove range methods
- rename $array->set to $array->set_element
- rename SPVM::Perl::Object to SPVM::Object
- add SPVM::new_multi_array_len
0.0339 2018-05-26
- rename Std::Math to Math
- renmae Std::Time to Time
- renmae Std::TypeUtil to TypeUtil
- rename Std::IO to IO
- rename Std to CORE
- merged CORE::Time to CORE
- merged CORE::IO to CORE
- CORE module is loaded by default
- CORE functions become static functions
0.0338 2018-05-25
- add examples
- add const byte[] type
- String type become string type to express it is core type.
- Otring type become object type to express it is core type.
- string type become syntax sugar of const byte[].
- string next of end character become '\0'
0.0337 2018-05-24
- remove jit descriptor
- add SPVM::JIT moudle
- JIT compile unit become package
- implement JIT compile cache system
- improve test peformance very much
0.0336 2018-05-19
- fix hash insert and search bug
- name string is shared intenally
- only support NetBSD 7+, not support NetBSD 6
0.0335 2018-05-18
- support multi dimension array initialization
my $nums = [
[1, 2, 3],
[4, 5, 6]
];
0.0334 2018-05-07
- add new array init syntax.
my $nums = [3, 4, 5];
my $nums = [0.1, 0.4, 0.8];
- remove Std::Number::Util many subtoutines
- rename Std::Number::Util to Std::TypeUtil
and Std::TypeUtil become C language inttype.h and float.h wrapper
- remove Std::Array::Util
0.0333 2018-05-05
- fix array init type bug
- fix 32bit environment not work bug
0.0332 2018-05-04
- Cleanup internal ast
0.0331 2018-05-01
- fix many assign reference count bug.
- Object type become generic purpose type
- Object can be assigned any array object
0.0329 2018-04-24
- use sprintf "%g" format for string conversion
0.0328 2018-04-24
- Numeric class become not private, and set_value method.
- add Bool package
- fix nan test bug
0.0327 2018-04-21
- fix jit link subroutine name bug
- only print warning message when SPVM_TEST_ENABLE_WARNINGS is defined
- double, float string convertion more portable
- fix windows long constant bug
- fix windows jit dll file overwritten bug
0.0326 2018-04-20
- forbidden function call from Perl. All subroutine become method or class method
- rename Std::Arrays to Std::Array::Util
- rename Std::Array::Util copy_of_xxx to copy_xxxs
- rename Std::Array::Util equals_xxx to eq_xxxs
- fix windows source file reading bug
- inline source code must be in .inline instead of .native
- fix temporary directory bug
- add build directory cleanup logic
0.0325 2018-04-13
- remove template feature
- rename Math to Std::Math
- rename Arrays to Std::Arrays
- rename Number::Util to Std::Number::Util
- add some Std::Math functions
- remove absolute call subroutine syntax
method is only instance method or class method
- rename CORE to Std
- need use Std to use print, warn and time
- use must be in package block
0.0324 2018-04-07
- implement string convertion
- implement isa
- implement string comparison operator
- fix (term) is not allowed bug
0.0323 2018-04-06
- fix file empty bug
0.0322 2018-04-04
- allow numeric type to String convertion
- remove string concat operator automatical type convertion
- licence become MIT licence
0.0321 2018-04-02
- rename Integer package to Int package
- add Number::Util and move many number util funtions of Byte, Short, Int, Long, Float, Double to Number::Util
- SPVM all C source file is compiled by -std=c99 option by default
0.0320 2018-03-29
- add private and public descriptor
- add private field
- add private package
- fix check cast bug
0.0319 2018-03-29
- add interface descriptor to package declaration
- fix bug that empty package parsing fail
- add Object interface
- add subroutine argument convertion
- implement interface method call
- implement check cast
0.0318 2018-03-20
- field become public by default
- remove set, get keyword
- new become public by default
- add self keyword to represent invocant
- many module methods become class method
Byte, Short, Integer, Long, Float, Double, Math
0.0317 2018-03-15
- support escape character \0
- cleanup leave scope logic
- numeric variable become local variable in jitcode
0.0316 2018-03-10
- remove runtime constant_pool
0.0315 2018-03-08
- add JIT descripter
- fix manifest not to contain SPVM-* files
0.0314 2018-03-01
- remove build_shared_lib.pl script
- fix jit subroutine not called bug
0.0313 2018-02-26
- fix shared lib dependency bug
- sub descripter position is changed
before: sub sin : native double ($x : double);
after : native sub sin : double ($x : double);
- fix windows dll not loading bug
0.0312 2018-02-23
- fix bug that last statement can't do leave scope logic
0.0311 2018-02-21
- shared library building temporaly directory is cleaned up in the scope
- cleanup shared library loading
- fix exception stack trace subroutine name
- fix all warnings
0.0310 2018-02-16
- enum value must be int type
- remove byte literal b
- remove short literal s
- add automatically type convertion to + operator
- add automatically type convertion to - operator
- add automatically type convertion to * operator
- add automatically type convertion to / operator
- add automatically type convertion to % operator
- add automatically type convertion to unary -
- fix unary + bug
- add automatically type convertion to unary +
- add automatically type convertion to == operator
- add automatically type convertion to != operator
- add automatically type convertion to > operator
- add automatically type convertion to >= operator
- add automatically type convertion to < operator
- add automatically type convertion to <= operator
- add automatically type convertion to array index
- add automatically type convertion to lengh of new array
- add automatically type convertion to ~ operator
- add automatically type convertion to & operator
- add automatically type convertion to | operator
- add automatically type convertion to ^ operator
- add automatically type convertion to << operator
- add automatically type convertion to >> operator
- add automatically type convertion to >>> operator
- limit <<, >>, >>> right value
- fix increment, decrelement assignment bug
- implement float, double increment
- add automatically type convertion to == operator
0.0309 2018-02-10
- jit code is called from virtual machine
- separate tests to succeed tests at less memory environment
0.0308 2018-02-05
- implement Perl compatible GC system correctory
- fix eval block stack bug
0.0307 2018-02-01
- fix print function bug that print line break.
- remove say relative functions. say, say_xxx, say_xxx_err
- remove print relative functions. print_xxx, print_xxx_err
- rename print_err to warn
- sub definition is changed. sub NAME : RETURN_TYPE ($arg1 : ARG_TYPE1, ...) { }
0.0306 2018-01-23
- remove SPVM::Debug
- croak stack trace is on by default
0.0305 2018-01-20
- fix MANIFEST
- improve exception logic
0.0304 2018-01-18
- add jit code in test(jit-spvm.t)
0.0303 2018-01-03
- fix reference count bug in loop
- support array initialization in any place.
new int[] { 1, 2, 3} is used in any place.
- add temporary JIT code for preparation for JIT compile
- fix assign excecution order
- fix type inference bug
0.0302 2017-12-07
- add eval block stack max length
- fix next statement bug
- operation code become flexible 1 byte to fixed 64 byte for preparation of JIT compile
0.0301 2017-11-20
- support relative name subroutine call
sum(0, 1);
At first, current package is searched, next core function
- rename std package to CORE package
- package variable must be start upper case
- lexical variable must be start lower case
- support relative name package variable
0.03 2017-11-17
- SPVM VM change Stack Based VM to Register Based VM
This change slow down performance temporary
- fix bug that my variable type can't be detected.
- fix my var scope bug
- fix negate operator bug
- add complement operator ~
but, this is prepared for JIT compile
0.0284 2017-10-30
- simplify SPVM internal to implement JIT compile
0.0283 2017-10-23
- cleanup SPVM modules
- implement get_type_id correctory
- change array init syntax
before: my $values : int[] = [1, 2, 3];
after : my $values = new int[] {1, 2, 3};
0.0282 2017-10-23
- support package variable
0.0281 2017-10-19
- remove SPVM::new_object
- remove SPVM::Object::Package::set
- remove SPVM::Object::Package::get
- can call method directory from SPVM object
my $object = SPVM::TestCase::new();
$object->set_x_byte($BYTE_MAX);
$object->set_x_short($SHORT_MAX);
- remove Package->name syntax because Perl subroutine call correspoing to SPVM subroutine call completely
- remove relative name subroutine call because future keyword adding don't break backward compatible
- fix method call bug
- add getter and setter syntax
set x, y;
get x, y;
- field become private
- new keyword become private
0.0280 2017-10-13
- add String type again
- add Native API new_string
- add Native API get_string_length
- add Native API get_string_chars
0.0279 2017-10-12
- fix catch exception bug that runtime exception can't be cached
0.0278 2017-10-11
- throw exception when get array length of undef value
- SPVM::new_xxx_array return undef if argument is undef
- allow SPVM::call_sub undef argument
- add std::say_err ($value : byte[]) : native void;
- add std::say_err_byte ($value : byte) : native void;
- add std::say_err_short ($value : short) : native void;
- add std::say_err_int ($value : int) : native void;
- add std::say_err_long ($value : long) : native void;
- add std::say_err_float ($value : float) : native void;
- add std::say_err_double ($value : double) : native void;
- add std::print_err ($value : byte[]) : native void;
- add std::print_err_byte ($value : byte) : native void;
- add std::print_err_short ($value : short) : native void;
- add std::print_err_int ($value : int) : native void;
- add std::print_err_long ($value : long) : native void;
- add std::print_err_float ($value : float) : native void;
- add std::print_err_double ($value : double) : native void;
- add std::time()
- add Array::equals_byte()
- add Array::equals_short()
- add Array::equals_int()
- add Array::equals_long()
- add Array::equals_float()
- add Array::equals_double()
0.0277 2017-10-10
- allow resorved word for subroutine name
- add Arrays package
- add Arrays::copy_of_byte
- add Arrays::copy_of_short
- add Arrays::copy_of_int
- add Arrays::copy_of_long
- add Arrays::copy_of_float
- add Arrays::copy_of_double
- fix native subroutine exception bugs
- array initialization allow all terms, and need type declaration
0.0276 2017-10-05
- rename back to_array to get_elements
0.0275 2017-10-04
- fix Math.spvm loading bug
0.0274 2017-10-04
- add package name check
- fix enum call bug
0.0273 2017-10-03
- support octal literal
- support binary literal
0.0272 2017-09-27
- add Math::tan function
- add Math::asin function
- add Math::acos function
- add Math::atan function
- add Math::to_radians function
- add Byte package
- add Short package
- add Integer package
- add Long package
- add Float package
- add Double package
- fix call native long function bug
- change byte constatant specifier b to y
124b -> 124y
- a, b, c, d, e, f become hex character.
0.0271 2017-09-23
- add Math::cos function
- add Math::sin function
0.0270 2017-09-22
- fix 0 length string bug
0.0269 2017-09-21
- add SPVM::Object::Array::Short::set_data()
- add SPVM::Object::Array::Int::set_data()
- add SPVM::Object::Array::Long::set_data()
- add SPVM::Object::Array::Float::set_data()
- add SPVM::Object::Array::Double::set_data()
- add SPVM::Object::Array::Short::to_data()
- add SPVM::Object::Array::Int::to_data()
- add SPVM::Object::Array::Long::to_data()
- add SPVM::Object::Array::Float::to_data()
- add SPVM::Object::Array::Double::to_data()
- add SPVM::new_short_array_data()
- add SPVM::new_int_array_data()
- add SPVM::new_long_array_data()
- add SPVM::new_float_array_data()
- add SPVM::new_double_array_data()
- add SPVM::Object::Array::Byte::set_elements_range()
- add SPVM::Object::Array::Short::set_elements_range()
- add SPVM::Object::Array::Int::set_elements_range()
- add SPVM::Object::Array::Long::set_elements_range()
- add SPVM::Object::Array::Float::set_elements_range()
- add SPVM::Object::Array::Double::set_elements_range()
- add SPVM::Object::Array::Byte::set_data_range()
- add SPVM::Object::Array::Short::set_data_range()
- add SPVM::Object::Array::Int::set_data_range()
- add SPVM::Object::Array::Long::set_data_range()
- add SPVM::Object::Array::Float::set_data_range()
- add SPVM::Object::Array::Double::set_data_range()
- add SPVM::Object::Array::Byte::to_array_range()
- add SPVM::Object::Array::Short::to_array_range()
- add SPVM::Object::Array::Int::to_array_range()
- add SPVM::Object::Array::Long::to_array_range()
- add SPVM::Object::Array::Float::to_array_range()
- add SPVM::Object::Array::Double::to_array_range()
- add SPVM::Object::Array::Byte::to_data_range()
- add SPVM::Object::Array::Short::to_data_range()
- add SPVM::Object::Array::Int::to_data_range()
- add SPVM::Object::Array::Long::to_data_range()
- add SPVM::Object::Array::Float::to_data_range()
- add SPVM::Object::Array::Double::to_data_range()
0.0268 2017-09-19
- remove string type. SPVM string become byte[].
- SPVM::new_string_bytes renamed to SPVM::new_byte_array_data and return SPVM::Array::Byte object
- SPVM::new_string renamed to SPVM::new_byte_array_string and return SPVM::Array::Byte object
- rename get_elements to to_array
- rename get_string to to_string
- rename get_data to to_data
0.0267 2017-09-18
- add .= operator
0.0266 2017-09-16
- fix bug that empty string is not used
- rename SPVM::new_string_raw to SPVM::new_string_bytes
- implement . operator to concat string
- renmae println to say
0.0265 2017-09-13
- fix clang duplicate symbol bug
0.0264 2017-09-12
- rename Inline to Extension
0.0263 2017-09-12
- add native INC config
- add native LIBS config
- add special assign syntax
+=
-=
*=
/=
%=
&=
^=
|=
<<=
>>=
>>>=
- fix CBuilder config bug
0.0262 2017-09-12
- fix make dependency
0.0261 2017-09-11
- remove inline syntax
__INLINE__
__NATIVE__
- add new runtime compile syntax
Foo.spvm
Foo.native/Foo.c
Foo.native/Foo.config
0.0260 2017-09-08
- fix windows dll bugs
0.0259 2017-09-06
- add Math module
- add Math::sin function
- add Math->PI constant
- add Math->E constant
0.0258 2017-09-06
- fix temporary inline file name.
- support inline native config
__CONFIG__
- support inline config following options
CC
CCFLAGS
LD
LDDLFLAGS
OPTIMIZE
0.0257 2017-09-05
- improve inline native source error message
- inline source is separated each
0.0256 2017-09-04
- CBuilder output become quite.
- Fix some Windows compile error
0.0255 2017-09-04
- detect automatically inline native function
- remove SPVM::Inline
0.0254 2017-09-02
- Support inline native function. implement SPVM::Inline
0.0253 2017-09-01
- fix exception bugs
0.0252 2017-08-30
- allow enum last camma
- allow term last camma
- allow args last camma
- allow descripter last camma
- forbidden double comma
0.0251 2017-08-30
- fix bug that if package is not exists, compile is ok.
- implement destructor
sub DESTROY ($self : Foo) : void {
}
0.0250 2017-08-29
- cleanup runtime
- cleanup api
- fix exception some bug
0.0249 2017-08-25
- string can't convert to byte[]
- byte[] can't convert to string
- allow $string->[0] to get byte value
- improve get_sub_id, get_type_id, get_field_id performance
0.0248 2017-08-19
- support xs.dll dynamiclin library
- fix __END__ not used bug
0.0247 2017-08-19
- Sorry, rename back stdout to std
SPVM only have std package by default and automatically loaded without use std;
- support dynamic link library
0.0246 2017-08-17
- array element is initialized by zero.
0.0245 2017-08-16
- fix get object byte field bug
- fix set object byte field bug
- fix bug that compiler can't load source file over 0xFF bytes
0.0244 2017-08-15
- implement weak reference to resolve recursive reference
weaken $obj->{foo};
- Field become have any object
0.0243 2017-08-12
- add SPVM::new_object_array_len function
- add SPVM::Array::Object::set function
- add SPVM::Array::Object::get function
0.0242 2017-08-11
- array malloc length + 1. and last value is 0. This is for C level string API.
- add debug mode.
use SPVM::Debug;
0.0241 2017-08-08
- fix void subroutine bug that if return value is not exists, runtime error occur.
0.0240 2017-08-07
- fix number literal bug that hex number e and E is floating point specifier
- add byte and short number literal syntax
123b
123s
- hex number only allow A, B, C, D, E, F because f is used to specify the number is floating point
and b is used to specify the number is byte
- fix array float store and load bug
- support underline in number literal
123_123
0xFF_FF
0.0239 2017-08-05
- cleanup enum internal logic
- fix clang compiler error
- fix all warnings
0.0238 2017-08-04
- Support nested switch statement
0.0237 2017-08-03
- improve SPVM call_sub performance
0.0236 2017-08-01
- add __END__
- SPVM exception can be cached from Perl's eval { ... }
- fix one character string bug.
0.0235 2017-07-31
- fix default return value
- imporve exception message
0.0234 2017-07-29
- rename malloc to new. you can also define new function for object initialization.
my $obj = new Foo;
my $obj = Foo::new(3);
package Foo {
sub new($var1 : int) {
# ...
return new Foo;
}
}
- object's fields are initialized by zero.
0.0233 2017-07-28
- support package template.
- support over 4G memory allocation
0.0232 2017-07-26
- add len keyword to get array length
reason is that
foo(@$nums) looks like passing array itself, not array length.
you can use len keyword for readability.
foo(len $nums);
- Fix bug that error occur when near small base_object_max_byte_size_use_memory_pool is malloced
0.0231 2017-07-25
- Fix clang compile error
0.0230 2017-07-25
- Fix POSIX function import bug
- Package name must be start with upper case. Lowercase is reserved for core package.
- Add SPVM/stdout.pm as Perl module
0.0229 2017-07-25
- support array initialization
my $nums = [1, 2, 3];
- fix memory breaking bug when object is assigned from freelist
0.0228 2017-07-22
- fix enum constant bug
- support float enum
- support double enum
0.0227 2017-07-21
- fix tests bug
0.0226 2017-07-20
- fix float convertion bugs
- fix convert double to short bug
- fix floating number which don't have point(for example, 346638529e+38) parsing bug.
- rename std package to stdout
- fix enum default type. Correct type is int.
- fix enum { FOO = 1 } syntax.
0.0225 2017-07-19
- add SPVM::Array::Byte::get_elements method
- add SPVM::Array::Short::get_elements method
- add SPVM::Array::Int::get_elements method
- add SPVM::Array::Long::get_elements method
- add SPVM::Array::Float::get_elements method
- add SPVM::Array::Double::get_elements method
0.0224 2017-07-19
- fix memory leak bugs. fix reference count.
0.0223 2017-07-18
- fix hash segmentation fault bug when many hash is created.
0.0222 2017-07-18
- add SPVM::Object::set
- add SPVM::Object::get
- rename SPVM::byte_array to SPVM::new_byte_array
- rename SPVM::short_array to SPVM::new_short_array
- rename SPVM::int_array to SPVM::new_int_array
- rename SPVM::long_array to SPVM::new_long_array
- rename SPVM::float_array to SPVM::new_float_array
- rename SPVM::double_array to SPVM::new_double_array
- rename SPVM::string_raw to SPVM::new_string_raw
- rename SPVM::string to SPVM::new_string
- rename SPVM::object to SPVM::new_object
0.0221 2017-07-15
- fix && not working bug
- fix || not working bug
- fix ! not working bug
0.0220 2017-07-14
- Support array return type in SPVM::call_sub
0.0219 2017-07-13
- Support constant floating point E expression
0.5E3
0.5e3
0.5E+3
0.5e+3
0.5E-3
0.5e-3
- add SPVM::string function
- add SPVM::string_raw function
0.0218 2017-07-13
- Fix float culcuration bugs
- add SPVM::byte_array, SPVM::short_array, SPVM::long_array, SPVM::float_array, SPVM::double_array function
to create SPVM array object.
0.0217 2017-07-12
- Support SPVM::int_array([1, 2, 3]) function
This values can be passed to SPVM function.
0.0216 2017-07-12
- Fix constant sign is not initialized bug
0.0215 2017-07-11
- Support while (my $var = 3) { ... }
- Support long min constant -9223372036854775808
- Fix array malloc bug
0.0214 2017-07-11
- Fix for statement segmentaion fault bug
- VAR = TERM return VAR. For example, allow the syntax "if (my $error = $@) { ... }
- Fix if condition (byte, short, long, float) bugs.
0.0213 2017-07-10
- Fix MANIFEST
0.0212 2017-07-10
- Fix hex literal bug. 0xFFFFFFFFFFFFFFFFL is OK.
- Fix bit shift bugs. <<, >>, >>> work well now.
0.0211 2017-07-08
- Fix if statement condition not working bugs
- try { } catch () { } syntax is replaced with eval { }; if ($@) { ... } syntax.
0.0210 2017-07-08
- Fix reference count bugs
0.0209 2017-07-07
- len $nums is replaced with @$nums
- $nums[0] is replaced with $nums->[0]
- $obj{x} is replaced with $obj->{x}
0.0208 2017-07-06
- add die logic when 32 bit Perl
- add several SPVM internal functions
0.0207 2017-06-30
- Fix amd64 segfault bug.
0.0206 2017-06-20
- Argument and return value become normal SV which have IV or NV.
# Example
my $total = SPVM::MyModule2::foo(3, 5);
print $total . "\n";
0.0205 2017-06-29
- Only support 64 bit Perl.
In 32 bit Perl, 64 bit integer is not supported. This means that Perl can not express 64 bit integers on source code.
0.0204 2017-06-28
- add env interface. This is similar as JAVA JNI
0.0203 2017-06-26
- build SPVM using same CCFLAG as Perl itself
0.0202 2017-06-25
- use same CCFLAG in Makefile.PL
0.0201 2017-06-20
- fix memset 0 bug
0.02 2017-06-20
- improve XS type convertion logic
0.01 2017-06-17(DEVELOPMENT RELEASE
- Fisrt development release