Mercurial > projects > dang
comparison gen/CodeGen.d @ 192:fda35d57847e
Fixed String parsing, so that they get created with the right type in AST.
Also added so that you can parse options to the test program, that will mirror them to Dang.
Eg.
./tests/run --semantic-only
will pass --semantic-only to Dang on each run.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Fri, 25 Jul 2008 15:00:54 +0200 |
parents | 08b6ce45b456 |
children | 4e1a7265d620 |
comparison
equal
deleted
inserted
replaced
191:e799db8d9cb0 | 192:fda35d57847e |
---|---|
714 if (v is null) | 714 if (v is null) |
715 v = m.getNamedFunction(id.getSymbol().getMangledFQN()); | 715 v = m.getNamedFunction(id.getSymbol().getMangledFQN()); |
716 return LValue(v); | 716 return LValue(v); |
717 case ExpType.StringExp: | 717 case ExpType.StringExp: |
718 auto stringExp = cast(StringExp)exp; | 718 auto stringExp = cast(StringExp)exp; |
719 char[] data = cast(char[])stringExp.data; | 719 char[] data = cast(char[])stringExp.data.data; |
720 auto string_constant = ConstantArray.GetString(data, true); | 720 auto string_constant = ConstantArray.GetString(data, true); |
721 auto gv = m.addGlobal(string_constant, "string"); | 721 auto gv = m.addGlobal(string_constant, "string"); |
722 gv.linkage = Linkage.Internal; | 722 gv.linkage = Linkage.Internal; |
723 gv.globalConstant = true; | 723 gv.globalConstant = true; |
724 return LValue(gv); | 724 return LValue(gv); |