Skip to content
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

[SUPER DRAFT] New API for invoking JS functions from C# #60765

Closed
wants to merge 16 commits into from

Commits on Dec 8, 2021

  1. This is a combination of 217 commits.

    Add test coverage for date marshaling
    Add uri test
    Disable some log statements
    Returning structs works
    Returning custom classes works
    Add null checks to describe_value
    Remove invalid cwrap
    Add trimming annotations
    Restore old benchmark html
    Reuse result and exception roots
    Cleaner codegen
    Disambiguate converters in devtools
    Transition back to static methods, add signature checks and more error handling
    Implement a simple bound method cache so that automated tests don't exhaust the scratch root buffer; make the scratch root buffer smaller
    Fix a LMF leak
    Fix C warnings
    Hard-coded table of marshalers is no longer needed
    Shorter wrapper function names for better stacks
    Add linker exclusions for custom marshalers
    Hack around bug in linker/runtime that causes System.Uri forwarder to break
    Rework class lookup
    Support passing numeric values as DateTime
    Transition some null returns to asserts
    Clean up conditionals
    Don't use ISO strings
    Change pre/post filter syntax to require an explicit "return" so it can contain multiple statements
    Allow ToJavaScript to accept a pointer instead of an 'in' reference
    Support managed pointer return/parameter types in more places
    Add marshal_type for pointers
    Add tests verifying that you can marshal structs by address and then unpack them
    Initial gc safety work
    Fix formatting rule
    Rename pre/post filters
    Fix type error in driver.c
    remove _pick_result_chara_for_marshal_type
    Add library build descriptor to ensure marshalers are not stripped when the BCL is trimmed
    Attempt to fix the linker stripping test code
    Better version of no-configured-marshaler warning
    Annotate SetupJSContinuation
    Annotate safehandle APIs and add null checks
    Update targets file to pass custom marshaler msbuild items through to the helix proxy project (requires another change to work)
    Add tests for Task and ValueTask marshaling
    Fix unboxing for generic structs
    Rebase cleanups
    Correct datetime test to use UTC for comparison
    Eliminate use of MONO. and BINDING. in closures
    Optimize out a js->c call
    Normalize some APIs to take MonoType instead of MonoClass
    Repair merge damage
    Address PR feedback
    Move some types around
    Repair merge damage
    Type system fixes
    Rework create_named_function so that it can handle larger numbers of closure keys more efficiently
    Remove unnecessary test instrumentation
    Fix closure variables being generated in the wrong place
    Use a single memory slab for temp_malloc
    Checkpoint span support
    Fix unbuffered filters, support ReadOnlySpan
    Fix auto signatures for primitives and add test
    Use 4-chara unicode escapes since the x escapes are not officially permitted in JSON
    Checkpoint C# implementation of converter generator
    Align everything by 8 when constructing argument buffers because if you don't do that, the runtime passes corrupt data to C# functions
    Don't shove raw mono pointers into root buffers since we weren't doing it before (it might be nice to do it though)
    Fully transition over to having C# generate signature converters
    C# implementation of bind_method codegen
    Clean up the bindings named closure table management
    Add some comments
    Don't allocate a root for the this-ref when binding methods if the this-ref is null
    kg committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    07a3030 View commit details
    Browse the repository at this point in the history
  2. Repair merge damage

    kg committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    def3119 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. Fix lint errors

    kg committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    aea0b6a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    118e732 View commit details
    Browse the repository at this point in the history
  3. Checkpoint

    kg committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    bc5ab98 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aa08d51 View commit details
    Browse the repository at this point in the history
  5. Generate more specialized result handling code for bound methods. Ali…

    …gn C# and C's idea of marshal types better.
    kg committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    96d5254 View commit details
    Browse the repository at this point in the history
  6. Codegen cleanup

    kg committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    18449e3 View commit details
    Browse the repository at this point in the history
  7. Satisfy analyzer

    kg committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    f470485 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Fix GC safety issue

    kg committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    c7a8a26 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2021

  1. Configuration menu
    Copy the full SHA
    008a8f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0e6586 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0ea873 View commit details
    Browse the repository at this point in the history
  4. Fix root index being incorrect

    kg committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    201cbf8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e7525f0 View commit details
    Browse the repository at this point in the history
  6. Update imports

    kg committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    de3e4c1 View commit details
    Browse the repository at this point in the history