Skip to content

Commit 4b61a6f

Browse files
Merge branch 'master' into feat-optional-chaining
2 parents 174e7bf + 36becec commit 4b61a6f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/Common/Memory/Allocator.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56
#pragma once
@@ -448,6 +449,8 @@ void AssertValue(void * mem, T value, uint byteCount)
448449
#define NO_EXPORT(x) x
449450
#endif
450451

452+
#if defined(_MSC_VER) && !defined(__clang__)
453+
451454
// For the debugger extension, we don't need the placement news
452455
#ifndef __PLACEMENT_NEW_INLINE
453456
#define __PLACEMENT_NEW_INLINE
@@ -473,6 +476,14 @@ void * previousAllocation // Previously allocated memory
473476

474477
#endif
475478

479+
#else
480+
481+
// Use std inline placement new instead of custom
482+
// See PR #7009
483+
#include <new>
484+
485+
#endif
486+
476487
//----------------------------------------
477488
// throwing operator new overrides
478489
//----------------------------------------

lib/Runtime/Base/Constants.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56
#include "RuntimeBasePch.h"
@@ -29,7 +30,7 @@ const char16 Constants::StringMatch[] = _u("String.prototype.match");
2930
const uint64 Constants::ExponentMask = 0x3FF0000000000000;
3031
const uint64 Constants::MantissaMask = 0x000FFFFFFFFFFFFF;
3132

32-
#ifdef _M_AMD64
33+
#ifdef TARGET_64
3334
const size_t Constants::StackLimitForScriptInterrupt = 0x7fffffffffffffff;
3435
#else
3536
const size_t Constants::StackLimitForScriptInterrupt = 0x7fffffff;

0 commit comments

Comments
 (0)