]> gitweb.factorcode.org Git - factor.git/commitdiff
Found a few more places to use lookup-c-type
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 24 Oct 2011 22:57:37 +0000 (15:57 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 24 Oct 2011 22:58:40 +0000 (15:58 -0700)
basis/alien/complex/complex.factor
basis/classes/struct/struct.factor
basis/cpu/ppc/32/linux/linux.factor
basis/cpu/ppc/64/linux/linux.factor
basis/cpu/ppc/ppc.factor
basis/gobject-introspection/types/types.factor
extra/cuda/ffi/ffi.factor
extra/cuda/types/types.factor
extra/llvm/invoker/invoker.factor

index fbf28071d013744f6c074f18d2d524256205374b..eb28d95b5e91c6b1c1f7e6bee501c32b2245b6ee 100644 (file)
@@ -11,5 +11,5 @@ IN: alien.complex
 <<
 ! This overrides the fact that small structures are never returned
 ! in registers on NetBSD, Linux and Solaris running on 32-bit x86.
-\ complex-float c-type t >>return-in-registers? drop
+\ complex-float lookup-c-type t >>return-in-registers? drop
 >>
index 5a1cefc8d152080c5a758455a9c27d83bf2134fa..d3b4f5c962199460d2cf8cf29de5f2b5d40ca498 100644 (file)
@@ -173,7 +173,6 @@ TUPLE: struct-c-type < abstract-c-type
 
 INSTANCE: struct-c-type value-type
 
-! M: struct-c-type c-type ;
 M: struct-c-type lookup-c-type ;
 
 M: struct-c-type base-type ;
index 27b9f123ae70ccd9bedef5e66600ece259f136b6..187de4e7842d8d76fc17ae45c9e9188f47bfffae 100644 (file)
@@ -20,8 +20,8 @@ M: ppc param-regs
     } ;
 
 M: ppc value-struct?
-    c-type [ complex-double c-type = ]
-    [ complex-float c-type = ] bi or ;
+    lookup-c-type [ complex-double lookup-c-type = ]
+    [ complex-float lookup-c-type = ] bi or ;
 
 M: ppc dummy-stack-params? f ;
 
@@ -37,10 +37,10 @@ M: ppc float-right-align-on-stack? f ;
 
 M: ppc flatten-struct-type ( type -- seq )
     {
-        { [ dup c-type complex-double c-type = ]
+        { [ dup lookup-c-type complex-double lookup-c-type = ]
           [ drop { { int-rep f f } { int-rep f f }
                    { int-rep f f } { int-rep f f } } ] }
-        { [ dup c-type complex-float c-type = ]
+        { [ dup lookup-c-type complex-float lookup-c-type = ]
           [ drop { { int-rep f f } { int-rep f f } } ] }
         [ call-next-method [ first t f 3array ] map ]
     } cond ;
index 70a9aed5ca19886536aeed1c978058ebbec86390..6b4df01173559fe3d385ab5be29494a6cb590e9c 100644 (file)
@@ -35,18 +35,18 @@ M: ppc float-right-align-on-stack? t ;
 
 M: ppc flatten-struct-type ( type -- seq )
     {
-        { [ dup c-type complex-double c-type = ]
+        { [ dup lookup-c-type complex-double lookup-c-type = ]
           [ drop { { double-rep f f } { double-rep f f } } ] }
-        { [ dup c-type complex-float c-type = ]
+        { [ dup lookup-c-type complex-float lookup-c-type = ]
           [ drop { { float-rep f f } { float-rep f f } } ] }
         [ heap-size cell align cell /i { int-rep f f } <repetition> ]
     } cond ;
 
 M: ppc flatten-struct-type-return ( type -- seq )
     {
-        { [ dup c-type complex-double c-type = ]
+        { [ dup lookup-c-type complex-double lookup-c-type = ]
           [ drop { { double-rep f f } { double-rep f f } } ] }
-        { [ dup c-type complex-float c-type = ]
+        { [ dup lookup-c-type complex-float lookup-c-type = ]
           [ drop { { float-rep f f } { float-rep f f } } ] }
         [ heap-size cell align cell /i { int-rep t f } <repetition> ]
     } cond ;
index 078f9a7bc9f9ee755996291ac80dca34a4093ddf..754ecb3bc1ec8b4bd06ba7d856993ed55c3cfc93 100644 (file)
@@ -360,7 +360,7 @@ M: ppc return-regs ( -- regs )
 
 ! Is this structure small enough to be returned in registers?
 M: ppc return-struct-in-registers? ( c-type -- ? )
-    c-type return-in-registers?>> ;
+    lookup-c-type return-in-registers?>> ;
 
 ! If t, floats are never passed in param regs
 M: ppc float-on-stack? ( -- ? ) f ;
@@ -1081,4 +1081,4 @@ USE: vocabs.loader
     [ ]
 } cond
 
-complex-double c-type t >>return-in-registers? drop
+complex-double lookup-c-type t >>return-in-registers? drop
index f563b87853f2ed20075b388e588eca099483692b..05ec8ef5db2a82c23a1911289449750ac08dda5c 100644 (file)
@@ -85,7 +85,7 @@ ERROR: unknown-type-error type ;
     qualified-type-name type-infos get-global at ;
 
 :: register-type ( c-type type-info name -- )
-    type-info c-type >>c-type name
+    type-info lookup-c-type >>c-type name
     type-infos get-global set-at ;
 
 : register-standard-type ( c-type name -- )
@@ -104,7 +104,7 @@ ERROR: unknown-type-error type ;
 ERROR: deferred-type-error ;
 
 <<
-void* c-type clone
+void* lookup-c-type clone
     [ drop deferred-type-error ] >>unboxer-quot
     [ drop deferred-type-error ] >>boxer-quot
     object >>boxed-class
index c0537bea8dc540348410072cb5309f07ace8b2a3..a7d5f9d81f6656b46a01e75d45a44acdc4b3cef3 100644 (file)
@@ -32,9 +32,9 @@ SYMBOLS: CUdouble CUlonglong CUulonglong ;
 : always-8-byte-align ( c-type -- c-type )
     8 >>align 8 >>align-first ;
 
-longlong  c-type clone always-8-byte-align \ CUlonglong  typedef
-ulonglong c-type clone always-8-byte-align \ CUulonglong typedef
-double    c-type clone always-8-byte-align \ CUdouble    typedef
+longlong  lookup-c-type clone always-8-byte-align \ CUlonglong  typedef
+ulonglong lookup-c-type clone always-8-byte-align \ CUulonglong typedef
+double    lookup-c-type clone always-8-byte-align \ CUdouble    typedef
 >>
 
 STRUCT: CUuuid
index 7d16685d8e34847dfaf0f6d7f489b449280f682b..99be696cbeab5700ad2a9bc70f54247f54a3397a 100644 (file)
@@ -183,110 +183,110 @@ STRUCT: double4
     { z double }
     { w double } ;
 
-char2 c-type 
+char2 lookup-c-type 
     2 >>align
     2 >>align-first
     drop
-char4 c-type 
+char4 lookup-c-type 
     4 >>align
     4 >>align-first
     drop
 
-uchar2 c-type 
+uchar2 lookup-c-type 
     2 >>align
     2 >>align-first
     drop
-uchar4 c-type 
+uchar4 lookup-c-type 
     4 >>align
     4 >>align-first
     drop
 
-short2 c-type 
+short2 lookup-c-type 
     4 >>align
     4 >>align-first
     drop
-short4 c-type 
+short4 lookup-c-type 
     8 >>align
     8 >>align-first
     drop
 
-ushort2 c-type 
+ushort2 lookup-c-type 
     4 >>align
     4 >>align-first
     drop
-ushort4 c-type 
+ushort4 lookup-c-type 
     8 >>align
     8 >>align-first
     drop
 
-int2 c-type 
+int2 lookup-c-type 
     8 >>align
     8 >>align-first
     drop
-int4 c-type 
+int4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-uint2 c-type 
+uint2 lookup-c-type 
     8 >>align
     8 >>align-first
     drop
-uint4 c-type 
+uint4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-long2 c-type 
+long2 lookup-c-type 
     long heap-size 2 * >>align
     long heap-size 2 * >>align-first
     drop
-long4 c-type 
+long4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-ulong2 c-type 
+ulong2 lookup-c-type 
     long heap-size 2 * >>align
     long heap-size 2 * >>align-first
     drop
-ulong4 c-type 
+ulong4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-longlong2 c-type 
+longlong2 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
-longlong4 c-type 
+longlong4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-ulonglong2 c-type 
+ulonglong2 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
-ulonglong4 c-type 
+ulonglong4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-float2 c-type 
+float2 lookup-c-type 
     8 >>align
     8 >>align-first
     drop
-float4 c-type 
+float4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
 
-double2 c-type 
+double2 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
-double4 c-type 
+double4 lookup-c-type 
     16 >>align
     16 >>align-first
     drop
index 20fb7e8f62e4f849db5769ab029f4a645599794d..4fd68d3965adda409dcac149be9ec4056da4ac98 100644 (file)
@@ -40,8 +40,8 @@ TUPLE: function name alien return params ;
     "alien.llvm" create swap
     [
         dup name>> function-pointer ,
-        dup return>> c-type ,
-        dup params>> [ second c-type ] map ,
+        dup return>> lookup-c-type ,
+        dup params>> [ second lookup-c-type ] map ,
         cdecl , \ alien-indirect ,
     ] [ ] make swap function-effect [ define-declared ] with-compilation-unit ;