Changes for version 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;
- Before
- The pointer class need the following memory because of the feature that any information can be saved.
- 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);
Modules
SPVM Language
Array Utilities
Blessed object base class
Array based blessed object
Class based blessed object
String based blessed object
Bool object
Build SPVM program
SPVM Builder Public APIs
Compiler and Linker of Native Sources
Link Information
Configurations of Compile and Link of Native Sources
Configurations of creating excutable files.
Create a Executable File
Library Information
Link Information
Object file information
Resourceurations of Compile and Link of Native Sources
Build Utilities
Public APIs of the utility of SPVM Builder
Byte object
Dynamic byte Array
A Interface Type to Clone a Object
Interface Type for the Callback to Clone a Object
Command Line Information
Interface Type for Object Comparation Callback
Interface Type for byte Comparation Callback
Interface Type for double Comparation Callback
Interface Type for float Comparation Callback
Interface Type for int Comparation Callback
Interface Type for long Comparation Callback
Interface Type for short Comparation Callback
Interface Type for String Comparation Callback
double Complex Type
float Complex Type
$class_name is a SPVM module
SPVM Performance Benchmark
SPVM Exchange API
SPVM Language Specification
SPVM Language Specification
SPVM Standard Modules
SPVM Native APIs
SPVM Allocator Native APIs
SPVM Compiler Native APIs
SPVM Precompile Native APIs
SPVM Runtime Native APIs
SPVM String Buffer Native APIs
How to write the native module
How to write the resource module
SPVM Performance Tutorial
complex tutorial.
Double object
Dynamic double Array
Interface Type for Object Equality Checking Callback
a callback implementation of EqualityChecker to check if the memory addresses of the two objects are equal.
Error
Not Supported Error
System Error
SPVM Exchange API
Float object
Dynamic float Array
SPVM Starndard Functions
Format Utilities
Hash Data Structure
Hash entry
Int object
Dynamic int Array
Dynamic Object Array
Long object
Dynamic long Array
Point
Point 3D
Short object
Dynamic short Array
Sorting Functions
String Buffer
Dynamic string array
A Interface Type to Stringify a Object
Interface Type for Stringing Callback
Time Manipulation
Time information
Examples
- examples/doc/tutorial/basic/lib/SPVM/MyMath.spvm
- examples/doc/tutorial/basic/sum.pl
- examples/doc/tutorial/precompile/lib/SPVM/MyMath.spvm
- examples/doc/tutorial/precompile/sum_precompile.pl
- examples/native/bind_clib/bind_clib.pl
- examples/native/bind_clib/lib/SPVM/BindCLib.c
- examples/native/bind_clib/lib/SPVM/BindCLib.config
- examples/native/bind_clib/lib/SPVM/BindCLib.native/include/bind_clib.h
- examples/native/bind_clib/lib/SPVM/BindCLib.native/src/bind_clib.c
- examples/native/bind_clib/lib/SPVM/BindCLib.spvm
- examples/native/cuda_add/cuda_add.pl
- examples/native/cuda_add/lib/SPVM/MyAdd.config
- examples/native/cuda_add/lib/SPVM/MyAdd.cu
- examples/native/cuda_add/lib/SPVM/MyAdd.native/include/cuda_array_culc.h
- examples/native/cuda_add/lib/SPVM/MyAdd.native/src/cuda_array_culc.cu
- examples/native/cuda_add/lib/SPVM/MyAdd.spvm
- examples/native/eigen/README
- examples/native/gsl/lib/SPVM/MyGSL.c
- examples/native/gsl/lib/SPVM/MyGSL.config
- examples/native/gsl/lib/SPVM/MyGSL.spvm
- examples/native/gsl/mygsl.pl
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.config
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.cpp
- examples/native/opencv/resize/lib/SPVM/MyOpenCVResize.spvm
- examples/native/opencv/resize/linux-pengin-output.png
- examples/native/opencv/resize/linux-pengin.png
- examples/native/opencv/resize/opencv_resize.pl
- examples/native/openmp/lib/SPVM/MyOpenMP.c
- examples/native/openmp/lib/SPVM/MyOpenMP.config
- examples/native/openmp/lib/SPVM/MyOpenMP.spvm
- examples/native/openmp/openmp.pl
- examples/native/zlib/lib/SPVM/MyZlib.c
- examples/native/zlib/lib/SPVM/MyZlib.config
- examples/native/zlib/lib/SPVM/MyZlib.spvm
- examples/native/zlib/zlib.pl
- examples/spvmcc/basic/README.txt
- examples/spvmcc/basic/SPVM/MyApp.spvm
- examples/spvmcc/basic/myapp