req::ptr<StringData> String::buildString(int n) { const StringData* sd = GetIntegerStringData(n); if (sd) { assert(sd->isStatic()); return req::ptr<StringData>::attach(const_cast<StringData*>(sd)); } return req::ptr<StringData>::attach(buildStringData(n)); }
String::String(int n) { const StringData *sd = GetIntegerStringData(n); if (sd) { assert(sd->isStatic()); m_px = (StringData *)sd; return; } m_px = buildStringData(n); m_px->setRefCount(1); }
HOT_FUNC String::String(int64 n) { const StringData *sd = GetIntegerStringData(n); if (sd) { ASSERT(sd->isStatic()); m_px = (StringData *)sd; return; } m_px = buildStringData(n); m_px->setRefCount(1); }