Commit Graph

68 Commits

Author SHA1 Message Date
Nick Lewycky
3a004b3e82 Fix build of compiler-llvm by growing the interface to SectionBody. 2020-05-03 16:08:05 -07:00
Syrus
fd96c4080e Merge branch 'master' into frame-info
# Conflicts:
#	lib/compiler-llvm/src/compiler.rs
#	lib/compiler-llvm/src/translator/code.rs
2020-05-01 22:09:26 -07:00
Syrus
20ad3d608f Fixed LLVM with new compiler structure 2020-05-01 22:04:33 -07:00
Nick Lewycky
4827434eef Build up list of per-function custom sections and build local relocations into them. 2020-05-01 16:31:26 -07:00
Syrus
cf70a297d8 Fixed compilation 2020-05-01 15:57:18 -07:00
Nick Lewycky
1227d50e9b Initial commit for support of custom sections. 2020-05-01 15:46:45 -07:00
Syrus
c33a368ff8 Added custom sections
Based on this document:

https://www.notion.so/wasmer/Compiler-Refactor-Proposal-c678a73b0e2c4572834d2dba21263916
2020-05-01 11:23:22 -07:00
Nick Lewycky
71eeb135bc Parse a relocation to a different user function out of the object file.
This updates to a newer inkwell to pick up a fix to Section::get_contents. Picking that up changed builder.build_struct_gep to return a Result, and there's many API updates scattered around to support that.

Compute the function names for all local and imported functions in the module in advance and pass that mapping to the function code generation.

debug_trap is added to Intrinsics, though all users are commented out.
2020-04-29 17:41:30 -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
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
f62f475309 Return Features & Target by reference in Compiler 2020-04-22 11:07:45 -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
a402691303 First iteration of wasmer-reborn 2020-04-21 21:37:33 -07:00