Skip to content
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 embuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def main():
tasks.append(name)
else:
# There are some ports that we don't want to build as part
# of ALL since the are not well tested or widely used:
# of ALL since they are not well tested or widely used:
if 'cocos2d' in targets:
targets.remove('cocos2d')

Expand Down
12 changes: 6 additions & 6 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ class Mode(Enum):
class LinkFlag:
"""Used to represent a linker flag.

The flag value is stored along with a bool that distingingishes input
The flag value is stored along with a bool that distinguishes input
files from non-files.

A list of these is return by separate_linker_flags.
A list of these is returned by separate_linker_flags.
"""
value: str
is_file: int
Expand Down Expand Up @@ -281,7 +281,7 @@ def main(args):
if 'EMCC_REPRODUCE' in os.environ:
options.reproduce = os.environ['EMCC_REPRODUCE']

# For internal consistency, ensure we don't attempt or read or write any link time
# For internal consistency, ensure we don't attempt to read or write any link time
# settings until we reach the linking phase.
settings.limit_settings(COMPILE_TIME_SETTINGS)

Expand Down Expand Up @@ -510,13 +510,13 @@ def get_clang_command_asm():
compile_args, linker_args = separate_linker_flags(newargs)

# Map of file basenames to how many times we've seen them. We use this to generate
# unique `_NN` suffix for object files in cases when we are compiling multiple soures that
# unique `_NN` suffix for object files in cases when we are compiling multiple sources that
# have the same basename. e.g. `foo/utils.c` and `bar/utils.c` on the same command line.
seen_names = {}

def uniquename(name):
if name not in seen_names:
# No suffix needed the firt time we see given name.
# No suffix needed the first time we see given name.
seen_names[name] = 1
return name

Expand Down Expand Up @@ -547,7 +547,7 @@ def compile_source_file(input_file):
# but we want the `.dwo` file to be generated in the current working directory,
# like it is under clang. We could avoid this hack if we use the clang driver
# to generate the temporary files, but that would also involve using the clang
# driver to perform linking which would be big change.
# driver to perform linking which would be a big change.
cmd += ['-Xclang', '-split-dwarf-file', '-Xclang', unsuffixed_basename(input_file) + '.dwo']
cmd += ['-Xclang', '-split-dwarf-output', '-Xclang', unsuffixed_basename(input_file) + '.dwo']
shared.check_call(cmd)
Expand Down
12 changes: 6 additions & 6 deletions emrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def kill_browser_process():

# Heuristic that attempts to search for the browser process IDs that emrun spawned.
# This depends on the assumption that no other browser process IDs have been spawned
# during the short time perioed between the time that emrun started, and the browser
# during the short time period between the time that emrun started, and the browser
# process navigated to the page.
# This heuristic is needed because all modern browsers are multiprocess systems -
# starting a browser process from command line generally launches just a "stub" spawner
Expand Down Expand Up @@ -443,7 +443,7 @@ def pid_existed(pid):
logv('Was unable to detect the browser process that was spawned by emrun. This may occur if the target page was opened in a tab on a browser process that already existed before emrun started up.')


# Our custom HTTP web server that will server the target page to run via .html.
# Our custom HTTP web server that will serve the target page to run via .html.
# This is used so that we can load the page via a http:// URL instead of a
# file:// URL, since those wouldn't work too well unless user allowed XHR
# without CORS rules. Also, the target page will route its stdout and stderr
Expand Down Expand Up @@ -477,7 +477,7 @@ def handle_incoming_message(self, seq_num, log, data):
if len(self.http_message_queue) > 16:
self.print_next_message()

# If it's been too long since we we got a message, prints out the oldest
# If it's been too long since we got a message, prints out the oldest
# queued message, ignoring the proper order. This ensures that if any
# messages are actually lost, that the message queue will be orderly flushed.
def print_timed_out_messages(self):
Expand Down Expand Up @@ -1005,7 +1005,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 struct
# backslash as param 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 @@ -1017,7 +1017,7 @@ def win_get_file_properties(fname):
# 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
# any other must be of the form \StringfileInfo\%04X%04X\param_name, middle
# two are language/codepage pair returned from above

strInfo = {}
Expand Down Expand Up @@ -1577,7 +1577,7 @@ def parse_args(args):
parser.add_argument('cmdlineparams', nargs='*')

# Support legacy argument names with `_` in them (but don't
# advertize these in the --help message).
# advertise these in the --help message).
for i, a in enumerate(args):
if a == '--':
break
Expand Down
2 changes: 1 addition & 1 deletion site/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
]


#Build "Todo" notes into the source
# Build "Todo" notes into the source
#todo_include_todos = 'True'

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion src/Fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function fetchGetResponseHeaders(id, dst, dstSizeBytes) {
return stringToUTF8(responseHeaders, dst, dstSizeBytes) + 1;
}

//Delete the xhr JS object, allowing it to be garbage collected.
// Delete the xhr JS object, allowing it to be garbage collected.
function fetchFree(id) {
#if FETCH_DEBUG
dbg(`fetch: fetchFree id:${id}`);
Expand Down
2 changes: 1 addition & 1 deletion src/audio_worklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function createWasmAudioWorkletProcessor() {
// Prepare the output views; see createOutputViews(). The 'STACK_ALIGN'
// deduction stops the STACK_OVERFLOW_CHECK failing (since the stack will
// be full if we allocate all the available space) leaving room for a
// single AudioSampleFrame as a minumum. There's an arbitrary maximum of
// single AudioSampleFrame as a minimum. There's an arbitrary maximum of
// 64 frames, for the case where a multi-MB stack is passed.
this.outputViews = new Array(Math.min(((wwParams.stackSize - {{{ STACK_ALIGN }}}) / this.bytesPerChannel) | 0, /*sensible limit*/ 64));
#if ASSERTIONS
Expand Down
2 changes: 1 addition & 1 deletion src/closure-externs/closure-externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ var moduleRtn;
/**
* This was removed from upstream closure compiler in
* https://github.com/google/closure-compiler/commit/f83322c1b.
* Perhaps we should remove it do?
* Perhaps we should remove it too?
*
* @param {MediaStreamConstraints} constraints A MediaStreamConstraints object.
* @param {function(!MediaStream)} successCallback
Expand Down
2 changes: 1 addition & 1 deletion src/emrun_postjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2013 The Emscripten Authors
* SPDX-License-Identifier: MIT
*
* This file gets implicatly injected as a `--post-js` file when
* This file gets implicitly injected as a `--post-js` file when
* emcc is run with `--emrun`
*/

Expand Down
2 changes: 1 addition & 1 deletion src/emrun_prejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2013 The Emscripten Authors
* SPDX-License-Identifier: MIT
*
* This file gets implicatly injected as a `--pre-js` file when
* This file gets implicitly injected as a `--pre-js` file when
* emcc is run with `--emrun`
*/

Expand Down
2 changes: 1 addition & 1 deletion src/lib/libaddfunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ addToLibrary({
#else
// Set the new value.
try {
// Attempting to call this with JS function will cause of table.set() to fail
// Attempting to call this with JS function will cause table.set() to fail
setWasmTableEntry(ret, func);
} catch (err) {
if (!(err instanceof TypeError)) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/libasync.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ addToLibrary({
{{{ runtimeKeepalivePop(); }}}
#if MEMORY64
// When re-winding, the arguments to a function are ignored. For i32 arguments we
// can just call the function with no args at all since and the engine will produce zeros
// can just call the function with no args at all since the engine will produce zeros
// for all arguments. However, for i64 arguments we get `undefined cannot be converted to
// BigInt`.
return func(...Asyncify.restoreRewindArguments(original));
Expand Down Expand Up @@ -392,7 +392,7 @@ addToLibrary({
// `Asyncify.handleSleepReturnValue`.
// `Asyncify.handleSleepReturnValue` contains the return
// value of the last C function to have executed
// `Asyncify.handleSleep()`, where as `asyncWasmReturnValue`
// `Asyncify.handleSleep()`, whereas `asyncWasmReturnValue`
// contains the return value of the exported WASM function
// that may have called C functions that
// call `Asyncify.handleSleep()`.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/libatomic.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ addToLibrary({
// Increment waitAsync generation counter, account for wraparound in case
// application does huge amounts of waitAsyncs per second (not sure if
// possible?)
// Valid counterrange: 0...2^31-1
// Valid counter range: 0...2^31-1
let counter = liveAtomicWaitAsyncCounter;
liveAtomicWaitAsyncCounter = Math.max(0, (liveAtomicWaitAsyncCounter+1)|0);
liveAtomicWaitAsyncs[counter] = addr;
Expand Down
14 changes: 7 additions & 7 deletions src/lib/libcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ addToLibrary({
},
#elif !SUPPORT_LONGJMP
#if !INCLUDE_FULL_LIBRARY
// These are in order to print helpful error messages when either longjmp of
// These are in order to print helpful error messages when either longjmp or
// setjmp is used.
longjmp__deps: [() => {
error('longjmp support was disabled (SUPPORT_LONGJMP=0), but it is required by the code (either set SUPPORT_LONGJMP=1, or remove uses of it in the project)');
Expand Down Expand Up @@ -666,7 +666,7 @@ addToLibrary({
}

if (str.indexOf(".") > 0) {
// parse IPv4 embedded stress
// parse IPv4 embedded address
str = str.replace(new RegExp('[.]', 'g'), ":");
words = str.split(":");
words[words.length-4] = Number(words[words.length-4]) + Number(words[words.length-3])*256;
Expand All @@ -686,7 +686,7 @@ addToLibrary({
}
offset = z-1;
} else {
// parse hex to field to 16-bit value and write it in network byte-order
// parse hex field to 16-bit value and write it in network byte-order
parts[w+offset] = _htons(parseInt(words[w],16));
}
} else {
Expand Down Expand Up @@ -756,7 +756,7 @@ addToLibrary({
// IPv4-compatible IPv6 address if 16-bit value (bytes 11 and 12) == 0x0000 (6th word)
if (parts[5] === 0) {
str = "::";
//special case IPv6 addresses
// special case IPv6 addresses
if (v4part === "0.0.0.0") v4part = ""; // any/unspecified address
if (v4part === "0.0.0.1") v4part = "1";// loopback address
str += v4part;
Expand Down Expand Up @@ -1592,7 +1592,7 @@ addToLibrary({
// is a stack allocation that LLVM made, which may go away before the main
// thread gets the message. For that reason we handle proxying *after* the
// call to readEmAsmArgs, and therefore we do that manually here instead
// of using __proxy. (And dor simplicity, do the same in the sync
// of using __proxy. (And for simplicity, do the same in the sync
// case as well, even though it's not strictly necessary, to keep the two
// code paths as similar as possible on both sides.)
return proxyToMainThread(0, emAsmAddr, sync, ...args);
Expand All @@ -1615,8 +1615,8 @@ addToLibrary({
#endif

#if !DECLARE_ASM_MODULE_EXPORTS
// When DECLARE_ASM_MODULE_EXPORTS is set, this function is programatically
// ceated during linking. See `create_receiving` in `emscripten.py`.
// When DECLARE_ASM_MODULE_EXPORTS is set, this function is programmatically
// created during linking. See `create_receiving` in `emscripten.py`.
// When DECLARE_ASM_MODULE_EXPORTS=0 is set, `assignWasmExports` is instead
// defined here as a normal JS library function.
$assignWasmExports__deps: ['$asmjsMangle',
Expand Down
20 changes: 10 additions & 10 deletions src/lib/libdylink.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ var LibraryDylink = {
// Resolve a global symbol by name. This is used during module loading to
// resolve imports, and by `dlsym` when used with `RTLD_DEFAULT`.
// Returns both the resolved symbol (i.e. a function or a global) along with
// the canonical name of the symbol (in some cases is modify the symbol as
// the canonical name of the symbol (in some cases modifying the symbol as
// part of the loop process, so that actual symbol looked up has a different
// name).
$resolveGlobalSymbol__deps: ['$isSymbolDefined', '$createNamedFunction',
Expand Down Expand Up @@ -166,7 +166,7 @@ var LibraryDylink = {
$GOT: {},

// Proxy handler used for GOT.mem and GOT.func imports. Each of these
// imports is fullfilled dynamically via the `get` method of this proxy
// imports is fulfilled dynamically via the `get` method of this proxy
// handler. We abuse the `target` of the Proxy in order to pass the set of
// weak imports to the handler.
$GOTHandler__internal: true,
Expand Down Expand Up @@ -303,7 +303,7 @@ var LibraryDylink = {
return value;
}
#endif
// Detect immuable wasm global exports. These represent data addresses
// Detect immutable wasm global exports. These represent data addresses
// which are relative to `memoryBase`
if (isImmutableGlobal(value)) {
return new WebAssembly.Global({'value': '{{{ POINTER_WASM_TYPE }}}'}, value.value + {{{ to64('memoryBase') }}});
Expand Down Expand Up @@ -507,7 +507,7 @@ var LibraryDylink = {
// we should see the dylink custom section right after the magic number and wasm version
failIf(binary[8] !== 0, 'need the dylink section to be first')
offset = 9;
var section_size = getLEB(); //section size
var section_size = getLEB(); // section size
end = offset + section_size;
var name = getString();
failIf(name !== 'dylink.0');
Expand Down Expand Up @@ -682,7 +682,7 @@ var LibraryDylink = {
// table and memory regions. Later threads re-use the same table region
// and can ignore the memory region (since memory is shared between
// threads already).
// If `handle` is specified than it is assumed that the calling thread has
// If `handle` is specified then it is assumed that the calling thread has
// exclusive access to it for the duration of this function. See the
// locking in `dynlink.c`.
var firstLoad = !handle || !{{{ makeGetValue('handle', C_STRUCTS.dso.mem_allocated, 'i8') }}};
Expand Down Expand Up @@ -728,7 +728,7 @@ var LibraryDylink = {

// This is the export map that we ultimately return. We declare it here
// so it can be used within resolveSymbol. We resolve symbols against
// this local symbol map in the case there they are not present on the
// this local symbol map in the case where they are not present on the
// global Module object. We need this fallback because Modules sometime
// need to import their own symbols
var moduleExports;
Expand Down Expand Up @@ -857,7 +857,7 @@ var LibraryDylink = {
{{{ makeEval('ASM_CONSTS[start] = eval(func)') }}};
}

// Add any EM_ASM function that exist in the side module
// Add any EM_ASM functions that exist in the side module
if ('__start_em_asm' in moduleExports) {
var start = moduleExports['__start_em_asm'].value;
var stop = moduleExports['__stop_em_asm'].value;
Expand Down Expand Up @@ -1132,7 +1132,7 @@ var LibraryDylink = {
registerDynCallSymbols(dso.exports);
#endif
} else if (!dso.global) {
// The library was previously loaded only locally but not
// The library was previously loaded only locally but now
// we have a request with global=true.
dso.global = true;
mergeLibSymbols(dso.exports, libName)
Expand Down Expand Up @@ -1422,8 +1422,8 @@ var LibraryDylink = {
#endif
result = addr;
} else {
// Insert the function into the wasm table. If its a direct wasm
// function the second argument will not be needed. If its a JS
// Insert the function into the wasm table. If it's a direct wasm
// function the second argument will not be needed. If it's a JS
// function we rely on the `sig` attribute being set based on the
// `<func>__sig` specified in library JS file.
result = addFunction(result, result.sig);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/libembind.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var LibraryEmbind = {
$InvokerFunctions: '<<< EMBIND_AOT_INVOKERS >>>',
#endif
// If register_type is used, emval will be registered multiple times for
// different type id's, but only a single type object is needed on the JS side
// different type ids, but only a single type object is needed on the JS side
// for all of them. Store the type for reuse.
$EmValType__deps: ['_emval_decref', '$Emval', '$readPointer'],
$EmValType: `{
Expand Down Expand Up @@ -737,7 +737,7 @@ var LibraryEmbind = {
return onDone(rv);
};
#else
// Builld the arguments that will be passed into the closure around the invoker
// Build the arguments that will be passed into the closure around the invoker
// function.
var retType = argTypes[0];
var instType = argTypes[1];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/libembind_gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ var LibraryEmbind = {
return [];
});
},
// Stub function. This is called a when extending an object and not needed for TS generation.
// Stub function. This is called when extending an object and not needed for TS generation.
_embind_create_inheriting_constructor: (constructorName, wrapperType, properties) => {},
_embind_register_enum__deps: ['$AsciiToString', '$EnumDefinition', '$moduleDefinitions', '$getEnumValueType'],
_embind_register_enum: function(rawType, name, size, isSigned, rawValueType) {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/libeventloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ LibraryJSEventLoop = {
// (https://stackoverflow.com/questions/8430966/is-calling-settimeout-with-a-negative-delay-ok)
var remaining = n - _emscripten_get_now();
#if ENVIRONMENT_MAY_BE_NODE
// Recent revsions of node, however, give TimeoutNegativeWarning
// Recent revisions of node, however, give TimeoutNegativeWarning
remaining = Math.max(0, remaining);
#endif
setTimeout(tick, remaining);
Expand Down Expand Up @@ -417,10 +417,10 @@ LibraryJSEventLoop = {
}

// We create the loop runner here but it is not actually running until
// _emscripten_set_main_loop_timing is called (which might happen a
// _emscripten_set_main_loop_timing is called (which might happen at a
// later time). This member signifies that the current runner has not
// yet been started so that we can call runtimeKeepalivePush when it
// gets it timing set for the first time.
// gets its timing set for the first time.
MainLoop.running = false;
MainLoop.runner = function MainLoop_runner() {
if (ABORT) return;
Expand Down
Loading