Skip to content

Fix more typos. #21395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion emar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.

"""Wrapper scripte around `llvm-ar`.
"""Wrapper script around `llvm-ar`.
"""

import sys
Expand Down
2 changes: 1 addition & 1 deletion embuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def main():
auto_tasks = False
task_targets = dict.fromkeys(args.targets) # use dict to keep targets order

# subsitute
# substitute
predefined_tasks = {
'SYSTEM': system_tasks,
'USER': PORTS,
Expand Down
2 changes: 1 addition & 1 deletion emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def run(args):

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

if 'EMMAKEN_CFLAGS' in os.environ:
exit_with_error('`EMMAKEN_CFLAGS` is no longer supported, please use `EMCC_CFLAGS` instead')
Expand Down
6 changes: 3 additions & 3 deletions emrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ def win_get_file_properties(fname):
props = {'FixedFileInfo': None, 'StringFileInfo': None, 'FileVersion': None}

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

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

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

# In Windows cmdline, & character delimits multiple commmands, so must
# In Windows cmdline, & character delimits multiple commands, so must
# use ^ to escape them.
if browser_exe == 'cmd':
url = url.replace('&', '^&')
Expand Down
2 changes: 1 addition & 1 deletion src/embind/embind.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ var LibraryEmbind = {
* though at creation, the 'dummy' has the correct constructor name. Thus,
* objects created with IMVU.new would show up in the debugger as 'dummy',
* which isn't very helpful. Using IMVU.createNamedFunction addresses the
* issue. Doublely-unfortunately, there's no way to write a test for this
* issue. Doubly-unfortunately, there's no way to write a test for this
* behavior. -NRD 2013.02.22
*/
var dummy = createNamedFunction(constructor.name || 'unknownFunctionName', function(){});
Expand Down
8 changes: 4 additions & 4 deletions src/gl-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @version 1.2.4
*/

// Modifed for emscripten:
// Modified for emscripten:
// - Global scoping etc.
// - Disabled some non-closure-compatible javadoc comments.

Expand Down Expand Up @@ -267,7 +267,7 @@ vec3.cross = function (vec, vec2, dest) {
};

/**
* Caclulates the length of a vec3
* Calculates the length of a vec3
*
* _param {vec3} vec vec3 to calculate length of
*
Expand All @@ -279,7 +279,7 @@ vec3.length = function (vec) {
};

/**
* Caclulates the dot product of two vec3s
* Calculates the dot product of two vec3s
*
* _param {vec3} vec First operand
* _param {vec3} vec2 Second operand
Expand Down Expand Up @@ -342,7 +342,7 @@ vec3.lerp = function (vec, vec2, lerp, dest) {
};

/**
* Calculates the euclidian distance between two vec3
* Calculates the euclidean distance between two vec3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are in upstream code which we don't normally modify, but I don't expect us to update this, so sgtm.

*
* Params:
* _param {vec3} vec First vector
Expand Down
2 changes: 1 addition & 1 deletion src/headless.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ var Worker = (workerPath) => {
workerPath = fixPath(workerPath);
var workerCode = read(workerPath);
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
replace(/\nonmessage = /, '\nvar onmessage = '); // workers commonly do "onmessage = ", we need to varify that to sandbox
replace(/\nonmessage = /, '\nvar onmessage = '); // workers commonly do "onmessage = ", we need to verify that to sandbox
headlessPrint(`loading worker ${workerPath} : ${workerCode.substring(0, 50)}`);
eval(workerCode); // will implement onmessage()

Expand Down
24 changes: 12 additions & 12 deletions src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function isDefined(symName) {
if (symName == '__main_argc_argv' && SIDE_MODULE_EXPORTS.has('main')) {
return true;
}
// 'invoke_' symbols are created at runtime in libary_dylink.py so can
// 'invoke_' symbols are created at runtime in library_dylink.py so can
// always be considered as defined.
if (RELOCATABLE && symName.startsWith('invoke_')) {
return true;
Expand Down Expand Up @@ -138,22 +138,22 @@ function runJSify() {
}

function handleI64Signatures(symbol, snippet, sig, i53abi) {
// Handle i64 paramaters and return values.
// Handle i64 parameters and return values.
//
// When WASM_BIGINT is enabled these arrive as BigInt values which we
// convert to int53 JS numbers. If necessary, we also convert the return
// value back into a BigInt.
//
// When WASM_BIGINT is not enabled we receive i64 values as a pair of i32
// numbers which is coverted to single int53 number. In necessary, we also
// numbers which is converted to single int53 number. In necessary, we also
// split the return value into a pair of i32 numbers.
return modifyJSFunction(snippet, (args, body, async_, oneliner) => {
let argLines = args.split('\n');
argLines = argLines.map((line) => line.split('//')[0]);
const argNames = argLines.join(' ').split(',').map((name) => name.trim());
const newArgs = [];
let innerArgs = [];
let argConvertions = '';
let argConversions = '';
if (sig.length > argNames.length + 1) {
error(`handleI64Signatures: signature too long for ${symbol}`);
return snippet;
Expand All @@ -164,13 +164,13 @@ function runJSify() {
// here, which will result in the default case below.
const argType = sig[i + 1];
if (WASM_BIGINT && ((MEMORY64 && argType == 'p') || (i53abi && argType == 'j'))) {
argConvertions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
argConversions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
} else {
if (argType == 'j' && i53abi) {
argConvertions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
argConversions += ` ${receiveI64ParamAsI53(name, undefined, false)}\n`;
newArgs.push(defineI64Param(name));
} else if (argType == 'p' && CAN_ADDRESS_2GB) {
argConvertions += ` ${name} >>>= 0;\n`;
argConversions += ` ${name} >>>= 0;\n`;
newArgs.push(name);
} else {
newArgs.push(name);
Expand All @@ -187,17 +187,17 @@ function runJSify() {
// For functions that where we need to mutate the return value, we
// also need to wrap the body in an inner function.
if (oneliner) {
if (argConvertions) {
if (argConversions) {
return `${async_}(${args}) => {
${argConvertions}
${argConversions}
return ${makeReturn64(body)};
}`
}
return `${async_}(${args}) => ${makeReturn64(body)};`
}
return `\
${async_}function(${args}) {
${argConvertions}
${argConversions}
var ret = (() => { ${body} })();
return ${makeReturn64('ret')};
}`;
Expand All @@ -210,7 +210,7 @@ ${argConvertions}
}
return `\
${async_}function(${args}) {
${argConvertions}
${argConversions}
${body};
}`;
});
Expand Down Expand Up @@ -514,7 +514,7 @@ function(${args}) {
// in library.js and library_pthread.js. These happen before deps are
// processed so depending on it via `__deps` doesn't work.
if (dep === '$noExitRuntime') {
error('noExitRuntime cannot be referenced via __deps mechansim. Use DEFAULT_LIBRARY_FUNCS_TO_INCLUDE or EXPORTED_RUNTIME_METHODS')
error('noExitRuntime cannot be referenced via __deps mechanism. Use DEFAULT_LIBRARY_FUNCS_TO_INCLUDE or EXPORTED_RUNTIME_METHODS')
}
return addFromLibrary(dep, `${symbol}, referenced by ${dependent}`, dep === aliasTarget);
}
Expand Down
10 changes: 5 additions & 5 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ addToLibrary({

#if PTHREADS
if (ENVIRONMENT_IS_PTHREAD) {
// implict exit can never happen on a pthread
// implicit exit can never happen on a pthread
#if ASSERTIONS
assert(!implicit);
#endif
Expand Down Expand Up @@ -2586,7 +2586,7 @@ addToLibrary({
// skip this function and the caller to get caller's return address
#if MEMORY64
// MEMORY64 injects and extra wrapper within emscripten_return_address
// to handle BigInt convertions.
// to handle BigInt conversions.
var caller = callstack[level + 4];
#else
var caller = callstack[level + 3];
Expand Down Expand Up @@ -3129,7 +3129,7 @@ addToLibrary({
#else
#if !WASM_BIGINT
// Without WASM_BIGINT support we cannot directly call function with i64 as
// part of thier signature, so we rely the dynCall functions generated by
// part of their signature, so we rely on the dynCall functions generated by
// wasm-emscripten-finalize
if (sig.includes('j')) {
return dynCallLegacy(sig, ptr, args);
Expand Down Expand Up @@ -3166,7 +3166,7 @@ addToLibrary({
$setWasmTableEntry__deps: ['$wasmTableMirror', '$wasmTable'],
$setWasmTableEntry: (idx, func) => {
wasmTable.set(idx, func);
// With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overriden to return wrapped
// With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped
// functions so we need to call it here to retrieve the potential wrapper correctly
// instead of just storing 'func' directly into wasmTableMirror
wasmTableMirror[idx] = wasmTable.get(idx);
Expand Down Expand Up @@ -3379,7 +3379,7 @@ addToLibrary({
// setTimeout or any other kind of event handler that calls into user case
// needs to use this wrapper.
//
// The job of this wrapper is the handle emscripten-specfic exceptions such
// The job of this wrapper is the handle emscripten-specific exceptions such
// as ExitStatus and 'unwind' and prevent these from escaping to the top
// level.
$callUserCallback__deps: ['$handleException', '$maybeExit'],
Expand Down
2 changes: 1 addition & 1 deletion src/library_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ var LibraryBrowser = {
Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;
Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;
} else {
// just add the mouse delta to the current absolut mouse position
// just add the mouse delta to the current absolute mouse position
// FIXME: ideally this should be clamped against the canvas size and zero
Browser.mouseX += Browser.mouseMovementX;
Browser.mouseY += Browser.mouseMovementY;
Expand Down
2 changes: 1 addition & 1 deletion src/library_dylink.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var LibraryDylink = {

$isSymbolDefined: (symName) => {
// Ignore 'stub' symbols that are auto-generated as part of the original
// `wasmImports` used to instantate the main module.
// `wasmImports` used to instantiate the main module.
var existing = wasmImports[symName];
if (!existing || existing.stub) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/library_exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ addCxaCatch = (n) => {
LibraryManager.library[`__cxa_find_matching_catch_${n}`] = eval(`(${args}) => findMatchingCatch([${argString}])`);
};

// Add the first 2-5 catch handlers premptively. Others get added on demand in
// Add the first 2-5 catch handlers preemptively. Others get added on demand in
// jsifier. This is done here primarily so that these symbols end up with the
// correct deps in the stub library that we pass to wasm-ld.
// Note: __cxa_find_matching_catch_N function uses N = NumClauses + 2 so
Expand Down
4 changes: 2 additions & 2 deletions src/library_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ FS.staticInit();` +
#if ASSERTIONS
super(ERRNO_MESSAGES[errno]);
#endif
// TODO(sbc): Use the inline member delclaration syntax once we
// TODO(sbc): Use the inline member declaration syntax once we
// support it in acorn and closure.
this.name = 'ErrnoError';
this.errno = errno;
Expand Down Expand Up @@ -745,7 +745,7 @@ FS.staticInit();` +
// parents must exist
var lookup, old_dir, new_dir;

// let the errors from non existant directories percolate up
// let the errors from non existent directories percolate up
lookup = FS.lookupPath(old_path, { parent: true });
old_dir = lookup.node;
lookup = FS.lookupPath(new_path, { parent: true });
Expand Down
10 changes: 5 additions & 5 deletions src/library_glemu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3002,10 +3002,10 @@ var LibraryGLEmulation = {
var renderer = GLImmediate.getRenderer();

// Generate index data in a format suitable for GLES 2.0/WebGL
var numVertexes = 4 * GLImmediate.vertexCounter / GLImmediate.stride;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a valid spelling:

https://dictionary.cambridge.org/us/dictionary/english/vertexes

But sgtm to change it as it does seem much less common.

if (!numVertexes) return;
var numVertices = 4 * GLImmediate.vertexCounter / GLImmediate.stride;
if (!numVertices) return;
#if ASSERTIONS
assert(numVertexes % 1 == 0, "`numVertexes` must be an integer.");
assert(numVertices % 1 == 0, "`numVertices` must be an integer.");
#endif
var emulatedElementArrayBuffer = false;
var numIndexes = 0;
Expand Down Expand Up @@ -3047,7 +3047,7 @@ var LibraryGLEmulation = {
assert(GLImmediate.firstVertex % 4 == 0);
#endif
ptr = GLImmediate.firstVertex * 3;
var numQuads = numVertexes / 4;
var numQuads = numVertices / 4;
numIndexes = numQuads * 6; // 0 1 2, 0 2 3 pattern
#if ASSERTIONS
assert(ptr + (numIndexes << 1) <= GL.MAX_TEMP_BUFFER_SIZE, 'too many immediate mode indexes (b)');
Expand All @@ -3062,7 +3062,7 @@ var LibraryGLEmulation = {
if (numIndexes) {
GLctx.drawElements(GLImmediate.mode, numIndexes, GLctx.UNSIGNED_SHORT, ptr);
} else {
GLctx.drawArrays(GLImmediate.mode, startIndex, numVertexes);
GLctx.drawArrays(GLImmediate.mode, startIndex, numVertices);
}

if (emulatedElementArrayBuffer) {
Expand Down
2 changes: 1 addition & 1 deletion src/library_glut.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ var LibraryGLUT = {
case 191: return s ? 63 : 47; // forward slash
case 219: return s ? 123 : 91; // open bracket
case 220: return s ? 124 : 47; // back slash
case 221: return s ? 125 : 93; // close braket
case 221: return s ? 125 : 93; // close bracket
case 222: return s ? 34 : 39; // single quote
}

Expand Down
2 changes: 1 addition & 1 deletion src/library_int53.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ addToLibrary({
$MIN_INT53: '-{{{ Math.pow(2, 53) }}}',
// Counvert a bigint value (usually coming from Wasm->JS call) into an int53
// JS Number. This is used when we have an incoming i64 that we know is a
// pointer or size_t and is expected to be withing the int53 range.
// pointer or size_t and is expected to be within the int53 range.
// Returns NaN if the incoming bigint is outside the range.
$bigintToI53Checked__deps: ['$MAX_INT53', '$MIN_INT53'],
$bigintToI53Checked: (num) => (num < MIN_INT53 || num > MAX_INT53) ? NaN : Number(num),
Expand Down
Loading