diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index 9cfd5258f..51782ee7d 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -133,7 +133,7 @@ const getNextFuncIndex = (ast, countImportedFunc) => { }; /** - * Create a init instruction for a global + * Creates an init instruction for a global type * @param {t.GlobalType} globalType the global type * @returns {t.Instruction} init expression */ @@ -156,7 +156,7 @@ const createDefaultInitForGlobal = globalType => { /** * Rewrite the import globals: * - removes the ModuleImport instruction - * - injects at the same offset a mutable global of the same time + * - injects at the same offset a mutable global of the same type * * Since the imported globals are before the other global declarations, our * indices will be preserved. @@ -206,7 +206,7 @@ const rewriteImportedGlobals = state => bin => { additionalInitCode.push( /** - * get_global in global initilizer only work for imported globals. + * get_global in global initializer only works for imported globals. * They have the same indices than the init params, so use the * same index. */