SWAPを実装
This commit is contained in:
@@ -886,6 +886,12 @@ class Compiler
|
||||
compilePopVar(i, sc);
|
||||
}
|
||||
}
|
||||
void compileSwap(Swap swap, Scope sc)
|
||||
{
|
||||
compilePushReference(swap.item2, sc);
|
||||
compilePushReference(swap.item1, sc);
|
||||
genCode(new SwapCode());
|
||||
}
|
||||
void compileStatement(Statement i, Scope s)
|
||||
{
|
||||
switch(i.type)
|
||||
@@ -1132,6 +1138,9 @@ class Compiler
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NodeType.Swap:
|
||||
compileSwap(cast(Swap)i, s);
|
||||
break;
|
||||
default:
|
||||
stderr.writeln("Compile:NotImpl ", i.type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user