RTC::Room* Loop::GetRoomFromRequest(Channel::Request* request, uint32_t* roomId) { MS_TRACE(); static const Json::StaticString k_roomId("roomId"); auto json_roomId = request->internal[k_roomId]; if (!json_roomId.isUInt()) MS_THROW_ERROR("Request has not numeric internal.roomId"); // If given, fill roomId. if (roomId) *roomId = json_roomId.asUInt(); auto it = this->rooms.find(json_roomId.asUInt()); if (it != this->rooms.end()) { RTC::Room* room = it->second; return room; } else { return nullptr; } }
void JitFragmentWriter::emitDelName(InternedString name) { call(false, (void*)ASTInterpreterJitInterface::delNameHelper, getInterp(), #ifndef NDEBUG imm(asUInt(name).first), imm(asUInt(name).second)); #else imm(asUInt(name))); #endif }
RewriterVar* JitFragmentWriter::emitDeref(InternedString s) { return call(false, (void*)ASTInterpreterJitInterface::derefHelper, getInterp(), #ifndef NDEBUG imm(asUInt(s).first), imm(asUInt(s).second)); #else imm(asUInt(s))); #endif }
void JitFragmentWriter::emitSetLocal(InternedString s, int vreg, bool set_closure, RewriterVar* v) { assert(vreg >= 0); if (set_closure) { call(false, (void*)ASTInterpreterJitInterface::setLocalClosureHelper, getInterp(), imm(vreg), #ifndef NDEBUG imm(asUInt(s).first), imm(asUInt(s).second), #else imm(asUInt(s)), #endif v); } else { vregs_array->setAttr(8 * vreg, v); } }
LargestUInt Value::asLargestUInt() const { #if defined(JSON_NO_INT64) return asUInt(); #else return asUInt64(); #endif }