@@ -36,7 +36,7 @@ pub struct Context<'a> {
36
36
/// renames for each identifier.
37
37
js_imports : HashMap < String , Vec < ( String , Option < String > ) > > ,
38
38
39
- /// A map of each wasm import and what JS to hook up to it.
39
+ /// A map of each Wasm import and what JS to hook up to it.
40
40
wasm_import_definitions : HashMap < ImportId , String > ,
41
41
42
42
/// A map from an import to the name we've locally imported it as.
@@ -377,7 +377,7 @@ impl<'a> Context<'a> {
377
377
}
378
378
379
379
// Depending on the output mode, generate necessary glue to actually
380
- // import the wasm file in one way or another.
380
+ // import the Wasm file in one way or another.
381
381
let mut init = ( String :: new ( ) , String :: new ( ) ) ;
382
382
let mut footer = String :: new ( ) ;
383
383
let mut imports = self . js_import_header ( ) ?;
@@ -445,9 +445,9 @@ impl<'a> Context<'a> {
445
445
}
446
446
}
447
447
448
- // With Bundlers we can simply import the wasm file as if it were an ES module
448
+ // With Bundlers we can simply import the Wasm file as if it were an ES module
449
449
// and let the bundler/runtime take care of it.
450
- // With Node we manually read the wasm file from the filesystem and instantiate it.
450
+ // With Node we manually read the Wasm file from the filesystem and instantiate it.
451
451
OutputMode :: Bundler { .. } | OutputMode :: Node { module : true } => {
452
452
for ( id, js) in crate :: sorted_iter ( & self . wasm_import_definitions ) {
453
453
let import = self . module . imports . get_mut ( * id) ;
@@ -491,7 +491,7 @@ impl<'a> Context<'a> {
491
491
}
492
492
493
493
// With a browser-native output we're generating an ES module, but
494
- // browsers don't support natively importing wasm right now so we
494
+ // browsers don't support natively importing Wasm right now so we
495
495
// expose the same initialization function as `--target no-modules`
496
496
// as the default export of the module.
497
497
OutputMode :: Web => {
@@ -821,7 +821,7 @@ impl<'a> Context<'a> {
821
821
}} catch (e) {{
822
822
if (module.headers.get('Content-Type') != 'application/wasm') {{
823
823
console.warn(\" `WebAssembly.instantiateStreaming` failed \
824
- because your server does not serve wasm with \
824
+ because your server does not serve Wasm with \
825
825
`application/wasm` MIME type. Falling back to \
826
826
`WebAssembly.instantiate` which is slower. Original \
827
827
error:\\ n\" , e);
@@ -1307,7 +1307,7 @@ impl<'a> Context<'a> {
1307
1307
}
1308
1308
}
1309
1309
1310
- // A fast path that directly writes char codes into WASM memory as long
1310
+ // A fast path that directly writes char codes into Wasm memory as long
1311
1311
// as it finds only ASCII characters.
1312
1312
//
1313
1313
// This is much faster for common ASCII strings because it can avoid
@@ -1836,7 +1836,7 @@ impl<'a> Context<'a> {
1836
1836
1837
1837
let cache = format ! ( "cached{}Memory{}" , kind, view. num) ;
1838
1838
let resized_check = if self . module . memories . get ( memory) . shared {
1839
- // When it's backed by a `SharedArrayBuffer`, growing the wasm module's memory
1839
+ // When it's backed by a `SharedArrayBuffer`, growing the Wasm module's memory
1840
1840
// doesn't detach old references; instead, it just leaves them pointing to a
1841
1841
// slice of the up-to-date memory. So in order to check if it's been grown, we
1842
1842
// have to compare it to the up-to-date buffer.
@@ -2393,7 +2393,7 @@ impl<'a> Context<'a> {
2393
2393
}
2394
2394
2395
2395
/// If a start function is present, it removes it from the `start` section
2396
- /// of the wasm module and then moves it to an exported function, named
2396
+ /// of the Wasm module and then moves it to an exported function, named
2397
2397
/// `__wbindgen_start`.
2398
2398
fn unstart_start_function ( & mut self ) -> bool {
2399
2399
let start = match self . module . start . take ( ) {
@@ -2780,7 +2780,7 @@ impl<'a> Context<'a> {
2780
2780
}
2781
2781
}
2782
2782
2783
- /// Attempts to directly hook up the `id` import in the wasm module with
2783
+ /// Attempts to directly hook up the `id` import in the Wasm module with
2784
2784
/// the `instrs` specified.
2785
2785
///
2786
2786
/// If this succeeds it returns `Ok(true)`, otherwise if it cannot be
@@ -2845,15 +2845,15 @@ impl<'a> Context<'a> {
2845
2845
2846
2846
// If there's no field projection happening here and this is a direct
2847
2847
// import from an ES-looking module, then we can actually just hook this
2848
- // up directly in the wasm file itself. Note that this is covered in the
2848
+ // up directly in the Wasm file itself. Note that this is covered in the
2849
2849
// various output formats as well:
2850
2850
//
2851
- // * `bundler` - they think wasm is an ES module anyway
2851
+ // * `bundler` - they think Wasm is an ES module anyway
2852
2852
// * `web` - we're sure to emit more `import` directives during
2853
2853
// `gen_init` and we update the import object accordingly.
2854
- // * `nodejs` - the polyfill we have for requiring a wasm file as a node
2854
+ // * `nodejs` - the polyfill we have for requiring a Wasm file as a node
2855
2855
// module will naturally emit `require` directives for the module
2856
- // listed on each wasm import.
2856
+ // listed on each Wasm import.
2857
2857
// * `no-modules` - imports aren't allowed here anyway from other
2858
2858
// modules and an error is generated.
2859
2859
if js. fields . is_empty ( ) {
@@ -2928,11 +2928,11 @@ impl<'a> Context<'a> {
2928
2928
// needed.
2929
2929
CallAdapter ( _) => saw_call = true ,
2930
2930
2931
- // Conversions to wasm integers are always supported since
2931
+ // Conversions to Wasm integers are always supported since
2932
2932
// they're coerced into i32/f32/f64 appropriately.
2933
2933
IntToWasm { .. } => { }
2934
2934
2935
- // Converts from wasm to JS, however, only supports most
2935
+ // Converts from Wasm to JS, however, only supports most
2936
2936
// integers. Converting into a u32 isn't supported because we
2937
2937
// need to generate glue to change the sign.
2938
2938
WasmToInt {
@@ -3993,7 +3993,7 @@ impl<'a> Context<'a> {
3993
3993
let stack_pointer = match self . aux . stack_pointer {
3994
3994
Some ( s) => s,
3995
3995
// In theory this shouldn't happen since malloc is included in
3996
- // most wasm binaries (and may be gc'd out) and that almost
3996
+ // most Wasm binaries (and may be gc'd out) and that almost
3997
3997
// always pulls in a stack pointer. We can try to synthesize
3998
3998
// something here later if necessary.
3999
3999
None => bail ! ( "failed to find stack pointer" ) ,
0 commit comments