Changeset 3098
- Timestamp:
- 11/25/08 04:49:00 (12 months ago)
- Location:
- trunk/ProjectFortress
- Files:
-
- 13 modified
-
astgen/Fortress.ast (modified) (4 diffs)
-
src/com/sun/fortress/compiler/desugarer/DesugaringVisitor.java (modified) (2 diffs)
-
src/com/sun/fortress/compiler/desugarer/DottedMethodRewriteVisitor.java (modified) (1 diff)
-
src/com/sun/fortress/compiler/desugarer/MutableVarRefRewriteVisitor.java (modified) (1 diff)
-
src/com/sun/fortress/compiler/desugarer/ObjectExpressionVisitor.java (modified) (1 diff)
-
src/com/sun/fortress/compiler/desugarer/PreDisambiguationDesugaringVisitor.java (modified) (2 diffs)
-
src/com/sun/fortress/compiler/desugarer/VarRefContainer.java (modified) (1 diff)
-
src/com/sun/fortress/compiler/disambiguator/ExprDisambiguator.java (modified) (2 diffs)
-
src/com/sun/fortress/compiler/disambiguator/TypeDisambiguator.java (modified) (2 diffs)
-
src/com/sun/fortress/compiler/typechecker/TypeChecker.java (modified) (2 diffs)
-
src/com/sun/fortress/nodes_util/ApiMaker.java (modified) (2 diffs)
-
src/com/sun/fortress/parser/TraitObject.rats (modified) (4 diffs)
-
src/com/sun/fortress/tools/FortressAstToConcrete.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ProjectFortress/astgen/Fortress.ast
r3097 r3098 132 132 */ 133 133 abstract AbstractNode() extends UIDObject; 134 135 136 134 /** 137 135 * compilation unit declaration … … 139 137 */ 140 138 abstract CompilationUnit(APIName name, List<Import> imports); 141 142 143 139 /** 144 140 * component declaration … … 273 269 TraitDecl(List<BaseType> excludes = Collections.<BaseType>emptyList(), 274 270 Option<List<BaseType>> comprises 275 = Option.<List<BaseType>>none(), 276 List<Decl> decls) implements GenericDecl; 271 = Option.<List<BaseType>>none()) implements GenericDecl; 277 272 /** 278 273 * object declaration in components or APIs … … 317 312 Option<List<BaseType>> throwsClause 318 313 = Option.<List<BaseType>>none(), 319 Option<Contract> contract = Option.<Contract>none(), 320 List<Decl> decls) 314 Option<Contract> contract = Option.<Contract>none()) 321 315 implements GenericDeclWithParams; 322 316 /** -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/DesugaringVisitor.java
r3095 r3098 578 578 return forObjectDeclOnly(that, that.getMods(), that.getName(), 579 579 that.getStaticParams(), that.getExtendsClause(), 580 that.getWhere(), params_result, 581 that.getThrowsClause(), contract_result, 582 gettersAndDecls); 580 that.getWhere(), gettersAndDecls, params_result, 581 that.getThrowsClause(), contract_result); 583 582 } 584 583 … … 601 600 return forTraitDeclOnly(that, that.getMods(), that.getName(), 602 601 that.getStaticParams(), that.getExtendsClause(), 603 that.getWhere(), that.getExcludes(),604 that.get Comprises(), gettersAndDecls);602 that.getWhere(), gettersAndDecls, 603 that.getExcludes(), that.getComprises()); 605 604 } 606 605 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/DottedMethodRewriteVisitor.java
r2550 r3098 52 52 that.getStaticParams(), 53 53 that.getExtendsClause(), that.getWhere(), 54 that.getParams(), that.getThrowsClause(),55 that.get Contract(), decls_result);54 decls_result, that.getParams(), 55 that.getThrowsClause(), that.getContract()); 56 56 } 57 57 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/MutableVarRefRewriteVisitor.java
r3082 r3098 91 91 that.getStaticParams(), 92 92 that.getExtendsClause(), that.getWhere(), 93 that.getParams(), that.getThrowsClause(),94 that.get Contract(), decls_result);93 decls_result, that.getParams(), 94 that.getThrowsClause(), that.getContract()); 95 95 } 96 96 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/ObjectExpressionVisitor.java
r3082 r3098 657 657 ObjectDecl lifted = new ObjectDecl(span, liftedObjId, staticParams, 658 658 extendsClauses, 659 Option.<WhereClause>none(), 660 params , decls);659 Option.<WhereClause>none(), decls, 660 params); 661 661 662 662 if(enclosingSelf != null) { -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/PreDisambiguationDesugaringVisitor.java
r3096 r3098 81 81 List<TraitTypeWhere> extendsClause, 82 82 Option<WhereClause> where, 83 List<Decl> decls, 83 84 List<BaseType> excludes, 84 Option<List<BaseType>> comprises, 85 List<Decl> decls) { 85 Option<List<BaseType>> comprises) { 86 86 if (!that.getName().equals(anyTypeId)) { 87 87 extendsClause = rewriteExtendsClause(that, extendsClause); 88 88 } 89 89 return super.forTraitDeclOnly(that, mods, name, staticParams, extendsClause, 90 where, excludes, comprises, decls);90 where, decls, excludes, comprises); 91 91 } 92 92 … … 98 98 List<TraitTypeWhere> extendsClause, 99 99 Option<WhereClause> where, 100 List<Decl> decls, 100 101 Option<List<Param>> params, 101 102 Option<List<BaseType>> throwsClause, 102 Option<Contract> contract, 103 List<Decl> decls) { 103 Option<Contract> contract) { 104 104 extendsClause = rewriteExtendsClause(that, extendsClause); 105 105 return super.forObjectDeclOnly(that, mods, name, staticParams, extendsClause, 106 where, params, throwsClause, contract, decls);106 where, decls, params, throwsClause, contract); 107 107 } 108 108 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/desugarer/VarRefContainer.java
r3094 r3098 100 100 Collections.<TraitTypeWhere>emptyList(), 101 101 Option.<WhereClause>none(), 102 Option.<List<Param>>some(params),103 Collections.<Decl>emptyList() );102 Collections.<Decl>emptyList(), 103 Option.<List<Param>>some(params) ); 104 104 105 105 return container; -
trunk/ProjectFortress/src/com/sun/fortress/compiler/disambiguator/ExprDisambiguator.java
r3096 r3098 671 671 extendsClause, 672 672 v.recurOnOptionOfWhereClause(that.getWhere()), 673 v.recurOnListOfDecl(that.getDecls()), 673 674 v.recurOnListOfBaseType(that.getExcludes()), 674 v.recurOnOptionOfListOfBaseType(that.getComprises()), 675 v.recurOnListOfDecl(that.getDecls())); 675 v.recurOnOptionOfListOfBaseType(that.getComprises())); 676 676 } 677 677 … … 719 719 extendsClause, 720 720 v.recurOnOptionOfWhereClause(that.getWhere()), 721 v.recurOnListOfDecl(that.getDecls()), 721 722 v.recurOnOptionOfListOfParam(that.getParams()), 722 723 v.recurOnOptionOfListOfBaseType(that.getThrowsClause()), 723 v.recurOnOptionOfContract(that.getContract()), 724 v.recurOnListOfDecl(that.getDecls())); 724 v.recurOnOptionOfContract(that.getContract())); 725 725 } 726 726 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/disambiguator/TypeDisambiguator.java
r3096 r3098 143 143 v.recurOnListOfTraitTypeWhere(that.getExtendsClause()), 144 144 v.recurOnOptionOfWhereClause(that.getWhere()), 145 v.recurOnListOfDecl(that.getDecls()), 145 146 v.recurOnListOfBaseType(that.getExcludes()), 146 v.recurOnOptionOfListOfBaseType(that.getComprises()), 147 v.recurOnListOfDecl(that.getDecls())); 147 v.recurOnOptionOfListOfBaseType(that.getComprises())); 148 148 } 149 149 … … 161 161 v.recurOnListOfTraitTypeWhere(that.getExtendsClause()), 162 162 v.recurOnOptionOfWhereClause(that.getWhere()), 163 v.recurOnListOfDecl(that.getDecls()), 163 164 v.recurOnOptionOfListOfParam(that.getParams()), 164 165 v.recurOnOptionOfListOfBaseType(that.getThrowsClause()), 165 v.recurOnOptionOfContract(that.getContract()), 166 v.recurOnListOfDecl(that.getDecls())); 166 v.recurOnOptionOfContract(that.getContract())); 167 167 } 168 168 -
trunk/ProjectFortress/src/com/sun/fortress/compiler/typechecker/TypeChecker.java
r3095 r3098 3443 3443 (List<TraitTypeWhere>)TypeCheckerResult.astFromResults(extendsClauseResult), 3444 3444 where, 3445 (List<Decl>)TypeCheckerResult.astFromResults(decls_result), 3445 3446 (Option<List<Param>>)TypeCheckerResult.astFromResults(paramsResult), 3446 3447 (Option<List<BaseType>>)TypeCheckerResult.astFromResults(throwsClauseResult), 3447 contract, 3448 (List<Decl>)TypeCheckerResult.astFromResults(decls_result)); 3448 contract); 3449 3449 3450 3450 return TypeCheckerResult.compose(new_node, checker_with_sparams.subtypeChecker, … … 4006 4006 (List<TraitTypeWhere>)TypeCheckerResult.astFromResults(extendsClauseResult), 4007 4007 where, 4008 (List<Decl>)TypeCheckerResult.astFromResults(decls_result), 4008 4009 (List<BaseType>)TypeCheckerResult.astFromResults(excludesResult), 4009 (Option<List<BaseType>>)TypeCheckerResult.astFromResults(comprisesResult), 4010 (List<Decl>)TypeCheckerResult.astFromResults(decls_result)); 4010 (Option<List<BaseType>>)TypeCheckerResult.astFromResults(comprisesResult)); 4011 4011 4012 4012 return TypeCheckerResult.compose(new_node, checker_with_sparams.subtypeChecker, -
trunk/ProjectFortress/src/com/sun/fortress/nodes_util/ApiMaker.java
r3096 r3098 125 125 that.getExtendsClause(), 126 126 that.getWhere(), 127 absDecls, 127 128 that.getExcludes(), 128 that.getComprises(), 129 absDecls)); 129 that.getComprises())); 130 130 } else return Option.<Node>none(); 131 131 } … … 142 142 that.getExtendsClause(), 143 143 that.getWhere(), 144 absDecls, 144 145 that.getParams(), 145 146 that.getThrowsClause(), 146 that.getContract(), 147 absDecls)); 147 that.getContract())); 148 148 } else return Option.<Node>none(); 149 149 } -
trunk/ProjectFortress/src/com/sun/fortress/parser/TraitObject.rats
r3096 r3098 49 49 new TraitDecl(span, a1, a2.getName(), 50 50 a2.getStaticParams(), a2.getExtendsClause(), a3.getWhere(), 51 a 3.getExcludes(), a3.getComprises(), a4);51 a4, a3.getExcludes(), a3.getComprises()); 52 52 }; 53 53 … … 177 177 (span, a1, a2.getName(), 178 178 a2.getStaticParams(), a2.getExtendsClause(), fhc.getWhereClause(), 179 a 2.getParams(), fhc.getThrowsClause(), contract, a3);179 a3, a2.getParams(), fhc.getThrowsClause(), contract); 180 180 }; 181 181 … … 321 321 (span, a1, a2.getName(), 322 322 a2.getStaticParams(), a2.getExtendsClause(), a3.getWhere(), 323 a 3.getExcludes(), a3.getComprises(), a4);323 a4, a3.getExcludes(), a3.getComprises()); 324 324 }; 325 325 … … 437 437 (span, a1, a2.getName(), 438 438 a2.getStaticParams(), a2.getExtendsClause(), fhc.getWhereClause(), 439 params, fhc.getThrowsClause(), contract, a3);439 a3, params, fhc.getThrowsClause(), contract); 440 440 }; 441 441 -
trunk/ProjectFortress/src/com/sun/fortress/tools/FortressAstToConcrete.java
r3096 r3098 420 420 return forTraitDeclOnly(that, mods_result, name_result, 421 421 staticParams_result, extendsClause_result, 422 where_result, excludes_result, comprises_result,423 decls_result);422 where_result, decls_result, 423 excludes_result, comprises_result); 424 424 } 425 425 } … … 431 431 List<String> extendsClause_result, 432 432 Option<String> where_result, 433 List<String> decls_result, 433 434 List<String> excludes_result, 434 Option<List<String>> comprises_result, 435 List<String> decls_result) { 435 Option<List<String>> comprises_result) { 436 436 StringBuilder s = new StringBuilder(); 437 437 … … 485 485 return forObjectDeclOnly(that, mods_result, name_result, 486 486 staticParams_result, extendsClause_result, 487 where_result, params_result, 488 throwsClause_result, contract_result, 489 decls_result); 487 where_result, decls_result, params_result, 488 throwsClause_result, contract_result); 490 489 } 491 490 } … … 497 496 List<String> extendsClause_result, 498 497 Option<String> where_result, 498 List<String> decls_result, 499 499 Option<List<String>> params_result, 500 500 Option<List<String>> throwsClause_result, 501 Option<String> contract_result, 502 List<String> decls_result) { 501 Option<String> contract_result) { 503 502 StringBuilder s = new StringBuilder(); 504 503

