Index: .poseidon ================================================================== --- .poseidon +++ .poseidon @@ -9,11 +9,11 @@ 0 main.d - -g -unittest + -g -profile -unittest Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,9 +1,9 @@ .PHONY : all windows doc DC=dmd -DC_OPT=-O -release +DC_OPT=-O -release -inline SRC = $(wildcard *.d polemy/*.d tricks/*.d) posix: Index: build.bat ================================================================== --- build.bat +++ build.bat @@ -1,6 +1,6 @@ @setlocal ENABLEDELAYEDEXPANSION @set ARGS= @for %%I in (main.d polemy\*.d tricks\*.d) do @set ARGS=!ARGS! %%I @if not exist bin mkdir bin -@echo dmd -ofbin\polemy.exe -O -release %ARGS% -@dmd -ofbin\polemy.exe -O -release %ARGS% +@echo dmd -ofbin\polemy.exe -O -release -inline %ARGS% +@dmd -ofbin\polemy.exe -O -release -inline %ARGS% Index: polemy/parse.d ================================================================== --- polemy/parse.d +++ polemy/parse.d @@ -632,10 +632,11 @@ assert_throw!UnexpectedEOF(parseString(`let "x"`)); assert_throw!UnexpectedEOF(parseString(`var`)); assert_throw!ParseException(parseString(`@val x ==`)); assert_throw!ParseException(parseString(`if(){1}`)); assert_throw!UnexpectedEOF(parseString(`f(`)); + assert_throw!ParseException(parseString(`fun(x y){}`)); } unittest { mixin EasyAST; Index: tricks/tricks.d ================================================================== --- tricks/tricks.d +++ tricks/tricks.d @@ -103,11 +103,11 @@ hash_t structuralHash(T)(T x) { alias SC_Unqual!(T) UCT; static if(is(UCT == class)) - return (cast(UCT)x).toHash(); + return (x is null ? 0 : (cast(UCT)x).toHash()); else static if(SC_HasGoodHash!(UCT)) { return typeid(UCT).getHash(&x); } else static if(is(UCT T == T[])) @@ -156,12 +156,10 @@ return opCmp(rhs) == 0; } override int opCmp(Object rhs_) const /// member-by-member compare { - if( rhs_ is null ) - return -1; if( auto rhs = cast(typeof(this))rhs_ ) { foreach(i,_; this.tupleof) { static if(is(typeof(_) == struct)) @@ -199,11 +197,11 @@ assert_eq( (new Temp(1,"foo")).toHash, (new Temp(1,"foo")).toHash ); assert_ne( new Temp(1,"foo"), new Temp(2,"foo") ); assert_ne( new Temp(1,"foo"), new Temp(1,"bar") ); assert_gt( new Temp(1,"foo"), new Temp(1,"bar") ); assert_lt( new Temp(1,"foo"), new Temp(2,"bar") ); - assert_ge( new Temp(1,"foo"), new Temp(1,"foo") ); + assert_ge( new Temp(1,"foo"), new Temp(1,"foo") ); class TempDummy { int x; string y;