The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 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); }

Documentation

C/C++ Binding using SPVM Extension(BETA before 1.0)
SPVM Standard Functions
SPVM Language
SPVM Native Interface
SPVM Perl API

Modules

Fast array and numeric operation, and provide easy way to C/C++ Binding
Bool Utility
Byte object
SPVM data structure
Array object
Double object
Float object
Int object
Long object
SPVM data structure
Short object

Provides

in lib/SPVM/Build.pm
in lib/SPVM/Build/CBuilder.pm
in lib/SPVM/Build/CBuilder/Native.pm
in lib/SPVM/Build/CBuilder/Precompile.pm
in lib/SPVM/Build/Info.pm
in lib/SPVM/Build/Setting.pm
in lib/SPVM/Build/Util.pm
in lib/SPVM/BuildDir.pm