| IDENT '(' Exprs ')'
@{
@i {
- @Term.node@ = new_call(@IDENT.name@, new_arg(@Exprs.node@, new_nothing(), 0) /*this*/,
- TREENULL, @Term.gparamges@, @Term.vars_in@);
+ @Term.node@ = new_call(@IDENT.name@, @Exprs.node@, new_arg(new_nothing(), new_nothing(), 0) /*this*/,
+ @Term.gparamges@, @Term.vars_in@);
@Term.node@->soffset = MAX(@Exprs.paramcount@, @Term.gparamges@);
+ @Term.node@->sc = @Term.node@->kids[1]->sc = @Exprs.node@->sc;
}
@i @Exprs.cnt@ = 1;
@i @Term.imm@ = 0;
| Term '.' IDENT '(' Exprs ')'
@{
@i {
- @Term.node@ = new_call(@IDENT.name@, new_arg(@Exprs.node@, @Term.1.node@, 0) /*this*/,
- TREENULL, @Term.gparamges@, @Term.vars_in@);
+ @Term.node@ = new_call(@IDENT.name@, @Exprs.node@, new_arg(@Term.1.node@, new_nothing(), 0) /*this*/,
+ @Term.gparamges@, @Term.vars_in@);
@Term.node@->soffset = MAX(@Exprs.paramcount@, @Term.gparamges@);
+ @Term.node@->sc = @Term.node@->kids[1]->sc = @Exprs.node@->sc;
}
@i @Exprs.cnt@ = 1;
@i @Term.imm@ = 0;
@i @Term.call@ = 1;
- @reg @Exprs.node@->reg = @Term.1.node@->reg = @Term.node@->kids[0]->reg = @Term.node@->reg;
+ @reg @Exprs.node@->reg = @Term.1.node@->reg = @Term.node@->kids[1]->reg = @Term.node@->reg;
@}
;
Exprs:
Expr ',' Exprs
@{
- @i @Exprs.0.node@ = new_arg(@Expr.0.node@, @Exprs.1.node@, @Exprs.0.cnt@);
+ @i {
+ @Exprs.0.node@ = new_arg(@Exprs.1.node@, @Expr.0.node@, @Exprs.0.cnt@);
+ @Exprs.0.node@->sc = @Exprs.1.node@->sc;
+ }
@i @Exprs.0.paramcount@ = @Exprs.1.paramcount@;
@i @Exprs.1.cnt@ = @Exprs.0.cnt@ + 1;
@reg {
@}
| Expr
@{
- @i @Exprs.0.node@ = new_arg(@Expr.0.node@, new_nothing(), @Exprs.cnt@);
+ @i {
+ @Exprs.0.node@ = new_arg(@Expr.0.node@, new_nothing(), @Exprs.cnt@);
+ @Exprs.0.node@->sc = malloc(8 * sizeof(short));
+ }
@i @Exprs.paramcount@ = @Exprs.cnt@ + 1;
@reg @Expr.node@->reg = @Exprs.0.node@->reg;
@}
|
@{
- @i @Exprs.0.node@ = new_nothing();
+ @i {
+ @Exprs.0.node@ = new_nothing();
+ @Exprs.0.node@->sc = malloc(8 * sizeof(short));
+ }
@i @Exprs.paramcount@ = @Exprs.cnt@;
@}
;