-/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2015 Jay Freeman (saurik)
+/* Cycript - The Truly Universal Scripting Language
+ * Copyright (C) 2009-2016 Jay Freeman (saurik)
*/
/* GNU Affero General Public License, Version 3 {{{ */
return $ CYTypedIdentifier($ CYTypeIntegral(CYTypeSigned, 1));
}
+#ifdef __SIZEOF_INT128__
+template <>
+CYTypedIdentifier *Primitive<signed __int128>::Decode(CYPool &pool) const {
+ return $ CYTypedIdentifier($ CYTypeInt128(CYTypeSigned));
+}
+#endif
+
template <>
CYTypedIdentifier *Primitive<signed long int>::Decode(CYPool &pool) const {
return $ CYTypedIdentifier($ CYTypeIntegral(CYTypeSigned, 2));
return $ CYTypedIdentifier($ CYTypeIntegral(CYTypeUnsigned, 1));
}
+#ifdef __SIZEOF_INT128__
+template <>
+CYTypedIdentifier *Primitive<unsigned __int128>::Decode(CYPool &pool) const {
+ return $ CYTypedIdentifier($ CYTypeInt128(CYTypeUnsigned));
+}
+#endif
+
template <>
CYTypedIdentifier *Primitive<unsigned long int>::Decode(CYPool &pool) const {
return $ CYTypedIdentifier($ CYTypeIntegral(CYTypeUnsigned, 2));
return $ CYTypedIdentifier($ CYTypeCharacter(CYTypeNeutral), $ CYTypePointerTo());
}
+#ifdef CY_OBJECTIVEC
CYTypedIdentifier *Meta::Decode(CYPool &pool) const {
return $ CYTypedIdentifier($ CYTypeVariable("Class"));
}
CYTypedIdentifier *Selector::Decode(CYPool &pool) const {
return $ CYTypedIdentifier($ CYTypeVariable("SEL"));
}
+#endif
CYTypedIdentifier *Bits::Decode(CYPool &pool) const {
_assert(false);
return CYDecodeType(pool, &type)->Modify($ CYTypeArrayOf($D(size)));
}
+#ifdef CY_OBJECTIVEC
CYTypedIdentifier *Object::Decode(CYPool &pool) const {
if (name == NULL)
return $ CYTypedIdentifier($ CYTypeVariable("id"));
else
return $ CYTypedIdentifier($ CYTypeVariable(name), $ CYTypePointerTo());
}
+#endif
CYTypedIdentifier *Aggregate::Decode(CYPool &pool) const {
_assert(!overlap);
return result->Modify($ CYTypeFunctionWith(variadic, parameters));
}
+#ifdef CY_OBJECTIVEC
CYTypedIdentifier *Block::Modify(CYPool &pool, CYTypedIdentifier *result, CYTypedParameter *parameters) const {
return result->Modify($ CYTypeBlockWith(parameters));
}
return $ CYTypedIdentifier($ CYTypeVariable("NSBlock"), $ CYTypePointerTo());
return Callable::Decode(pool);
}
+#endif
}