Skip to content

Commit 587c9b6

Browse files
[Docs] Fix typos [NFC] (#21395)
1 parent b4f224e commit 587c9b6

33 files changed

+77
-77
lines changed

emar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# University of Illinois/NCSA Open Source License. Both these licenses can be
55
# found in the LICENSE file.
66

7-
"""Wrapper scripte around `llvm-ar`.
7+
"""Wrapper script around `llvm-ar`.
88
"""
99

1010
import sys

embuilder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def main():
232232
auto_tasks = False
233233
task_targets = dict.fromkeys(args.targets) # use dict to keep targets order
234234

235-
# subsitute
235+
# substitute
236236
predefined_tasks = {
237237
'SYSTEM': system_tasks,
238238
'USER': PORTS,

emcc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def run(args):
578578

579579
if 'EMMAKEN_COMPILER' in os.environ:
580580
exit_with_error('`EMMAKEN_COMPILER` is no longer supported.\n' +
581-
'Please use the `LLVM_ROOT` and/or `COMPILER_WRAPPER` config settings instread')
581+
'Please use the `LLVM_ROOT` and/or `COMPILER_WRAPPER` config settings instead')
582582

583583
if 'EMMAKEN_CFLAGS' in os.environ:
584584
exit_with_error('`EMMAKEN_CFLAGS` is no longer supported, please use `EMCC_CFLAGS` instead')

emrun.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ def win_get_file_properties(fname):
996996
props = {'FixedFileInfo': None, 'StringFileInfo': None, 'FileVersion': None}
997997

998998
import win32api
999-
# backslash as parm returns dictionary of numeric info corresponding to VS_FIXEDFILEINFO struc
999+
# backslash as parm returns dictionary of numeric info corresponding to VS_FIXEDFILEINFO struct
10001000
fixedInfo = win32api.GetFileVersionInfo(fname, '\\')
10011001
props['FixedFileInfo'] = fixedInfo
10021002
props['FileVersion'] = "%d.%d.%d.%d" % (fixedInfo['FileVersionMS'] / 65536,
@@ -1005,7 +1005,7 @@ def win_get_file_properties(fname):
10051005
fixedInfo['FileVersionLS'] % 65536)
10061006

10071007
# \VarFileInfo\Translation returns list of available (language, codepage)
1008-
# pairs that can be used to retreive string info. We are using only the first pair.
1008+
# pairs that can be used to retrieve string info. We are using only the first pair.
10091009
lang, codepage = win32api.GetFileVersionInfo(fname, '\\VarFileInfo\\Translation')[0]
10101010

10111011
# any other must be of the form \StringfileInfo\%04X%04X\parm_name, middle
@@ -1731,7 +1731,7 @@ def run():
17311731
elif 'opera' in browser_exe.lower():
17321732
processname_killed_atexit = 'opera'
17331733

1734-
# In Windows cmdline, & character delimits multiple commmands, so must
1734+
# In Windows cmdline, & character delimits multiple commands, so must
17351735
# use ^ to escape them.
17361736
if browser_exe == 'cmd':
17371737
url = url.replace('&', '^&')

src/embind/embind.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ var LibraryEmbind = {
747747
* though at creation, the 'dummy' has the correct constructor name. Thus,
748748
* objects created with IMVU.new would show up in the debugger as 'dummy',
749749
* which isn't very helpful. Using IMVU.createNamedFunction addresses the
750-
* issue. Doublely-unfortunately, there's no way to write a test for this
750+
* issue. Doubly-unfortunately, there's no way to write a test for this
751751
* behavior. -NRD 2013.02.22
752752
*/
753753
var dummy = createNamedFunction(constructor.name || 'unknownFunctionName', function(){});

src/gl-matrix.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @version 1.2.4
77
*/
88

9-
// Modifed for emscripten:
9+
// Modified for emscripten:
1010
// - Global scoping etc.
1111
// - Disabled some non-closure-compatible javadoc comments.
1212

@@ -267,7 +267,7 @@ vec3.cross = function (vec, vec2, dest) {
267267
};
268268

269269
/**
270-
* Caclulates the length of a vec3
270+
* Calculates the length of a vec3
271271
*
272272
* _param {vec3} vec vec3 to calculate length of
273273
*
@@ -279,7 +279,7 @@ vec3.length = function (vec) {
279279
};
280280

281281
/**
282-
* Caclulates the dot product of two vec3s
282+
* Calculates the dot product of two vec3s
283283
*
284284
* _param {vec3} vec First operand
285285
* _param {vec3} vec2 Second operand
@@ -342,7 +342,7 @@ vec3.lerp = function (vec, vec2, lerp, dest) {
342342
};
343343

344344
/**
345-
* Calculates the euclidian distance between two vec3
345+
* Calculates the euclidean distance between two vec3
346346
*
347347
* Params:
348348
* _param {vec3} vec First vector

src/headless.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ var Worker = (workerPath) => {
240240
workerPath = fixPath(workerPath);
241241
var workerCode = read(workerPath);
242242
workerCode = workerCode.replace(/Module/g, 'zzModuleyy' + (Worker.id++)). // prevent collision with the global Module object. Note that this becomes global, so we need unique ids
243-
replace(/\nonmessage = /, '\nvar onmessage = '); // workers commonly do "onmessage = ", we need to varify that to sandbox
243+
replace(/\nonmessage = /, '\nvar onmessage = '); // workers commonly do "onmessage = ", we need to verify that to sandbox
244244
headlessPrint(`loading worker ${workerPath} : ${workerCode.substring(0, 50)}`);
245245
eval(workerCode); // will implement onmessage()
246246

src/jsifier.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function isDefined(symName) {
6969
if (symName == '__main_argc_argv' && SIDE_MODULE_EXPORTS.has('main')) {
7070
return true;
7171
}
72-
// 'invoke_' symbols are created at runtime in libary_dylink.py so can
72+
// 'invoke_' symbols are created at runtime in library_dylink.py so can
7373
// always be considered as defined.
7474
if (RELOCATABLE && symName.startsWith('invoke_')) {
7575
return true;
@@ -138,22 +138,22 @@ function runJSify() {
138138
}
139139

140140
function handleI64Signatures(symbol, snippet, sig, i53abi) {
141-
// Handle i64 paramaters and return values.
141+
// Handle i64 parameters and return values.
142142
//
143143
// When WASM_BIGINT is enabled these arrive as BigInt values which we
144144
// convert to int53 JS numbers. If necessary, we also convert the return
145145
// value back into a BigInt.
146146
//
147147
// When WASM_BIGINT is not enabled we receive i64 values as a pair of i32
148-
// numbers which is coverted to single int53 number. In necessary, we also
148+
// numbers which is converted to single int53 number. In necessary, we also
149149
// split the return value into a pair of i32 numbers.
150150
return modifyJSFunction(snippet, (args, body, async_, oneliner) => {
151151
let argLines = args.split('\n');
152152
argLines = argLines.map((line) => line.split('//')[0]);
153153
const argNames = argLines.join(' ').split(',').map((name) => name.trim());
154154
const newArgs = [];
155155
let innerArgs = [];
156-
let argConvertions = '';
156+
let argConversions = '';
157157
if (sig.length > argNames.length + 1) {
158158
error(`handleI64Signatures: signature too long for ${symbol}`);
159159
return snippet;
@@ -164,13 +164,13 @@ function runJSify() {
164164
// here, which will result in the default case below.
165165
const argType = sig[i + 1];
166166
if (WASM_BIGINT && ((MEMORY64 && argType == 'p') || (i53abi && argType == 'j'))) {
167-
argConvertions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
167+
argConversions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
168168
} else {
169169
if (argType == 'j' && i53abi) {
170-
argConvertions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
170+
argConversions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
171171
newArgs.push(defineI64Param(name));
172172
} else if (argType == 'p' && CAN_ADDRESS_2GB) {
173-
argConvertions += ` ${name} >>>= 0;\n`;
173+
argConversions += ` ${name} >>>= 0;\n`;
174174
newArgs.push(name);
175175
} else {
176176
newArgs.push(name);
@@ -187,17 +187,17 @@ function runJSify() {
187187
// For functions that where we need to mutate the return value, we
188188
// also need to wrap the body in an inner function.
189189
if (oneliner) {
190-
if (argConvertions) {
190+
if (argConversions) {
191191
return `${async_}(${args}) => {
192-
${argConvertions}
192+
${argConversions}
193193
return ${makeReturn64(body)};
194194
}`
195195
}
196196
return `${async_}(${args}) => ${makeReturn64(body)};`
197197
}
198198
return `\
199199
${async_}function(${args}) {
200-
${argConvertions}
200+
${argConversions}
201201
var ret = (() => { ${body} })();
202202
return ${makeReturn64('ret')};
203203
}`;
@@ -210,7 +210,7 @@ ${argConvertions}
210210
}
211211
return `\
212212
${async_}function(${args}) {
213-
${argConvertions}
213+
${argConversions}
214214
${body};
215215
}`;
216216
});
@@ -514,7 +514,7 @@ function(${args}) {
514514
// in library.js and library_pthread.js. These happen before deps are
515515
// processed so depending on it via `__deps` doesn't work.
516516
if (dep === '$noExitRuntime') {
517-
error('noExitRuntime cannot be referenced via __deps mechansim. Use DEFAULT_LIBRARY_FUNCS_TO_INCLUDE or EXPORTED_RUNTIME_METHODS')
517+
error('noExitRuntime cannot be referenced via __deps mechanism. Use DEFAULT_LIBRARY_FUNCS_TO_INCLUDE or EXPORTED_RUNTIME_METHODS')
518518
}
519519
return addFromLibrary(dep, `${symbol}, referenced by ${dependent}`, dep === aliasTarget);
520520
}

src/library.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ addToLibrary({
7676

7777
#if PTHREADS
7878
if (ENVIRONMENT_IS_PTHREAD) {
79-
// implict exit can never happen on a pthread
79+
// implicit exit can never happen on a pthread
8080
#if ASSERTIONS
8181
assert(!implicit);
8282
#endif
@@ -2586,7 +2586,7 @@ addToLibrary({
25862586
// skip this function and the caller to get caller's return address
25872587
#if MEMORY64
25882588
// MEMORY64 injects and extra wrapper within emscripten_return_address
2589-
// to handle BigInt convertions.
2589+
// to handle BigInt conversions.
25902590
var caller = callstack[level + 4];
25912591
#else
25922592
var caller = callstack[level + 3];
@@ -3129,7 +3129,7 @@ addToLibrary({
31293129
#else
31303130
#if !WASM_BIGINT
31313131
// Without WASM_BIGINT support we cannot directly call function with i64 as
3132-
// part of thier signature, so we rely the dynCall functions generated by
3132+
// part of their signature, so we rely on the dynCall functions generated by
31333133
// wasm-emscripten-finalize
31343134
if (sig.includes('j')) {
31353135
return dynCallLegacy(sig, ptr, args);
@@ -3166,7 +3166,7 @@ addToLibrary({
31663166
$setWasmTableEntry__deps: ['$wasmTableMirror', '$wasmTable'],
31673167
$setWasmTableEntry: (idx, func) => {
31683168
wasmTable.set(idx, func);
3169-
// With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overriden to return wrapped
3169+
// With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped
31703170
// functions so we need to call it here to retrieve the potential wrapper correctly
31713171
// instead of just storing 'func' directly into wasmTableMirror
31723172
wasmTableMirror[idx] = wasmTable.get(idx);
@@ -3379,7 +3379,7 @@ addToLibrary({
33793379
// setTimeout or any other kind of event handler that calls into user case
33803380
// needs to use this wrapper.
33813381
//
3382-
// The job of this wrapper is the handle emscripten-specfic exceptions such
3382+
// The job of this wrapper is the handle emscripten-specific exceptions such
33833383
// as ExitStatus and 'unwind' and prevent these from escaping to the top
33843384
// level.
33853385
$callUserCallback__deps: ['$handleException', '$maybeExit'],

src/library_browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ var LibraryBrowser = {
595595
Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;
596596
Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;
597597
} else {
598-
// just add the mouse delta to the current absolut mouse position
598+
// just add the mouse delta to the current absolute mouse position
599599
// FIXME: ideally this should be clamped against the canvas size and zero
600600
Browser.mouseX += Browser.mouseMovementX;
601601
Browser.mouseY += Browser.mouseMovementY;

src/library_dylink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var LibraryDylink = {
5252

5353
$isSymbolDefined: (symName) => {
5454
// Ignore 'stub' symbols that are auto-generated as part of the original
55-
// `wasmImports` used to instantate the main module.
55+
// `wasmImports` used to instantiate the main module.
5656
var existing = wasmImports[symName];
5757
if (!existing || existing.stub) {
5858
return false;

src/library_exceptions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ addCxaCatch = (n) => {
397397
LibraryManager.library[`__cxa_find_matching_catch_${n}`] = eval(`(${args}) => findMatchingCatch([${argString}])`);
398398
};
399399

400-
// Add the first 2-5 catch handlers premptively. Others get added on demand in
400+
// Add the first 2-5 catch handlers preemptively. Others get added on demand in
401401
// jsifier. This is done here primarily so that these symbols end up with the
402402
// correct deps in the stub library that we pass to wasm-ld.
403403
// Note: __cxa_find_matching_catch_N function uses N = NumClauses + 2 so

src/library_fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ FS.staticInit();` +
130130
#if ASSERTIONS
131131
super(ERRNO_MESSAGES[errno]);
132132
#endif
133-
// TODO(sbc): Use the inline member delclaration syntax once we
133+
// TODO(sbc): Use the inline member declaration syntax once we
134134
// support it in acorn and closure.
135135
this.name = 'ErrnoError';
136136
this.errno = errno;
@@ -745,7 +745,7 @@ FS.staticInit();` +
745745
// parents must exist
746746
var lookup, old_dir, new_dir;
747747

748-
// let the errors from non existant directories percolate up
748+
// let the errors from non existent directories percolate up
749749
lookup = FS.lookupPath(old_path, { parent: true });
750750
old_dir = lookup.node;
751751
lookup = FS.lookupPath(new_path, { parent: true });

src/library_glemu.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3002,10 +3002,10 @@ var LibraryGLEmulation = {
30023002
var renderer = GLImmediate.getRenderer();
30033003

30043004
// Generate index data in a format suitable for GLES 2.0/WebGL
3005-
var numVertexes = 4 * GLImmediate.vertexCounter / GLImmediate.stride;
3006-
if (!numVertexes) return;
3005+
var numVertices = 4 * GLImmediate.vertexCounter / GLImmediate.stride;
3006+
if (!numVertices) return;
30073007
#if ASSERTIONS
3008-
assert(numVertexes % 1 == 0, "`numVertexes` must be an integer.");
3008+
assert(numVertices % 1 == 0, "`numVertices` must be an integer.");
30093009
#endif
30103010
var emulatedElementArrayBuffer = false;
30113011
var numIndexes = 0;
@@ -3047,7 +3047,7 @@ var LibraryGLEmulation = {
30473047
assert(GLImmediate.firstVertex % 4 == 0);
30483048
#endif
30493049
ptr = GLImmediate.firstVertex * 3;
3050-
var numQuads = numVertexes / 4;
3050+
var numQuads = numVertices / 4;
30513051
numIndexes = numQuads * 6; // 0 1 2, 0 2 3 pattern
30523052
#if ASSERTIONS
30533053
assert(ptr + (numIndexes << 1) <= GL.MAX_TEMP_BUFFER_SIZE, 'too many immediate mode indexes (b)');
@@ -3062,7 +3062,7 @@ var LibraryGLEmulation = {
30623062
if (numIndexes) {
30633063
GLctx.drawElements(GLImmediate.mode, numIndexes, GLctx.UNSIGNED_SHORT, ptr);
30643064
} else {
3065-
GLctx.drawArrays(GLImmediate.mode, startIndex, numVertexes);
3065+
GLctx.drawArrays(GLImmediate.mode, startIndex, numVertices);
30663066
}
30673067

30683068
if (emulatedElementArrayBuffer) {

src/library_glut.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ var LibraryGLUT = {
153153
case 191: return s ? 63 : 47; // forward slash
154154
case 219: return s ? 123 : 91; // open bracket
155155
case 220: return s ? 124 : 47; // back slash
156-
case 221: return s ? 125 : 93; // close braket
156+
case 221: return s ? 125 : 93; // close bracket
157157
case 222: return s ? 34 : 39; // single quote
158158
}
159159

src/library_int53.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ addToLibrary({
134134
$MIN_INT53: '-{{{ Math.pow(2, 53) }}}',
135135
// Counvert a bigint value (usually coming from Wasm->JS call) into an int53
136136
// JS Number. This is used when we have an incoming i64 that we know is a
137-
// pointer or size_t and is expected to be withing the int53 range.
137+
// pointer or size_t and is expected to be within the int53 range.
138138
// Returns NaN if the incoming bigint is outside the range.
139139
$bigintToI53Checked__deps: ['$MAX_INT53', '$MIN_INT53'],
140140
$bigintToI53Checked: (num) => (num < MIN_INT53 || num > MAX_INT53) ? NaN : Number(num),

0 commit comments

Comments
 (0)