summaryrefslogtreecommitdiff
path: root/src/zap/zapimage.cpp
diff options
context:
space:
mode:
authorFadi Hanna <fadim@microsoft.com>2016-05-13 20:35:54 -0700
committerFadi Hanna <fadim@microsoft.com>2016-05-13 20:35:54 -0700
commit97b4ff0b438261ba11b357008630076054a6f25d (patch)
tree320c32b25b556124cb354ab06a86c8f6ae806d98 /src/zap/zapimage.cpp
parent5b065284dc57bc3a9eaee9f86b0df258b1d3d7af (diff)
downloadcoreclr-97b4ff0b438261ba11b357008630076054a6f25d.tar.gz
coreclr-97b4ff0b438261ba11b357008630076054a6f25d.tar.bz2
coreclr-97b4ff0b438261ba11b357008630076054a6f25d.zip
Initial implementation of generic dictionary access for R2R. (#4519)
For now, only TypeHandle dictionary entry slots are supported and encoded in a R2R version resilient format (the rest to come soon). Support is only limited for x64 Windows platforms (rest is still TODO) The basic idea: each dictionary access is initally a call to a DynamicHelper R2R cell that computes the dictionary signature, and patches the R2R cell address with an assembly stub that performs the dictionary lookup.
Diffstat (limited to 'src/zap/zapimage.cpp')
-rw-r--r--src/zap/zapimage.cpp62
1 files changed, 36 insertions, 26 deletions
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 3ce7cd6d3c..a435d6a44d 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -2226,38 +2226,48 @@ ZapImage::CompileStatus ZapImage::TryCompileMethodWorker(CORINFO_METHOD_HANDLE h
Exception *ex = GET_EXCEPTION();
HRESULT hrException = ex->GetHR();
- StackSString message;
- ex->GetMessage(message);
+#ifdef FEATURE_READYTORUN_COMPILER
+ // NYI features in R2R - Stop crossgen from spitting unnecessary messages to the console
+ if (IsReadyToRunCompilation() && hrException == E_NOTIMPL)
+ {
+ result = NOT_COMPILED;
+ }
+ else
+#endif
+ {
+ StackSString message;
+ ex->GetMessage(message);
- CorZapLogLevel level;
+ CorZapLogLevel level;
-#ifdef CROSSGEN_COMPILE
- // Warnings should not go to stderr during crossgen
- level = CORZAP_LOGLEVEL_WARNING;
-#else
- level = CORZAP_LOGLEVEL_ERROR;
-#endif
+ #ifdef CROSSGEN_COMPILE
+ // Warnings should not go to stderr during crossgen
+ level = CORZAP_LOGLEVEL_WARNING;
+ #else
+ level = CORZAP_LOGLEVEL_ERROR;
+ #endif
- // FileNotFound errors here can be converted into a single error string per ngen compile, and the detailed error is available with verbose logging
- if (hrException == COR_E_FILENOTFOUND)
- {
- StackSString logMessage(W("System.IO.FileNotFoundException: "));
- logMessage.Append(message);
- FileNotFoundError(logMessage.GetUnicode());
- level = CORZAP_LOGLEVEL_INFO;
- }
+ // FileNotFound errors here can be converted into a single error string per ngen compile, and the detailed error is available with verbose logging
+ if (hrException == COR_E_FILENOTFOUND)
+ {
+ StackSString logMessage(W("System.IO.FileNotFoundException: "));
+ logMessage.Append(message);
+ FileNotFoundError(logMessage.GetUnicode());
+ level = CORZAP_LOGLEVEL_INFO;
+ }
- m_zapper->Print(level, W("%s while compiling method %s\n"), message.GetUnicode(), zapInfo.m_currentMethodName.GetUnicode());
+ m_zapper->Print(level, W("%s while compiling method %s\n"), message.GetUnicode(), zapInfo.m_currentMethodName.GetUnicode());
- result = COMPILE_FAILED;
- m_zapper->m_failed = TRUE;
+ result = COMPILE_FAILED;
+ m_zapper->m_failed = TRUE;
- if (m_stats != NULL)
- {
- if ((m_zapper->m_pOpt->m_compilerFlags & CORJIT_FLG_IL_STUB) == 0)
- m_stats->m_failedMethods++;
- else
- m_stats->m_failedILStubs++;
+ if (m_stats != NULL)
+ {
+ if ((m_zapper->m_pOpt->m_compilerFlags & CORJIT_FLG_IL_STUB) == 0)
+ m_stats->m_failedMethods++;
+ else
+ m_stats->m_failedILStubs++;
+ }
}
}
EX_END_CATCH(SwallowAllExceptions);