Code Monkey home page Code Monkey logo

nora's Issues

Add scan-build to push workflow

Should save the SARIF file and add it to the security tab.

Also add a PR workflow that warns the user in the PR if the patch has a problem.

Templatize ToTopLevelNode and ToExprNode

We have defined ToTopLevelNode and ToExprNode structs with operator() to upcast variants. I am sure there's a way to simplify this in C++.

This should be a NFC enhancement.

Split writer from dumper

We need a Writer class that writes Racket values, as opposed to the dumper who is supposed to dump ASTNodes.

An example where these differs is values.

The Writer should write (values 1 2) as

1
2

while the Dumper should dump it as

(values 1 2)

Closure test crashes nora

The following test crashes nora:

;; RUN: norac %s | FileCheck %s
;; CHECK: 12
(linklet () ()
  (define-values (fn) (values 0))
  (let-values (((x) (values 2)))
     (set! fn (lambda (y) (+ x y))))
  (let-values (((x) (values 3)))
     (fn 10)))

There's a warning from ubsan as well:

Cannot set undefined identifier.
Expected lambda expression in Application.
/home/pmatos/dev/nora/src/include/interpreter.h:43:52: runtime error: member call on null pointer of type 'ast::ValueNode'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/pmatos/dev/nora/src/include/interpreter.h:43:52 in
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==23846==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x56310e36d3d7 bp 0x7ffebfb63690 sp 0x7ffebfb63650 T23846)
==23846==The signal is caused by a READ memory access.
==23846==Hint: address points to the zero page.
    #0 0x56310e36d3d7 in Interpreter::getResult() const /home/pmatos/dev/nora/src/include/interpreter.h:43:52
    #1 0x56310e36cae7 in main /home/pmatos/dev/nora/src/main.cpp:53:26
    #2 0x7f2ef4c3c78f  (/usr/lib/libc.so.6+0x2378f) (BuildId: 4a4bec3d95a1804443e852958fe59ed461135ce9)
    #3 0x7f2ef4c3c849 in __libc_start_main (/usr/lib/libc.so.6+0x23849) (BuildId: 4a4bec3d95a1804443e852958fe59ed461135ce9)
    #4 0x56310e33aa74 in _start (/home/pmatos/dev/nora/build/bin/norac+0x164a74) (BuildId: ff1360b6f90819159bf3d99f7e8a9ddb2f700ae2)

UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV /home/pmatos/dev/nora/src/include/interpreter.h:43:52 in Interpreter::getResult() const
==23846==ABORTING

I also think that even once this is fixed nora will print 13, rather than 12.

GCC does not compile nora

GCC can't compile nora atm. However, since we track MLIR very close to HEAD of LLVM it might be that this is not realistic. Support for C++20 might be different etc. So I am putting this here but won't look into it in the near future.

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.