-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: wfltaylor/JavaScriptKit
base: main
head repository: swiftwasm/JavaScriptKit
compare: main
- 7 commits
- 22 files changed
- 2 contributors
Commits on Jun 1, 2026
-
Change Data.construct(from uint8Array:) return type from Data? to Data (
swiftwasm#752) Make Data typed-array constructor non-optional
Configuration menu - View commit details
-
Copy full SHA for d1e0f95 - Browse repository at this point
Copy the full SHA d1e0f95View commit details
Commits on Jun 8, 2026
-
BridgeJS: Support optional @js struct in imported function signatures
Optional @js structs could not be used as parameters or return values of imported (@JSFunction) signatures: the generator lowered Optional<Struct> using the non-optional object-id ABI ([isSome, objectId] / a single Int32 return), for which no Optional lowering exists, so the generated thunk did not compile. Bridge optional @js structs through the stack ABI instead - an isSome discriminator plus the struct fields - exactly like optional arrays and dictionaries. Structs already conform to the stack-based bridging protocols, so the existing _BridgedAsOptional/stack runtime extensions and the JS link's stack handling already support this; only the import-side lowering/lifting in the code generator needed to change. Adds a jsRoundTripOptionalPoint runtime round-trip (some + none) and a SwiftStructImports codegen snapshot.
Configuration menu - View commit details
-
Copy full SHA for 2941cd2 - Browse repository at this point
Copy the full SHA 2941cd2View commit details -
Merge pull request swiftwasm#755 from PassiveLogic/kr/nullable-struct…
…-import BridgeJS: Support optional @js struct in imported function signatures
Configuration menu - View commit details
-
Copy full SHA for 2388473 - Browse repository at this point
Copy the full SHA 2388473View commit details -
BridgeJS: Support case enums as imported function parameters and returns
Case enums (enums without raw values or associated values) already bridged across the export boundary as their Int32 tag, but the TypeScript import path rejected them with "Enum types are not yet supported in TypeScript imports". The JS glue already round-trips the tag in both directions, so enable case enums as imported (@JSFunction) parameters and return values by lowering and lifting that Int32 tag in the import context, matching the export side. Adds a CaseEnumImports round-trip test and an EnumCaseImport codegen snapshot.
Configuration menu - View commit details
-
Copy full SHA for 7d3faa0 - Browse repository at this point
Copy the full SHA 7d3faa0View commit details -
Merge pull request swiftwasm#756 from PassiveLogic/kr/case-enum-import
BridgeJS: Support case enums as imported function parameters and returns
Configuration menu - View commit details
-
Copy full SHA for c40fc49 - Browse repository at this point
Copy the full SHA c40fc49View commit details -
BridgeJS: Use a BigInt zero placeholder for Wasm i64 in generated JS
A Wasm i64 parameter or return value is represented as a JavaScript BigInt. The generated JS used a plain 0 as the placeholder for the absent case of an optional i64 parameter (isSome ? v : 0) and for the error-path return of an imported thunk, so calling such an export with null (or an imported i64 function throwing) raised "TypeError: Cannot convert 0 to a BigInt". Emit 0n for i64 in both placeholders (jsZeroLiteral and the imported-thunk return placeholder). This was latent because the optional Int64/UInt64 round-trip tests never exercised the none case; add those assertions.
Configuration menu - View commit details
-
Copy full SHA for 7aef830 - Browse repository at this point
Copy the full SHA 7aef830View commit details -
Merge pull request swiftwasm#757 from PassiveLogic/kr/optional-scalar…
…-zero-literal
Configuration menu - View commit details
-
Copy full SHA for be3b300 - Browse repository at this point
Copy the full SHA be3b300View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main