Age | Commit message (Collapse) | Author |
|
Cleanup C++ glue code related to JIT helpers
|
|
Add support for reading portable IL PDB using System.Reflection.Metadata.dll. We will try to open the IL PDB file using the portable pdb reader first, and fallback to the unmanaged diasymreader for non-portable pdbs.
Fixes #49
|
|
- Add intrisic attributes to Object.GetType/Type.GetTypeFromHandle (Object.GetType is commented out under TODO)
- Implement temporary marshalling for bool since it is used by every other Win32 API
- Implement HandleException method on JIT-EE interface
|
|
- Add lookup of all RyuJIT intrinsics
- Update manage implementations of the intrinsics to fit with what RyuJIT is capable of
- Make intrinsic expansions by the codegen to be optional by providing fallback paths
- Fix USE_PORTABLE_HELPERS to be defined for portable runtime only
These changes are under CORERT ifdefs as necessary to be reconciled with .NET Native for UWP later.
|
|
Fix #519
|
|
Since Generics context is not yet supported, we were not setting the contextHandle in getCallInfo JITEE interface implementation. Thus, when JIT would get the calling details, it would get a bogus value for contextHandle and later pass on that values to other calls to the JITEE interface. In this case, initClass was being passed the bogus value that it attempted to operate upon assuming its a valid generics context and resulted in OverflowException.
This fix is to compute the contextHandle as expected.
|
|
|
|
* When JIT calls into the JIT-EE interface, the call is wrapped.
All managed exceptions are caught by the wrapper, and re-throw as
native exceptions.
* The call from ILCompiler to JIT is also wrapped. The wrapper catches
all native exceptions, and re-throws them as managed exceptions.
* The message and call stack from the original managed exception is
captured and stored in the unmanaged exception object, and restored
in the managed exception thrown by the JIT wrapper.
* A new native module (jitinterface.dll or jitinterface.so) is added
to contain the native part of the wrappers. Long term, we should
consider whether to merge this into JIT.
|
|
- Move name to MetadataType and separate Namespace from Name. Name can
be a MetadataString once we have it.
- Introduce GenerericParameterDesc in the type hierarchy. For now it
doesn't have anything.
- Move ContainingType to MetadataType
- Expose literal fields.
|
|
- Update RyuJIT package to latest CoreCLR (includes the .NET 4.6.1 integration)
- Update and fix JIT-EE interface to keep "Hello world" working
- Update documentation as necessary
|
|
The managed signatures of IEEMemoryManager::ClrVirtualAlloc and IEEMemoryManager::ClrVirtualFree were missing `this` argument.
Fixes #411.
|
|
See issue #440.
Replaced TARGET_X86 by _TARGET_X86_.
|
|
|
|
MethodCode abstraction was redundant with MethodCodeNode.
Fixes part of #68
|
|
* The assert that dimensions are less than 32 is pointless. We should
either enforce it in the compiler if we want to, or stop enforcing it
completely.
* RhCollect is an assembly helper.
|
|
Implement getBuiltinClass
|
|
This had a few hits in the CoreCLR test run. Not sure how many tests it
will actually fix (a lot of them were for TypedReference and friends),
but it certainly lets us bucket them better with a better error message.
|
|
|
|
Using the https://github.com/dotnet/codeformatter tool with the
following command line:
/rule-:FieldNames,ReadonlyFields ILCompiler.sln
|
|
|
|
Relocation or a BlockRelativeTarget.
|
|
Change JIT name from ProtoJit to RyuJit and Update feed URL
|
|
|
|
Make unimplemented features more diagnosable
|
|
This improves diagnosability of unimplemented compiler features at
runtime.
* If we hit an exception when compiling a method, generate code to call
a "not yet implemented" method. (This used to be "generate INT 3")
* In the not yet implemented method print the method name and reason
* Add messages to a bunch of exceptions
|
|
|
|
Remove casting to EcmaMethod from JitInterface
|
|
There were two heavy hitters on the CoreCLR test suite:
* Uses of RuntimeFieldHandle outside of the limited area we support were crashing the compiler. Moving the detection to the catchall block so that we do whatever we do for other unsupported features.
* FilterException is getting called by JIT when one of the locals in a method refers to a type we couldn't load and JitInterface is throwing an exception.
|
|
Expose necessary properties on MethodDesc.
|
|
- Rename the compiler .exe to ilc.exe
- Rename ILToNative.* to ILCompiler.* everywhere else
|
|
This allows to place break point into C# source and step into callee.
Jit reports il to native offsets. EE has source line to il offset.
Basically when Jit reports such table, I build native offset to source location table (DebugLocInfo).
File names are uniquely aggregated and referenced by the index -- DebugFileInfo.
The latter table is a global thing which is emitted once in the beginning
The former table is for each function.
I didn't share ILEmitter code but just copy it for now since it only uses line info.
Eventually this needs to factored.
I also adapted codeview emission code from LLVM for native Object writer, which also needs to be refactored.
It's under review -- https://github.com/dotnet/llilc/pull/936
ObjectWriter version should be also updated accordingly.
|
|
With this change, local variables can no longer be represented as
an array of TypeDefs, so adding a new structure that will hold
the TypeDef and additional metadata.
Most of the changes are just a ripple effect.
We are now reporting pinned locals to RyuJIT.
|
|
Emit frame info
Since CI pass, I now merge this change. I also updated binaries in Jan's private share although the official build doesn't consume this in case someone just want to copy it from there.
|
|
This supports for emitting frame info for Windows.
Basically pdata/xdata is constructed like C++ to allow call stack dumps.
EH table itself is not populated yet since EH model is not determined.
The native object writer part is under review -- https://github.com/dotnet/llilc/pull/933
Tested debugger now shows call stacks on the managed code that we emit in Windows.
|
|
Add support for constrained method calls
|
|
This should be complete for the set of scenarios we can currently
encounter (no shared generics).
* Port of TryResolveConstraintMethodApprox from NUTC/CoreCLR. This is
the part that will need to be extended for shared generics. I think I
managed to come up with an assert that will trigger when the time is
right to update the logic.
* Necessary changes on the JitInterface side
* Implement UncheckedCast in the BCL (I hit this since my fix started
pulling in 30% more methods for hello world).
I'm not checking in a change to allow compiling the extra methods that
we now support (change to _skipJitList in Compilation.cs). This is
because I don't want to spend time updating the list for Linux Hello
World.
|
|
The calling convention workaround on getLocationOfThisType breaks Unix. Apply it only when we are running on Windows.
|
|
This will ease debugging when JIT generates code that references this.
|
|
Final set of fixes to get Hello World running on Linux:
* Pretend thread static fields are not thread static. It's not like we
support threading at this point anyway. I filed issue #209 tracking
this.
* Fix up Platform.Linux.cpp. The previous implementation didn't really
work. This one will, for English only...
* Report offset of objData to codegen (this short comment doesn't
express how awful it was to debug this).
|
|
Fixes #101
|
|
EEType passed to new array helper had extra array level applied to it. I have also deleted calls to register dependencies with the obsolete driver from JIT-EE interface.
|
|
We need a blacklist of methods that can't be passed to the JIT because
we will throw from JitInterface - on Linux we can't catch the exception
because it involves going across the native stack.
There's also a few methods that don't throw a managed exception, but
crash. The stack was pretty useless. I marked them specially on the
list.
I also added a miserable implementation of System V struct passing
classification. Not sure how correct it is, and it definitely isn't
complete.
You need a protojit.so on Linux to run (yep, remove the "lib" prefix).
|
|
The implementation mirrors the way we implement GC statics. The actual
storage for thread static fields will be allocated at runtime on the GC
heap and the helper to get to the static base will need to indirect
through the GC handle table. Most of the piping within the compiler is
present. What is not present is:
* Actually allocating an object that represents the static block. We
will need to decide whether we want to do it lazily, or on thread
attach, or...
* Putting the "region of handles to thread static blocks" in a thread
static section of the executable. This likely needs some work on the
ObjWriter side.
* The helper to get the thread static base is implemented as INT3.
This way we don't need to blacklist 3 methods for Linux Hello World.
|
|
Half-implementation of RyuJIT generated ROData blocks
|
|
Instead of trying to call HandleToObject on something that is not a
handle and throwing an ArgumentOverflowException, capture the ROData
information.
We're still dropping the generated method body on the floor in
Compilation.cs, but the difference is that we no longer throw a managed
exception from something that is called by RyuJIT (which we expect to be
problematic on CoreCLR).
This way we don't need to blacklist 11 methods from getting compiled for
Linux Hello World.
|
|
* We need to properly report CONTAINS_GC_PTR because RyuJIT can catch us lying.
* getUnboxHelper gets called (the implementation is easy enough so I just did it).
* While I was at it, I removed the cast to EcmaType from getClassAttribs.
* Added a bunch of obvious comments.
|
|
Adjust inheritance hierarchy of type system
|
|
- Adjust project so that non common bits use folders in the project
- Add DefType as a base type of MetadataType, and define NoMetadataType to derive from that
- Add new api to MetadataType to get MetadataType base type. (Note, this means that all MetadataTypes must derive from MetadataTypes)
- Restructure field layout code so that the logic that is associated with a given class is in a seperate c# file that is per class with extra contents.
- Move MethodImpls logic in EcmaType to seperate file to match factoring of base class.
|
|
|
|
Redirect string constructor references to the Ctor method
|