|
|
@@ -3,6 +3,7 @@
|
|
|
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
|
|
|
//-------------------------------------------------------------------------------------------------------
|
|
|
// ChakraDiag does not link with Runtime.lib and does not include .cpp files, so this file will be included as a header
|
|
|
+// For these reasons, we need the functions marked as inline in this file to remain inline
|
|
|
#include "RuntimeLibraryPch.h"
|
|
|
#include "DataStructures/LargeStack.h"
|
|
|
|
|
|
@@ -20,7 +21,10 @@ namespace Js
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
- StringCopyInfo::StringCopyInfo(
|
|
|
+ // In the ChakraDiag case, this file is #included so the method needs to be marked as inline
|
|
|
+ // In the ChakraCore case, it's compiled standalone and then linked with, and the StringCopyInfo
|
|
|
+ // constructor is referenced by other translation units so it needs to not be inline
|
|
|
+ JS_DIAG_INLINE StringCopyInfo::StringCopyInfo(
|
|
|
JavascriptString *const sourceString,
|
|
|
_Inout_count_(sourceString->m_charLength) char16 *const destinationBuffer)
|
|
|
: sourceString(sourceString), destinationBuffer(destinationBuffer)
|
|
|
@@ -33,14 +37,14 @@ namespace Js
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
- JavascriptString *StringCopyInfo::SourceString() const
|
|
|
+ JS_DIAG_INLINE JavascriptString *StringCopyInfo::SourceString() const
|
|
|
{
|
|
|
Assert(isInitialized);
|
|
|
|
|
|
return sourceString;
|
|
|
}
|
|
|
|
|
|
- char16 *StringCopyInfo::DestinationBuffer() const
|
|
|
+ JS_DIAG_INLINE char16 *StringCopyInfo::DestinationBuffer() const
|
|
|
{
|
|
|
Assert(isInitialized);
|
|
|
return destinationBuffer;
|