diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index ba8b3ef28..22f1f9523 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -10,6 +10,8 @@ on: - "more-dune" permissions: read-all +env: + OPAMCONFIRMLEVEL: unsafe-yes jobs: build: @@ -19,6 +21,8 @@ jobs: os: - ubuntu-latest - macos-latest + # intel macos + - macos-13 ocaml-compiler: - 4.14.2 @@ -33,9 +37,51 @@ jobs: with: ocaml-compiler: ${{ matrix.ocaml-compiler }} + - run: gcc --version + + - name: Prepare to install cross-compiler (Ubuntu specific) + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + sudo dpkg --add-architecture i386 + sudo apt update -y + - run: opam pin add Lama.dev . --no-action - run: opam depext Lama.dev --yes --with-test - run: opam install . --deps-only --with-test - run: eval $(opam env) - - run: opam exec -- make install - - run: opam exec -- make regression + + - run: rm -fr runtime32 + if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} + - run: opam exec -- dune b src runtime runtime32 stdlib tutorial + if: ${{ matrix.os != 'macos-latest' && matrix.os != 'macos-13'}} + - run: opam exec -- dune b src runtime stdlib tutorial + if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }} + - run: opam exec -- dune b @install --profile=release + - run: opam exec -- dune install --profile=release + - run: opam exec -- dune test stdlib/regression + - run: opam exec -- dune test regression_long + - run: opam exec -- dune test regression + - run: opam exec -- make regression-all + + # fails on mac + # - run: opam exec -- dune b + # - run: opam exec -- dune install --profile=release + # - run: opam exec -- dune test stdlib/regression + # - run: opam exec -- dune test regression + # - run: opam exec -- dune test regression_long + + # works + # - run: rm -fr runtime32 + # if: ${{ matrix.os == 'macos-latest' }} + # - run: opam exec -- dune b src runtime stdlib tutorial + # if: ${{ matrix.os == 'macos-latest' }} + # - run: opam exec -- make install + # if: ${{ matrix.os != 'macos-latest' }} + # - run: opam exec -- make regression-all + + # - run: opam exec -- dune test stdlib/regression -j1 + # - run: opam exec -- dune b + # - run: opam exec -- dune b @install + # - run: opam exec -- dune install + # - run: opam exec -- make regression + # - run: opam exec -- dune test regression diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..8d9e6d8b6 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,38 @@ +name: Build in docker +on: + push: + branches: + - '1.30' + - 'i686-cross' + +env: + OPAMROOT: /home/user/.opam + OPAMCONFIRMLEVEL: unsafe-yes + +jobs: + build: + runs-on: ubuntu-24.04 + container: + image: kakadu18/ocaml:lama + + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - run: opam --version + - run: whoami + - run: opam exec -- ocamlopt --version + + - name: Checkout code + uses: actions/checkout@v4 + + - run: | + opam install . --depext-only --with-test --with-doc + opam install . --deps-only --with-test --with-doc + + - name: List installed packages + run: opam list + + - run: opam exec -- dune build --profile=release + - run: opam exec -- dune test regression/ stdlib/regression diff --git a/Lama.opam b/Lama.opam index 2de3a899a..33dffba4e 100644 --- a/Lama.opam +++ b/Lama.opam @@ -28,3 +28,4 @@ build: [ "@doc" {with-doc} ] ] +depexts: [ [ "gcc-14-multilib" ] {os-distribution = "ubuntu"} ] \ No newline at end of file diff --git a/Lama.opam.template b/Lama.opam.template new file mode 100644 index 000000000..ca78f1b04 --- /dev/null +++ b/Lama.opam.template @@ -0,0 +1 @@ +depexts: [ [ "gcc-14-multilib" ] {os-distribution = "ubuntu"} ] \ No newline at end of file diff --git a/byterun/dune b/byterun/dune index e4291745b..79f9552b0 100644 --- a/byterun/dune +++ b/byterun/dune @@ -34,3 +34,4 @@ (promote (until-clean))) (action (run gcc -Wall -Wextra -O3 -Iinclude/ -DWITH_CHECK -c %{src} -o %{target}))) + diff --git a/lama-spec.pdf b/lama-spec.pdf index fd70c4407..6ed537181 100644 Binary files a/lama-spec.pdf and b/lama-spec.pdf differ diff --git a/performance/_dune b/performance/_dune index d0dc1ca8c..7528c4db9 100644 --- a/performance/_dune +++ b/performance/_dune @@ -1,8 +1,9 @@ (rule - (targets Sort.x64.exe) + (targets Sort.exe) (deps (:lama Sort.lama) - ../runtime/runtime.a) + ../runtime/runtime.a + ../stdlib/x64/Fun.i) (mode (promote (until-clean))) (action @@ -11,11 +12,11 @@ "../runtime" (run %{project_root}/src/Driver.exe - -march=x86_64 + -64 %{lama} -I ../stdlib/x64 - -I + -runtime ../runtime -o %{targets})))) diff --git a/regression/gen.ml b/regression/gen.ml index 74630521a..f8e34841c 100644 --- a/regression/gen.ml +++ b/regression/gen.ml @@ -21,7 +21,7 @@ let () = let found = if Sys.file_exists !lama_file then ( cram_printfn - " $ ../src/Driver.exe -i test%03d.lama < \ + " $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test%03d.lama < \ test%03d.input" i i; true) diff --git a/regression/test001.t b/regression/test001.t index 518e6ade4..d0bed44ae 100644 --- a/regression/test001.t +++ b/regression/test001.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test001.lama < test001.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test001.lama < test001.input + > > 90 diff --git a/regression/test002.t b/regression/test002.t index 1660aedcf..dbea6b049 100644 --- a/regression/test002.t +++ b/regression/test002.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test002.lama < test002.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test002.lama < test002.input + > > 41 diff --git a/regression/test003.t b/regression/test003.t index b84e725c1..b0c19f13b 100644 --- a/regression/test003.t +++ b/regression/test003.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test003.lama < test003.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test003.lama < test003.input + > > 7 + 3 + 1 diff --git a/regression/test004.t b/regression/test004.t index 58b3bcba7..09eb20f86 100644 --- a/regression/test004.t +++ b/regression/test004.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test004.lama < test004.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test004.lama < test004.input + > > 10 diff --git a/regression/test005.t b/regression/test005.t index 53a6c5732..a3265dd01 100644 --- a/regression/test005.t +++ b/regression/test005.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test005.lama < test005.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test005.lama < test005.input + > > 11 diff --git a/regression/test006.t b/regression/test006.t index 074663a48..0b3315cd8 100644 --- a/regression/test006.t +++ b/regression/test006.t @@ -1,3 +1,7 @@ - $ ../src/Driver.exe -i test006.lama < test006.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test006.lama < test006.input + > > 1 + 1 + 0 + 1 + 0 + 0 diff --git a/regression/test007.t b/regression/test007.t index 86fc9f47f..fd2ef9355 100644 --- a/regression/test007.t +++ b/regression/test007.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test007.lama < test007.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test007.lama < test007.input + -4 diff --git a/regression/test008.t b/regression/test008.t index ba4c09b5d..dabb80f5f 100644 --- a/regression/test008.t +++ b/regression/test008.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test008.lama < test008.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test008.lama < test008.input + -45 diff --git a/regression/test009.t b/regression/test009.t index f450edd1a..8b1101b6a 100644 --- a/regression/test009.t +++ b/regression/test009.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test009.lama < test009.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test009.lama < test009.input + 1024 diff --git a/regression/test010.t b/regression/test010.t index 0d4224f08..4a8a7e115 100644 --- a/regression/test010.t +++ b/regression/test010.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test010.lama < test010.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test010.lama < test010.input + 499950 diff --git a/regression/test011.t b/regression/test011.t index 1d9f70055..83a123979 100644 --- a/regression/test011.t +++ b/regression/test011.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test011.lama < test011.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test011.lama < test011.input + 2 diff --git a/regression/test012.t b/regression/test012.t index a3abd09ac..9242d69ea 100644 --- a/regression/test012.t +++ b/regression/test012.t @@ -1,3 +1,9 @@ - $ ../src/Driver.exe -i test012.lama < test012.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test012.lama < test012.input + > 0 + 0 + 0 + 1 + 1 + 0 + 1 + 1 diff --git a/regression/test013.t b/regression/test013.t index c6a66b2d1..b1d33a9f5 100644 --- a/regression/test013.t +++ b/regression/test013.t @@ -1,3 +1,9 @@ - $ ../src/Driver.exe -i test013.lama < test013.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test013.lama < test013.input + > 10 + 11 + 10 + 11 + 3 + 2 + 1 + 0 diff --git a/regression/test014.t b/regression/test014.t index 707cd59d2..76bb2f7d5 100644 --- a/regression/test014.t +++ b/regression/test014.t @@ -1,3 +1,32 @@ - $ ../src/Driver.exe -i test014.lama < test014.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test014.lama < test014.input + > 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 diff --git a/regression/test015.t b/regression/test015.t index ccd7a6aea..68064ed14 100644 --- a/regression/test015.t +++ b/regression/test015.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test015.lama < test015.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test015.lama < test015.input + > 7919 diff --git a/regression/test016.t b/regression/test016.t index b756b183e..3fa8f16a0 100644 --- a/regression/test016.t +++ b/regression/test016.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test016.lama < test016.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test016.lama < test016.input + > 3628800 diff --git a/regression/test017.t b/regression/test017.t index ed92d09b7..2569536e4 100644 --- a/regression/test017.t +++ b/regression/test017.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test017.lama < test017.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test017.lama < test017.input + > 6765 diff --git a/regression/test018.t b/regression/test018.t index 07b5b96b2..a3c2b1847 100644 --- a/regression/test018.t +++ b/regression/test018.t @@ -1,3 +1,15 @@ - $ ../src/Driver.exe -i test018.lama < test018.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test018.lama < test018.input + > 2 + 0 + 3 + 4 + 5 + 0 + 7 + 0 + 11 + 0 + 13 + 0 + 17 + 2 diff --git a/regression/test019.t b/regression/test019.t index 6ab1b2fa1..d6cbd6ca2 100644 --- a/regression/test019.t +++ b/regression/test019.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test019.lama < test019.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test019.lama < test019.input + 499950 diff --git a/regression/test020.t b/regression/test020.t index a9fa2ee60..265754f85 100644 --- a/regression/test020.t +++ b/regression/test020.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test020.lama < test020.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test020.lama < test020.input + > 7919 diff --git a/regression/test021.t b/regression/test021.t index 8adcfb814..42d7f250d 100644 --- a/regression/test021.t +++ b/regression/test021.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test021.lama < test021.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test021.lama < test021.input + > 3628800 diff --git a/regression/test022.t b/regression/test022.t index 1064c82c3..e8a476acc 100644 --- a/regression/test022.t +++ b/regression/test022.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test022.lama < test022.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test022.lama < test022.input + > 6765 diff --git a/regression/test023.t b/regression/test023.t index d1819e258..be6a9247a 100644 --- a/regression/test023.t +++ b/regression/test023.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test023.lama < test023.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test023.lama < test023.input + > > > > > > 35 diff --git a/regression/test024.t b/regression/test024.t index 7cd9205c6..8a57cde52 100644 --- a/regression/test024.t +++ b/regression/test024.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test024.lama < test024.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test024.lama < test024.input + > 3 + 8 diff --git a/regression/test025.t b/regression/test025.t index f22a4673a..2e8984752 100644 --- a/regression/test025.t +++ b/regression/test025.t @@ -1,3 +1,13 @@ - $ ../src/Driver.exe -i test025.lama < test025.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test025.lama < test025.input + > 1 + 100 + 200 + 300 + 2 + 100 + 200 + 300 + 3 + 100 + 200 + 300 diff --git a/regression/test026.t b/regression/test026.t index 853e1f567..e1ebf39fe 100644 --- a/regression/test026.t +++ b/regression/test026.t @@ -1,3 +1,22 @@ - $ ../src/Driver.exe -i test026.lama < test026.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test026.lama < test026.input + > 1 + 100 + 200 + 300 + 100 + 200 + 300 + 2 + 100 + 200 + 300 + 100 + 200 + 300 + 3 + 100 + 200 + 300 + 100 + 200 + 300 diff --git a/regression/test027.t b/regression/test027.t index 8540028e3..e78b6e477 100644 --- a/regression/test027.t +++ b/regression/test027.t @@ -1,3 +1,36 @@ - $ ../src/Driver.exe -i test027.lama < test027.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test027.lama < test027.input + > 1 + 100 + 200 + 300 + 1 + 2 + 100 + 200 + 300 + 3 + 100 + 200 + 300 + 3 + 4 + 100 + 200 + 300 + 5 + 100 + 200 + 300 + 5 + 100 + 200 + 300 + 100 + 200 + 300 + 100 + 200 + 300 + 100 + 200 + 300 diff --git a/regression/test028.t b/regression/test028.t index 7091a4741..8c8126ada 100644 --- a/regression/test028.t +++ b/regression/test028.t @@ -1,3 +1,15 @@ - $ ../src/Driver.exe -i test028.lama < test028.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test028.lama < test028.input + > 7 + 5040 + 6 + 720 + 5 + 120 + 4 + 24 + 3 + 6 + 2 + 2 + 1 + 1 diff --git a/regression/test029.t b/regression/test029.t index 04d4f1a6e..cfdb9bec3 100644 --- a/regression/test029.t +++ b/regression/test029.t @@ -1,3 +1,19 @@ - $ ../src/Driver.exe -i test029.lama < test029.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test029.lama < test029.input + > 9 + 55 + 8 + 34 + 7 + 21 + 6 + 13 + 5 + 8 + 4 + 5 + 3 + 3 + 2 + 2 + 1 + 1 diff --git a/regression/test034.t b/regression/test034.t index 8601bd531..5bb297cc3 100644 --- a/regression/test034.t +++ b/regression/test034.t @@ -1,3 +1,17 @@ - $ ../src/Driver.exe -i test034.lama < test034.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test034.lama < test034.input + > 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 diff --git a/regression/test036.t b/regression/test036.t index 1db95d055..4f2416b36 100644 --- a/regression/test036.t +++ b/regression/test036.t @@ -1,3 +1,17 @@ - $ ../src/Driver.exe -i test036.lama < test036.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test036.lama < test036.input + > 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 97 + 97 + 97 + 97 + 97 + 97 + 97 + 97 diff --git a/regression/test040.t b/regression/test040.t index 2c7563e3d..5941bb36a 100644 --- a/regression/test040.t +++ b/regression/test040.t @@ -1,3 +1,5 @@ - $ ../src/Driver.exe -i test040.lama < test040.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test040.lama < test040.input + > 1 + 2 + 3 + 4 diff --git a/regression/test041.t b/regression/test041.t index 0e725f312..7b3d8614f 100644 --- a/regression/test041.t +++ b/regression/test041.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test041.lama < test041.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test041.lama < test041.input + > 600 + 1800 diff --git a/regression/test042.t b/regression/test042.t index 5ab593583..ff70733f9 100644 --- a/regression/test042.t +++ b/regression/test042.t @@ -1,3 +1,11 @@ - $ ../src/Driver.exe -i test042.lama < test042.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test042.lama < test042.input + > 0 + 1 + 2 + 3 + 4 + 4 + 4 + 4 + 4 + 4 diff --git a/regression/test045.t b/regression/test045.t index d135df2b8..057631e33 100644 --- a/regression/test045.t +++ b/regression/test045.t @@ -1,3 +1,41 @@ - $ ../src/Driver.exe -i test045.lama < test045.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test045.lama < test045.input + > 49 + 34 + 97 + 98 + 99 + 34 + 91 + 93 + 91 + 49 + 44 + 32 + 50 + 44 + 32 + 51 + 93 + 67 + 111 + 110 + 115 + 32 + 40 + 49 + 44 + 32 + 67 + 111 + 110 + 115 + 32 + 40 + 50 + 44 + 32 + 78 + 105 + 108 + 41 + 41 diff --git a/regression/test046.t b/regression/test046.t index 6c920bc8c..774ea8f00 100644 --- a/regression/test046.t +++ b/regression/test046.t @@ -1,3 +1,14 @@ - $ ../src/Driver.exe -i test046.lama < test046.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test046.lama < test046.input + > 3 + 3 + 3 + 1 + 2 + 3 + 5 + 5 + 1 + 2 + 3 + 4 + 5 diff --git a/regression/test050.t b/regression/test050.t index 474a590e2..6ffa63d34 100644 --- a/regression/test050.t +++ b/regression/test050.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test050.lama < test050.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test050.lama < test050.input + > 2 diff --git a/regression/test054.t b/regression/test054.t index f5e6ab47c..a3c28c553 100644 --- a/regression/test054.t +++ b/regression/test054.t @@ -1,3 +1,14 @@ - $ ../src/Driver.exe -i test054.lama < test054.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test054.lama < test054.input + > 105 + 105 + 105 + 230 + 105 + 105 + 105 + 230 + 105 + 250 + 1 + 2 + 3 diff --git a/regression/test059.t b/regression/test059.t index 36771040e..edba4d0c8 100644 --- a/regression/test059.t +++ b/regression/test059.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test059.lama < test059.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test059.lama < test059.input + > 0 + 1 + 2 diff --git a/regression/test063.t b/regression/test063.t index 5cbcaf32a..41f505c44 100644 --- a/regression/test063.t +++ b/regression/test063.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test063.lama < test063.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test063.lama < test063.input + > 100 + 200 diff --git a/regression/test072.t b/regression/test072.t index c669333ea..a8e7765f3 100644 --- a/regression/test072.t +++ b/regression/test072.t @@ -1,3 +1,19 @@ - $ ../src/Driver.exe -i test072.lama < test072.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test072.lama < test072.input + > 9 + 55 + 8 + 34 + 7 + 21 + 6 + 13 + 5 + 8 + 4 + 5 + 3 + 3 + 2 + 2 + 1 + 1 diff --git a/regression/test073.t b/regression/test073.t index 08743d828..9949b3e6c 100644 --- a/regression/test073.t +++ b/regression/test073.t @@ -1,3 +1,15 @@ - $ ../src/Driver.exe -i test073.lama < test073.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test073.lama < test073.input + > 7 + 5040 + 6 + 720 + 5 + 120 + 4 + 24 + 3 + 6 + 2 + 2 + 1 + 1 diff --git a/regression/test074.t b/regression/test074.t index be1774e6e..23e9e5d1c 100644 --- a/regression/test074.t +++ b/regression/test074.t @@ -1,3 +1,37 @@ - $ ../src/Driver.exe -i test074.lama < test074.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test074.lama < test074.input + > 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 5 + 13 + 29 + 61 + 125 + 253 + 509 + 1021 + 2045 diff --git a/regression/test077.t b/regression/test077.t index 8e5a4fad2..d20448ac9 100644 --- a/regression/test077.t +++ b/regression/test077.t @@ -1,3 +1,7 @@ - $ ../src/Driver.exe -i test077.lama < test077.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test077.lama < test077.input + > 5 + 6 + 7 + 8 + 9 + 10 diff --git a/regression/test078.t b/regression/test078.t index 0dbc6bcd4..a1ec08938 100644 --- a/regression/test078.t +++ b/regression/test078.t @@ -1,3 +1,13 @@ - $ ../src/Driver.exe -i test078.lama < test078.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test078.lama < test078.input + > 1 + 2 + 3 + 4 + 1 + 2 + 3 + 4 + 3 + 4 + 1 + 2 diff --git a/regression/test079.t b/regression/test079.t index 1b61aac6c..9a308541e 100644 --- a/regression/test079.t +++ b/regression/test079.t @@ -1,3 +1,7 @@ - $ ../src/Driver.exe -i test079.lama < test079.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test079.lama < test079.input + > 1 + 1 + 1 + 1 + 0 + 0 diff --git a/regression/test080.t b/regression/test080.t index b58eacc24..ec2fde0ea 100644 --- a/regression/test080.t +++ b/regression/test080.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test080.lama < test080.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test080.lama < test080.input + > 0 + 100 + 300 diff --git a/regression/test081.t b/regression/test081.t index 87a068735..d50969c29 100644 --- a/regression/test081.t +++ b/regression/test081.t @@ -1,3 +1,7 @@ - $ ../src/Driver.exe -i test081.lama < test081.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test081.lama < test081.input + > 1 + 2 + 3 + 100 + 200 + 300 diff --git a/regression/test082.t b/regression/test082.t index 9099a229a..4a87a9abd 100644 --- a/regression/test082.t +++ b/regression/test082.t @@ -1,3 +1,18 @@ - $ ../src/Driver.exe -i test082.lama < test082.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test082.lama < test082.input + > 1 + 1 + 1 + 1 + 1 + 2 + 3 + 100 + 3 + 2 + 1 + 6 + 5 + 4 + 3 + 2 + 1 diff --git a/regression/test083.t b/regression/test083.t index 545e3890f..dfce6143b 100644 --- a/regression/test083.t +++ b/regression/test083.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test083.lama < test083.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test083.lama < test083.input + > 7 + 7 + 28 diff --git a/regression/test084.t b/regression/test084.t index 497f83055..f96122588 100644 --- a/regression/test084.t +++ b/regression/test084.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test084.lama < test084.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test084.lama < test084.input + > 55 + 310 + 310 diff --git a/regression/test085.t b/regression/test085.t index 98dbc5659..cc28aaa11 100644 --- a/regression/test085.t +++ b/regression/test085.t @@ -1,3 +1,9 @@ - $ ../src/Driver.exe -i test085.lama < test085.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test085.lama < test085.input + > 0 + 15 + 15 + 1 + 2 + 3 + 4 + 5 diff --git a/regression/test086.t b/regression/test086.t index 8fb0841f4..ac00537ab 100644 --- a/regression/test086.t +++ b/regression/test086.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test086.lama < test086.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test086.lama < test086.input + > 1 + 2 + 3 diff --git a/regression/test088.t b/regression/test088.t index bdd2970b2..61755d444 100644 --- a/regression/test088.t +++ b/regression/test088.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test088.lama < test088.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test088.lama < test088.input + 0 + 3 diff --git a/regression/test089.t b/regression/test089.t index 113626425..f9f1c0e8c 100644 --- a/regression/test089.t +++ b/regression/test089.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test089.lama < test089.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test089.lama < test089.input + > > > 8 diff --git a/regression/test090.t b/regression/test090.t index ae4d68414..4577eb78f 100644 --- a/regression/test090.t +++ b/regression/test090.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test090.lama < test090.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test090.lama < test090.input + > 6 + 7 + 8 diff --git a/regression/test091.t b/regression/test091.t index 299bf17f6..75bce3cff 100644 --- a/regression/test091.t +++ b/regression/test091.t @@ -1,3 +1,10 @@ - $ ../src/Driver.exe -i test091.lama < test091.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test091.lama < test091.input + > 1 + 2 + 3 + 2 + 3 + 4 + 3 + 4 + 5 diff --git a/regression/test092.t b/regression/test092.t index c09945bad..689ab2cb3 100644 --- a/regression/test092.t +++ b/regression/test092.t @@ -1,3 +1,6 @@ - $ ../src/Driver.exe -i test092.lama < test092.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test092.lama < test092.input + > 1 + 1 + 1 + 1 + 0 diff --git a/regression/test093.t b/regression/test093.t index bcfad3b29..19266d5f0 100644 --- a/regression/test093.t +++ b/regression/test093.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test093.lama < test093.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test093.lama < test093.input + > 11 + 18 diff --git a/regression/test094.t b/regression/test094.t index c6c4ef1cd..72f39d9e0 100644 --- a/regression/test094.t +++ b/regression/test094.t @@ -1,3 +1,5 @@ - $ ../src/Driver.exe -i test094.lama < test094.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test094.lama < test094.input + > 5 + 7 + 12 + -2 diff --git a/regression/test095.t b/regression/test095.t index ac74eb128..0d8ac26f1 100644 --- a/regression/test095.t +++ b/regression/test095.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test095.lama < test095.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test095.lama < test095.input + > 5 diff --git a/regression/test096.t b/regression/test096.t index 5cc29a0b1..367025406 100644 --- a/regression/test096.t +++ b/regression/test096.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test096.lama < test096.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test096.lama < test096.input + > 2 + 1 diff --git a/regression/test097.t b/regression/test097.t index a298e83ba..f2d487d93 100644 --- a/regression/test097.t +++ b/regression/test097.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test097.lama < test097.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test097.lama < test097.input + > 35 diff --git a/regression/test098.t b/regression/test098.t index c47319ee8..b9fea5ab4 100644 --- a/regression/test098.t +++ b/regression/test098.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test098.lama < test098.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test098.lama < test098.input + > 12 diff --git a/regression/test099.t b/regression/test099.t index 9e21031d6..3a5da4fbe 100644 --- a/regression/test099.t +++ b/regression/test099.t @@ -1,3 +1,4 @@ - $ ../src/Driver.exe -i test099.lama < test099.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test099.lama < test099.input + > 1 + 800 + 800 diff --git a/regression/test100.t b/regression/test100.t index 21ab73166..d872a8977 100644 --- a/regression/test100.t +++ b/regression/test100.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test100.lama < test100.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test100.lama < test100.input + > 0 diff --git a/regression/test101.t b/regression/test101.t index 62f822d6d..9cd1bbcc3 100644 --- a/regression/test101.t +++ b/regression/test101.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test101.lama < test101.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test101.lama < test101.input + > 0 diff --git a/regression/test102.t b/regression/test102.t index b56ff1899..7a7fc9130 100644 --- a/regression/test102.t +++ b/regression/test102.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test102.lama < test102.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test102.lama < test102.input + > 5 diff --git a/regression/test103.t b/regression/test103.t index b67ea1eee..5f8c9356c 100644 --- a/regression/test103.t +++ b/regression/test103.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test103.lama < test103.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test103.lama < test103.input + > > > 5 diff --git a/regression/test104.t b/regression/test104.t index 9a230d221..843537a6d 100644 --- a/regression/test104.t +++ b/regression/test104.t @@ -1,3 +1,11 @@ - $ ../src/Driver.exe -i test104.lama < test104.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test104.lama < test104.input + > 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 diff --git a/regression/test105.t b/regression/test105.t index f51ca70b3..c625f9639 100644 --- a/regression/test105.t +++ b/regression/test105.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test105.lama < test105.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test105.lama < test105.input + > 3 diff --git a/regression/test106.t b/regression/test106.t index bc9a9b64a..b8a470a9d 100644 --- a/regression/test106.t +++ b/regression/test106.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test106.lama < test106.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test106.lama < test106.input + > 1 + 2 diff --git a/regression/test107.t b/regression/test107.t index 603c339fa..4092ae943 100644 --- a/regression/test107.t +++ b/regression/test107.t @@ -1,3 +1,2 @@ - $ ../src/Driver.exe -i test107.lama < test107.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test107.lama < test107.input + > 0 diff --git a/regression/test110.t b/regression/test110.t index 7bc8c67a4..782b2bf81 100644 --- a/regression/test110.t +++ b/regression/test110.t @@ -1,3 +1,7 @@ - $ ../src/Driver.exe -i test110.lama < test110.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test110.lama < test110.input + > 0 + 0 + 10 + 0 + 10 + 100 diff --git a/regression/test111.t b/regression/test111.t index 257987648..c211681d8 100644 --- a/regression/test111.t +++ b/regression/test111.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test111.lama < test111.input - Error: could not find an interface file for import "Std" + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test111.lama < test111.input + Error: undefined name "stringcat" at (11, 15) [255] diff --git a/regression/test112.t b/regression/test112.t index 520d60335..2f8c3f930 100644 --- a/regression/test112.t +++ b/regression/test112.t @@ -1,3 +1,12 @@ - $ ../src/Driver.exe -i test112.lama < test112.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test112.lama < test112.input + 1 + 2 + 5 + 6 + 7 + 8 + 5 + 6 + 7 + 8 + 3 diff --git a/regression/test801.t b/regression/test801.t index f99da3eb7..b3c8ded53 100644 --- a/regression/test801.t +++ b/regression/test801.t @@ -1,3 +1,6 @@ - $ ../src/Driver.exe -i test801.lama < test801.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test801.lama < test801.input + 1 + 2 + 3 + 4 + 5 diff --git a/regression/test802.t b/regression/test802.t index df6e1d2ef..0d48765c7 100644 --- a/regression/test802.t +++ b/regression/test802.t @@ -1,3 +1,11 @@ - $ ../src/Driver.exe -i test802.lama < test802.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test802.lama < test802.input + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 diff --git a/regression/test803.t b/regression/test803.t index 61ae4e9ad..be1b55018 100644 --- a/regression/test803.t +++ b/regression/test803.t @@ -1,3 +1,3 @@ - $ ../src/Driver.exe -i test803.lama < test803.input - Error: could not find an interface file for import "Std" - [255] + $ ../src/Driver.exe -runtime ../runtime -I ../stdlib/x64 -i test803.lama < test803.input + Fatal error: exception Failure("int value expected (Closure ([\"unit\"], , ))\n") + [2] diff --git a/runtime/Makefile b/runtime/Makefile index 1d5fe82a1..f71efd909 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -24,7 +24,7 @@ runtime.o: runtime.c runtime.h $(CC) $(PROD_FLAGS) -c runtime.c -o runtime.o printf.o: printf.S - $(CC) $(PROD_FLAGS) -x assembler-with-cpp -c -g printf.S -o printf.o + $(CC) $(PROD_FLAGS) -Wa,--noexecstack -x assembler-with-cpp -c -g printf.S -o printf.o clean: $(RM) *.a *.o *~ negative_scenarios/*.err diff --git a/runtime32/_dune b/runtime32/_dune index c81d429cd..854ed9ac2 100644 --- a/runtime32/_dune +++ b/runtime32/_dune @@ -10,6 +10,8 @@ (install (section share) + (enabled_if + (= %{system} "linux")) (files (runtime.a as x32/runtime.a) (Std.i as x32/Std.i))) diff --git a/spec/03.04.expressions.tex b/spec/03.04.expressions.tex index 6dd536a7b..6efa836ab 100644 --- a/spec/03.04.expressions.tex +++ b/spec/03.04.expressions.tex @@ -141,7 +141,33 @@ There are three forms of expressions to specify composite values: arrays, lists \subsection{Let Expressions} -TODO +\begin{figure}[h] + \[ + \begin{array}{rcll} + \defterm{letExpression} & : & \term{let}\s\nonterm{pattern}\s\term{=}\s\nonterm{expression}\s\term{in}\s\nonterm{expression} + \end{array} + \] + \caption{Let-expression syntax} + \label{let_expression} +\end{figure} + +Let expression is a derived syntactic form for a one-branch case-expression. An expression + +\begin{lstlisting} + let p = e in b +\end{lstlisting} + +is equivalent to + +\begin{lstlisting} + case e of + p -> b + esac +\end{lstlisting} + +As let expression lacks an explicit ending specifier its scope extends to the right while possible; multiple let expressions on +the same nesting level associate to the right. + \FloatBarrier diff --git a/spec/08.standard_library.tex b/spec/08.standard_library.tex index 383702992..bed1b1787 100644 --- a/spec/08.standard_library.tex +++ b/spec/08.standard_library.tex @@ -95,8 +95,8 @@ is automatically created and closed within the call.} \descr{\lstinline|fun fprintf (file, fmt, ...)|}{Same as "\lstinline|printf|", but outputs to a given file. The file argument should be that acquired by \lstinline|fopen| function.} -\descr{\lstinline|fun regexp (str)|}{Compiles a string representation of a regular expression (as per POSIX-Extended Regular Expressions syntax) into - an internal representation. The return value is a external pointer to the internal representation.} +\descr{\lstinline|fun regexp (string)|}{Compiles a string representation of a regular expression (as per POSIX-Extended Regular Expressions syntax) into + an internal representation. The return value is an external pointer to the internal representation.} \descr{\lstinline|fun regexpMatch (pattern, subj, pos)|}{Matches a string "\lstinline{subj}", starting from the position "\lstinline|pos|", against a pattern "\lstinline{pattern}". The pattern is an external pointer to a compiled representation, returned by the diff --git a/src/SM.ml b/src/SM.ml index d11f9a509..45cf47779 100644 --- a/src/SM.ml +++ b/src/SM.ml @@ -1464,7 +1464,7 @@ let compile cmd ((imports, _), p) = | Expr.Ignore s -> let ls, env = env#get_label in add_code (compile_expr tail ls env s) ls false [ DROP ] - | Expr.ElemRef (x, i) -> compile_list tail l env [ x; i ] + | Expr.ElemRef _ -> failwith "Should not happen. Indirect assignemts are temporarily prohibited." | Expr.Var x -> ( let env, line = env#gen_line x in let env, acc = env#lookup x in @@ -1475,10 +1475,7 @@ let compile cmd ((imports, _), p) = false, line @ [ PROTO (name, env#current_function) ] ) | _ -> (env, false, line @ [ LD acc ])) - | Expr.Ref x -> - let env, line = env#gen_line x in - let env, acc = env#lookup x in - (env, false, line @ [ LDA acc ]) + | Expr.Ref _ -> failwith "Should not happen. Indirect assignemts are temporarily prohibited." | Expr.Const n -> (env, false, [ CONST n ]) | Expr.String s -> (env, false, [ STRING s ]) | Expr.Binop (op, x, y) -> @@ -1533,13 +1530,15 @@ let compile cmd ((imports, _), p) = let env, line = env#gen_line x in let env, acc = env#lookup x in add_code (compile_expr false lassn env e) lassn false (line @ [ ST acc ]) - | Expr.Assign (x, e) -> + | Expr.Assign (Expr.ElemRef (x, i), e) -> let lassn, env = env#get_label in add_code - (compile_list false lassn env [ x; e ]) + (compile_list false lassn env [ x; i; e ]) lassn false - [ (match x with Expr.Ref _ -> STI | _ -> STA) ] - (*Expr.ElemRef _ -> STA | _ -> STI]*) + [ STA ] + | Expr.Assign (x, _) -> + failwith + (Printf.sprintf "Indirect assignment is not supported yet: %s" (show Expr.t x)) | Expr.Skip -> (env, false, []) | Expr.Seq (s1, s2) -> compile_list tail l env [ s1; s2 ] | Expr.If (c, s1, s2) -> diff --git a/src/X86_32.ml b/src/X86_32.ml index e6b20350e..0e95be2e6 100644 --- a/src/X86_32.ml +++ b/src/X86_32.ml @@ -22,8 +22,6 @@ let word_size = 4;; | I of int * opnd (* an indirect operand with offset *) with show -let show_opnd = show(opnd) - (* For convenience we define the following synonyms for the registers: *) let ebx = R 0 let ecx = R 1 @@ -150,7 +148,7 @@ let compile cmd env imports code = in let env , pushs = push_args env [] n in let closure, env = env#pop in - let y , env = env#allocate in + let _ , env = env#allocate in env, pushs @ [Mov (closure, edx); Mov (I(0, edx), eax); Mov (ebp, esp); @@ -197,7 +195,7 @@ let compile cmd env imports code = else push_args env ((mov x (env#loc (Value.Arg (n-1)))) @ acc) (n-1) in let env, pushs = push_args env [] n in - let y, env = env#allocate in + let _, env = env#allocate in env, pushs @ [Mov (ebp, esp); Pop (ebp)] @ (if env#has_closure then [Pop ebx] else []) @ [Jmp f] ) else ( @@ -563,8 +561,8 @@ module M = Map.Make (String) (* Environment implementation *) class env prg = let chars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'" in - let make_assoc l i = List.combine l (List.init (List.length l) (fun x -> x + i)) in - let rec assoc x = function [] -> raise Not_found | l :: ls -> try List.assoc x l with Not_found -> assoc x ls in + (* let make_assoc l i = List.combine l (List.init (List.length l) (fun x -> x + i)) in *) + (* let rec assoc x = function [] -> raise Not_found | l :: ls -> try List.assoc x l with Not_found -> assoc x ls in *) object (self) inherit SM.indexer prg val globals = S.empty (* a set of global variables *) @@ -663,7 +661,7 @@ class env prg = (* allocates a fresh position on a symbolic stack *) method allocate = let x, n = - let rec allocate' = function + let allocate' = function | [] -> ebx , 0 | (S n)::_ -> S (n+1) , n+2 | (R n)::_ when n < num_of_regs -> R (n+1) , stack_slots diff --git a/src/X86_64.ml b/src/X86_64.ml index 9c5845c2e..62b09ee3d 100644 --- a/src/X86_64.ml +++ b/src/X86_64.ml @@ -260,11 +260,16 @@ let show env instr = let in_memory = function M _ | S _ | I _ -> true | C _ | R _ | L _ -> false let mov x s = - (* Numeric literals with more than 32 bits cannot ne directly moved to memory location *) - let big_numeric_literal = function L num -> num > 0xFFFFFFFF | _ -> false in + (* Numeric literals with more than 32 bits cannot be directly moved to memory location *) + let big_numeric_literal = function + | L num -> num > 0xFFFFFFFF || num < -0xFFFFFFFF + | _ -> false + in if x = s then [] - else if (in_memory x && in_memory s) || big_numeric_literal x then - [ Mov (x, rax); Mov (rax, s) ] + else if + (in_memory x && in_memory s) + || (big_numeric_literal x && (in_memory x || in_memory s)) + then [ Mov (x, rax); Mov (rax, s) ] else [ Mov (x, s) ] (* Boxing for numeric values *) @@ -691,16 +696,30 @@ let compile cmd env imports code = (env, push_closure_code @ mov address l @ call_code) | CONST n -> let s, env' = env#allocate in - (env', [ Mov (L (box n), s) ]) + (env', mov (L (box n)) s) | STRING s -> let addr, env = env#string s in let l, env = env#allocate in let env, call = compile_call env ~fname:".string" 1 false in (env, mov addr l @ call) - | LDA x -> + | LDA _ -> + failwith + "Should not happen. Indirect assignemts are temporarily \ + prohibited." + (* let s, env' = (env#variable x)#allocate in let s', env'' = env'#allocate in - (env'', [ Lea (env'#loc x, rax); Mov (rax, s); Mov (rax, s') ]) + let loc_x = env'#loc x in + match loc_x with + | R _ -> + failwith + "We are not able to take an address of a register. This \ + is the known limitation of 64-bit compiler. If you \ + encountered this issue, just do not use indirect \ + assignment :(" + | _ -> + (); + (env'', [ Lea (loc_x, rax); Mov (rax, s); Mov (rax, s') ])*) | LD x -> ( let s, env' = (env#variable x)#allocate in ( env', @@ -715,7 +734,11 @@ let compile cmd env imports code = | S _ | M _ -> [ Mov (s, rax); Mov (rax, env'#loc x) ] | _ -> [ Mov (s, env'#loc x) ] )) | STA -> compile_call env ~fname:".sta" 3 false - | STI -> ( + | STI -> + failwith + "Should not happen. Indirect assignemts are temporarily \ + prohibited." + (* let v, env = env#pop in let x = env#peek in ( env, @@ -727,7 +750,7 @@ let compile cmd env imports code = Mov (rdx, I (0, rax)); Mov (rdx, x); ] - | _ -> [ Mov (v, rax); Mov (rax, I (0, x)); Mov (rax, x) ] )) + | _ -> [ Mov (v, rax); Mov (rax, I (0, x)); Mov (rax, x) ] )*) | BINOP op -> compile_binop env op | LABEL s | FLABEL s | SLABEL s -> (env, [ Label s ]) | JMP l -> ((env#set_stack l)#set_barrier, [ Jmp l ]) @@ -909,7 +932,7 @@ let compile cmd env imports code = ] @ (if name = "main" then [ Binop ("^", rax, rax) ] else []) @ [ - Meta "\t.cfi_restore\t5"; + Meta "\t.cfi_restore\trbp"; Meta "\t.cfi_def_cfa\t4, 4"; Ret; Meta "\t.cfi_endproc"; @@ -972,24 +995,20 @@ let compile cmd env imports code = 1 false | LINE line -> env#gen_line line | FAIL ((line, col), value) -> - let v, env = if value then (env#peek, env) else env#pop in + let value, env = if value then (env#peek, env) else env#pop in let msg_addr, env = env#string cmd#get_infile in - let vr, env = env#allocate in - let sr, env = env#allocate in - let liner, env = env#allocate in - let colr, env = env#allocate in + let value_arg_addr, env = env#allocate in + let msg_arg_addr, env = env#allocate in + let line_arg_addr, env = env#allocate in + let col_arg_addr, env = env#allocate in let env, code = compile_call env ~fname:".match_failure" 4 false in let _, env = env#pop in ( env, - [ - Mov (L col, colr); - Mov (L line, liner); - Mov (msg_addr, sr); - Mov (v, vr); - ] - @ code ) + mov (L col) col_arg_addr @ mov (L line) line_arg_addr + @ mov msg_addr msg_arg_addr @ mov value value_arg_addr @ code + ) | i -> invalid_arg (Printf.sprintf "invalid SM insn: %s\n" (GT.show insn i)) @@ -1304,6 +1323,10 @@ class env prg mode = Buffer.add_char buf '\\'; Buffer.add_char buf 't'; iterate (i + 2) + | 'r' -> + Buffer.add_char buf '\\'; + Buffer.add_char buf 'r'; + iterate (i + 2) | _ -> Buffer.add_char buf '\\'; Buffer.add_char buf '\\'; @@ -1474,8 +1497,8 @@ let build cmd prog = in let compiler_flags, linker_flags = match cmd#target_os with - | Darwin -> ("-arch x86_64", "-ld_classic") - | Linux -> ("", "") + | Darwin -> ("-arch x86_64 -Wa,--noexecstack", "-ld_classic") + | Linux -> ("-Wa,--noexecstack", "") in let debug_flags = if cmd#is_debug then "-g" else "" in match cmd#get_mode with @@ -1493,11 +1516,17 @@ let build cmd prog = (Buffer.contents buf) cmd#get_runtime_path (match cmd#march with `X86_32 -> "runtime32" | `AMD64 -> "runtime") in - Sys.command gcc_cmdline + let result = Sys.command gcc_cmdline in + if result <> 0 then + failwith + (Printf.sprintf "Assembly compiler failed with exit code %d" result) | `Compile -> let cmd = Printf.sprintf "%s %s %s -c -g %s.s" compiler compiler_flags debug_flags cmd#basename in - Sys.command cmd + let result = Sys.command cmd in + if result <> 0 then + failwith + (Printf.sprintf "Assembly compiler failed with exit code %d" result) | _ -> invalid_arg "must not happen" diff --git a/src/dune b/src/dune index ae7211707..30a6d0efd 100644 --- a/src/dune +++ b/src/dune @@ -61,7 +61,7 @@ SM X86_64) ((action - (run %{project_root}/src/pp5+gt+plugins+ostap+dump.byte %{input-file})) + (run %{project_root}/src/pp5+gt+plugins+ostap+dump.exe %{input-file})) Language Pprinter X86_32 @@ -69,7 +69,8 @@ version))) (preprocessor_deps (file %{project_root}/src/pp5+gt+plugins+ostap+dump.byte) - ;(file %{project_root}/src/pp5+gt+plugins+ostap+dump.exe) + (file %{project_root}/src/pp5+gt+plugins+ostap+dump.exe) + ; ) ;(inline_tests) ) @@ -106,5 +107,17 @@ -o %{targets}))) +(rule + (targets pp5+gt+plugins+ostap+dump.exe) + (deps + (package GT)) + (action + (run + mkcamlp5.opt + -package + camlp5,camlp5.pa_o,camlp5.pr_o,ostap.syntax,GT.syntax.all,GT.syntax + -o + %{targets}))) + (cram (deps ./Driver.exe)) diff --git a/stdlib/Makefile b/stdlib/Makefile index 546f2af54..5d4766162 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -18,6 +18,8 @@ $(BDIR)/Fun.o: $(BDIR)/Ref.o $(BDIR)/Data.o: $(BDIR)/Ref.o $(BDIR)/Collection.o +$(BDIR)/Queue.o: $(BDIR)/List.o + $(BDIR)/Collection.o: $(BDIR)/List.o $(BDIR)/Ref.o $(BDIR)/Array.o: $(BDIR)/List.o diff --git a/stdlib/Queue.lama b/stdlib/Queue.lama new file mode 100644 index 000000000..f02d1fa7b --- /dev/null +++ b/stdlib/Queue.lama @@ -0,0 +1,26 @@ +import List; + +fun emptyQueue () { + [{}, {}] +} + +fun isEmptyQueue (q) { + case q of + [{}, {}] -> true + | _ -> false + esac +} + +fun enqueue ([pop, push], x) { + [pop, x : push] +} + +fun dequeue ([pop, push]) { + case pop of + x : pop -> [[pop, push], x] + | _ -> case push of + {} -> failure ("dequeueing from empty queue\n") + | _ -> dequeue ([reverse (push), {}]) + esac + esac +} diff --git a/stdlib/regression/dune b/stdlib/regression/dune index cf12a75a0..0f6430d20 100644 --- a/stdlib/regression/dune +++ b/stdlib/regression/dune @@ -1,9 +1,13 @@ ; This file was autogenerated (cram (deps ../../src/Driver.exe)) -(cram (deps ../../runtime32/runtime.a ../../runtime32/Std.i)) +(cram + (enabled_if (= %{system} "linux")) + (deps ../../runtime32/runtime.a ../../runtime32/Std.i)) (cram (deps ../../runtime/runtime.a ../../runtime/Std.i)) -(cram (deps ../x32/Array.i ../x32/Array.o ../x32/Buffer.i ../x32/Buffer.o ../x32/Collection.i ../x32/Collection.o ../x32/Data.i ../x32/Data.o ../x32/Fun.i ../x32/Fun.o ../x32/Lazy.i ../x32/Lazy.o ../x32/List.i ../x32/List.o ../x32/Matcher.i ../x32/Matcher.o ../x32/Ostap.i ../x32/Ostap.o ../x32/Random.i ../x32/Random.o ../x32/Ref.i ../x32/Ref.o ../x32/STM.i ../x32/STM.o ../x32/Timer.i ../x32/Timer.o)) +(cram + (enabled_if (= %{system} "linux")) + (deps ../x32/Array.i ../x32/Array.o ../x32/Buffer.i ../x32/Buffer.o ../x32/Collection.i ../x32/Collection.o ../x32/Data.i ../x32/Data.o ../x32/Fun.i ../x32/Fun.o ../x32/Lazy.i ../x32/Lazy.o ../x32/List.i ../x32/List.o ../x32/Matcher.i ../x32/Matcher.o ../x32/Ostap.i ../x32/Ostap.o ../x32/Random.i ../x32/Random.o ../x32/Ref.i ../x32/Ref.o ../x32/STM.i ../x32/STM.o ../x32/Timer.i ../x32/Timer.o)) (cram (deps ../x64/Array.i ../x64/Array.o ../x64/Buffer.i ../x64/Buffer.o ../x64/Collection.i ../x64/Collection.o ../x64/Data.i ../x64/Data.o ../x64/Fun.i ../x64/Fun.o ../x64/Lazy.i ../x64/Lazy.o ../x64/List.i ../x64/List.o ../x64/Matcher.i ../x64/Matcher.o ../x64/Ostap.i ../x64/Ostap.o ../x64/Random.i ../x64/Random.o ../x64/Ref.i ../x64/Ref.o ../x64/STM.i ../x64/STM.o ../x64/Timer.i ../x64/Timer.o)) (cram (applies_to test01) (deps test01.lama)) diff --git a/stdlib/regression/gen.ml b/stdlib/regression/gen.ml index 8d1caaac6..824fef158 100644 --- a/stdlib/regression/gen.ml +++ b/stdlib/regression/gen.ml @@ -7,11 +7,17 @@ let sprintf = Printf.sprintf let () = Out_channel.with_open_text "dune" (fun dunech -> let dprintfn fmt = Format.kasprintf (Printf.fprintf dunech "%s\n") fmt in + let iflinux () = dprintfn " (enabled_if (= %%{system} \"linux\"))" in dprintfn "; This file was autogenerated\n"; dprintfn "(cram (deps ../../src/Driver.exe))"; - dprintfn "(cram (deps ../../runtime32/runtime.a ../../runtime32/Std.i))"; + dprintfn "(cram"; + iflinux (); + dprintfn " (deps ../../runtime32/runtime.a ../../runtime32/Std.i))"; dprintfn "(cram (deps ../../runtime/runtime.a ../../runtime/Std.i))"; - dprintfn "(cram (deps %s))" + + dprintfn "(cram"; + iflinux (); + dprintfn " (deps %s))" (String.concat " " (List.concat_map (fun s -> [sprintf "../x32/%s.i" s ;sprintf "../x32/%s.o" s @@ -36,7 +42,7 @@ let () = if Sys.file_exists !lama_file && i <> 30 then ( (* cram_printfn " $ ls ../x64"; *) cram_printfn - " $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test%02d.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack'" i; + " $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test%02d.lama -o test" i; cram_printfn " $ ./test"; true) else false diff --git a/stdlib/regression/test01.t b/stdlib/regression/test01.t index 9410a9f0c..8c74ad30e 100644 --- a/stdlib/regression/test01.t +++ b/stdlib/regression/test01.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test01.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test01.lama -o test $ ./test Set internal structure: MNode (63, 1, 0, MNode (31, 1, 0, MNode (15, 1, 0, MNode (7, 1, 0, MNode (3, 1, 0, MNode (1, 1, 0, MNode (0, 1, 0, 0, 0), MNode (2, 1, 0, 0, 0)), MNode (5, 1, 0, MNode (4, 1, 0, 0, 0), MNode (6, 1, 0, 0, 0))), MNode (11, 1, 0, MNode (9, 1, 0, MNode (8, 1, 0, 0, 0), MNode (10, 1, 0, 0, 0)), MNode (13, 1, 0, MNode (12, 1, 0, 0, 0), MNode (14, 1, 0, 0, 0)))), MNode (23, 1, 0, MNode (19, 1, 0, MNode (17, 1, 0, MNode (16, 1, 0, 0, 0), MNode (18, 1, 0, 0, 0)), MNode (21, 1, 0, MNode (20, 1, 0, 0, 0), MNode (22, 1, 0, 0, 0))), MNode (27, 1, 0, MNode (25, 1, 0, MNode (24, 1, 0, 0, 0), MNode (26, 1, 0, 0, 0)), MNode (29, 1, 0, MNode (28, 1, 0, 0, 0), MNode (30, 1, 0, 0, 0))))), MNode (47, 1, 0, MNode (39, 1, 0, MNode (35, 1, 0, MNode (33, 1, 0, MNode (32, 1, 0, 0, 0), MNode (34, 1, 0, 0, 0)), MNode (37, 1, 0, MNode (36, 1, 0, 0, 0), MNode (38, 1, 0, 0, 0))), MNode (43, 1, 0, MNode (41, 1, 0, MNode (40, 1, 0, 0, 0), MNode (42, 1, 0, 0, 0)), MNode (45, 1, 0, MNode (44, 1, 0, 0, 0), MNode (46, 1, 0, 0, 0)))), MNode (55, 1, 0, MNode (51, 1, 0, MNode (49, 1, 0, MNode (48, 1, 0, 0, 0), MNode (50, 1, 0, 0, 0)), MNode (53, 1, 0, MNode (52, 1, 0, 0, 0), MNode (54, 1, 0, 0, 0))), MNode (59, 1, 0, MNode (57, 1, 0, MNode (56, 1, 0, 0, 0), MNode (58, 1, 0, 0, 0)), MNode (61, 1, 0, MNode (60, 1, 0, 0, 0), MNode (62, 1, 0, 0, 0)))))), MNode (79, 1, -1, MNode (71, 1, 0, MNode (67, 1, 0, MNode (65, 1, 0, MNode (64, 1, 0, 0, 0), MNode (66, 1, 0, 0, 0)), MNode (69, 1, 0, MNode (68, 1, 0, 0, 0), MNode (70, 1, 0, 0, 0))), MNode (75, 1, 0, MNode (73, 1, 0, MNode (72, 1, 0, 0, 0), MNode (74, 1, 0, 0, 0)), MNode (77, 1, 0, MNode (76, 1, 0, 0, 0), MNode (78, 1, 0, 0, 0)))), MNode (87, 1, -1, MNode (83, 1, 0, MNode (81, 1, 0, MNode (80, 1, 0, 0, 0), MNode (82, 1, 0, 0, 0)), MNode (85, 1, 0, MNode (84, 1, 0, 0, 0), MNode (86, 1, 0, 0, 0))), MNode (95, 1, 0, MNode (91, 1, 0, MNode (89, 1, 0, MNode (88, 1, 0, 0, 0), MNode (90, 1, 0, 0, 0)), MNode (93, 1, 0, MNode (92, 1, 0, 0, 0), MNode (94, 1, 0, 0, 0))), MNode (97, 1, -1, MNode (96, 1, 0, 0, 0), MNode (98, 1, -1, 0, MNode (99, 1, 0, 0, 0))))))) Set elements: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99} diff --git a/stdlib/regression/test02.t b/stdlib/regression/test02.t index 687ba8c4d..5b05c8d2c 100644 --- a/stdlib/regression/test02.t +++ b/stdlib/regression/test02.t @@ -1,5 +1,4 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test02.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test02.lama -o test $ ./test Assn ("x", Dec ("3")) diff --git a/stdlib/regression/test03.t b/stdlib/regression/test03.t index 3a60e6a8e..4a0482855 100644 --- a/stdlib/regression/test03.t +++ b/stdlib/regression/test03.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test03.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test03.lama -o test $ ./test -1 1 diff --git a/stdlib/regression/test04.t b/stdlib/regression/test04.t index dc4386546..49da03f89 100644 --- a/stdlib/regression/test04.t +++ b/stdlib/regression/test04.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test04.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test04.lama -o test $ ./test Map internal structure: MNode (63, {630}, 0, MNode (31, {310}, 0, MNode (15, {150}, 0, MNode (7, {70}, 0, MNode (3, {30}, 0, MNode (1, {10}, 0, MNode (0, {0}, 0, 0, 0), MNode (2, {20}, 0, 0, 0)), MNode (5, {50}, 0, MNode (4, {40}, 0, 0, 0), MNode (6, {60}, 0, 0, 0))), MNode (11, {110}, 0, MNode (9, {90}, 0, MNode (8, {80}, 0, 0, 0), MNode (10, {100}, 0, 0, 0)), MNode (13, {130}, 0, MNode (12, {120}, 0, 0, 0), MNode (14, {140}, 0, 0, 0)))), MNode (23, {230}, 0, MNode (19, {190}, 0, MNode (17, {170}, 0, MNode (16, {160}, 0, 0, 0), MNode (18, {180}, 0, 0, 0)), MNode (21, {210}, 0, MNode (20, {200}, 0, 0, 0), MNode (22, {220}, 0, 0, 0))), MNode (27, {270}, 0, MNode (25, {250}, 0, MNode (24, {240}, 0, 0, 0), MNode (26, {260}, 0, 0, 0)), MNode (29, {290}, 0, MNode (28, {280}, 0, 0, 0), MNode (30, {300}, 0, 0, 0))))), MNode (47, {470}, 0, MNode (39, {390}, 0, MNode (35, {350}, 0, MNode (33, {330}, 0, MNode (32, {320}, 0, 0, 0), MNode (34, {340}, 0, 0, 0)), MNode (37, {370}, 0, MNode (36, {360}, 0, 0, 0), MNode (38, {380}, 0, 0, 0))), MNode (43, {430}, 0, MNode (41, {410}, 0, MNode (40, {400}, 0, 0, 0), MNode (42, {420}, 0, 0, 0)), MNode (45, {450}, 0, MNode (44, {440}, 0, 0, 0), MNode (46, {460}, 0, 0, 0)))), MNode (55, {550}, 0, MNode (51, {510}, 0, MNode (49, {490}, 0, MNode (48, {480}, 0, 0, 0), MNode (50, {500}, 0, 0, 0)), MNode (53, {530}, 0, MNode (52, {520}, 0, 0, 0), MNode (54, {540}, 0, 0, 0))), MNode (59, {590}, 0, MNode (57, {570}, 0, MNode (56, {560}, 0, 0, 0), MNode (58, {580}, 0, 0, 0)), MNode (61, {610}, 0, MNode (60, {600}, 0, 0, 0), MNode (62, {620}, 0, 0, 0)))))), MNode (79, {790}, -1, MNode (71, {710}, 0, MNode (67, {670}, 0, MNode (65, {650}, 0, MNode (64, {640}, 0, 0, 0), MNode (66, {660}, 0, 0, 0)), MNode (69, {690}, 0, MNode (68, {680}, 0, 0, 0), MNode (70, {700}, 0, 0, 0))), MNode (75, {750}, 0, MNode (73, {730}, 0, MNode (72, {720}, 0, 0, 0), MNode (74, {740}, 0, 0, 0)), MNode (77, {770}, 0, MNode (76, {760}, 0, 0, 0), MNode (78, {780}, 0, 0, 0)))), MNode (87, {870}, -1, MNode (83, {830}, 0, MNode (81, {810}, 0, MNode (80, {800}, 0, 0, 0), MNode (82, {820}, 0, 0, 0)), MNode (85, {850}, 0, MNode (84, {840}, 0, 0, 0), MNode (86, {860}, 0, 0, 0))), MNode (95, {950}, 0, MNode (91, {910}, 0, MNode (89, {890}, 0, MNode (88, {880}, 0, 0, 0), MNode (90, {900}, 0, 0, 0)), MNode (93, {930}, 0, MNode (92, {920}, 0, 0, 0), MNode (94, {940}, 0, 0, 0))), MNode (97, {970}, -1, MNode (96, {960}, 0, 0, 0), MNode (98, {980}, -1, 0, MNode (99, {990}, 0, 0, 0))))))) Map elements: {[0, 0], [1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60], [7, 70], [8, 80], [9, 90], [10, 100], [11, 110], [12, 120], [13, 130], [14, 140], [15, 150], [16, 160], [17, 170], [18, 180], [19, 190], [20, 200], [21, 210], [22, 220], [23, 230], [24, 240], [25, 250], [26, 260], [27, 270], [28, 280], [29, 290], [30, 300], [31, 310], [32, 320], [33, 330], [34, 340], [35, 350], [36, 360], [37, 370], [38, 380], [39, 390], [40, 400], [41, 410], [42, 420], [43, 430], [44, 440], [45, 450], [46, 460], [47, 470], [48, 480], [49, 490], [50, 500], [51, 510], [52, 520], [53, 530], [54, 540], [55, 550], [56, 560], [57, 570], [58, 580], [59, 590], [60, 600], [61, 610], [62, 620], [63, 630], [64, 640], [65, 650], [66, 660], [67, 670], [68, 680], [69, 690], [70, 700], [71, 710], [72, 720], [73, 730], [74, 740], [75, 750], [76, 760], [77, 770], [78, 780], [79, 790], [80, 800], [81, 810], [82, 820], [83, 830], [84, 840], [85, 850], [86, 860], [87, 870], [88, 880], [89, 890], [90, 900], [91, 910], [92, 920], [93, 930], [94, 940], [95, 950], [96, 960], [97, 970], [98, 980], [99, 990]} diff --git a/stdlib/regression/test05.t b/stdlib/regression/test05.t index e097cb5bf..fd2e997ac 100644 --- a/stdlib/regression/test05.t +++ b/stdlib/regression/test05.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test05.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test05.lama -o test $ ./test Cached: 1 Cached: 1 diff --git a/stdlib/regression/test06.t b/stdlib/regression/test06.t index 2397dcd6d..1bd844705 100644 --- a/stdlib/regression/test06.t +++ b/stdlib/regression/test06.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test06.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test06.lama -o test $ ./test Flattening: 0 Flattening: {0, 0, 0, 0} diff --git a/stdlib/regression/test07.t b/stdlib/regression/test07.t index 176c7e006..7008dfa47 100644 --- a/stdlib/regression/test07.t +++ b/stdlib/regression/test07.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test07.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test07.lama -o test $ ./test HashTab internal structure: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {[{1, 2, 3}, 100]}, 0, 0, 0] HashTab internal structure: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {[{1, 2, 3}, 200], [{1, 2, 3}, 100]}, 0, 0, 0] diff --git a/stdlib/regression/test08.t b/stdlib/regression/test08.t index 378b1d134..d8ea8e497 100644 --- a/stdlib/regression/test08.t +++ b/stdlib/regression/test08.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test08.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test08.lama -o test $ ./test 6 120 diff --git a/stdlib/regression/test09.t b/stdlib/regression/test09.t index a12501b0c..64cff417a 100644 --- a/stdlib/regression/test09.t +++ b/stdlib/regression/test09.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test09.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test09.lama -o test $ ./test Parsing a*| against "aa"... Succ ({"a", "a"}) Parsing a+| against "aa"... Succ ({"a", "a"}) diff --git a/stdlib/regression/test10.t b/stdlib/regression/test10.t index 75613f54f..fd21203a9 100644 --- a/stdlib/regression/test10.t +++ b/stdlib/regression/test10.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test10.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test10.lama -o test $ ./test Parsing "aaa" with many ... Succ ({"a", "a", "a"}) Parsing "ab" with bad_alter ... Succ ("ab") diff --git a/stdlib/regression/test11.t b/stdlib/regression/test11.t index 7efd2e871..227782b28 100644 --- a/stdlib/regression/test11.t +++ b/stdlib/regression/test11.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test11.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test11.lama -o test $ ./test Succ ("a") Succ (Add ("a", "a")) diff --git a/stdlib/regression/test12.t b/stdlib/regression/test12.t index ba857ec2b..04b3b742f 100644 --- a/stdlib/regression/test12.t +++ b/stdlib/regression/test12.t @@ -1,5 +1,4 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test12.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test12.lama -o test $ ./test Succ (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul (Mul ("a", "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a"), "a")) diff --git a/stdlib/regression/test13.t b/stdlib/regression/test13.t index 873cf0c62..f69935f4a 100644 --- a/stdlib/regression/test13.t +++ b/stdlib/regression/test13.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test13.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test13.lama -o test $ ./test Succ (Add ("a", Sub ("a", "a"))) Succ (Mul (Div (Mul ("a", "a"), "a"), "a")) diff --git a/stdlib/regression/test14.t b/stdlib/regression/test14.t index c6a2f32a7..09e8f8c18 100644 --- a/stdlib/regression/test14.t +++ b/stdlib/regression/test14.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test14.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test14.lama -o test $ ./test Succ (Add ("a", Sub ("a", "a"))) Succ (Mul (Div (Mul ("a", "a"), "a"), "a")) diff --git a/stdlib/regression/test15.t b/stdlib/regression/test15.t index 86786f3db..f7830e133 100644 --- a/stdlib/regression/test15.t +++ b/stdlib/regression/test15.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test15.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test15.lama -o test $ ./test Succ (Eq ("a", "a")) Succ (Eq (Mul ("a", "a"), Mul ("a", "a"))) diff --git a/stdlib/regression/test16.t b/stdlib/regression/test16.t index 6365c1431..ff411c4b5 100644 --- a/stdlib/regression/test16.t +++ b/stdlib/regression/test16.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test16.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test16.lama -o test $ ./test Succ (Eq ("a", "a")) Succ (Eq ("b", "b")) diff --git a/stdlib/regression/test17.t b/stdlib/regression/test17.t index d38333431..d6f242b37 100644 --- a/stdlib/regression/test17.t +++ b/stdlib/regression/test17.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test17.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test17.lama -o test $ ./test Lazy body: 0 Lazy body: 1 diff --git a/stdlib/regression/test18.t b/stdlib/regression/test18.t index 72a01879a..c10a41179 100644 --- a/stdlib/regression/test18.t +++ b/stdlib/regression/test18.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test18.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test18.lama -o test $ ./test 1 =?= 1 = 0 symmetricity: ok diff --git a/stdlib/regression/test20.t b/stdlib/regression/test20.t index 7bff5b1e6..04ba202ab 100644 --- a/stdlib/regression/test20.t +++ b/stdlib/regression/test20.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test20.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test20.lama -o test $ ./test Empty Node (0, Empty, Empty) diff --git a/stdlib/regression/test21.t b/stdlib/regression/test21.t index 4d97bd002..7435cc4ef 100644 --- a/stdlib/regression/test21.t +++ b/stdlib/regression/test21.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test21.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test21.lama -o test $ ./test 1 1 diff --git a/stdlib/regression/test22.t b/stdlib/regression/test22.t index f926a76c9..9309f39d3 100644 --- a/stdlib/regression/test22.t +++ b/stdlib/regression/test22.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test22.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test22.lama -o test $ ./test 0 {1, 2, 3, 4} diff --git a/stdlib/regression/test23.t b/stdlib/regression/test23.t index fa9a04daa..0306c0c36 100644 --- a/stdlib/regression/test23.t +++ b/stdlib/regression/test23.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test23.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test23.lama -o test $ ./test 1 {2, 3, 4} diff --git a/stdlib/regression/test24.t b/stdlib/regression/test24.t index e48bb1d9e..0d8edd5e8 100644 --- a/stdlib/regression/test24.t +++ b/stdlib/regression/test24.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test24.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test24.lama -o test $ ./test 3 {1} diff --git a/stdlib/regression/test25.t b/stdlib/regression/test25.t index 091f14033..b3079e9d7 100644 --- a/stdlib/regression/test25.t +++ b/stdlib/regression/test25.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test25.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test25.lama -o test $ ./test Cloning int: 5 Cloning string: abc diff --git a/stdlib/regression/test26.t b/stdlib/regression/test26.t index 4319c15cf..7f5907b36 100644 --- a/stdlib/regression/test26.t +++ b/stdlib/regression/test26.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test26.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test26.lama -o test $ ./test Number of commands-line arguments: 1 arg [0 ] = "./test" diff --git a/stdlib/regression/test27.t b/stdlib/regression/test27.t index 158b1e5a8..d2e743c03 100644 --- a/stdlib/regression/test27.t +++ b/stdlib/regression/test27.t @@ -1,5 +1,4 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test27.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test27.lama -o test $ ./test Yes diff --git a/stdlib/regression/test28.t b/stdlib/regression/test28.t index 4afff951a..0972fd855 100644 --- a/stdlib/regression/test28.t +++ b/stdlib/regression/test28.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test28.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test28.lama -o test $ ./test Succ (Seq ("a", "b")) Succ (Alt ("a")) diff --git a/stdlib/regression/test29.t b/stdlib/regression/test29.t index 507ffc622..a1edb8939 100644 --- a/stdlib/regression/test29.t +++ b/stdlib/regression/test29.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test29.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test29.lama -o test $ ./test Succ (Seq ("a", "b")) Succ (Alt ("a")) diff --git a/stdlib/regression/test32.t b/stdlib/regression/test32.t index c1112dde3..c1c48950c 100644 --- a/stdlib/regression/test32.t +++ b/stdlib/regression/test32.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test32.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test32.lama -o test $ ./test Flattening: 0 Flattening: {A, B, C, D} diff --git a/stdlib/regression/test33.t b/stdlib/regression/test33.t index 4d79e62c9..8681e6527 100644 --- a/stdlib/regression/test33.t +++ b/stdlib/regression/test33.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test33.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test33.lama -o test $ ./test {}.string: 0 {}.stringcat: diff --git a/stdlib/regression/test34.t b/stdlib/regression/test34.t index f896fa062..5ac075f5b 100644 --- a/stdlib/regression/test34.t +++ b/stdlib/regression/test34.t @@ -1,6 +1,5 @@ This file was autogenerated. - $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test34.lama -o test 2>&1 | grep -v 'missing .note.GNU-stack' - /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker + $ ../../src/Driver.exe -runtime ../../runtime -I ../../runtime -I ../../stdlib/x64 -ds -dp test34.lama -o test $ ./test - ' " ` % \ \r + ' " ` % \ \h @ $ # ; [ ] diff --git a/tutorial/dune b/tutorial/dune index 9da618d90..2e0df6f9c 100644 --- a/tutorial/dune +++ b/tutorial/dune @@ -1,7 +1,8 @@ (rule (targets Expressions.x32.exe) - (enabled_if (= %{ocaml-config:os_type} "linux")) +; (enabled_if (= %{ocaml-config:os_type} "linux")) + (enabled_if (= %{system} "linux")) (deps (:lama Expressions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i) (mode (promote (until-clean))) @@ -43,7 +44,8 @@ (rule (targets Functions.x32.exe) - (enabled_if (= %{ocaml-config:os_type} "linux")) +; (enabled_if (= %{ocaml-config:os_type} "linux")) + (enabled_if (= %{system} "linux")) (deps (:lama Functions.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i) (mode (promote (until-clean))) @@ -85,7 +87,8 @@ (rule (targets Hello.x32.exe) - (enabled_if (= %{ocaml-config:os_type} "linux")) +; (enabled_if (= %{ocaml-config:os_type} "linux")) + (enabled_if (= %{system} "linux")) (deps (:lama Hello.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i) (mode (promote (until-clean))) @@ -127,7 +130,8 @@ (rule (targets PatternMatching.x32.exe) - (enabled_if (= %{ocaml-config:os_type} "linux")) +; (enabled_if (= %{ocaml-config:os_type} "linux")) + (enabled_if (= %{system} "linux")) (deps (:lama PatternMatching.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i) (mode (promote (until-clean))) @@ -169,7 +173,8 @@ (rule (targets Values.x32.exe) - (enabled_if (= %{ocaml-config:os_type} "linux")) +; (enabled_if (= %{ocaml-config:os_type} "linux")) + (enabled_if (= %{system} "linux")) (deps (:lama Values.lama) ../runtime32/runtime.a ../stdlib/x32/Fun.i) (mode (promote (until-clean)))