void DebugFrame::alignmentStaticAsserts() { // VS2017 doesn't consider offsetOfFrame() to be a constexpr, so we have // to use offsetof directly. These asserts can't be at class-level // because the type is incomplete.
static_assert(WasmStackAlignment >= Alignment, "Aligned by ABI before pushing DebugFrame"); #ifndef JS_CODEGEN_NONE
static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0, "Aligned after pushing DebugFrame"); #endif #ifdef JS_CODEGEN_ARM64 // This constraint may or may not be necessary. If you hit this because // you've changed the frame size then feel free to remove it, but be extra // aware of possible problems.
static_assert(sizeof(DebugFrame) % 16 == 0, "ARM64 SP alignment"); #endif
}
uint8_t* frame = static_cast<uint8_t*>((void*)this) + offsetOfFrame(); void* dataPtr = frame - iter.frameOffset(); switch (iter.mirType()) { case jit::MIRType::Int32:
vp.set(Int32Value(*static_cast<int32_t*>(dataPtr))); break; case jit::MIRType::Int64: // Just display as a Number; it's ok if we lose some precision
vp.set(NumberValue((double)*static_cast<int64_t*>(dataPtr))); break; case jit::MIRType::Float32:
vp.set(NumberValue(*static_cast<float*>(dataPtr))); break; case jit::MIRType::Double:
vp.set(NumberValue(*static_cast<double*>(dataPtr))); break; case jit::MIRType::WasmAnyRef:
vp.set(((AnyRef*)dataPtr)->toJSValue()); break; #ifdef ENABLE_WASM_SIMD case jit::MIRType::Simd128:
vp.set(NumberValue(0)); break; #endif default:
MOZ_CRASH("local type");
} returntrue;
}
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.