Permalink
Browse files

use the new syntax for new initialization

  • Loading branch information...
1 parent 4eeeee6 commit cc8daf90aa407c9d00c615ede7cc12f641a1a7f0 @NotFound committed Jun 18, 2012
Showing with 7 additions and 7 deletions.
  1. +3 −3 winxedxc.winxed
  2. +4 −4 winxedxx.winxed
View
@@ -146,7 +146,7 @@ class WinxedCompiler
var parsed = self.winxed.compile_from_file(sourcefile,
"parse":[named("target")]
);
- var output = new WinxedXX.Output(outhandle);
+ :WinxedXX.Output output(outhandle);
output.emit(parsed);
}
}
@@ -277,7 +277,7 @@ function main [main](var argv)
{
using namespace WinxedXC;
- var cloptions = new Options(argv);
+ :Options cloptions(argv);
string target = cloptions.getstring("target", "run");
string outfile = cloptions.getstring("o");
string stage = cloptions.getstring("stage");
@@ -376,7 +376,7 @@ function main [main](var argv)
//--------------------------------------------------
// Compile the generated C++ to obj.
var cxxconfig = config["cxx"];
- var cxx = new CompilerCxx(cxxconfig);
+ :CompilerCxx cxx(cxxconfig);
for (string cxxfile in cxxfiles) {
if (verbose)
say("Compiling C++: ", cxxfile);
View
@@ -1993,7 +1993,7 @@ function emit_define_local(out, funst, string dataname)
"::operator() (const ", Type_PMCArray, " & wxx_fun_args)\n");
out.print("{\n" );
- var emitlocal = new EmitFunction(funst);
+ :EmitFunction emitlocal(funst);
emitlocal.emit_params(out);
var usedlexicals = funst.usedlexicals;
@@ -2082,7 +2082,7 @@ class EmitFunction
function emit_FunctionStatement(out, funst, string prefix[optional])
{
- var emitfun = new EmitFunction(funst);
+ :EmitFunction emitfun(funst);
string name = funst.name;
int ismethod = funst.ismethod();
@@ -2303,7 +2303,7 @@ class NamespaceGen
push(genitems, item);
}
else if (item instanceof NamespaceStatement) {
- var child = new ChildNamespaceGen(item);
+ :ChildNamespaceGen child(item);
push(genchilds, child);
push(genitems, child);
}
@@ -2578,7 +2578,7 @@ INITIALIZEREND:>>
self.print(HEADER);
- var nsgen = new RootNamespaceGen(ns);
+ :RootNamespaceGen nsgen(ns);
self.nsgen = nsgen;
nsgen.emit_declare(self);
nsgen.emit_declare_subid(self);

0 comments on commit cc8daf9

Please sign in to comment.