Get rid of StSw craziness and use lsllastpass to make another pass.
This has been a TODO item for long. Now that we have lsllastpass, it's actually easy to implement. Adds an LSLTypeDefaults dictionary to lslcommon, just in case the state-changing function returns a value and we need to insert a return statement. We've also added subtree-local info to lsllastpass (lost when we return to the parent after visiting a subtree). This fixes a bug where naked switch statements could appear as a result of optimization, and cause the compilation to fail.
This commit is contained in:
@@ -272,7 +272,7 @@ class Test03_Optimizer(UnitTestCase):
|
||||
vector vvvv2=vvvv;
|
||||
float ffff3 = v.z;
|
||||
integer fn(){
|
||||
if (1) state default; else return 2;
|
||||
if (1) state default;
|
||||
return fn();}
|
||||
|
||||
default{touch(integer n){
|
||||
|
||||
Reference in New Issue
Block a user