MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / forceValidateForComponent

Method forceValidateForComponent

include/vm/vm.h:151–159  ·  view source on GitHub ↗

Force-set the VM stage to Validated for a loaded component without actually running validation. Only used in spec tests and will be removed when component-model is fully supported. Returns failure if no component is loaded.

Source from the content-addressed store, hash-verified

149 /// when component-model is fully supported.
150 /// Returns failure if no component is loaded.
151 Expect<void> forceValidateForComponent() {
152 std::unique_lock Lock(Mutex);
153 if (Stage < VMStage::Loaded || !Comp) {
154 return Unexpect(ErrCode::Value::WrongVMWorkflow);
155 }
156 Comp->setIsValidated();
157 Stage = VMStage::Validated;
158 return {};
159 }
160
161 /// ======= Functions can be called after the validated stage. =======
162 /// Instantiate validated wasm module.

Callers 1

TEST_PFunction · 0.80

Calls 2

UnexpectFunction · 0.85
setIsValidatedMethod · 0.45

Tested by 1

TEST_PFunction · 0.64