Commit Graph

5 Commits

Author SHA1 Message Date
Minero Aoki 118d27b4ef r4941@macbookpro: aamine | 2009-05-24 21:54:18 +0900
* net/loveruby/cflat/ast: remove useless methods: ExprNode#isConstantAddress.
 


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4246 1b9489fe-b721-0410-924e-b54b9192deb8
2009-05-24 12:56:37 +00:00
Minero Aoki 3b29c039bd r4865@macbookpro: aamine | 2009-05-18 03:02:28 +0900
* net/loveruby/cflat/parser/Parser.jj: change function pointer syntax: int(*)(int,int) -> int(int,int)*.  Function type is int(int,int).
 * net/loveruby/cflat/parser/Parser.jj: function returns function type, not pointer to function.
 * net/loveruby/cflat/compiler/TypeResolver.java: resolve all function headers first, then resolve bodies.
 * net/loveruby/cflat/compiler/TypeResolver.java: generate a pointer for array-type expression.
 * net/loveruby/cflat/compiler/TypeResolver.java: isDereferable -> isPointer.
 * net/loveruby/cflat/compiler/TypeChecker.java: ditto.
 * net/loveruby/cflat/compiler/DereferenceChecker.java: ditto.
 * net/loveruby/cflat/compiler/IRGenerator.java: ditto.
 * net/loveruby/cflat/compiler/IRGenerator.java: shouldEvaluatedToAddress -> isLoadable (check arrays and functions, not only arrays).
 * net/loveruby/cflat/type/Type.java: remove #isDereferable.
 * net/loveruby/cflat/type/UserType.java: ditto.
 * net/loveruby/cflat/type/ArrayType.java: is not a scalar.
 * net/loveruby/cflat/type/ArrayType.java: is not dereferable itself.
 * net/loveruby/cflat/type/PointerType.java: is incompatible with arrays.
 * net/loveruby/cflat/type/IntegerType.java: ditto.
 * net/loveruby/cflat/type/FunctionType.java: is callable.
 * net/loveruby/cflat/type/ParamTypeRefs.java: x[] -> x* for param types.
 * net/loveruby/cflat/type/TypeTable.java: new method #getParamType.
 * net/loveruby/cflat/ast/ExprNode.java: new method #isLvalue.
 * net/loveruby/cflat/ast/ExprNode.java: new method #isAssignable.
 * net/loveruby/cflat/ast/ExprNode.java: new method #isLoadable.
 * net/loveruby/cflat/ast/CastNode.java: delegate them.
 * net/loveruby/cflat/ast/LHSNode.java: new super class of LHS nodes.
 * net/loveruby/cflat/ast/VariableNode.java: ditto.
 * net/loveruby/cflat/ast/DereferenceNode.java: ditto.
 * net/loveruby/cflat/ast/ArefNode.java: ditto.
 * net/loveruby/cflat/ast/MemberNode.java: ditto.
 * net/loveruby/cflat/ast/PtrMemberNode.java: ditto.
 * net/loveruby/cflat/entity/Entity.java: remove #cannotLoad.
 * net/loveruby/cflat/entity/Function.java: ditto.
 * net/loveruby/cflat/entity/Variable.java: ditto.
 * net/loveruby/cflat/entity/Constant.java: ditto.
 * net/loveruby/cflat/ir/Addr.java: is not LHS node now.
 


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4220 1b9489fe-b721-0410-924e-b54b9192deb8
2009-05-17 18:35:02 +00:00
Minero Aoki 8ca82908c1 * net/loveruby/cflat/ast/ExprNode.java: has all LHSNode methods.
* net/loveruby/cflat/ast/LHSNode.java: removed (methods merged into ExprNode).
* net/loveruby/cflat/ast/CastNode.java: should implement #isConstantAddress.
* net/loveruby/cflat/ast/DereferenceNode.java: does not implement LHSNode.
* net/loveruby/cflat/ast/ArefNode.java: ditto.
* net/loveruby/cflat/ast/PtrMemberNode.java: ditto.
* net/loveruby/cflat/ast/MemberNode.java: ditto.
* net/loveruby/cflat/ast/VariableNode.java: ditto.
* net/loveruby/cflat/ast/LiteralNode.java: ditto.
* net/loveruby/cflat/compiler/CodeGenerator.java: cast not needed.
* test/cast3.cb: test cast on LHS.
* test/test.sh: run it.


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@3802 1b9489fe-b721-0410-924e-b54b9192deb8
2008-01-05 03:52:41 +00:00
Minero Aoki e3282566a4 * introduce ExprNode class for all expression nodes.
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@3773 1b9489fe-b721-0410-924e-b54b9192deb8
2008-01-02 11:53:41 +00:00
Minero Aoki dd209e191b import cbc from stdcompiler repository (rev185)
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@3753 1b9489fe-b721-0410-924e-b54b9192deb8
2007-12-24 08:19:51 +00:00