summaryrefslogtreecommitdiff
path: root/src/vm/jitinterface.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-10-07Remove some dead remoting and context static things (#20277)Austin Wise1-20/+3
* Remove IsRemotingIntercepted methods that always return false. * Remove GetOptionalMembersAllocationSize parameters that are always false. * Remove references to context static. Remove references in comments and methodnames. * Remove RemotingVtsInfo.
2018-10-05Report instantiation argument in non-virtual interface calls (#20257)Michal Strehovský1-5/+10
The existing code would incorrectly inhibit codegen from generating instantiation argument in non-virtual calls to default interface methods (i.e. those that can happen with the `base` syntax in C#). Fixes #16775.
2018-10-05Remove context statics stuff (#20256)Jan Vorlicek1-8/+0
* Remove context statics stuff part 1 This change removes all context statics stuff from the runtime since context statics are not supported and this code was obsolete. * Remove context statics stuff from the debugger code
2018-10-03Add MethodImplOptions.AggressiveOptimization and use it for tiering (#20009)Koundinya Veluri1-1/+12
Add MethodImplOptions.AggressiveOptimization and use it for tiering Part of fix for https://github.com/dotnet/corefx/issues/32235 Workaround for https://github.com/dotnet/coreclr/issues/19751 - Added and set CORJIT_FLAG_AGGRESSIVE_OPT to indicate that a method is flagged with AggressiveOptimization - For a method flagged with AggressiveOptimization, tiering uses a foreground tier 1 JIT on first call to the method, skipping the tier 0 JIT and call counting - When tiering is disabled, a method flagged with AggressiveOptimization does not use r2r-pregenerated code - R2r crossgen does not generate code for a method flagged with AggressiveOptimization
2018-09-28Make `structType` optional in jitEEInterface method `getFieldType`. (#20191)Sergey Andreenko1-3/+6
* Make `structType` optional in `getFieldType`. The declaration in corinfo.h says: "if 'structType' == 0, then don't bother the structure info". However, `getFieldTypeInternal ` did not check this case. * Do not bother the structure info when we do not need it from `getFieldType`.
2018-09-26Cross-bitness in VTable Calls (#20137)Egor Chesakov1-2/+2
* Use TARGET_POINTER_SIZE in CEEInfo::getMethodVTableOffset in src/vm/jitinterface.cpp * Use SIZEOF__MethodTable_ in src/vm/methodtable.h
2018-09-20Performance fix for R2R: vtable calls (#20061)Fadi Hanna1-4/+17
* Performance fix for R2R: use vtable-based codegen for virtual calls within the System.Private.CoreLib version bubble, avoiding the use of the VSD, or in the generics case, a dictionary lookup. The CoreLib assembly will always be serviced along side the coreclr runtime, so special casing CoreLib to using vtable-based calls like the fragile NI case is ok.
2018-08-28Enable mixed mode assembly loading (#19542)Morgan Brown1-19/+5
Bring back functionality for loading IJW assemblies and calling managed->native. Also add workaround to test case for the C++ compiler inserting calls to mscoree.
2018-08-23Enable unloading of AssemblyLoadContext (#18476)Jan Vorlicek1-4/+3
Enable assembly unloading * Allow PInvoke methods on collectible assemblies * Fix test unloadability Several hundreds of tests were using Helper class that created GCHandle, but never freed it. That prevented unloading of those tests. The change modifies the Helper class to keep the handle in a finalizable object. Several GCHandle related tests were not freeing the GCHandle they allocated, so this change adds freeing them to enable the unloading. * Add missing error messages to the resources * Fix shuffle thunk cache for unloadability * Add GetLoaderAllocator to ICLRPrivBinder
2018-08-06Merge pull request #19228 from AndyAyersMS/FixDevirtFinalMethodAndy Ayers1-0/+14
Fix resolveVirtualMethodHelper to check for explicit override cases
2018-08-02Fix resolveVirtualMethodHelper to check for explicit override casesAndy Ayers1-0/+14
Explicit method overrides in a class can override a virtual final method with different method. This is only possible if the different method first is introduced in a new slot. So when devirtualizing, verify that the slot of the derived method matches the slot of the base method. If they don't match, just bail on devirtualizing. Fixes #19222.
2018-08-01Allow rejit on attach (#19054)David Mason1-1/+1
* change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * change profiler rejit to be enabled by default, and also change the debugger to only give up on setting a breakpoint if a method has been rejitted, rather than just whenever rejit is on * copy corprof changes to the pal version, and change rejit so it is allowable on attach * Change GetILFunctionBody/SetILFunctionBody to be allowed after attach * Also make RequestRevert allowable on attach * change lock order and switch from GC_NOTRIGGER to GC_TRIGGERS in Rejit codepath through the codeversionmanager * make GetReJITIDs callable after attach * rename value to enable/disable rejit on attach, and cache values of profiler rejit and config value * Change places where the jit checks for rejit being enabled to actually check for what it wants, which is whether jump stamps are enabled * get rid of old value that was readded by merge somehow * disallow detach after setting rejit event mask, and prevent it from being set if rejit on attach is turned off * fix incorrect assert * Take the codemanager lock in SetIP
2018-06-29Remove relocations for vtable chunks (#17147)Gleb Balykov1-3/+13
* Separate sections READONLY_VCHUNKS and READONLY_DICTIONARY * Remove relocations for second-level indirection of Vtable in case FEATURE_NGEN_RELOCS_OPTIMIZATIONS is enabled. Introduce FEATURE_NGEN_RELOCS_OPTIMIZATIONS, under which NGEN specific relocations optimizations are enabled * Replace push/pop of R11 in stubs with - str/ldr of R4 in space reserved in epilog for non-tail calls - usage of R4 with hybrid-tail calls (same as for EmitShuffleThunk) * Replace push/pop of R11 for function epilog with usage of LR as helper register right before its restore from stack
2018-06-26Add VM support for Unsafe.AsRef(in T)Jan Kotas1-1/+2
2018-06-25Cross-bitness in instance fields placement and CORINFO structs (#18366)Egor Chesakov1-5/+5
* Replace sizeof(OBJECTREF*) with TARGET_POINTER_SIZE * Define IN_TARGET_32BIT IN_TARGET_64BIT macros * Replace IN_WIN32 IN_WIN64 with IN_TARGET_32BIT IN_TARGET_64BIT in src/vm/jitinterface.cpp src/vm/methodtablebuilder.cpp * Define and use OFFSETOF__CORINFO_* constants in clrjit * Define for all 64-bit targets * Use unsigned __int32 to emphasize that this is 32-bit number * Rename Array__u1Elems to Array__data * Eliminate OFFSETOF__CORINFO_RefArray__length * Rename OFFSETOF__CORINFO_RefAny__ to OFFSETOF__CORINFO_TypedReference__ * Fix OFFSETOF__CORINFO_TypedReference__dataPtr macro value
2018-06-19PInvoke calli support for CoreRT (#18534)Jan Kotas1-0/+5
* Ifdef out NGen-specific PInvoke calli inlining limitation for CoreCLR This limitation seems to be a left-over from effort to eliminate JITing with fragile NGen. * Delete dead partial-trust related code * Allow PInvoke stub inlining * Add convertCalliToCall JIT/EE interface method * Update superpmi
2018-06-11(Re)Enable NativeVarargs for CoreCLR (#18373)Jarret Shook1-0/+2
* Enable NativeVarargs for CoreCLR This will allow coreclr run programs which have native varargs. It also re-enables the ArgIterator type for managed to managed native vararg calls. This will allow the use of the __arglist keyword. Limitations: NYI statements have been added for all Unix Targets. With this change __arglist (native varargs) will be supported, but not yet tested on: Amd64 Windows x86 Windows Arm32 Windows Arm64 Windows This change does not re-enable native vararg tests. This will be done in a separate change.
2018-06-06Cross-bitness support in JitInterface (#18329)Egor Chesakov1-11/+30
* Replace sizeof(tailCallType) / sizeof(tailCallType[0]) with _countof(tailCallType) * Remove TransparentProxyObject and RealProxyObject * InlinedCallFrame::GetEEInfo should not be used for R2R compilation * Hardcode constants used in CEEInfo::getEEInfo * Thread fields should not be used for R2R compilation * Zero pEEInfoOut->inlinedCallFrameInfo when compiling R2R code * Rename OFFSETOF__PtrArray__m_Array to avoid compilation conflicts with asmconstants * Add assertions enabled in every non-crossbitness scenario * Define and use CROSSBITNESS_COMPILE macro
2018-06-04Work in VM towards cross-bitness crossgen (#18245)Egor Chesakov1-3/+3
* Replace sizeof expressions with target-specific constants: * sizeof(ObjHeader) -> OBJHEADER_SIZE * sizeof(Object) -> OBJECT_SIZE * ObjSizeOf(Object) -> OBJECT_BASESIZE * sizeof(ArrayBase) -> ARRAYBASE_SIZE * ObjSizeOf(ArrayBase) -> ARRAYBASE_BASESIZE * Remove ObjSizeOf macro * Use OBJECT_SIZE in ArrayBase::GetBoundsOffset * Cast ppObj to CORCOMPILE_GCREFMAP_TOKENS* before dereferencing in FakePromote * LOG2_PTRSIZE should depend on _TARGET_64BIT_
2018-06-03Typo (#18266)John Doe1-2/+2
* addres -> address * depedant -> dependent * gaurantee -> guarantee * gaurantees -> guarantees * lable -> label * lazieness -> laziness * lcoation -> location * enquing -> enqueuing * enregsitered -> enregistered * ensurin -> ensuring
2018-06-03Warnings cleanup (#18260)Robin Sue1-6/+7
* Cleanup all disabled warnings that do not trigger * Fix warning about line continuation in single line comment * Eliminiate all unreferenced local variables and reenable warning
2018-05-27Typo (#18141)John Doe1-1/+1
* Ajusted -> Adjusted * alot -> a lot * Ambigous -> Ambiguous * amoun -> amount * amoung -> among * Amperstand -> Ampersand * Anbody -> Anybody * anddoens't -> and doesn't * anme -> name * annoations -> annotations * annother -> another * anothr -> another * ansynchronous -> asynchronous * anticpation -> anticipation * anway -> anyway * aother -> another * Apparant -> Apparent * appartment -> apartment * appdmomain -> appdomain * Appdomian -> Appdomain * appdomin -> appdomain * approproiate -> appropriate * approprate -> appropriate * approp -> appropriate * appened -> appended * appropiately -> appropriately * appropraitely -> appropriately * Apperantly -> Apparently * approp. -> appropriate * Approriate -> Appropriate
2018-05-24Typo (#18122)John Doe1-1/+1
* acquringing -> acquiring * Activ -> Active * activley -> actively * acutal -> actual * bIncomingIPAdddefed -> bIncomingIPAddRefed * adddr -> addr * readding -> reading * Addfunction -> AddFunction * additionnal -> additional * Additonal -> Additional * Additonally -> Additionally * Addresss -> Address * addtion -> addition * aded -> added * aditional -> additional * adjustements -> adjustments * Adress -> Address * afer -> after * aformentioned -> aforementioned * afte -> after * agains -> against * agaisnt -> against * aggresively -> aggressively * aggreates -> aggregates * aggregious -> egregious * aginst -> against * agregates -> aggregates * Agressive -> Aggressive * ahve -> have * ajdust -> adjust * ajust -> adjust * alement -> element * algoritm -> algorithm * alighnment -> alignment * alignmant -> alignment * constraits -> constraints * Allcator -> Allocator * alllocate -> allocate * alloacted -> allocated * allocatate -> allocate * allocatoror -> allocator * alloctaed -> allocated * alloction -> allocation * alloted -> allotted * allt he -> all the * alltogether -> altogether * alocate -> allocate * alocated -> allocated * Alocates -> Allocates * alogrithm -> algorithm * aloocate -> allocate * alot -> a lot * alwasy -> always * alwyas -> always * alwys -> always
2018-05-24Fix a variety of typos (#18096)John Doe1-1/+1
* absense -> absence * aboring -> aborting * absense -> absence * absoute -> absolute * absoute -> absolute * abstration -> abstraction * dwDesiredAcces -> dwDesiredAccess * accees -> access * accesed -> accessed * accessability -> accessibility * accessable -> accessible * accidentaly -> accidentally * accesible -> accessible * accommondate -> accommodate * accurancy -> accuracy * accuratley -> accurately * Achitecture -> Architecture * acompannying -> accompanying * acordingly -> accordingly
2018-05-14Remove usages of AnsiString and replace them with UnicodeString. (#17989)Brian Robbins1-2/+7
2018-04-18Merge pull request #16962 from CarolEidt/UnixDefinesCarol Eidt1-10/+14
Unix/x64 ABI cleanup
2018-04-17Handle getTailCallCopyArgsThunk returning NULL in the JIT (#17592)Jan Kotas1-2/+2
This saves the JIT from hardcoding the logic on where getTailCallCopyArgsThunk is implemented
2018-04-17Unix/x64 ABI cleanupCarol Eidt1-10/+14
Eliminate `FEATURE_UNIX_AMD64_STRUCT_PASSING` and replace it with `UNIX_AMD64_ABI` when used alone. Both are currently defined; it is highly unlikely the latter will work alone; and it significantly clutters up the code, especially the JIT. Also, fix the altjit support (now `UNIX_AMD64_ABI_ITF`) to *not* call `ClassifyEightBytes` if the struct is too large. Otherwise it asserts.
2018-03-27[Arm64] Fix forcerelocs (#17264)Steve MacLean1-0/+3
2018-03-27[Arm64] reserve for jump stubs (#17244)Steve MacLean1-22/+40
2018-03-24Delete unused files from src/inc (#17186)Jan Kotas1-1/+0
2018-03-12Run ILLInk on System.Private.CoreLib.dll to remove dead code. (#16876)Eugene Rozenfeld1-7/+0
We already run ILLInk on corefx assemblies to remove dead code; this change enables that for System.Private.CoreLib.dll. The new ILLink.targets file is similar to the one in corefx. All runtime dependencies were already computed and rooted in an xml file that was embedded in System.Private.CoreLib.dll. This change adds ILLinkTrim.xml with a few manual roots. They are also included in the embedded xml. The dead code found by ILLink that could be removed from sources was already removed in https://github.com/dotnet/coreclr/pull/16759 The remaining code removed by ILLink falls into 4 categories: 1. Inlined constants. 2. Private default constructors when there are no other instance constructors. 3. System.Number+DoubleHelper.Sign that needs to stay in the sources for corert mirror. 4. EventListener._EventSourceCreated event methods (the even field is retained). ILLink also clears initlocals on all methods so I removed the workaround we had in jitinterface.cpp.
2018-02-26Replace sizeof(void*)-like expressions with TARGET_POINTER_SIZE macroEgor Chesakov1-15/+15
2018-02-12Define type initialization semantics for interface instance methods (#16340)Michal Strehovský1-2/+3
* Define type initialization semantics for interface instance methods Accessing an instance method on an interface should trigger non-beforefieldinit class constructors (same as it does for valuetypes). Fixes #15650.
2018-02-10Allow jit internal errors to propagate to user visible exception (#16320)Andy Ayers1-7/+0
May help users find workarounds for cases where the jits hit some kind of implementation limit, as in #12480 or #14762.
2018-01-31Merge with latest code and PR feedback.Eric Erhardt1-1/+1
2018-01-31Add Vector<T> to CoreLib.Eric Erhardt1-1/+15
This requires the runtime to change to recognize the Vector classes in either System.Numerics.Vectors.dll or in System.Private.CoreLib.dll. To do this, I added the [Intrinsic] attribute to Vector<T> struct and Vector static class.
2018-01-30Fix contract violation in new method CEEInfo::getTypeForPrimitiveNumericClassBrian Sullivan1-17/+36
Don't call the method CEEInfo::asCorInfoType THROWS TRIGGERS SO_INTOLERANT
2018-01-23Delete dead code (#15990)Jan Kotas1-89/+0
2018-01-23Add Unsafe.IsAddressGreaterThan / IsAddressLessThan (#15988)Levi Broderick1-0/+22
2018-01-23Catch ambiguous interface method resolution exceptions (#15978)Michal Strehovský1-3/+22
Default interface methods might end up being ambiguous. This thows an exception we need to catch.
2018-01-23Do not devirtualize shared default interface methods (#15979)Michal Strehovský1-0/+8
The result of the devirtualization for a method on a generic type should be an instantiating stub, but this doesn't seem to work right. Fixing that is a perf issue (that can be triaged/punted - #15977). This commit is a correctness fix to avoid bad codegen for that case. Resolves #15591.
2018-01-21Remove AppDomainLeaks configuration option (#15956)antofik1-18/+0
Removed all usages of AppDomainLeaks configuration option and CHECK_APP_DOMAIN_LEAKS feature Fix #12094
2018-01-19Stop treating all calls to instance interface methods as callvirt (#15925)Michal Strehovský1-1/+8
Fixes #15827.
2018-01-05Detect ByRefLike types using attribute (#15745)Jan Kotas1-8/+1
* Detect ByRefLike types using attribute and improve error messages for their invalid use Fixes #11371 and #15458
2017-12-15Merge pull request #15370 from MichalStrehovsky/defaultintf-mergeMichal Strehovský1-5/+13
Merge dev/defaultintf to master
2017-12-14Adding Unsafe API Add nuint that is used by SpanHelpers (#15527)Ahson Khan1-0/+23
* Adding Unsafe API Add nuint that is used by SpanHelpers * Change elementOffset to IntPtr in method signature.
2017-12-13Merge pull request #15244 from fiigii/vectorCarol Eidt1-0/+43
Enable Vector128/256<T> and Add intrinsics
2017-12-13Adding Unsafe APIs that are used by System.Memory (#15497)Ahson Khan1-1/+19
* Adding Unsafe APIs that are used by System.Memory * Update comment to match S.R.CS.U xml * Changing S.R.CS namespace to Internal.R.CS and making Unsafe class public * Add new InternalCompilerServices namespace to vm
2017-12-12Enable Vector128/256<T> and Add intrinsicsFei Peng1-0/+43