tonsky / datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
Eclipse Public License 1.0
5.49k stars 309 forks source link

How to hot fix aot code? #440

Closed ifeuille closed 1 year ago

ifeuille commented 1 year ago

For example, change the script of tutorial02aot to:

require tutorial_02

def test_call
    print("this tutorial utilizes basic builin module with constant and function\n")

[export]
def test
    test_call()
    let sq2 = SQRT2
    print("sq2 = {sq2} // expecting sqrt(2), 1.41421\n")
    let xma = xmadd(sq2,sq2,1.0,1.0)    // sq2*sq2 + 1*1 => 3
    print("xma = {xma} // expecting 3\n")

In this case, how to hot fix the test_call function?