Skip to content

Commit

Permalink
+= objectscript;
Browse files Browse the repository at this point in the history
  • Loading branch information
r-lyeh committed Jul 13, 2015
1 parent 45db566 commit eb17602
Show file tree
Hide file tree
Showing 1,231 changed files with 520,853 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@ scriptorium
- no fancy stats/charts yet (come back soon)
- benchmarking latest versions (at the time of writing, Jul 2015)

### languages evaluated (29)
### languages evaluated (30)
- angelscript
- angelscript (angelscript-jit)
- c (c4)
Expand All @@ -26,6 +26,7 @@ scriptorium
- lua (lua)
- lua (lua-jit)
- neko (nekovm)
- os (objectscript)
- pawn (pawn)
- pawn (pawn-asm)
- psl
Expand Down Expand Up @@ -168,6 +169,10 @@ neko/nekovm
5702887
1.13424 s.
os/objectscript
5702887
3.03817 s.
pawn
tests\fib.p(28) : warning 237: recursive function "fibR"
fib: 5702887 = 5702887
Expand Down
17 changes: 17 additions & 0 deletions os/main.cc
@@ -0,0 +1,17 @@
#include <objectscript.h>
#include <os-binder.h>

float test(float a, float b){ return a + b; }

int main( int argc, const char **argv )
{
if( argc <= 1 ) return -1;

using namespace ObjectScript;
OS * os = OS::create();
//os->setGlobal(def("test", test)); // use binder
//os->eval("print(test(2, 3))"); // outputs: 5
os->require(argv[1]);
os->release();
return 0;
}
3 changes: 3 additions & 0 deletions os/make.bat
@@ -0,0 +1,3 @@
cl /Feos.exe main.cc -I objectscript\src objectscript\src\ext-json\*.c* objectscript\src\ext-datetime\*.c* objectscript\src\ext-url\*.c* objectscript\src\ext-process\*.c* objectscript\src\ext-filesystem\*.c* objectscript\src\ext-base64\*.c* objectscript\src\ext-hashlib\*.cpp objectscript\src\ext-hashlib\sha\*.c* objectscript\src\ext-hashlib\md5\*.c* objectscript\src\ext-hashlib\des\*.c* objectscript\src\ext-hashlib\crc32\*.c* objectscript\src\objectscript.cpp objectscript\src\os-heap.c* -DOS_CURL_DISABLED -DOS_SQLITE3_DISABLED -DOS_ICONV_DISABLED -DOS_REGEXP_DISABLED -DOS_ODBO_DISABLED -DOS_ZLIB_DISABLED /Ox /Oy /MT /DNDEBUG

del *.obj
33 changes: 33 additions & 0 deletions os/objectscript/.gitignore
@@ -0,0 +1,33 @@
*.osc
*.ost
*.tmp
win/os-fcgi/Release/
win/os-fcgi/Debug/
win/os-fcgi/DebugPrice/
win/os-fcgi/bin-Release/
win/os-fcgi/bin-Debug/
win/os-fcgi/bin-DebugPrice/
win/os-fcgi/ipch/
win/os-fcgi/x64/Release/
win/os-fcgi/x64/Debug/
win/os-fcgi/x64/bin-Release/
win/os-fcgi/x64/bin-Debug/
win/os-fcgi/cache-osc/
win/os/Release/
win/os/Debug/
win/os/DebugPrice/
win/os/bin-Release/
win/os/bin-Debug/
win/os/bin-DebugPrice/
win/os/ipch/
win/os/x64/Release/
win/os/x64/Debug/
win/os/x64/bin-Release/
win/os/x64/bin-Debug/
win/os/cache-osc/
win/ipch/
*.opensdf
*.sdf
*.suo
*.vcxproj.user
build
23 changes: 23 additions & 0 deletions os/objectscript/3rdparty/MPFDParser-1.0/Exception.cpp
@@ -0,0 +1,23 @@
// This file is distributed under GPLv3 licence
// Author: Gorelov Grigory (gorelov@grigory.info)
//
// Contacts and other info are on the WEB page: grigory.info/MPFDParser


#include "Exception.h"

MPFD::Exception::Exception(std::string error) {
Error = error;
}

MPFD::Exception::Exception(const MPFD::Exception& orig) {
Error = orig.Error;
}

MPFD::Exception::~Exception() {

}

std::string MPFD::Exception::GetError() {
return Error;
}
32 changes: 32 additions & 0 deletions os/objectscript/3rdparty/MPFDParser-1.0/Exception.h
@@ -0,0 +1,32 @@
// This file is distributed under GPLv3 licence
// Author: Gorelov Grigory (gorelov@grigory.info)
//
// Contacts and other info are on the WEB page: grigory.info/MPFDParser


#ifndef _EXCEPTION_H
#define _EXCEPTION_H

#include <string>
// #include <iostream>
#include <errno.h>


namespace MPFD {

class Exception {
public:
Exception(std::string error);
Exception(const Exception& orig);
virtual ~Exception();

std::string GetError();

private:
std::string Error;

};
}

#endif /* _EXCEPTION_H */

0 comments on commit eb17602

Please sign in to comment.