]> git.lizzy.rs Git - rust.git/commitdiff
trans: remove Closure
authorJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 00:27:20 +0000 (19:27 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 22:22:15 +0000 (17:22 -0500)
src/librustc_trans/trans/callee.rs

index 8048d0218df2d5d375328464514a556b85034b5f..11f52ad62202ea7e6a2ca41b54f6d3ce501e7d00 100644 (file)
@@ -66,8 +66,6 @@ pub struct MethodData {
 }
 
 pub enum CalleeData<'tcx> {
-    Closure(Datum<'tcx, Lvalue>),
-
     // Constructor for enum variant/tuple-like-struct
     // i.e. Some, Ok
     NamedTupleConstructor(subst::Substs<'tcx>, ty::Disr),
@@ -681,16 +679,6 @@ pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
         TraitItem(d) => {
             (d.llfn, None, Some(d.llself))
         }
-        Closure(d) => {
-            // Closures are represented as (llfn, llclosure) pair:
-            // load the requisite values out.
-            let pair = d.to_llref();
-            let llfn = GEPi(bcx, pair, &[0u, abi::FAT_PTR_ADDR]);
-            let llfn = Load(bcx, llfn);
-            let llenv = GEPi(bcx, pair, &[0u, abi::FAT_PTR_EXTRA]);
-            let llenv = Load(bcx, llenv);
-            (llfn, Some(llenv), None)
-        }
         Intrinsic(node, substs) => {
             assert!(abi == synabi::RustIntrinsic);
             assert!(dest.is_some());