Giter Site home page Giter Site logo

sillycross / pochivm Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 8.0 7.08 MB

Lightweight framework for easy and efficient code generation

Home Page: https://sillycross.github.io/PochiVM

Dockerfile 0.02% C++ 98.77% C 0.43% Python 0.22% CMake 0.51% Makefile 0.02% Shell 0.02%
code-generation jit-compilation llvm

pochivm's Issues

support for primitive arrays

I have been playing around with PochiVM.
I have run into problems using it with an array (holding uint8_t elements).
Forgive me, I'm not a c/c++ dev and likely to be doing something stupid.

If I try to add a primitive array to a Class I see an error:

[ERROR] Calling function with array-typed parameter or return value is not supported yet. Change it to pointer-type to workaround. Offending function:

If I however try to pass an array as a parameter to a method I see this error at runtime:

Cannot allocate unsized type
%param_0 = alloca %class.Tutorial101
storing unsized types is not allowed

If I try to add an std:array (or std:vector) to a Class as a member variable and register it I see a bunch of errors in generated code:

RegisterMemberObject<&Tutorial101::test>();

In file included from ../../pochivm/api_function_proto.h:9:
../../generated/release/generated/pochivm_runtime_headers.generated.h:192:35: error: incomplete result type 'Reference<std::array<int, 5> >' in function definition
Reference<std::array<int, 5>> test() {
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:23:18: note: forward declaration of 'PochiVM::Reference<std::array<int, 5> >'
template<> class Reference<std::array<int, 5>>;
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:211:16: error: 'Reference<std::array<int, 5> >' is an incomplete type
return Reference<std::array<int, 5>>(new AstCallExpr(&__pochivm_cpp_fn_metadata, std::vector<AstNodeBase*>{ __pochivm_ref_ptr }));
^
../../generated/release/generated/pochivm_runtime_headers.generated.h:23:18: note: forward declaration of 'PochiVM::Reference<std::array<int, 5> >'
template<> class Reference<std::array<int, 5>>;

I could just be going down the wrong path... (In which case an example using a primitive array (or std:array) of type uint8_t would be great), or if support for arrays is not there yet.

Is the latter is the case, can support be added?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.