This change enables compilation of the runtime excluding the PAL
layer on Linux.
Most of the changes are just to make it build with clang that's
more strict w.r.t. the C++11 standard.
In addition to that, I have removed our implementation of the
new / delete operators and replaced all calls to new in the
runtime by new (nothrow).
The change here is just adding some default implmentation to be used for
Linux so we can avoid calling any path end up calling Win32 API.
The change also will make it easier in the future to determine what
functionality needed for Linux to implement the real PAL layer.
Note that, the changes here cover most of the globalization implemntation but
we may need to do more as needed if we run into any other problem when getting
the demo ready
Most of the work is piping the RVA static data from the PE image
into our internal data structures, and into the resulting object file.
* Adding IsIntrinsic property that indicates whether the property is an intrinsic
* Adding concept of ReadOnlyDataBlobs to the NodeFactory. I expect this to be more general purpose.
* Name mangling on fields. I was conflicted about adding a big name mangler since we will only need it for RVA statics, but I did it anyway.
This is intentionally only recognizing InitializeArray as an intrinsic. We have some
work to do before we can enable it on e.g. CompareExchange<T>.
We will need to figure out a way to distinguish between JIT intrinsics and
compiler intrinsics in the near future.
The existing string field layout data assumes the code will be compiled
with Bartok. We will not be carrying forward the workarounds at the
compiler side that make it work.
Hello World compiles, but doesn't run because we don't support instance method delegates yet.
* Do not try to emit addresses of abstract methods into vtables. Emit a null pointer instead.
* Generate an "INT 3" method body if JIT fails to compile a method
* Fix a bug in GC static data EEType creation code
* Emit an external symbol reference for RuntimeImports
* Temporary workaround for WriteBarrier. We can't call the C++ method because JIT doesn't build a stack frame with a register spill zone before the call.
The rest are some small fixes:
* Fix a bug where during EEType generation we assumed everything will be
castable to MetadataType
* Compute proper baseSize for Array and MDArray types
Adding support for CoreCLR-style MDArrays. The MDArrays are implemented
inline (as opposed to having an indirection to a separate vector, which
is how they are implemented in .NET Native).
We are emitting IL stubs for Get/Set/Address methods and allocation is
handled by a separate JIT helper implemented by the runtime.
I also update the implementation in the CPP backend - that one was using
.NET Native style arrays that expected MDArrays to be backed by a
"normal" generic type.
There are still some TODOs left (type check, bounds check) that depend
on the IL stub emitter to work with labels. Labels are NYI and this
checkin is already pretty big as it is. I can tackle that in a separate
checkin.
Tiny IL disassember that will show you disassembly of a MethodIL
instance within Visual Studio.
Makes the game of "How did Michal mess up generating the IL again?" way
less frustrating for me.