]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Internal.hpp
Unix domain sockets are often walled by sandboxes.
[cycript.git] / ObjectiveC / Internal.hpp
index 8606d55fa6941e719a2bf17e14e7671648b97749..79f455b240613e622786bd75656803b820da6763 100644 (file)
 #include "../Internal.hpp"
 
 struct Selector_privateData :
-    CYValue<Selector_privateData, SEL>
+    CYRoot
 {
+    SEL value_;
+
     _finline Selector_privateData(SEL value) :
-        CYValue(value)
+        value_(value)
     {
     }
 };
 
 struct Instance :
-    CYValue<Instance, id>
+    CYRoot
 {
-    enum Flags {
-        None          = 0,
-        Permanent     = (1 << 0),
-        Uninitialized = (1 << 1),
-    };
+    typedef unsigned Flags;
+    static const Flags None = 0;
+    static const Flags Permanent = 1 << 0;
+    static const Flags Uninitialized = 1 << 1;
 
+    id value_;
     Flags flags_;
 
     Instance(id value, Flags flags);
@@ -53,29 +55,55 @@ struct Instance :
 
     static JSClassRef GetClass(id value, Flags flags);
 
+    _finline bool IsPermanent() const {
+        return (flags_ & Permanent) != 0;
+    }
+
     _finline bool IsUninitialized() const {
         return (flags_ & Uninitialized) != 0;
     }
 };
 
+struct Block :
+    Instance
+{
+    using Instance::Instance;
+};
+
+struct Constructor :
+    Instance
+{
+    using Instance::Instance;
+};
+
 namespace cy {
 struct Super :
-    CYValue<Super, id>
+    CYRoot
 {
+    id value_;
     Class class_;
 
     _finline Super(id value, Class _class) :
-        CYValue(value),
+        value_(value),
         class_(_class)
     {
     }
 }; }
 
+struct Prototype :
+    CYRoot
+{
+};
+
 struct Messages :
-    CYValue<Messages, Class>
+    CYRoot
 {
+    static constexpr const char *const Cache_ = "p";
+
+    Class value_;
+
     _finline Messages(Class value) :
-        CYValue(value)
+        value_(value)
     {
     }
 
@@ -83,12 +111,13 @@ struct Messages :
 };
 
 struct Interior :
-    CYValue<Interior, id>
+    CYRoot
 {
+    id value_;
     CYProtect owner_;
 
     _finline Interior(id value, JSContextRef context, JSObjectRef owner) :
-        CYValue(value),
+        value_(value),
         owner_(context, owner)
     {
     }