Commit Graph

520 Commits

Author SHA1 Message Date
Syrus
39550bc469 Simplified wasmparser dependencies 2020-04-28 14:26:31 -07:00
Syrus
3d2bb43a93 Updated dependent crate versions 2020-04-27 20:03:44 -07:00
Nick Lewycky
944c3d0f2f Fix trampoline generation.
Updates to new API for trampolines, taking two vmctx pointers and reusing the input space to write the returns.

Wasm values are padded to 128-bits.

Removes a pile of dead code.
2020-04-27 16:01:16 -07:00
Nick Lewycky
502e5badf4 Finish emitting and loading the trampoline code.
Turning an LLVM module into a CompiledFunction should be refactored.

Bump to latest inkwell so that we can make use of object_file with the fixes.

Comment out accidentally committed debug code that writes to my home directory.
2020-04-24 17:07:54 -07:00
Nick Lewycky
1de21f0c33 Make translator::intrinsics accessible to trampoline.
Start filling in the code to generate trampolines. Move func_type_to_llvm and type_to_llvm from code.rs to intrinsics.rs so that trampoline code can reuse them.
2020-04-24 16:42:14 -07:00
Nick Lewycky
a6bde15ce5 Connect trampoline code to trampoline module. Still unimplemented. 2020-04-24 16:31:31 -07:00
Nick Lewycky
474b3eb2f2 Fill in CompiledFunction::body with the instructions.
Use a bit of a hack to find the function, we ask LLVM to emit it to a non-standard section with a name of our choosing, and that entire section should have our function body and nothing else.
2020-04-24 16:06:03 -07:00
Nick Lewycky
8b7da22a1a Make vmctx an i8* so that we can use byte addressing.
Implement dynamic_sigindex.
2020-04-24 15:37:45 -07:00
Nick Lewycky
56fe08ad00 Assorted fixes:
Fix creation of the target machine. Fix CPU features, architecture and target name.

Function names are not mandatory. Support unnamed functions.

Include parameters and local variables in the list of local variables for LLVMFunctionCodeGenerator.

Run the tests single-threaded, using a Mutex in the rayon code. This means that only the first error is real, subsequent errors are just picking up the panic across threads.

Add TODOs about attributes on vmctx.
2020-04-23 23:32:17 -07:00
Nick Lewycky
7f4fa66a23 Fix build of compiler-llvm. 2020-04-22 16:30:55 -07:00
Nick Lewycky
4e6371c3ce Fix most compile issues in compiler-llvm.
Still to be fixed are MemoryPlan, MemoryStyle, TablePlan, and TableStyle.
2020-04-22 16:30:55 -07:00
Syrus
5eef30c7fa Added Singlepass backend 2020-04-22 14:25:27 -07:00
Syrus
502011685a Simplified cranelift and llvm compiler dependencies 2020-04-22 13:29:06 -07:00
Syrus
f62f475309 Return Features & Target by reference in Compiler 2020-04-22 11:07:45 -07:00
Syrus
57af68df13 Use module instead of module.local 2020-04-21 23:27:43 -07:00
Syrus
5e59eb895b Renamed defined_ to local_ 2020-04-21 23:26:17 -07:00
Syrus
feef35364b Renamed *Defined into *Local for better clarity 2020-04-21 23:19:33 -07:00
Syrus
68b500ad84 Moved TrapInformation to the Compiler 2020-04-21 23:01:43 -07:00
Syrus
6d98dcccd7 Added multiple readmes 2020-04-21 22:13:57 -07:00
Syrus
a402691303 First iteration of wasmer-reborn 2020-04-21 21:37:33 -07:00