Skip to content

Commit

Permalink
version 11.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ab25cq committed Jul 2, 2021
1 parent 4f1323b commit 1e6a025
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 20,212 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

この言語はアプリケーションを作るタイプの言語ではないかもしれません。iclover2を使ってシェルとして使うといいと思います。

version 10.6.0
version 11.0.0

サポートしている機能

Expand All @@ -24,8 +24,6 @@ version 10.6.0

とless外部コマンドで表示される。 メソッド名や外部コマンド名、ファイル名の補完もされます。JavaのIDEやPowerShellと同じく文脈に沿った補完を行います。

7.--with-jit指定を./configureにつけるとLLVMによるJITが有効になります。処理速度が向上します。大体3倍速くらいです。内部的にはClover2のソースファイルのコンパイル時にJITコンパイルしてダイナミックライブラリを作っているのでJITというよりネイティブコードコンパイラと言っても良いかもしれません。

8. シェルのような記述もできREPLをシェルの代わりに使うことができます。補完もシェルと同等の機能があります。ジョブコントロールも行うためfgやjobsなども動きます。ただしシェルよりは機能は限定的です。

ls -al | less
Expand Down Expand Up @@ -154,8 +152,6 @@ FEATURES
```
And less displayed with an external command. Method names, external command names, file names are also supplemented. Just like Java IDE and PowerShell, we will complement the context.

7. If you attach with-jit specification to ./configure, JIT by LLVM will be effective. Processing speed improves. It is about 3 times faster. Internally, it is good to say that it is a native code compiler rather than J IT because we are JIT compiled and compiled dynamic libraries when compiling Clover 2 source files.

8. You can write like a shell and REPL can be used instead of shell. Complementation also has the same function as shell. Since job control is also performed, fg and jobs etc. also move. However, the function is more limited than the shell.

ls -al | less
Expand Down Expand Up @@ -218,16 +214,6 @@ FEATURES
"""
);

13. FFI to C Language

class System
{
R_OK: static int from unistd.h
def strcmp(x:pointer, y:pointer): int from libc.so.6
}

You can use C language libraries without creating extension libraries etc.

14. Memory safe pointer

p := b"ABC"; p++; Clover.test("Memory safe pointer test", p->byte == 'B'); try { p +=100 } catch(e:Exception) { println("Out of range"); }
Expand Down
27 changes: 7 additions & 20 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ AC_ARG_WITH(debug, [ --with-debug include debug info
AC_ARG_WITH(log, [ --with-log create log ], [ LOGGING=1; ], [])
AC_ARG_WITH(optimize, [ --with-optimize with optimize(-O in CFLAGS) ], [ ENABLE_OPTIMIZE=1 ], [ ENABLE_OPTIMIZE=0 ])
AC_ARG_WITH(interpreter, [ --with-interpreter with interpreter ], [ ENABLE_INTERPRETER=1 ], [ ENABLE_INTERPRETER=0])
AC_ARG_WITH(jit, [ --with-jit with jit ], [ ENABLE_JIT=1 ], [ ENABLE_JIT=0])
AC_ARG_WITH(c-ffi, [ --with-c-ffi with c ffi ], [ ENABLE_CFFI=1 ], [ ENABLE_CFFI=0])
AC_ARG_WITH(thread, [ --with-thread with thread ], [ ENABLE_THREAD=1 ], [ ENABLE_THREAD=0])

Expand Down Expand Up @@ -406,25 +405,13 @@ CFLAGS="$CFLAGS -Qunused-arguments"

COMMON_OBJS="src/buffer.o src/debug.o src/xfunc.o src/klass.o src/constant.o src/code.o src/alignment.o src/utf.o"

if test $ENABLE_JIT = 1
then
CFLAGS="$CFLAGS -DENABLE_JIT"
OBJS="src/vm.o src/script.o src/object.o src/array.o src/string.o src/block.o src/regex.o src/integer.o src/byte.o src/short.o src/long.o src/float.o src/pointer.o src/char.o src/bool.o src/hash.o src/list.o src/tuple.o src/carray.o src/type.o src/stack.o src/heap.o src/exception.o src/native_method.o src/class_system.o src/class_clover.o src/class_clover_runtime.o src/clover_to_clang.o src/class_thread.o"
COMPILER_OBJS="src/js.o src/parser.o src/node_type.o src/node.o src/cast.o src/vtable.o src/script_ctime.o src/node_block.o src/node_block_type.o src/class_compiler.o src/klass_compile_time.o src/method_compiler.o src/module.o src/class_clover_compile_time.o"
JIT_OBJS="src/jit.o src/jit2.o src/jit3.o src/jit4.o src/jit5.o src/jit6.o"
JIT_RUNTIME_OBJS="src/jit_runtime.o"
JIT_SCRIPT_RUNTIME_OBJS="$COMMON_OBJS $OBJS $JIT_RUNTIME_OBJS src/jit_main.o"
JIT_MAIN_OBJ=src/jit_main2.o
JIT=1
else
OBJS="src/vm.o src/script.o src/object.o src/array.o src/string.o src/block.o src/regex.o src/integer.o src/byte.o src/short.o src/long.o src/float.o src/pointer.o src/char.o src/bool.o src/hash.o src/list.o src/tuple.o src/carray.o src/type.o src/stack.o src/heap.o src/exception.o src/native_method.o src/class_system.o src/class_clover.o src/class_clover_runtime.o src/clover_to_clang.o src/class_thread.o"
COMPILER_OBJS="src/js.o src/parser.o src/node_type.o src/node.o src/cast.o src/vtable.o src/script_ctime.o src/node_block.o src/node_block_type.o src/class_compiler.o src/klass_compile_time.o src/method_compiler.o src/module.o src/class_clover_compile_time.o"
JIT_OBJS=
JIT_RUNTIME_OBJS=
JIT_SCRIPT_RUNTIME_OBJS=
JIT_MAIN_OBJ=
JIT=0
fi
OBJS="src/vm.o src/script.o src/object.o src/array.o src/string.o src/block.o src/regex.o src/integer.o src/byte.o src/short.o src/long.o src/float.o src/pointer.o src/char.o src/bool.o src/hash.o src/list.o src/tuple.o src/carray.o src/type.o src/stack.o src/heap.o src/exception.o src/native_method.o src/class_system.o src/class_clover.o src/class_clover_runtime.o src/clover_to_clang.o src/class_thread.o"
COMPILER_OBJS="src/js.o src/parser.o src/node_type.o src/node.o src/cast.o src/vtable.o src/script_ctime.o src/node_block.o src/node_block_type.o src/class_compiler.o src/klass_compile_time.o src/method_compiler.o src/module.o src/class_clover_compile_time.o"
JIT_OBJS=
JIT_RUNTIME_OBJS=
JIT_SCRIPT_RUNTIME_OBJS=
JIT_MAIN_OBJ=
JIT=0

AC_CHECK_FUNCS(lchmod)

Expand Down
2 changes: 1 addition & 1 deletion src/compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static BOOL class_compiler(char* fname)

int gARGC;
char** gARGV;
char* gVersion = "10.6.0";
char* gVersion = "11.0.0";

char gScriptDirPath[PATH_MAX];
BOOL gRunningCompiler = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion src/get_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static BOOL is_shell_mode(char* source, char* fname, sVarTable* lv_table)

int gARGC;
char** gARGV;
char* gVersion = "10.6.0";
char* gVersion = "11.0.0";

char gScriptDirPath[PATH_MAX];
BOOL gRunningCompiler = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion src/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,7 +2338,7 @@ static void compiler_final()

int gARGC;
char** gARGV;
char* gVersion = "10.6.0";
char* gVersion = "11.0.0";

char gScriptDirPath[PATH_MAX];
BOOL gRunningCompiler = FALSE;
Expand Down
Loading

0 comments on commit 1e6a025

Please sign in to comment.