Changeset 1296
- Timestamp:
- 11/16/08 17:19:22 (2 months ago)
- Files:
-
- trunk/descent.core/src/descent/internal/codeassist/CompletionEngine.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/compiler/lookup/ILazy.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/compiler/lookup/LazyAggregateDeclaration.java (modified) (4 diffs)
- trunk/descent.core/src/descent/internal/compiler/lookup/LazyClassDeclaration.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/compiler/lookup/LazyInterfaceDeclaration.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/compiler/lookup/LazyModule.java (modified) (2 diffs)
- trunk/descent.core/src/descent/internal/compiler/lookup/LazyStructDeclaration.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/compiler/parser/SemanticContext.java (modified) (2 diffs)
- trunk/descent.core/src/descent/internal/compiler/parser/TypeTypeof.java (modified) (1 diff)
- trunk/descent.tests/descent/tests/dstress/DstressTestGeneratorBase.java (modified) (3 diffs)
- trunk/descent.ui/src/descent/internal/ui/text/java/GenericJavaTypeProposal.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/descent.core/src/descent/internal/codeassist/CompletionEngine.java
r1295 r1296 1733 1733 false /* not only statics */, 1734 1734 new HashtableOfCharArrayAndObject(), INCLUDE_ALL); 1735 } else if (se.sds instanceof ClassDeclaration) { 1736 currentName = computePrefixAndSourceRange(ident); 1737 suggestMembers((((ClassDeclaration) se.sds)).unlazy(semanticContext).members, 1738 false /* not only statics */, 1739 new HashtableOfCharArrayAndObject(), INCLUDE_ALL); 1740 } else if (se.sds instanceof StructDeclaration) { 1741 currentName = computePrefixAndSourceRange(ident); 1742 suggestMembers((((StructDeclaration) se.sds)).unlazy(semanticContext).members, 1743 false /* not only statics */, 1744 new HashtableOfCharArrayAndObject(), INCLUDE_ALL); 1735 1745 } else if (se.sds instanceof Package) { 1736 1746 char[] name = ident.ident; trunk/descent.core/src/descent/internal/compiler/lookup/ILazy.java
r1203 r1296 19 19 20 20 IdentifierExp getIdent(); 21 22 boolean isRunningSemantic(); 21 23 22 24 } trunk/descent.core/src/descent/internal/compiler/lookup/LazyAggregateDeclaration.java
r1246 r1296 65 65 66 66 s = lazy.members().get(lazy.members().size() - 1); 67 s.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 68 lazy.runMissingSemantic(s, context); 67 68 if (!lazy.isRunningSemantic()) { 69 s.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 70 lazy.runMissingSemantic(s, context); 71 } 69 72 } else { 70 73 Dsymbols symbols = new Dsymbols(); … … 80 83 s = lazy.members().get(lazy.members().size() - 1); 81 84 if (lazy.semanticScope() != null) { 82 s.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 85 if (!lazy.isRunningSemantic()) { 86 s.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 87 } 83 88 } 84 89 … … 86 91 } 87 92 88 for(Dsymbol sym : symbols) { 89 lazy.runMissingSemantic(sym, context); 93 if (!lazy.isRunningSemantic()) { 94 for(Dsymbol sym : symbols) { 95 lazy.runMissingSemantic(sym, context); 96 } 90 97 } 91 98 … … 161 168 int size = lazy.members().size(); 162 169 163 for (int i = 0; i < size; i++) { 164 Dsymbol sym = lazy.members().get(i); 165 sym.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 166 lazy.runMissingSemantic(sym, context); 170 if (!lazy.isRunningSemantic()) { 171 for (int i = 0; i < size; i++) { 172 Dsymbol sym = lazy.members().get(i); 173 174 sym.addMember(lazy.semanticScope(), lazy.asScopeDsymbol(), 0, context); 175 lazy.runMissingSemantic(sym, context); 176 } 167 177 } 168 178 } trunk/descent.core/src/descent/internal/compiler/lookup/LazyClassDeclaration.java
r1231 r1296 134 134 this.symtab = table; 135 135 } 136 137 private int isRunningSemantic; 138 139 @Override 140 public void semantic(Scope sc, SemanticContext context) { 141 isRunningSemantic++; 142 143 super.semantic(sc, context); 144 145 isRunningSemantic--; 146 } 147 148 @Override 149 public void semantic2(Scope sc, SemanticContext context) { 150 isRunningSemantic++; 151 152 super.semantic2(sc, context); 153 154 isRunningSemantic--; 155 } 156 157 @Override 158 public void semantic3(Scope sc, SemanticContext context) { 159 isRunningSemantic++; 160 161 super.semantic3(sc, context); 162 163 isRunningSemantic--; 164 } 165 166 public boolean isRunningSemantic() { 167 return isRunningSemantic != 0; 168 } 136 169 137 170 } trunk/descent.core/src/descent/internal/compiler/lookup/LazyInterfaceDeclaration.java
r1231 r1296 133 133 this.symtab = table; 134 134 } 135 136 private int isRunningSemantic; 137 138 @Override 139 public void semantic(Scope sc, SemanticContext context) { 140 isRunningSemantic++; 141 142 super.semantic(sc, context); 143 144 isRunningSemantic--; 145 } 146 147 @Override 148 public void semantic2(Scope sc, SemanticContext context) { 149 isRunningSemantic++; 150 151 super.semantic2(sc, context); 152 153 isRunningSemantic--; 154 } 155 156 @Override 157 public void semantic3(Scope sc, SemanticContext context) { 158 isRunningSemantic++; 159 160 super.semantic3(sc, context); 161 162 isRunningSemantic--; 163 } 164 165 public boolean isRunningSemantic() { 166 return isRunningSemantic != 0; 167 } 135 168 136 169 } trunk/descent.core/src/descent/internal/compiler/lookup/LazyModule.java
r1246 r1296 361 361 } 362 362 363 s.addMember(this.semanticScope, this, 0, context); 364 runMissingSemantic(s, context); 363 if (!isRunningSemantic()) { 364 s.addMember(this.semanticScope, this, 0, context); 365 runMissingSemantic(s, context); 366 } 365 367 366 368 if (ad != null) { … … 431 433 return ident; 432 434 } 435 436 private int isRunningSemantic; 437 438 @Override 439 public void semantic(Scope sc, SemanticContext context) { 440 isRunningSemantic++; 441 442 super.semantic(sc, context); 443 444 isRunningSemantic--; 445 } 446 447 @Override 448 public void semantic2(Scope sc, SemanticContext context) { 449 isRunningSemantic++; 450 451 super.semantic2(sc, context); 452 453 isRunningSemantic--; 454 } 455 456 @Override 457 public void semantic3(Scope sc, SemanticContext context) { 458 isRunningSemantic++; 459 460 super.semantic3(sc, context); 461 462 isRunningSemantic--; 463 } 464 465 public boolean isRunningSemantic() { 466 return isRunningSemantic != 0; 467 } 433 468 434 469 } trunk/descent.core/src/descent/internal/compiler/lookup/LazyStructDeclaration.java
r1246 r1296 134 134 this.symtab = table; 135 135 } 136 137 private int isRunningSemantic; 138 139 @Override 140 public void semantic(Scope sc, SemanticContext context) { 141 isRunningSemantic++; 142 143 super.semantic(sc, context); 144 145 isRunningSemantic--; 146 } 147 148 @Override 149 public void semantic2(Scope sc, SemanticContext context) { 150 isRunningSemantic++; 151 152 super.semantic2(sc, context); 153 154 isRunningSemantic--; 155 } 156 157 @Override 158 public void semantic3(Scope sc, SemanticContext context) { 159 isRunningSemantic++; 160 161 super.semantic3(sc, context); 162 163 isRunningSemantic--; 164 } 165 166 public boolean isRunningSemantic() { 167 return isRunningSemantic != 0; 168 } 136 169 137 170 } trunk/descent.core/src/descent/internal/compiler/parser/SemanticContext.java
r1265 r1296 15 15 import descent.core.dom.AST; 16 16 import descent.internal.compiler.env.IModuleFinder; 17 import descent.internal.compiler.lookup.DmdModuleFinder; 17 18 import descent.internal.core.CompilerConfiguration; 18 19 import descent.internal.core.util.Util; … … 129 130 130 131 // for debugging purposes 131 // global.path.add("c:\\ary\\programacion\\d\\1.020\\dmd\\src\\phobos");132 132 // this.moduleFinder = new DmdModuleFinder(global); 133 133 trunk/descent.core/src/descent/internal/compiler/parser/TypeTypeof.java
r1223 r1296 44 44 exp = exp.semantic(sc, context); 45 45 sc.intypeof--; 46 if (exp.op == TOK.TOKtype) {47 if (context.acceptsErrors()) {48 context.acceptProblem(Problem.newSemanticTypeError(49 IProblem.ArgumentToTypeofIsNotAnExpression, this,50 exp.toChars(context)));51 }52 }53 46 t = exp.type; 54 47 if (null == t) { trunk/descent.tests/descent/tests/dstress/DstressTestGeneratorBase.java
r918 r1296 1301 1301 failures.add("template_61_C.d"); 1302 1302 failures.add("template_63_C.d"); 1303 failures.add("template_66_C.d"); 1304 failures.add("template_66_D.d"); 1305 failures.add("template_66_E.d"); 1303 1306 failures.add("template_class_04.d"); 1304 1307 failures.add("template_class_05.d"); … … 1344 1347 failures.add("this_14_J.d"); 1345 1348 failures.add("this_15_A.d"); 1349 failures.add("this_16_B.d"); 1346 1350 failures.add("throw_07_A.d"); 1347 1351 failures.add("throw_07_B.d"); … … 1360 1364 failures.add("tuple_06_E.d"); 1361 1365 failures.add("tuple_06_F.d"); 1366 failures.add("tuple_09_A.d"); 1367 failures.add("tuple_09_B.d"); 1362 1368 failures.add("tuple_09_C.d"); 1369 failures.add("tuple_09_D.d"); 1370 failures.add("tuple_09_E.d"); 1371 failures.add("tuple_09_F.d"); 1363 1372 failures.add("tuple_09_G.d"); 1364 1373 failures.add("tuple_09_H.d"); trunk/descent.ui/src/descent/internal/ui/text/java/GenericJavaTypeProposal.java
r1295 r1296 252 252 private TypeArgumentProposal[] computeTypeArgumentProposals() throws JavaModelException { 253 253 if (fTypeArgumentProposals == null) { 254 255 getJavaElement().toString();256 254 257 255 IType type= (IType) getJavaElement();
