IoObject *IoState_on_doCString_withLabel_(IoState *self, IoObject *target, const char *s, const char *label) { IoObject *result; IoState_pushRetainPool(self); { IoMessage *m = IoMessage_newWithName_andCachedArg_(self, SIOSYMBOL("doString"), SIOSYMBOL(s)); if (label) { IoMessage_addCachedArg_(m, SIOSYMBOL(label)); } IoState_zeroSandboxCounts(self); result = IoState_tryToPerform(self, target, target, m); } IoState_popRetainPoolExceptFor_(self, result); return result; }
void IoBlock::add_arg(IoMessage* m, ExprPtr expr) const { if (!m->object) throw std::logic_error("Invalid message target; message object is null"); IoMessage_addCachedArg_(m, iovm->to_script(io_block, io_block, m, expr)); }
IoMessage *IoMessage_newWithName_andCachedArg_(void *state, IoSymbol *symbol, IoObject *arg) { IoMessage *self = IoMessage_newWithName_(state, symbol); IoMessage_addCachedArg_(self, arg); return self; }