Unfortunately, that isn't possible. While an object literal is being constructed, no external reference to that object exists until the entire literal is evaluated. The only way to use this
at this stage is to use a constructor instead:
function MyObject() {
this.var1 = 1;
this.var2 = 2;
this.var3 = this.var1 + this.var2;
}
myfunc(new MyObject());