inlinevoid InterpreterCache::Set(Thread* self, constvoid* key, size_t value) {
DCHECK(self->GetInterpreterCache() == this) << "Must be called from owning thread"; // Simple store works here as the cache is always read/written by the owning // thread only (or in a stop-the-world pause).
data_[IndexOf(key)] = Entry{key, value};
}
inlinevoid InterpreterCache::SetInt64(Thread* self, constvoid* key, uint64_t value) {
DCHECK(self->GetInterpreterCache() == this) << "Must be called from owning thread"; // Simple store works here as the cache is always read/written by the owning // thread only (or in a stop-the-world pause).
size_t index = IndexOf(key); if (kRuntimePointerSize == PointerSize::k64) {
data_[index] = Entry{key, value};
} else {
data_[index & ~1] = Entry{key, static_cast<uint32_t>(value)};
data_[index | 1] = Entry{key, static_cast<uint32_t>(value >> 32)};
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.