Constants.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "RuntimeBasePch.h"
  6. using namespace Js;
  7. // The VS2013 linker treats this as a redefinition of an already
  8. // defined constant and complains. So skip the declaration if we're compiling
  9. // with VS2013 or below.
  10. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  11. const uint Constants::InvalidSourceIndex;
  12. const RegSlot Constants::NoRegister;
  13. #endif
  14. const char16 Constants::AnonymousFunction[] = _u("Anonymous function");
  15. const char16 Constants::Anonymous[] = _u("anonymous");
  16. const char16 Constants::Empty[] = _u("");
  17. const char16 Constants::FunctionCode[] = _u("Function code");
  18. const char16 Constants::GlobalCode[] = _u("Global code");
  19. const char16 Constants::EvalCode[] = _u("eval code");
  20. const char16 Constants::GlobalFunction[] = _u("glo");
  21. const char16 Constants::UnknownScriptCode[] = _u("Unknown script code");
  22. const char16 Constants::StringReplace[] = _u("String.prototype.replace");
  23. const char16 Constants::StringMatch[] = _u("String.prototype.match");
  24. const uint64 Constants::ExponentMask = 0x3FF0000000000000;
  25. const uint64 Constants::MantissaMask = 0x000FFFFFFFFFFFFF;
  26. #ifdef _M_AMD64
  27. const size_t Constants::StackLimitForScriptInterrupt = 0x7fffffffffffffff;
  28. #else
  29. const size_t Constants::StackLimitForScriptInterrupt = 0x7fffffff;
  30. #endif
  31. #pragma warning(push)
  32. #pragma warning(disable:4815) // Allow no storage for zero-sized array at end of NullFrameDisplay struct.
  33. const Js::FrameDisplay Js::NullFrameDisplay = 0;
  34. const Js::FrameDisplay Js::StrictNullFrameDisplay(0, true);
  35. #pragma warning(pop)