Skip to content

Commit

Permalink
Merge pull request #29 from elite-lang/dev
Browse files Browse the repository at this point in the history
v0.8.1
  • Loading branch information
xssss1 committed Dec 27, 2015
2 parents 17c41bc + 9413f7f commit 2b5e8b4
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 17 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ if(UNIX)
set (dl_lib_link dl)
endif()

target_link_libraries(elite builder meta red scanner lex oolua_d lua exiconv
target_link_libraries(elite builder meta red scanner lex lua exiconv
${LLVM_LIBS} ${dl_lib_link})

if (CMAKE_BUILD_TYPE EQUAL "Debug")
target_link_libraries(elite oolua_d)
else()
target_link_libraries(elite oolua)
endif()


## 合并Headers
include(cmake/CombineHeader.cmake)
Expand Down
4 changes: 1 addition & 3 deletions MetaScriptRunner/src/PackageJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: sxf
* @Date: 2015-12-26 09:51:14
* @Last Modified by: sxf
* @Last Modified time: 2015-12-26 19:21:50
* @Last Modified time: 2015-12-26 22:00:20
*/

#include "PackageJIT.h"
Expand Down Expand Up @@ -66,8 +66,6 @@ class PackageJIT_private
std::vector<GenericValue> args;
args.push_back(GenericValue(msr->getCodeGenContext()));
GenericValue gv = EE->runFunction(func, args);
// plugin_init_func init = (plugin_init_func)(intptr_t)(EE->getPointerToFunction(func));
// init(msr->getCodeGenContext());
}

};
Expand Down
13 changes: 9 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
platform:
- x86
- Any CPU

configuration:
- Release
- Debug

clone_depth: 3 # clone entire repository history if not defined

install:
# how to install LLVM?
- git submodule update --init --recursive
- scripts\install_llvm_win32.bat

before_build:
- mkdir build
- cd build
- cmake ..
- cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_SDK_PATH="C:/projects/elite/LLVM_SDK" -DLLVM_VERSION=3.7 ..

build_script:
- msbuild /p:Configuration=Release "deps.vcxproj"
- msbuild /p:Configuration=Release "elite.vcxproj"
4 changes: 4 additions & 0 deletions conf/parser.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
| <dountil_state:v> {{ return v; }}
| <for_state:v> {{ return v; }}
| <return_state:v> {{ return v; }}
| <delete_expr:v> {{ return v; }}
;

<if_state> = "if" "(" <expr:exp> ")" <statement:s> {{ return makeList(newIDNode("if"), exp, s) }}
Expand Down Expand Up @@ -136,6 +137,9 @@
| <new_expr:n> "[" <call_args:args> "]" {{ addBrother(n, newParent(args)); return n;}}
;

<delete_expr> = "delete" <expr:exp> {{ return make_list(newIDNode("delete"), exp); }}
| "delete" [sz] <expr:exp> {{ return make_list(newIDNode("delete[]"), exp); }}
;

<numeric> = [int:i] {{ return newIntNode(i.val); }}
| [float:f] {{ return newFloatNode(f.val); }}
Expand Down
5 changes: 4 additions & 1 deletion doc/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ flex bison
6. 集成测试 ok
使用黑盒测试的思路,给定要编译的代码,和其输出的结果,通过编译运行,判断系统工作是否正常

7. 添加扩展包
7. 添加扩展包 ok
使用lua进行功能扩展,提供不同语言特性的分离导入

8. 中间过程的导出
使用log模块导出中间调试数据,用作EliteShow的展示

## 次要任务

1. 编译器输入参数的处理,目前输入参数有误时没有提示信息
Expand Down
1 change: 1 addition & 0 deletions scripts/install_llvm_win32.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git clone --depth=1 https://github.com/elite-lang/LLVM_Windows_37.git LLVM_SDK
4 changes: 2 additions & 2 deletions src/elite-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* @Author: sxf
* @Date: 2015-12-22 08:29:16
* @Last Modified by: sxf
* @Last Modified time: 2015-12-26 19:25:40
* @Last Modified time: 2015-12-26 22:31:07
*/


#define ELITE_VERSION_MAJOR "0"
#define ELITE_VERSION_MINOR "8"
#define ELITE_VERSION_RELEASE "0"
#define ELITE_VERSION_RELEASE "1"
#define ELITE_VERSION_NUM 8

#define ELITE_VERSION "Elite " ELITE_VERSION_MAJOR "." ELITE_VERSION_MINOR
Expand Down
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: sxf
* @Date: 2015-11-02 20:13:16
* @Last Modified by: sxf
* @Last Modified time: 2015-12-25 10:29:26
* @Last Modified time: 2015-12-26 22:20:31
*/

#include <iostream>
Expand Down Expand Up @@ -38,14 +38,14 @@ int main(int argc, const char *argv[])
string defalut_parser = PathGetter::getDefaultParserCfg();
int only_one_file = -1;
int close_link = 0;
if (argc <= 1) printf(help_message);
if (argc <= 1) cout << help_message;
else {
int i = 0;
while (i < argc-1) {
++i;
string opt(argv[i]);
if (opt == "-h" || opt == "--help") {
printf(help_message);
cout << help_message;
exit(0);
}
if (opt == "-d" || opt == "--dir") {
Expand All @@ -60,7 +60,7 @@ int main(int argc, const char *argv[])
}
if (opt == "-s" || opt == "--src") {
if (only_one_file == 1) {
printf(cscw);
cout << cscw;
exit(0);
}
srcdir = safe_getNext(argc, argv, i);
Expand All @@ -69,7 +69,7 @@ int main(int argc, const char *argv[])
}
if (opt == "-i" || opt == "--in") {
if (only_one_file == 0) {
printf(cscw);
cout << cscw;
exit(0);
}
onlyfile = safe_getNext(argc, argv, i);
Expand Down

0 comments on commit 2b5e8b4

Please sign in to comment.