File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
samples/bench/dotnet-llvm Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ public static string EchoStruct ()
2929 return JsonSerializer . Serialize ( data , SourceGenerationContext . Default . Data ) ;
3030 }
3131
32- [ JSExport ]
33- public static int Fi ( int n ) => n <= 1 ? n : Fi ( n - 1 ) + Fi ( n - 2 ) ;
32+ [ UnmanagedCallersOnly ( EntryPoint = "fi" ) ]
33+ public static int FiExport ( int n ) => Fi ( n ) ;
34+ private static int Fi ( int n ) => n <= 1 ? n : Fi ( n - 1 ) + Fi ( n - 2 ) ;
3435
3536 [ DllImport ( "x" , EntryPoint = "getNumber" ) ]
3637 private static extern int GetNumber ( ) ;
Original file line number Diff line number Diff line change 11mergeInto ( LibraryManager . library , {
2- // TODO: Figure how to get it from "../fixtures.mjs"
2+ // Figure how to get it from "../fixtures.mjs"
33 getNumber : ( ) => 42 ,
44} ) ;
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ export async function init() {
1616 return {
1717 echoNumber : runtime . Module . _echoNumber ,
1818 echoStruct : exports . Program . EchoStruct ,
19- fi : exports . Program . Fi
19+ fi : runtime . Module . _fi
2020 } ;
2121}
You can’t perform that action at this time.
0 commit comments