Skip to content

Commit

Permalink
refraction via CTFE
Browse files Browse the repository at this point in the history
  • Loading branch information
jll63 committed Apr 29, 2020
1 parent e5def90 commit 8c3f9b3
Show file tree
Hide file tree
Showing 15 changed files with 693 additions and 979 deletions.
8 changes: 8 additions & 0 deletions dev/build-examples
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for example in acceptnovisitors adventure matrix next rolex synopsis whytheunderscore; do
touch examples/$example/source/app.d
dub build openmethods:$example
done

du -hc examples/*/openmethods_*
6 changes: 4 additions & 2 deletions dev/run-everything
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ do
do
if [ -d $dir/$target ];
then
echo $target
echo "========================================================================"
echo "Running $target"
if [ "$target" = 'dl' ];
then
if [[ "$DC" == 'dmd' ]];
Expand Down Expand Up @@ -70,7 +71,8 @@ do

if [[ $target == *'.d' ]]
then
echo $target
echo "========================================================================"
echo "Running $target"

if [[ "$DC" == 'gdc' ]] && grep --quiet -P $DC_EXCLUSIONS $dir/$target;
then
Expand Down
8 changes: 1 addition & 7 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
},
"configurations": [
{
"dependencies": {
"fluent-asserts": "~>0.13.3"
},
"dflags": [
"-mixin=mixins.txt"
],
Expand All @@ -38,9 +35,6 @@
}
],
"copyright": "Copyright © 2017, Jean-Louis Leroy",
"dependencies": {
"bolts": "~>1.7.0"
},
"description": "fast, open multi-methods for D",
"importPaths": [
"source/"
Expand All @@ -63,4 +57,4 @@
],
"targetType": "library",
"version": "1.3.0+commit.2.gaa32b61"
}
}
10 changes: 5 additions & 5 deletions examples/dl/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ rm -f *.o *.di *.so

DC=dmd

BOLT_VERSION=1.7.0
dub fetch bolts@$BOLT_VERSION
BOLT_SOURCE=~/.dub/packages/bolts-$BOLT_VERSION/bolts/source
# BOLT_VERSION=1.7.0
# dub fetch bolts@$BOLT_VERSION
# BOLT_SOURCE=~/.dub/packages/bolts-$BOLT_VERSION/bolts/source

DFLAGS="-g -I../../source -I$BOLT_SOURCE $DFLAGS"

SOFLAGS="-L-fPIC -shared"

$DC $DFLAGS $SOFLAGS -i -c ../../source/openmethods.d
$DC $DFLAGS $SOFLAGS -i -c ../../source/bolts/reflection/*.d
$DC $DFLAGS $SOFLAGS openmethods.o meta*.o -oflibopenmethods.so
$DC $DFLAGS $SOFLAGS -i -c ../../source/bolts/experimental/*.d
$DC $DFLAGS $SOFLAGS *.o -oflibopenmethods.so

$DC $DFLAGS $SOFLAGS -c animals.d
$DC $DFLAGS $SOFLAGS animals.o -oflibanimals.so
Expand Down
2 changes: 1 addition & 1 deletion examples/matrix/source/matrix.d
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ interface Matrix
}

Matrix plus(virtual!Matrix, virtual!Matrix);
Matrix times(double, virtual!Matrix);
Matrix times(virtual!Matrix, double);
Matrix times(double, virtual!Matrix);
Loading

0 comments on commit 8c3f9b3

Please sign in to comment.