gesamt: unnoetige strdup calls entfernt
[uebersetzerbau-ss10.git] / gesamt / parser.y
index 67022564c33553b4bad34d5806b3681bece27754..107ede5c4992278fe35310d71b93909aeb1200a8 100644 (file)
@@ -331,7 +331,7 @@ IdentCommon:
                        @IdentCommon.node@ = TREENULL;
                        if(tab_lookup(@IdentCommon.s@, @IDENT.name@, S_VAR|S_PARM) == SYMNULL) {
                                /* es handelt sich um ein feldzugriff auf this */
-                               @IdentCommon.node@ = new_field(@IDENT.name@, new_param(O_ID, strdup("this"), TREENULL, TREENULL, 0), TREENULL, tab_lookup(@IdentCommon.s@, @IDENT.name@, S_FIELD) == SYMNULL ? -1 : tab_lookup(@IdentCommon.s@, @IDENT.name@, S_FIELD)->soffset);
+                               @IdentCommon.node@ = new_field(@IDENT.name@, new_param(O_ID, "this", TREENULL, TREENULL, 0), TREENULL, tab_lookup(@IdentCommon.s@, @IDENT.name@, S_FIELD) == SYMNULL ? -1 : tab_lookup(@IdentCommon.s@, @IDENT.name@, S_FIELD)->soffset);
                        } else { /* param oder var */
                                int tmp = tab_lookup(@IdentCommon.s@, @IDENT.name@, S_VAR|S_PARM) == SYMNULL ? -1 : tab_lookup(@IdentCommon.s@, @IDENT.name@, S_VAR|S_PARM)->param_index;
                                @IdentCommon.node@ = new_param(O_ID, @IDENT.name@, TREENULL, TREENULL, tmp);
@@ -530,7 +530,7 @@ Term:
 
        | THIS
          @{
-           @i @Term.node@ = new_param(O_ID, strdup("this"), TREENULL, TREENULL, 0);
+           @i @Term.node@ = new_param(O_ID, "this", TREENULL, TREENULL, 0);
                @i @Term.imm@ = 0;
                @i @Term.call@ = 0;
          @}