Ignore:
Timestamp:
Oct 25, 2019 8:21:36 AM (7 weeks ago)
Author:
Jonathan Kämpe
Message:

#5862 Minor refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jk-2597/Compiler/ModelicaMiddleEnd/src/jastadd/scalarization/Scalarization.jrag

    r13822 r13845  
    912912
    913913    public FTempAccessExp FExp.tempExp(String name, Index i) {
    914         FTempAccessExp res;
     914        FAccess access;
    915915        if (inFunction()) {
    916             res = new FTempAccessExp(new FAccessFull(name, i.createFArraySubscripts()));
     916            access = new FAccessFull(name, i.createFArraySubscripts());
    917917        } else {
    918             res = new FTempAccessExp(new FAccessString(name + i));
    919         }
    920         return (FTempAccessExp) dynamicFExp(res);
     918            access = new FAccessString(name + i);
     919        }
     920        return (FTempAccessExp) dynamicFExp(new FTempAccessExp(access));
    921921    }
    922922
    923923    public FTempAccessExp FExp.tempExp(String name, FArraySubscripts fas) {
    924         FTempAccessExp res;
     924        FAccess access;
    925925        if (inFunction()) {
    926926            if (fas == null) {
    927                 res = new FTempAccessExp(new FAccessFull(name));
     927                access = new FAccessFull(name);
    928928            } else {
    929                 res = new FTempAccessExp(new FAccessFull(name, fas));
     929                access = new FAccessFull(name, fas);
    930930            }
    931931        } else {
    932932            if (fas == null) {
    933                 res = new FTempAccessExp(new FAccessString(name));
     933                access = new FAccessString(name);
    934934            } else {
    935                 res = new FTempAccessExp(new FAccessString(name + fas));
    936             }
    937         }
    938         return (FTempAccessExp) dynamicFExp(res);
     935                access = new FAccessString(name + fas);
     936            }
     937        }
     938        return (FTempAccessExp) dynamicFExp(new FTempAccessExp(access));
    939939    }
    940940
Note: See TracChangeset for help on using the changeset viewer.