33// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44// -------------------------------------------------------------------------------------------------------
55// ChakraDiag does not link with Runtime.lib and does not include .cpp files, so this file will be included as a header
6+ // For these reasons, we need the functions marked as inline in this file to remain inline
67#include " RuntimeLibraryPch.h"
78#include " DataStructures/LargeStack.h"
89
@@ -20,7 +21,10 @@ namespace Js
2021 #endif
2122 }
2223
23- StringCopyInfo::StringCopyInfo (
24+ // In the ChakraDiag case, this file is #included so the method needs to be marked as inline
25+ // In the ChakraCore case, it's compiled standalone and then linked with, and the StringCopyInfo
26+ // constructor is referenced by other translation units so it needs to not be inline
27+ JS_DIAG_INLINE StringCopyInfo::StringCopyInfo (
2428 JavascriptString *const sourceString,
2529 _Inout_count_ (sourceString->m_charLength) char16 *const destinationBuffer)
2630 : sourceString(sourceString), destinationBuffer(destinationBuffer)
@@ -33,14 +37,14 @@ namespace Js
3337 #endif
3438 }
3539
36- JavascriptString *StringCopyInfo::SourceString () const
40+ JS_DIAG_INLINE JavascriptString *StringCopyInfo::SourceString () const
3741 {
3842 Assert (isInitialized);
3943
4044 return sourceString;
4145 }
4246
43- char16 *StringCopyInfo::DestinationBuffer () const
47+ JS_DIAG_INLINE char16 *StringCopyInfo::DestinationBuffer () const
4448 {
4549 Assert (isInitialized);
4650 return destinationBuffer;
0 commit comments