constructor(wasmModule, importObject = {}, wasmInstance, env) {
	        this.cacheMetadata = {};
	        this.initProgressCallback = [];
	        if (wasmInstance instanceof WebAssembly.Instance) {
	            support.assert(env instanceof environment.Environment, "env must be provided when passing in instance");
	        }
	        else {
	            support.assert(env === undefined);
	            env = new environment.Environment(importObject);
	            wasmInstance = new WebAssembly.Instance(wasmModule, env.imports);
	        }
	        env.start(wasmInstance);
	        this.env = env;
	        this.lib = new FFILibrary(wasmInstance, env.imports);
	        this.memory = this.lib.memory;
	        this.exports = this.lib.exports;
	        this.objFactory = new Map();
	        this.ctx = new RuntimeContext((name) => {
	            const autoAttachToScope = false;
	            // runtime context function do not auto-release.
	            return this.getGlobalFuncInternal(name, autoAttachToScope);
	        });
	        this.registerEnvGlobalPackedFuncs();
	        this.registerObjectFactoryFuncs();
	    }
Constructor

importObject can also be a {@link LibraryProvider} object,
a WASI object, or an object containing wasmLibraryProvider field.

@param wasmModule The input module or instance.
@param importObject The imports to initialize the wasmInstance if it is not provided.
@param wasmInstance Additional wasm instance argument for deferred construction.
@param env Directly specified environment module.

@see Please use the async version {@link instantiate} when targeting browsers.