
DONE
Wrap a finally check around the finally body 

------------------------------------------------------------------

DONE
Don't set the pc in catch if there is a user finally

------------------------------------------------------------------

DONE
In compiled code, remove the import jcilk_stub;

------------------------------------------------------------------

DONE
In Slow clone finally, call replaceSlowWithFinallet first then change pc

------------------------------------------------------------------

DONE
Compiling error checking:
What can be done in typeChecker:
%- type conversion for spawn ... no explicit checking.  Whatever auto-
%  upcast is allowed in Java is allowed in JCilk.  
%- regular method has to be called; cilk method has to spawned  
%- Disallow user to use CilkMain as regular method name
%- a cilk method can only be declared within a regular class; can't be declared
%  within an inner or anonymous class, otherwise the runtime has no access to it.
%- put in the check to forbid use of cilk w/ synchronized flag in method header
%- put in the check to forbid use of spawn/sync in synchronized blocks
%  (Can anything else be declared with Synchronized flag?)
%- put in the check to forbid use of spawn/sync in regular try blocks
%- put in the check to forbid use of spawn/sync in regular catch blocks
%- put in the check to forbid use of break/continue in cilk catch/finally
%  blocks

------------------------------------------------------------------

DONE
%CilkAbort should be its own type of Throwable. 
%Append "throwing CilkAbort" in every cilk method

------------------------------------------------------------------

DONE
The return statement in catchlet would break things right now
% Remember to do setResult(null) if the method has no return value: DONE
% Need to do setResult too if there is a return in catch/finally: DONE
 
------------------------------------------------------------------

DONE 

Need to enforce the rethrow of exceptions in CilkAbort
CilkAbort currently is a Throwable 

NOTE: 
Two approaches: Compile time check vs Runtime automatically rethrow.
Compile time check:
- Need to ensure, for every path exiting the catch(CilkAbort) block, 
  there is a rethrow. (no return, and when insert a statement at the end,
  that statement should be unreachable).
- If there is a finally block associated with the catch(CilkAbort) block,
  that finally block can not contain any return or throw statement.

Runtime auto insert:
- Insert a finally block after catch(CilkAbort), and throw new CilkAbort 
  (Has to create a new one because the old one can't be accessed unless
  it is executed as a finallet).  
- If the user code ontains a finally block already, need to wrap another
  outer finally around it and rethrow.

## What happens to the finallet and catchlet??
Just rethrow ... cause that throw propagates back to runtime, and runtime
will propagate it back to the "correct" parent, right? How?
Does the parent always have to be the slow clone?

------------------------------------------------------------------

DONE (I think)
The Catchlet* mechanism is not handling the Exception/Throwable instances
in the correct order (corresponding to user order).  Fix it! 
(See TestCatchlet01.jcilk)

------------------------------------------------------------------

In each frame, the variable no longer needs to be volatile

------------------------------------------------------------------

For finallet stuff:
pickup and altitude stay the same, but the exception passed in will be null.
In the slow clone:

finally {
  if( isFinallyPartiallySynced() ) {
      pc = /* whatever corresponding catch sets too */;
      // the original finally body
  }
  else {
      pc = /* whatever corresponding catch sets too */;
      replaceSlowCloneWithFinallet(pc);
  }

------------------------------------------------------------------

