Beispiel #1
0
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));
}
Beispiel #2
0
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);
}
Beispiel #3
0
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);
}