Git Product home page Git Product logo

anode's People

Contributors

dlurton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

linecode iriberri

anode's Issues

Travis build is broken

Due to errors such as this:

In file included from /home/travis/build/dlurton/anode/src/front/ast.cpp:2:
In file included from /home/travis/build/dlurton/anode/src/include/anode/front/ast.h:4:
In file included from /home/travis/build/dlurton/anode/src/include/anode/anode.h:13:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/unordered_map:47:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/hashtable.h:727:41: error: 
      too many arguments to function call, expected 2, have 3
            _M_node_allocator().construct(__n, std::forward<_Args>(__args)...);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/hashtable.h:1260:24: note: 
      in instantiation of function template specialization
      'std::_Hashtable<std::basic_string<char>, std::pair<const
      std::basic_string<char>, anode::type::ClassField *>,
      gc_allocator<std::pair<std::basic_string<char>, anode::type::ClassField *>
      >, std::__detail::_Select1st, std::equal_to<std::basic_string<char> >,
      std::hash<string>, std::__detail::_Mod_range_hashing,
      std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy,
      std::__detail::_Hashtable_traits<true, false, true>
      >::_M_allocate_node<const std::basic_string<char> &,
      anode::type::ClassField *&>' requested here
        __node_type* __node = _M_allocate_node(std::forward<_Args>(__args)...);

These errors do not occur in a VM running Ubuntu 14.04 with the same packages specified in the .travis.yml file. I currently do not have any idea how to resolve this issue. I have tried everything I can think of.

Invoke callback to return REPL result instead of returning in the middle of the module init function!

In src/compile.cpp:

    class ModuleAstVisitor : public ScopeFollowingVisitor {
            ....
    public:
        virtual bool visitingExprStmt(ExprStmt *expr) override {
            ....
            if(visitor.hasValue()) {
                //This is temporary - can't be returning in the middle of module init!
                irBuilder_.CreateRet(visitor.getValue());
            }
            ...
        }

Probably going to want to create something like this for the short term:

 void receiveReplResult(type::PrimitiveType type, void *value) {
      switch(result->resultType) {
           ...cast dump value to std::cout...
      }
 }

Then, in the LLVM IR emit call sites to this function instead of ret instructions.

LLVM shared libraries and tools are huge

libLLVM-5.0svn.so for example is 725mb! This is crazy. Need to research to see if we can reduce this size. I'm also wondering if this will be fixed with a release build--we know it will get smaller, the question is, how much?

The ANTLR4 lexer allows literal numbers with any number of digits

From Lwnn.g4:

LIT_INT:    '-'?[0-9]+;
LIT_FLOAT:  '-'?[0-9]+'.'[0-9]+;

We will need to provide a proper error message when numbers like "999999999999999999999999999999" are used, for example because this could exceed the maximum value of 32 bit integers, for example.

Variable assignment

Variables can be declared and initialized but there's no way to assign new values to them afterward.

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.