Skip to content

Commit c2932cd

Browse files
authored
Merge pull request #426 from yamacir-kit/cleanup
Cleanup
2 parents 2921d03 + 41c34b3 commit c2932cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1831
-1315
lines changed

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
matrix:
1515
compiler: [ g++, clang++ ]
1616
configuration: [ Debug, Release ]
17-
system: [ ubuntu-18.04, ubuntu-20.04 ]
17+
system: [ ubuntu-18.04, ubuntu-20.04, ubuntu-22.04 ]
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
- run: ./script/setup.sh --all
2121
- run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
2222
- run: cmake --build build --target safe-install.deb

.github/workflows/release.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
branches:
55
- master
66
jobs:
7-
Debian:
8-
runs-on: ubuntu-20.04
7+
Ubuntu:
8+
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
12-
- run: ./script/setup.sh --required
12+
- run: ./script/setup.sh
1313
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release
1414
- run: cmake --build build --target package
1515
- uses: actions/create-release@v1

CMakeLists.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ string(CONCAT UNSTABLE_OPTIMIZATION_OPTIONS # JOIN available if VERSION > 3.12
2626
# "-mtune=native "
2727
)
2828

29+
# NOTE: The `-gdwarf-4` option is set due to the following issues with Clang 14 and Valgrind versions below 3.20: https://bugzilla.mozilla.org/show_bug.cgi?id=1758782
2930
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -pipe")
30-
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
31-
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
32-
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
33-
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${UNSTABLE_OPTIMIZATION_OPTIONS}")
31+
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -gdwarf-4")
32+
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
33+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -gdwarf-4 -DNDEBUG")
34+
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG ${UNSTABLE_OPTIMIZATION_OPTIONS}")
3435

3536
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
3637
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})

README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Subset of R7RS-small.
7373
To install the above software, it is easy to use the following script.
7474

7575
``` bash
76-
$ ./script/setup.sh --required
76+
$ ./script/setup.sh
7777
```
7878

7979
## Installation
@@ -105,9 +105,9 @@ sudo rm -rf /usr/local/share/meevax
105105

106106
| Target Name | Description
107107
|:-------------------|:--
108-
| `all` (default) | Build shared-library `libmeevax.0.4.363.so` and executable `meevax`.
108+
| `all` (default) | Build shared-library `libmeevax.0.4.439.so` and executable `meevax`.
109109
| `test` | Test executable `meevax`.
110-
| `package` | Generate debian package `meevax_0.4.363_amd64.deb`.
110+
| `package` | Generate debian package `meevax_0.4.439_amd64.deb`.
111111
| `install` | Copy files into `/usr/local` __(1)__.
112112
| `install.deb` | `all` + `package` + `sudo apt install <meevax>.deb`
113113
| `safe-install.deb` | `all` + `test` + `package` + `sudo apt install <meevax>.deb`
@@ -122,13 +122,11 @@ __(1)__ Meevax installed by `make install` cannot be uninstalled by the system's
122122
## Usage
123123

124124
```
125-
Meevax Lisp System, version 0.4.363
125+
Meevax Lisp System, version 0.4.439
126126
127127
Usage: meevax [OPTION...] [FILE...]
128128
129129
Options:
130-
-b, --batch Suppress any system output.
131-
-d, --debug Deprecated.
132130
-e, --evaluate=STRING Read and evaluate given STRING at configuration step.
133131
-h, --help Display this help text and exit.
134132
-i, --interactive Take over control of root environment.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.363
1+
0.4.439

basis/r4rs-essential.ss

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
(read %read))
1515
(meevax string)
1616
(meevax symbol)
17-
(meevax syntax)
17+
(rename (meevax syntax)
18+
(sequence begin))
1819
(meevax vector)
1920
(rename (meevax write)
2021
(write %write))

basis/r7rs.ss

+15-32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(define-library (scheme base)
2-
(import (only (meevax error) error? read-error? file-error?)
2+
(import (only (meevax error) error-object? read-error? file-error?)
33
(only (meevax number) exact-integer?)
44
(only (meevax vector) vector-append vector-copy vector-copy! string->vector)
55
(only (meevax port)
@@ -337,11 +337,6 @@
337337
(string-map-1 x)
338338
(string-map-n (cons x xs))))
339339

340-
(define (error-object? x)
341-
(or (error? x)
342-
(read-error? x)
343-
(file-error? x)))
344-
345340
; (define (call-with-port port procedure)
346341
; (let-values ((results (procedure port)))
347342
; (close-port port)
@@ -461,33 +456,17 @@
461456

462457
(define-library (scheme cxr)
463458
(import (meevax pair))
464-
(export caaar
465-
caadr
466-
cadar
467-
caddr
468-
cdaar
469-
cdadr
470-
cddar
471-
cdddr
472-
caaaar
473-
caaadr
474-
caadar
475-
caaddr
476-
cadaar
477-
cadadr
478-
caddar
479-
cadddr
480-
cdaaar
481-
cdaadr
482-
cdadar
483-
cdaddr
484-
cddaar
485-
cddadr
486-
cdddar
487-
cddddr))
459+
(export caaar caaaar cdaaar
460+
caadr caaadr cdaadr
461+
cadar caadar cdadar
462+
caddr caaddr cdaddr
463+
cdaar cadaar cddaar
464+
cdadr cadadr cddadr
465+
cddar caddar cdddar
466+
cdddr cadddr cddddr))
488467

489468
(define-library (scheme char)
490-
(import (only (meevax character) char-codepoint)
469+
(import (only (meevax character) digit-value)
491470
(only (scheme r5rs)
492471
char-ci=?
493472
char-ci<?
@@ -518,7 +497,7 @@
518497
char-whitespace?
519498
char-upper-case?
520499
char-lower-case?
521-
(rename char-codepoint digit-value)
500+
digit-value
522501
char-upcase
523502
char-downcase
524503
(rename char-downcase char-foldcase)
@@ -578,6 +557,10 @@
578557
(car x)
579558
(current-input-port))))))
580559

560+
(define-library (scheme repl)
561+
(import (only (meevax environment) interaction-environment))
562+
(export interaction-environment))
563+
581564
(define-library (scheme write)
582565
(import (prefix (meevax write) %)
583566
(scheme base)

basis/srfi-149.ss

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525

2626
(define-library (srfi 149)
27-
(import (only (meevax macro) identifier->symbol)
27+
(import (only (meevax symbol) identifier->symbol)
2828
(only (meevax syntax) define-syntax quote-syntax)
2929
(scheme r4rs)
3030
(srfi 211 explicit-renaming)

basis/srfi-211.ss

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
(meevax list)
2020
(meevax macro)
2121
(meevax pair)
22-
(meevax syntax))
22+
(rename (meevax syntax)
23+
(sequence begin)))
2324

2425
(begin (define (er-macro-transformer f)
2526
(lambda (form use-env mac-env)

basis/srfi-23.ss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(define-library (srfi 23)
2-
(import (only (meevax error) make-error)
2+
(import (only (meevax error) error-object)
33
(only (scheme r5rs) define apply)
44
(only (srfi 34) raise))
55
(export error)
66
(begin (define (error . xs)
7-
(raise (apply make-error xs)))))
7+
(raise (apply error-object xs)))))

basis/srfi-6.ss

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(define-library (srfi 6)
2-
(import (meevax port))
2+
(import (meevax port)
3+
(meevax string))
34
(export (rename port->string get-output-string)
45
(rename string->port open-input-string)
56
(rename string->port open-output-string)))

configure/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Subset of R7RS-small.
7373
To install the above software, it is easy to use the following script.
7474

7575
``` bash
76-
$ ./script/setup.sh --required
76+
$ ./script/setup.sh
7777
```
7878

7979
## Installation
@@ -127,8 +127,6 @@ Meevax Lisp System, version ${PROJECT_VERSION}
127127
Usage: meevax [OPTION...] [FILE...]
128128
129129
Options:
130-
-b, --batch Suppress any system output.
131-
-d, --debug Deprecated.
132130
-e, --evaluate=STRING Read and evaluate given STRING at configuration step.
133131
-h, --help Display this help text and exit.
134132
-i, --interactive Take over control of root environment.

configure/version.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,43 @@ namespace meevax
2020
{
2121
inline namespace kernel
2222
{
23-
auto gmp_version() -> const_reference
23+
auto gmp_version() -> object const&
2424
{
2525
let static const version = make<symbol>(::gmp_version);
2626
return version;
2727
}
2828

29-
auto version() -> const_reference
29+
auto version() -> object const&
3030
{
3131
let static const version = make<symbol>("${PROJECT_VERSION}");
3232
return version;
3333
}
3434

35-
auto major_version() -> const_reference
35+
auto major_version() -> object const&
3636
{
3737
let static const version = make<exact_integer>("${PROJECT_VERSION_MAJOR}");
3838
return version;
3939
}
4040

41-
auto minor_version() -> const_reference
41+
auto minor_version() -> object const&
4242
{
4343
let static const version = make<exact_integer>("${PROJECT_VERSION_MINOR}");
4444
return version;
4545
}
4646

47-
auto patch_version() -> const_reference
47+
auto patch_version() -> object const&
4848
{
4949
let static const version = make<exact_integer>("${PROJECT_VERSION_PATCH}");
5050
return version;
5151
}
5252

53-
auto exact_version() -> const_reference
53+
auto exact_version() -> object const&
5454
{
5555
let static const version = make<symbol>("${${PROJECT_NAME}_VERSION_EXACT}");
5656
return version;
5757
}
5858

59-
auto features() -> const_reference
59+
auto features() -> object const&
6060
{
6161
let static const features = list(
6262
make<symbol>("r4rs"),

include/meevax/kernel/boolean.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ inline namespace kernel
2626
let extern const t;
2727
let extern const f;
2828

29-
auto select(const_reference) -> bool;
29+
auto is_truthy(object const&) -> bool;
3030
} // namespace kernel
3131
} // namespace meevax
3232

include/meevax/kernel/closure.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ inline namespace kernel
2828
{
2929
using pair::pair;
3030

31-
auto c() const -> const_reference;
31+
auto c() const -> object const&;
3232

33-
auto e() const -> const_reference;
33+
auto e() const -> object const&;
3434
};
3535

3636
auto operator <<(std::ostream &, closure const&) -> std::ostream &;

include/meevax/kernel/comparator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ inline namespace kernel
3333
return eq(x, y) or x.compare(y);
3434
};
3535

36-
auto equal(const_reference, const_reference) -> bool;
36+
auto equal(object const&, object const&) -> bool;
3737
} // namespace kernel
3838
} // namespace meevax
3939

include/meevax/kernel/complex.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ inline namespace kernel
3131

3232
explicit complex(std::string const&, int = 10);
3333

34-
auto canonicalize() const -> value_type;
34+
auto canonicalize() const -> object;
3535

36-
auto imag() const noexcept -> const_reference;
36+
auto imag() const noexcept -> object const&;
3737

38-
auto real() const noexcept -> const_reference;
38+
auto real() const noexcept -> object const&;
3939

4040
explicit operator std::complex<double>();
4141
};

0 commit comments

Comments
 (0)