-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
This works in ch21 not in ch22:
val fib = {int n ->
int temp=0;
int f1=1;
int f2=1;
int i=n;
while( i>1 ){
temp = f1+f2;
f1=f2;
f2=temp;
i=i-1;
}
return f2;
};
fib(10);
I am getting:
Exception in thread "main" java.lang.NullPointerException: Cannot read field "_head" because "ltree" is null
at com.seaofnodes.simple.node.CFGNode._bltWalk(CFGNode.java:170)
at com.seaofnodes.simple.node.CFGNode._bltWalk(CFGNode.java:152)
at com.seaofnodes.simple.node.CFGNode._bltWalk(CFGNode.java:152)
at com.seaofnodes.simple.node.CFGNode.buildLoopTree(CFGNode.java:143)
at com.seaofnodes.simple.codegen.CodeGen.loopTree(CodeGen.java:244)
at com.seaofnodes.simple.Simple.main(Simple.java:233)
I am running this in Simple cmd line with following args:
--dump-after-local-sched -S --cpu x86_64_v2 --abi SystemV
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels