Changeset 3155

Show
Ignore:
Timestamp:
12/06/08 06:17:14 (12 months ago)
Author:
sukyoungryu
Message:

[ast refactoring] Eliminated nodes: _RewriteFnRefOverloading and _RewriteOpRefOverloading

Location:
trunk/ProjectFortress
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/astgen/Fortress.ast

    r3149 r3155  
    10321032                         */ 
    10331033                        abstract FunctionalRef(List<StaticArg> staticArgs 
    1034                                                  = Collections.<StaticArg>emptyList(), int lexicalDepth=-2147483648); 
     1034                                                 = Collections.<StaticArg>emptyList(), 
     1035                                               int lexicalDepth=-2147483648); 
    10351036                            /** 
    10361037                             * expression with static instantiations 
     
    10431044                             * passes of the typechecker. Indicates that one of these FnRefs, which each have 
    10441045                             * different instantiations of static arguments, should be the correct instantiation. 
     1046                             * 
     1047                             * <overloadingType> 
     1048                             * type of a particular overloading 
    10451049                             */ 
    10461050                            FnRef(Id originalName, 
    10471051                                  List<Id> fns = Collections.<Id>singletonList(in_originalName), 
    1048                                   Option<List<_RewriteFnRefOverloading>> overloadings 
    1049                                       = Option.<List<_RewriteFnRefOverloading>>none()); 
     1052                                  Option<List<FnRef>> overloadings 
     1053                                      = Option.<List<FnRef>>none(), 
     1054                                  Option<Type> overloadingType); 
    10501055                            /** 
    10511056                             * operator name with (inferred) static instantiations 
     
    10591064                             * passes of the typechecker. Holds several different instantiations of static args, 
    10601065                             * one of which may be the correct insantiation. 
     1066                             * 
     1067                             * <overloadingType> 
     1068                             * type of a particular overloading 
    10611069                             */ 
    10621070                            OpRef(Op originalName, 
    10631071                                  List<Op> ops = Collections.<Op>singletonList(in_originalName), 
    1064                                   Option<List<_RewriteOpRefOverloading>> overloadings 
    1065                                       = Option.<List<_RewriteOpRefOverloading>>none()); 
     1072                                  Option<List<OpRef>> overloadings 
     1073                                      = Option.<List<OpRef>>none(), 
     1074                                  Option<Type> overloadingType); 
    10661075                        /** 
    10671076                         * juxtaposition of expressions 
     
    20322041             */ 
    20332042            Link(OpRef op, Expr expr); 
    2034             /* 
    2035              * An overloading, and the type of that particular overloading. 
    2036              */ 
    2037             _RewriteFnRefOverloading(FnRef fnRef, Type ty); 
    2038             /** 
    2039              * An operator overloading, and the tpye of that overloading. 
    2040              */ 
    2041             _RewriteOpRefOverloading(OpRef op, Type ty); 
    20422043 
    20432044    /** 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/OverloadRewriteVisitor.java

    r3132 r3155  
    3838    public Node forFnRefOnly(FnRef that, Option<Type> exprType_result, 
    3939                             List<StaticArg> staticArgs, Id originalName, List<Id> fns, 
    40                              Option<List<_RewriteFnRefOverloading>> overloadings) { 
     40                             Option<List<FnRef>> overloadings, 
     41                             Option<Type> type_result) { 
    4142        if (fns.size() > 1) { 
    4243            Collections.<Id>sort(fns, NodeComparator.idComparer); 
     
    5960        } 
    6061        return super.forFnRefOnly(that, exprType_result, staticArgs , originalName, fns, 
    61                                   overloadings); 
     62                                  overloadings, type_result); 
    6263    } 
    6364 
     
    6667    public Node forOpRefOnly(OpRef that, Option<Type> exprType_result, 
    6768                             List<StaticArg> staticArgs, Op originalName, List<Op> ops, 
    68                              Option<List<_RewriteOpRefOverloading>> overloadings) { 
     69                             Option<List<OpRef>> overloadings, 
     70                             Option<Type> type_result) { 
    6971        if (ops.size() > 1) { 
    7072            Collections.<Op>sort(ops, NodeComparator.opNameComparer); 
     
    8789        } 
    8890        return super.forOpRefOnly(that, exprType_result, staticArgs, originalName, ops, 
    89                                   overloadings); 
     91                                  overloadings, type_result); 
    9092    } 
    9193 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/DesugaringVisitor.java

    r3149 r3155  
    500500                             List<StaticArg> staticArgs_result, 
    501501                             Id fnResult, List<Id> fns_result, 
    502                              Option<List<_RewriteFnRefOverloading>> overloadings_result) { 
     502                             Option<List<FnRef>> overloadings_result, 
     503                             Option<Type> type_result) { 
    503504        // After disambiguation, the Id in a FnRef should have an empty API. 
    504505        assert(fnResult.getApiName().isNone()); 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/disambiguator/ExprDisambiguator.java

    r3146 r3155  
    11171117        } 
    11181118 
    1119         OpRef result = new OpRef(that.getSpan(),that.isParenthesized(),that.getStaticArgs(),op_name,CollectUtil.makeList(ops)); 
     1119        OpRef result = new OpRef(that.getSpan(),that.isParenthesized(), 
     1120                                 that.getStaticArgs(),op_name, 
     1121                                 CollectUtil.makeList(ops), 
     1122                                 Option.<Type>none()); 
    11201123        return Option.<OpRef>some(result); 
    11211124    } 
     
    11471150        if ( result_.isNone() ) { 
    11481151            // Make sure to populate the 'originalName' field. 
    1149             return new OpRef(that.getSpan(),that.isParenthesized(),that.getStaticArgs(),IterUtil.first(that.getOps()), that.getOps()); 
     1152            return new OpRef(that.getSpan(),that.isParenthesized(), 
     1153                             that.getStaticArgs(),IterUtil.first(that.getOps()), 
     1154                             that.getOps(), Option.<Type>none()); 
    11501155        } 
    11511156        else { 
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java

    r3148 r3155  
    861861        } 
    862862 
    863         private static List<Pair<FnRef, Type>> destructFnOverloadings(List<_RewriteFnRefOverloading> overloadings) { 
     863        private static List<Pair<FnRef, Type>> destructFnOverloadings(List<FnRef> overloadings) { 
    864864                List<Pair<FnRef, Type>> result = new ArrayList<Pair<FnRef, Type>>(overloadings.size()); 
    865                 for( _RewriteFnRefOverloading overloading : overloadings ) { 
    866                         result.add(Pair.make(overloading.getFnRef(), overloading.getTy())); 
     865                for( FnRef overloading : overloadings ) { 
     866                    if ( overloading.getOverloadingType().isNone() ) 
     867                        bug(overloading, 
     868                            "Type checker should have type for the overloading of " 
     869                            + overloading.getOriginalName()); 
     870                    result.add(Pair.make(overloading, overloading.getOverloadingType().unwrap())); 
    867871                } 
    868872                return result; 
     
    24372441                                              TypeCheckerResult originalName_result, 
    24382442                                              List<TypeCheckerResult> fns_result, 
    2439                                               Option<List<TypeCheckerResult>> overloadings_result) { 
     2443                                              Option<List<TypeCheckerResult>> overloadings_result, 
     2444                                              Option<TypeCheckerResult> type_result) { 
    24402445 
    24412446                // Could we give a type to each of our fns? 
     
    24582463                        // if there is an overloading that requires static args, and we don't have any, we'll 
    24592464                        // create a _FnInstantitedOverloading 
    2460                         List<_RewriteFnRefOverloading> fn_overloadings = new ArrayList<_RewriteFnRefOverloading>(); 
     2465                        List<FnRef> fn_overloadings = new ArrayList<FnRef>(); 
    24612466                        List<Type> arrow_types = new ArrayList<Type>(); 
    24622467                        ConstraintFormula accumulated_constraints = ConstraintFormula.TRUE; 
     
    24982503                                                        that.getLexicalDepth(), 
    24992504                                                        that.getOriginalName(), 
    2500                                                         that.getFns()); 
    2501                                         fn_overloadings.add(new _RewriteFnRefOverloading(that.getSpan(), fn_ref, new_type)); 
     2505                                                                 that.getFns(), 
     2506                                                                 Option.<Type>none()); 
     2507                                        fn_overloadings.add(ExprFactory.make_RewriteFnRefOverloading(that.getSpan(), fn_ref, new_type)); 
    25022508                                        arrow_types.add(new_type); 
    25032509                                        accumulated_constraints=accumulated_constraints.and(new_type_and_args_.unwrap().first().second(),this.subtypeChecker.new SubtypeHistory()); 
     
    25162522                                                             that.getOriginalName(), 
    25172523                                                             that.getFns(), 
    2518                                                              Option.<List<_RewriteFnRefOverloading>>some(fn_overloadings)); 
     2524                                                             Option.<List<FnRef>>some(fn_overloadings), 
     2525                                                             Option.<Type>none()); 
    25192526                } 
    25202527                else { 
     
    25472554                                                        that.getLexicalDepth(), 
    25482555                                                        that.getOriginalName(), 
    2549                                                         that.getFns()); 
     2556                                                             that.getFns(), 
     2557                                                             Option.<Type>none()); 
    25502558                } 
    25512559 
     
    35363544        } 
    35373545 
    3538         private static List<Pair<OpRef, Type>> destructOpOverLoading(List<_RewriteOpRefOverloading> overloadings){ 
     3546        private static List<Pair<OpRef, Type>> destructOpOverLoading(List<OpRef> overloadings){ 
    35393547                List<Pair<OpRef, Type>> result = new ArrayList<Pair<OpRef,Type>>(overloadings.size()); 
    3540                 for(_RewriteOpRefOverloading o: overloadings){ 
    3541                         result.add(Pair.make(o.getOp(),o.getTy())); 
     3548                for(OpRef o: overloadings){ 
     3549                    if ( o.getOverloadingType().isNone() ) 
     3550                        bug(o, "Type checker should have type for the overloading of " 
     3551                            + o.getOriginalName()); 
     3552                    result.add(Pair.make(o, o.getOverloadingType().unwrap())); 
    35423553                } 
    35433554                return result; 
     
    36493660                                              TypeCheckerResult originalName_result, 
    36503661                                              List<TypeCheckerResult> ops_result, 
    3651                                               Option<List<TypeCheckerResult>> overloadings_result) { 
     3662                                              Option<List<TypeCheckerResult>> overloadings_result, 
     3663                                              Option<TypeCheckerResult> type_result) { 
    36523664                // Did all ops typecheck? 
    36533665                for( TypeCheckerResult o_r : ops_result ) { 
     
    36673679                // OpRef with the overloading field set. 
    36683680                if( that.getStaticArgs().isEmpty() && TypesUtil.overloadingRequiresStaticArgs(overloaded_types) ) { 
    3669                         List<_RewriteOpRefOverloading> overloadings = new ArrayList<_RewriteOpRefOverloading>(); 
     3681                        List<OpRef> overloadings = new ArrayList<OpRef>(); 
    36703682                        List<Type> arrow_types = new ArrayList<Type>(); 
    36713683                        ConstraintFormula accumulated_constraints = ConstraintFormula.TRUE; 
     
    37083720                                                        that.getLexicalDepth(), 
    37093721                                                        that.getOriginalName(), 
    3710                                                         that.getOps()); 
    3711  
    3712                                         overloadings.add(new _RewriteOpRefOverloading(that.getSpan(), new_op_ref, new_type)); 
     3722                                                                     that.getOps(), 
     3723                                                                     Option.<Type>none()); 
     3724 
     3725                                        overloadings.add(ExprFactory.make_RewriteOpRefOverloading(that.getSpan(), new_op_ref, new_type)); 
    37133726                                        arrow_types.add(new_type); 
    37143727                                } 
     
    37253738                                                             that.getOriginalName(), 
    37263739                                                             that.getOps(), 
    3727                                                              Option.<List<_RewriteOpRefOverloading>>some(overloadings)); 
     3740                                                             Option.<List<OpRef>>some(overloadings), 
     3741                                                             Option.<Type>none()); 
    37283742                                        constraints = accumulated_constraints; 
    37293743                } 
     
    37513765                                                        that.getLexicalDepth(), 
    37523766                                                        that.getOriginalName(), 
    3753                                                         (List<Op>)TypeCheckerResult.astFromResults(ops_result)); 
     3767                                                             (List<Op>)TypeCheckerResult.astFromResults(ops_result), 
     3768                                                             Option.<Type>none()); 
    37543769                } 
    37553770 
  • trunk/ProjectFortress/src/com/sun/fortress/interpreter/rewrite/DesugarerVisitor.java

    r3149 r3155  
    162162        } 
    163163        Expr replacement(OpRef original) { 
    164             return NodeFactory.makeOpRef(original, lexicalNestedness); 
     164            return ExprFactory.makeOpRef(original, lexicalNestedness); 
    165165        } 
    166166        VarType replacement(VarType original) { 
  • trunk/ProjectFortress/src/com/sun/fortress/interpreter/rewrite/OprInstantiaterVisitor.java

    r3132 r3155  
    7575        if (args != n_args || originalName != n_originalName || ops != n_ops || type != n_type) { 
    7676            return new OpRef(op.getSpan(), op.isParenthesized(), Option.wrap(n_type), n_args, Environment.TOP_LEVEL, 
    77                     n_originalName, n_ops); 
     77                             n_originalName, n_ops, Option.<Type>none()); 
    7878        } 
    7979 
  • trunk/ProjectFortress/src/com/sun/fortress/nodes_util/ExprFactory.java

    r3149 r3155  
    239239    } 
    240240 
     241    public static OpRef make_RewriteOpRefOverloading(Span span, OpRef original, Type type) { 
     242        return new OpRef(span, original.isParenthesized(), original.getExprType(), 
     243                         original.getStaticArgs(), original.getLexicalDepth(), 
     244                         original.getOriginalName(), original.getOps(), 
     245                         original.getOverloadings(), Option.<Type>some(type)); 
     246    } 
     247 
    241248    public static OpRef makeMultiJuxt() { 
    242249        return makeOpRef(NodeFactory.makeOpMultifix(NodeFactory.makeOp("juxtaposition"))); 
     
    255262    } 
    256263 
     264    public static Expr makeOpRef(OpRef original, int lexicalNestedness) { 
     265            return new OpRef(original.getSpan(), original.isParenthesized(), 
     266                             original.getStaticArgs(), lexicalNestedness, 
     267                             original.getOriginalName(), original.getOps(), 
     268                             Option.<Type>none()); 
     269 
     270    } 
     271 
    257272    public static OpRef makeOpRef(Span span, String name) { 
    258273        Op op = NodeFactory.makeOpInfix(span, name); 
    259         return new OpRef(span, op, Collections.singletonList(op)); 
     274        return new OpRef(span, op, Collections.singletonList(op), Option.<Type>none()); 
    260275    } 
    261276 
    262277    public static OpRef makeOpRef(Op op) { 
    263         return new OpRef(op.getSpan(), op, Collections.singletonList(op)); 
     278        return new OpRef(op.getSpan(), op, Collections.singletonList(op), Option.<Type>none()); 
    264279    } 
    265280 
    266281    public static OpRef makeOpRef(Op op, List<StaticArg> staticArgs) { 
    267         return new OpRef(op.getSpan(), staticArgs, op, Collections.singletonList(op)); 
     282        return new OpRef(op.getSpan(), staticArgs, op, Collections.singletonList(op), Option.<Type>none()); 
    268283    } 
    269284 
     
    309324    } 
    310325 
     326    public static FnRef make_RewriteFnRefOverloading(Span span, FnRef original, Type type) { 
     327        return new FnRef(span, original.isParenthesized(), original.getExprType(), 
     328                         original.getStaticArgs(), original.getLexicalDepth(), 
     329                         original.getOriginalName(), original.getFns(), 
     330                         original.getOverloadings(), Option.<Type>some(type)); 
     331    } 
     332 
    311333    public static FnRef makeFnRef(Span span, Id name) { 
    312334        List<Id> names = Collections.singletonList(name); 
    313         return new FnRef(span, name, names); 
     335        return new FnRef(span, name, names, Option.<Type>none()); 
    314336    } 
    315337 
    316338    public static FnRef makeFnRef(FnRef original, int lexicalNestedness) { 
    317         return new FnRef(original.getSpan(), original.isParenthesized(), original.getStaticArgs(), original.getLexicalDepth(), original.getOriginalName(), original.getFns()); 
     339        return new FnRef(original.getSpan(), original.isParenthesized(), 
     340                         original.getStaticArgs(), original.getLexicalDepth(), 
     341                         original.getOriginalName(), original.getFns(), 
     342                         Option.<Type>none()); 
    318343    } 
    319344 
    320345    public static FnRef makeFnRef(FnRef that, Option<Type> ty, Id name, 
    321346                                  List<Id> ids, List<StaticArg> sargs, 
    322                                   Option<List<_RewriteFnRefOverloading>> overloadings) { 
     347                                  Option<List<FnRef>> overloadings) { 
    323348        return new FnRef(that.getSpan(), that.isParenthesized(), ty, 
    324                          sargs, name, ids, overloadings); 
     349                         sargs, name, ids, overloadings, Option.<Type>none()); 
    325350    } 
    326351 
    327352    public static FnRef makeFnRef(FnRef that, Option<Type> ty, Id name, 
    328353                                  List<Id> ids) { 
    329         return new FnRef(that.getSpan(), that.isParenthesized(), ty, name, ids); 
     354        return new FnRef(that.getSpan(), that.isParenthesized(), ty, name, ids, 
     355                         Option.<Type>none()); 
    330356    } 
    331357 
    332358    public static FnRef makeFnRef(Span span, Id name, List<StaticArg> sargs) { 
    333359        List<Id> names = Collections.singletonList(name); 
    334         return new FnRef(span, false, sargs, name, names); 
     360        return new FnRef(span, false, sargs, name, names, Option.<Type>none()); 
    335361    } 
    336362 
     
    338364        List<Id> names = 
    339365            Collections.singletonList(name); 
    340         return new FnRef(name.getSpan(), false, Collections.<StaticArg>emptyList(), name, names); 
     366        return new FnRef(name.getSpan(), false, 
     367                         Collections.<StaticArg>emptyList(), name, names, 
     368                         Option.<Type>none()); 
    341369    } 
    342370 
    343371    public static FnRef makeFnRef(Id name, Id orig){ 
    344      return new FnRef(name.getSpan(),false,Collections.<StaticArg>emptyList(), orig, Collections.singletonList(name)); 
     372     return new FnRef(name.getSpan(),false,Collections.<StaticArg>emptyList(), 
     373                      orig, Collections.singletonList(name), Option.<Type>none()); 
    345374    } 
    346375 
    347376    public static FnRef makeFnRef(Id orig, List<Id> names){ 
    348      return new FnRef(orig.getSpan(),false,Collections.<StaticArg>emptyList(), orig, names); 
     377     return new FnRef(orig.getSpan(),false, 
     378                      Collections.<StaticArg>emptyList(), orig, names, 
     379                      Option.<Type>none()); 
    349380    } 
    350381 
     
    353384        List<Id> qNames = Collections.singletonList(qName); 
    354385        return new FnRef(qName.getSpan(), false, 
    355                 Collections.<StaticArg>emptyList(), qName, qNames); 
     386                         Collections.<StaticArg>emptyList(), qName, qNames, 
     387                         Option.<Type>none()); 
    356388    } 
    357389 
     
    360392        List<Id> qNames = Collections.singletonList(qName); 
    361393        return new FnRef(qName.getSpan(), false, 
    362                 Collections.<StaticArg>emptyList(), qName, qNames); 
     394                         Collections.<StaticArg>emptyList(), qName, qNames, 
     395                         Option.<Type>none()); 
    363396    } 
    364397 
    365398    public static FnRef makeFnRef(Span span, boolean paren, Id original_fn, List<Id> fns, List<StaticArg> sargs) { 
    366      return new FnRef(span, paren, sargs, original_fn, fns); 
     399     return new FnRef(span, paren, sargs, original_fn, fns, 
     400                      Option.<Type>none()); 
    367401    } 
    368402 
     
    870904        public Expr forFnRef(FnRef e) { 
    871905            return new FnRef(e.getSpan(), true, 
    872                     e.getStaticArgs(), e.getOriginalName(), e.getFns()); 
     906                             e.getStaticArgs(), e.getOriginalName(), e.getFns(), 
     907                             Option.<Type>none()); 
    873908        } 
    874909        public Expr forOpRef(OpRef e) { 
    875910            return new OpRef(e.getSpan(), true, 
    876                     e.getStaticArgs(), e.getOriginalName(), e.getOps()); 
     911                             e.getStaticArgs(), e.getOriginalName(), e.getOps(), 
     912                             Option.<Type>none()); 
    877913        } 
    878914        public Expr forSubscriptExpr(SubscriptExpr e) { 
     
    916952      new_original_name = NodeFactory.makeOpInfix((Op)op.getOriginalName()); 
    917953 
    918      OpRef new_op = new OpRef(op.getSpan(),op.isParenthesized(),op.getStaticArgs(),op.getLexicalDepth(),new_original_name,new_ops); 
     954     OpRef new_op = new OpRef(op.getSpan(),op.isParenthesized(),op.getStaticArgs(), 
     955                              op.getLexicalDepth(),new_original_name,new_ops, 
     956                              Option.<Type>none()); 
    919957     return ExprFactory.makeOpExpr(new_op, lhs, rhs); 
    920958    } 
     
    935973      new_original_name = NodeFactory.makeOpPostfix((Op)op.getOriginalName()); 
    936974 
    937      OpRef new_op = new OpRef(op.getSpan(),op.isParenthesized(),op.getStaticArgs(),op.getLexicalDepth(),new_original_name,new_ops); 
     975     OpRef new_op = new OpRef(op.getSpan(),op.isParenthesized(),op.getStaticArgs(), 
     976                              op.getLexicalDepth(),new_original_name,new_ops, 
     977                              Option.<Type>none()); 
    938978     return ExprFactory.makeOpExpr(e, new_op); 
    939979    } 
  • trunk/ProjectFortress/src/com/sun/fortress/nodes_util/NodeFactory.java

    r3144 r3155  
    13071307    } 
    13081308 
    1309     public static Expr makeOpRef(OpRef original, int lexicalNestedness) { 
    1310             return new OpRef(original.getSpan(), original.isParenthesized(), original.getStaticArgs(), lexicalNestedness, original.getOriginalName(), original.getOps()); 
    1311  
    1312     } 
    1313  
    1314     public static TightJuxt makeTightJuxt(Span span, List<Expr> exprs) { 
    1315         return new TightJuxt(span, Useful.immutableTrimmedList(exprs)); 
    1316     } 
    1317  
    13181309    public static BoolRef makeBoolRef(BoolRef old, int depth) { 
    13191310        return new BoolRef(old.getSpan(), old.isParenthesized(), old.getName(), depth); 
     
    13491340    } 
    13501341 
    1351     public static ChainExpr makeChainExpr(Expr lhs, Op op, Expr rhs) { 
    1352         List<Link> links = new ArrayList<Link>(1); 
    1353         links.add(new Link(new Span(op.getSpan(), rhs.getSpan()), ExprFactory.makeOpRef(NodeFactory.makeOpInfix(op)), rhs)); 
    1354         return new ChainExpr(new Span(lhs.getSpan(), rhs.getSpan()), lhs, links); 
    1355     } 
    1356  
    13571342    public static VarType makeVarType(VarType original, int lexicalNestedness) { 
    13581343        return new VarType(original.getSpan(), original.isParenthesized(), original.getName(), lexicalNestedness); 
  • trunk/ProjectFortress/src/com/sun/fortress/parser_util/precedence_resolver/ASTUtil.java

    r3132 r3155  
    2626import java.util.Collections; 
    2727import java.util.List; 
     28import edu.rice.cs.plt.tuple.Option; 
    2829 
    2930import com.sun.fortress.nodes.AmbiguousMultifixOpExpr; 
     
    3637import com.sun.fortress.nodes.OpRef; 
    3738import com.sun.fortress.nodes.StaticArg; 
     39import com.sun.fortress.nodes.Type; 
    3840import com.sun.fortress.nodes_util.ExprFactory; 
    3941import com.sun.fortress.nodes_util.NodeFactory; 
     
    7779    static Expr multifix(Span span, Op op, List<Expr> args) { 
    7880        Op infix_op_ = NodeFactory.makeOpInfix(op); 
    79         OpRef infix_op = new OpRef(op.getSpan(), infix_op_,  Collections.<Op>singletonList(infix_op_)); 
     81        OpRef infix_op = new OpRef(op.getSpan(), infix_op_, 
     82                                   Collections.<Op>singletonList(infix_op_), 
     83                                   Option.<Type>none()); 
    8084 
    8185        Op multifix_op_ = NodeFactory.makeOpMultifix(op); 
    82         OpRef multifix_op = new OpRef(op.getSpan(), multifix_op_,  Collections.<Op>singletonList(multifix_op_)); 
     86        OpRef multifix_op = new OpRef(op.getSpan(), multifix_op_, 
     87                                      Collections.<Op>singletonList(multifix_op_), 
     88                                      Option.<Type>none()); 
    8389 
    8490        if (args.size() > 2) { 
     
    109115                                  sargs, 
    110116                                  en, 
    111                                   Collections.<Op>singletonList(en)); 
     117                                  Collections.<Op>singletonList(en), 
     118                                  Option.<Type>none()); 
    112119            return new OpExpr(span, false, ref, args); 
    113120        } else { 
  • trunk/ProjectFortress/src/com/sun/fortress/tools/FortressAstToConcrete.java

    r3149 r3155  
    16711671                                         String originalName_result, 
    16721672                                         List<String> fns_result, 
    1673                                          Option<List<String>> overloadings_result) { 
     1673                                         Option<List<String>> overloadings_result, 
     1674                                         Option<String> type_result) { 
    16741675        StringBuilder s = new StringBuilder(); 
    16751676 
     
    16971698                                         String originalName_result, 
    16981699                                         List<String> ops_result, 
    1699                                          Option<List<String>> overloadings_result) { 
     1700                                         Option<List<String>> overloadings_result, 
     1701                                         Option<String> type_result) { 
    17001702        return handleParen( canonicalOp(originalName_result), 
    17011703                            that.isParenthesized() ); 
    1702     } 
    1703  
    1704  
    1705  
    1706     @Override 
    1707     public String for_RewriteFnRefOverloadingOnly( 
    1708             _RewriteFnRefOverloading that, String fn_result, String ty_result) { 
    1709         return "(* _RewriteFnRefOverloading *)"; 
    1710     } 
    1711  
    1712     @Override 
    1713     public String for_RewriteOpRefOverloadingOnly( 
    1714             _RewriteOpRefOverloading that, String op_result, String ty_result) { 
    1715         return "(* _RewriteOpRefOverloading *)"; 
    17161704    } 
    17171705