Skip to content
Open
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
project(MOZART CXX)

ENABLE_TESTING()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
# Custom CMake modules

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_local ${CMAKE_MODULE_PATH})
Expand Down Expand Up @@ -37,7 +38,7 @@ if(MINGW)
CACHE STRING "Version of GCC in your MinGW installation")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format -Wno-format-extra-args")
set(CMAKE_CXX_STANDARD_LIBRARIES "-static -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")
set(CMAKE_CXX_STANDARD_LIBRARIES "-static -static-libgcc -static-libstdc++ -lwsock32 -lws2_32 ${CMAKE_CSS_STANDARD_LIBRARIES}")

# Check for gcc target architecture
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE GCC_ARCH)
Expand Down Expand Up @@ -93,7 +94,7 @@ add_subdirectory(lib)
add_subdirectory(opi)
add_subdirectory(wish)
add_subdirectory(stdlib)
add_subdirectory(platform-test)
add_subdirectory(platform-test EXCLUDE_FROM_ALL)

# Add launcher and icons
if(UNIX)
Expand Down
56 changes: 56 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: 2.0.0-beta.1-{branch}+{build}
image: Visual Studio 2015
environment:
BOOST_ROOT: C:\Libraries\boost_1_65_1

install:
- 'git submodule update --init'
- ps: '$env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "")'
- ps: '$env:path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin\;" + $env:path'

build_script:
#- set SOURCES="https://github.com/layus/mozart2/releases/download/v2.0.0-beta.1/mozart2-2.0.0-beta.1-Source.zip"
#- appveyor DownloadFile "%SOURCES%" -FileName mozart2.zip
#- 7z x mozart2.zip -oC:\projects

# uninstall tcl/tk
- pacman -Rdd --noconfirm mingw-w64-x86_64-tcl mingw-w64-x86_64-tk

# build tcl
- cd C:\projects
- wget -O tcl-release.tar.gz https://github.com/tcltk/tcl/archive/release.tar.gz
- tar xf tcl-release.tar.gz
- cd tcl-release/win/
- bash configure --enable-threads --enable-64bit --prefix=C:/tcltk/
- make
- make install

# build tk
- cd C:\projects
- wget -O tk-release.tar.gz https://github.com/tcltk/tk/archive/release.tar.gz
- tar xf tk-release.tar.gz
- cd tk-release/win/
- bash configure --enable-64bit --prefix=C:/tcltk/ --with-tcl=../../tcl-release/win/
- make
- make install

# build boost
- cd %BOOST_ROOT%
- call bootstrap.bat gcc
- cat bootstrap.log
- .\b2 toolset=gcc variant=release --with-thread --with-system --with-random --with-filesystem --with-program_options

# install emacs
# We cannot use $(pacman -S *-emacs because ISS packs C:/.../emacs.exe/../* which would include all of msys)
- choco install emacs64

# build mozart2
- mkdir C:\projects\mozart2\build
- cd C:\projects\mozart2\build
- cmake -DCMAKE_BUILD_TYPE=Release -G"MSYS Makefiles" -DCMAKE_PREFIX_PATH=C:/tcltk -DBOOST_ROOT="%BOOST_ROOT%" -DISS_INCLUDE_TCL=ON -DISS_INCLUDE_EMACS=ON C:\projects\mozart2
- cmake --build . --target installer -- VERBOSE=1

artifacts:
- path: build\mozart2-2.0.0-beta.1-x86_64-windows.exe
name: binary installer

4 changes: 4 additions & 0 deletions cmake_local/MozartConfigVersion.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

set(MOZART_PROP_OZ_VERSION "2.0.0-beta.1")
set(MOZART_PROP_OZ_DATE "Tue, 24 Oct 2017 12:07:14 +0200")

3 changes: 2 additions & 1 deletion distrib/windows/MozartSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ end;
#if !(TclIncluded == "ON")
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
TmpFileName, ExecStdout: string;
TmpFileName: string;
ExecStdout: AnsiString;
ResultCode: integer;
Version : string;
begin
Expand Down
2 changes: 1 addition & 1 deletion vm/boostenv/main/boostvm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BoostVM::BoostVM(BoostEnvironment& environment,
std::unique_ptr<std::string>&& app, bool isURL) :
VirtualMachine(environment, options), env(environment),
vm(this), identifier(identifier),
uuidGenerator(random_generator),
uuidGenerator(),
portClosed(false),
_asyncIONodeCount(0),
preemptionTimer(environment.io_service),
Expand Down
94 changes: 94 additions & 0 deletions vm/boostenv/main/cached/Abstraction-implem-decl-after.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
template <>
class TypeInfoOf<Abstraction>: public TypeInfo {

static constexpr UUID uuid() {
return UUID();
}
public:
TypeInfoOf() : TypeInfo("Abstraction", uuid(), false, false, false, sbTokenEq, 0) {}

static const TypeInfoOf<Abstraction>* const instance() {
return &RawType<Abstraction>::rawType;
}

static Type type() {
return Type(instance());
}

atom_t getTypeAtom(VM vm) const {
return Abstraction::getTypeAtom(vm);
}

inline
void printReprToStream(VM vm, RichNode self, std::ostream& out,
int depth, int width) const;

inline
UnstableNode serialize(VM vm, SE s, RichNode from) const;

inline
GlobalNode* globalize(VM vm, RichNode from) const;

inline
void gCollect(GC gc, RichNode from, StableNode& to) const;

inline
void gCollect(GC gc, RichNode from, UnstableNode& to) const;

inline
void sClone(SC sc, RichNode from, StableNode& to) const;

inline
void sClone(SC sc, RichNode from, UnstableNode& to) const;
};

template <>
class TypedRichNode<Abstraction>: public BaseTypedRichNode {
public:
explicit TypedRichNode(RichNode self) : BaseTypedRichNode(self) {}

inline
size_t getArraySize();

inline
StaticArray<class mozart::StableNode> getElementsArray();

inline
class mozart::StableNode& getElements(size_t i);

inline
class mozart::Space * home();

inline
size_t getArraySizeImpl();

inline
atom_t getPrintName(VM vm);

inline
bool isCallable(VM vm);

inline
bool isProcedure(VM vm);

inline
size_t procedureArity(VM vm);

inline
void getCallInfo(VM vm, size_t & arity, ProgramCounter & start, size_t & Xcount, StaticArray<class mozart::StableNode> & Gs, StaticArray<class mozart::StableNode> & Ks);

inline
void getDebugInfo(VM vm, atom_t & printName, class mozart::UnstableNode & debugData);

inline
void printReprToStream(VM vm, std::ostream & out, int depth, int width);

inline
class mozart::UnstableNode serialize(VM vm, SE se);

inline
class mozart::GlobalNode * globalize(VM vm);

inline
void setUUID(VM vm, const struct mozart::UUID & uuid);
};
7 changes: 7 additions & 0 deletions vm/boostenv/main/cached/Abstraction-implem-decl.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Abstraction;

template <>
class Storage<Abstraction> {
public:
typedef ImplWithArray<Abstraction, class mozart::StableNode> Type;
};
116 changes: 116 additions & 0 deletions vm/boostenv/main/cached/Abstraction-implem.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

void TypeInfoOf<Abstraction>::printReprToStream(VM vm, RichNode self, std::ostream& out,
int depth, int width) const {
assert(self.is<Abstraction>());
self.as<Abstraction>().printReprToStream(vm, out, depth, width);
}

UnstableNode TypeInfoOf<Abstraction>::serialize(VM vm, SE s, RichNode from) const {
assert(from.is<Abstraction>());
return from.as<Abstraction>().serialize(vm, s);
}

GlobalNode* TypeInfoOf<Abstraction>::globalize(VM vm, RichNode from) const {
assert(from.is<Abstraction>());
return from.as<Abstraction>().globalize(vm);
}

void TypeInfoOf<Abstraction>::gCollect(GC gc, RichNode from, StableNode& to) const {
assert(from.type() == type());
to.make<Abstraction>(gc->vm, from.as<Abstraction>().getArraySize(), gc, from.access<Abstraction>());
}

void TypeInfoOf<Abstraction>::gCollect(GC gc, RichNode from, UnstableNode& to) const {
assert(from.type() == type());
to.make<Abstraction>(gc->vm, from.as<Abstraction>().getArraySize(), gc, from.access<Abstraction>());
}

void TypeInfoOf<Abstraction>::sClone(SC sc, RichNode from, StableNode& to) const {
assert(from.type() == type());
if (from.as<Abstraction>().home()->shouldBeCloned()) {
to.make<Abstraction>(sc->vm, from.as<Abstraction>().getArraySize(), sc, from.access<Abstraction>());
} else {
to.init(sc->vm, from);
}
}

void TypeInfoOf<Abstraction>::sClone(SC sc, RichNode from, UnstableNode& to) const {
assert(from.type() == type());
if (from.as<Abstraction>().home()->shouldBeCloned()) {
to.make<Abstraction>(sc->vm, from.as<Abstraction>().getArraySize(), sc, from.access<Abstraction>());
} else {
to.init(sc->vm, from);
}
}

size_t TypedRichNode<Abstraction>::getArraySize() {
return _self.access<Abstraction>().getArraySize();
}

StaticArray<class mozart::StableNode> TypedRichNode<Abstraction>::getElementsArray() {
return _self.access<Abstraction>().getElementsArray();
}

class mozart::StableNode& TypedRichNode<Abstraction>::getElements(size_t i) {
return _self.access<Abstraction>().getElements(i);
}

inline
class mozart::Space * TypedRichNode<Abstraction>::home() {
return _self.access<Abstraction>().home();
}

inline
size_t TypedRichNode<Abstraction>::getArraySizeImpl() {
return _self.access<Abstraction>().getArraySizeImpl();
}

inline
atom_t TypedRichNode<Abstraction>::getPrintName(VM vm) {
return _self.access<Abstraction>().getPrintName(vm);
}

inline
bool TypedRichNode<Abstraction>::isCallable(VM vm) {
return _self.access<Abstraction>().isCallable(vm);
}

inline
bool TypedRichNode<Abstraction>::isProcedure(VM vm) {
return _self.access<Abstraction>().isProcedure(vm);
}

inline
size_t TypedRichNode<Abstraction>::procedureArity(VM vm) {
return _self.access<Abstraction>().procedureArity(vm);
}

inline
void TypedRichNode<Abstraction>::getCallInfo(VM vm, size_t & arity, ProgramCounter & start, size_t & Xcount, StaticArray<class mozart::StableNode> & Gs, StaticArray<class mozart::StableNode> & Ks) {
_self.access<Abstraction>().getCallInfo(vm, arity, start, Xcount, Gs, Ks);
}

inline
void TypedRichNode<Abstraction>::getDebugInfo(VM vm, atom_t & printName, class mozart::UnstableNode & debugData) {
_self.access<Abstraction>().getDebugInfo(vm, printName, debugData);
}

inline
void TypedRichNode<Abstraction>::printReprToStream(VM vm, std::ostream & out, int depth, int width) {
_self.access<Abstraction>().printReprToStream(vm, out, depth, width);
}

inline
class mozart::UnstableNode TypedRichNode<Abstraction>::serialize(VM vm, SE se) {
return _self.access<Abstraction>().serialize(vm, se);
}

inline
class mozart::GlobalNode * TypedRichNode<Abstraction>::globalize(VM vm) {
return _self.access<Abstraction>().globalize(_self, vm);
}

inline
void TypedRichNode<Abstraction>::setUUID(VM vm, const struct mozart::UUID & uuid) {
_self.access<Abstraction>().setUUID(_self, vm, uuid);
}
Loading