Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0d19d22
first steps towards supporting type classes
peq Dec 31, 2019
51ad081
wip
peq Jan 1, 2020
9086113
Merge branch 'master' into type-classes
peq Jan 3, 2020
e7ddf90
wip
peq Jan 4, 2020
fa23f1f
Revert "wip"
peq Jan 4, 2020
d3813a3
fix
peq Jan 4, 2020
7bd190a
wip
peq Jan 13, 2020
87692a9
Merge branch 'master' into type-classes
peq Jan 18, 2020
0326896
wip
peq Jan 19, 2020
625002e
wip
peq Jan 21, 2020
e679ff5
back to the design with parameters
peq Jan 23, 2020
8d8897c
add parameters for type-class-dicts
peq Jan 25, 2020
f0a2e9a
add type-class arguments
peq Jan 25, 2020
a2fe29b
singleton optimization
peq Jan 25, 2020
2f05cf0
wip
peq Jan 26, 2020
452e603
again changing design
peq Jan 27, 2020
0aa3a36
type class translation
peq Jan 29, 2020
c03c861
some real progress on type classes
peq Jan 29, 2020
b162a4f
fixed optimization
peq Jan 30, 2020
c496f81
find subclass instances
peq Jan 30, 2020
2f200e2
first dependent instances working
peq Jan 30, 2020
3aecaa2
removed debug
peq Jan 31, 2020
dc677ab
change syntax to 'implements' keyword
peq Jan 31, 2020
8ea93e7
first class with constraints
peq Feb 1, 2020
13bfc73
add missing super-visit
peq Feb 1, 2020
500c250
fixed NPE and tests
peq Feb 2, 2020
949a2ce
dependent constraints for classes
peq Feb 2, 2020
895a31f
some memory usage tweaks for travis
peq Feb 2, 2020
5e15802
increase heap size for travis
peq Feb 2, 2020
2bd0928
super-type constraint with dependency
peq Feb 4, 2020
39f8512
iterator example
peq Feb 9, 2020
a278a25
namespacing
peq Feb 9, 2020
ae31eb1
Type Check: All functions implemented correctly
peq Feb 9, 2020
02b06d6
added simple divergence check
peq Feb 9, 2020
464c9b0
basic support for derived ToIndex for object types
peq Feb 9, 2020
08dd207
support for multiple constraints
peq Feb 10, 2020
ca65678
fixed tests
peq Feb 11, 2020
9a45d20
fixed classcast exception
peq Feb 12, 2020
53250f4
default type class for classes
peq Feb 12, 2020
aae43e0
fix 464c9b0
peq Feb 12, 2020
4311d89
prefer overloads without type class constraints
peq Feb 12, 2020
9cc999d
overloading
peq Feb 12, 2020
b20a0b3
fix override check
peq Feb 13, 2020
3c09717
re-enable lua tests
peq Feb 13, 2020
1e263e0
removed any-type
peq Feb 13, 2020
ade9643
remove restriction to certain tests
peq Feb 13, 2020
040b04f
fixed bugs
peq Feb 13, 2020
4937df8
correct handling of public imports
peq Feb 13, 2020
8723ef1
fix lua: protect main
peq Feb 13, 2020
2303938
add correct submethods
peq Feb 14, 2020
1bcc0c1
one more test for subclasses
peq Feb 14, 2020
14bdfd1
fixed bug in for-loop translation (wip)
peq Feb 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed debug
  • Loading branch information
peq committed Jan 31, 2020
commit 3aecaa2b51a3fc789f04a2d8dae4a2f844627d7d
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public class ImTranslator {
private final Map<ExprFunctionCall, Integer> compiletimeExpressionsOrder = new HashMap<>();

de.peeeq.wurstscript.ast.Element lasttranslatedThing;
private boolean debug = true;
private boolean debug = false;
private final RunArgs runArgs;

public ImTranslator(WurstModel wurstProg, boolean isUnitTestMode, RunArgs runArgs) {
Expand Down Expand Up @@ -1728,7 +1728,6 @@ public ImFunctionCall imError(de.peeeq.wurstscript.ast.Element trace, ImExpr mes
if (ef == null) {
Optional<ImFunction> f = findErrorFunc().map(this::getFuncFor);
ef = errorFunc = f.orElseGet(this::makeDefaultErrorFunc);
imProg.getFunctions().add(errorFunc);
}
ImExprs arguments = JassIm.ImExprs(message);
return ImFunctionCall(trace, ef, ImTypeArguments(), arguments, false, CallType.NORMAL);
Expand Down Expand Up @@ -1757,7 +1756,9 @@ private ImFunction makeDefaultErrorFunc() {

List<FunctionFlag> flags = Lists.newArrayList();

return ImFunction(emptyTrace, "error", ImTypeVars(), parameters, returnType, locals, body, flags);
ImFunction result = ImFunction(emptyTrace, "error", ImTypeVars(), parameters, returnType, locals, body, flags);
imProg.getFunctions().add(result);
return result;
}


Expand Down