Skip to content

Commit 2b5e8b4

Browse files
committed
Merge pull request #29 from elite-lang/dev
v0.8.1
2 parents 17c41bc + 9413f7f commit 2b5e8b4

File tree

9 files changed

+34
-17
lines changed

9 files changed

+34
-17
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,15 @@ if(UNIX)
5252
set (dl_lib_link dl)
5353
endif()
5454

55-
target_link_libraries(elite builder meta red scanner lex oolua_d lua exiconv
55+
target_link_libraries(elite builder meta red scanner lex lua exiconv
5656
${LLVM_LIBS} ${dl_lib_link})
5757

58+
if (CMAKE_BUILD_TYPE EQUAL "Debug")
59+
target_link_libraries(elite oolua_d)
60+
else()
61+
target_link_libraries(elite oolua)
62+
endif()
63+
5864

5965
## 合并Headers
6066
include(cmake/CombineHeader.cmake)

MetaScriptRunner/src/PackageJIT.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: sxf
33
* @Date: 2015-12-26 09:51:14
44
* @Last Modified by: sxf
5-
* @Last Modified time: 2015-12-26 19:21:50
5+
* @Last Modified time: 2015-12-26 22:00:20
66
*/
77

88
#include "PackageJIT.h"
@@ -66,8 +66,6 @@ class PackageJIT_private
6666
std::vector<GenericValue> args;
6767
args.push_back(GenericValue(msr->getCodeGenContext()));
6868
GenericValue gv = EE->runFunction(func, args);
69-
// plugin_init_func init = (plugin_init_func)(intptr_t)(EE->getPointerToFunction(func));
70-
// init(msr->getCodeGenContext());
7169
}
7270

7371
};

appveyor.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
platform:
22
- x86
3-
- Any CPU
43

54
configuration:
65
- Release
7-
- Debug
6+
7+
clone_depth: 3 # clone entire repository history if not defined
88

99
install:
10-
# how to install LLVM?
10+
- git submodule update --init --recursive
11+
- scripts\install_llvm_win32.bat
1112

1213
before_build:
1314
- mkdir build
1415
- cd build
15-
- cmake ..
16+
- cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_SDK_PATH="C:/projects/elite/LLVM_SDK" -DLLVM_VERSION=3.7 ..
17+
18+
build_script:
19+
- msbuild /p:Configuration=Release "deps.vcxproj"
20+
- msbuild /p:Configuration=Release "elite.vcxproj"

conf/parser.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
| <dountil_state:v> {{ return v; }}
5252
| <for_state:v> {{ return v; }}
5353
| <return_state:v> {{ return v; }}
54+
| <delete_expr:v> {{ return v; }}
5455
;
5556

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

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

140144
<numeric> = [int:i] {{ return newIntNode(i.val); }}
141145
| [float:f] {{ return newFloatNode(f.val); }}

doc/TODO.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ flex bison
4141
6. 集成测试 ok
4242
使用黑盒测试的思路,给定要编译的代码,和其输出的结果,通过编译运行,判断系统工作是否正常
4343

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

47+
8. 中间过程的导出
48+
使用log模块导出中间调试数据,用作EliteShow的展示
49+
4750
## 次要任务
4851

4952
1. 编译器输入参数的处理,目前输入参数有误时没有提示信息

scripts/install_llvm_win32.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git clone --depth=1 https://github.com/elite-lang/LLVM_Windows_37.git LLVM_SDK

src/elite-config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* @Author: sxf
33
* @Date: 2015-12-22 08:29:16
44
* @Last Modified by: sxf
5-
* @Last Modified time: 2015-12-26 19:25:40
5+
* @Last Modified time: 2015-12-26 22:31:07
66
*/
77

88

99
#define ELITE_VERSION_MAJOR "0"
1010
#define ELITE_VERSION_MINOR "8"
11-
#define ELITE_VERSION_RELEASE "0"
11+
#define ELITE_VERSION_RELEASE "1"
1212
#define ELITE_VERSION_NUM 8
1313

1414
#define ELITE_VERSION "Elite " ELITE_VERSION_MAJOR "." ELITE_VERSION_MINOR

src/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: sxf
33
* @Date: 2015-11-02 20:13:16
44
* @Last Modified by: sxf
5-
* @Last Modified time: 2015-12-25 10:29:26
5+
* @Last Modified time: 2015-12-26 22:20:31
66
*/
77

88
#include <iostream>
@@ -38,14 +38,14 @@ int main(int argc, const char *argv[])
3838
string defalut_parser = PathGetter::getDefaultParserCfg();
3939
int only_one_file = -1;
4040
int close_link = 0;
41-
if (argc <= 1) printf(help_message);
41+
if (argc <= 1) cout << help_message;
4242
else {
4343
int i = 0;
4444
while (i < argc-1) {
4545
++i;
4646
string opt(argv[i]);
4747
if (opt == "-h" || opt == "--help") {
48-
printf(help_message);
48+
cout << help_message;
4949
exit(0);
5050
}
5151
if (opt == "-d" || opt == "--dir") {
@@ -60,7 +60,7 @@ int main(int argc, const char *argv[])
6060
}
6161
if (opt == "-s" || opt == "--src") {
6262
if (only_one_file == 1) {
63-
printf(cscw);
63+
cout << cscw;
6464
exit(0);
6565
}
6666
srcdir = safe_getNext(argc, argv, i);
@@ -69,7 +69,7 @@ int main(int argc, const char *argv[])
6969
}
7070
if (opt == "-i" || opt == "--in") {
7171
if (only_one_file == 0) {
72-
printf(cscw);
72+
cout << cscw;
7373
exit(0);
7474
}
7575
onlyfile = safe_getNext(argc, argv, i);

0 commit comments

Comments
 (0)