Show
Ignore:
Timestamp:
07/02/09 07:59:33 (5 months ago)
Author:
jrhil47
Message:

[index] Changed all Functional indices to store a thunk to get the return types, since during type checking the return types might need to be lazily evaluated. Also changed Functional indices to yield an Option for return types.
[type checker] Started implementing extraction of bindings from nodes for type environments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/src/com/sun/fortress/compiler/index/DeclaredMethod.java

    r3366 r3915  
    2121import java.util.List; 
    2222 
     23import com.sun.fortress.compiler.Types; 
    2324import com.sun.fortress.compiler.typechecker.StaticTypeReplacer; 
    2425import com.sun.fortress.nodes.BaseType; 
     
    3637import com.sun.fortress.nodes_util.Span; 
    3738 
     39import edu.rice.cs.plt.lambda.SimpleBox; 
    3840import edu.rice.cs.plt.tuple.Option; 
    3941 
     
    4648        _ast = ast; 
    4749        _declaringTrait = declaringTrait; 
     50        putThunk(SimpleBox.make(NodeUtil.getReturnType(_ast))); 
    4851    } 
    4952 
     
    9396 
    9497        @Override 
    95         public Type getReturnType() { 
    96                 return NodeUtil.getReturnType(_ast).unwrap(); 
    97         } 
    98  
    99         @Override 
    10098        public Id getDeclaringTrait() { 
    10199                return this._declaringTrait;