Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit f8d2a28

Browse files
obastemurchakrabot
authored andcommitted
deps: update ChakraCore to chakra-core/ChakraCore@acd74547f7
[1.8>1.9] [MERGE #4604 @obastemur] xplat: remove win64 Merge pull request #4604 from obastemur:fix_target_64 xplat was using some x86 codes / definitions for x64 due to win64 macro usage. This PR fixes some of the slow test fails those we were experiencing recently on ccrobot. Reviewed-By: chakrabot <[email protected]>
1 parent d3af30f commit f8d2a28

File tree

12 files changed

+40
-40
lines changed

12 files changed

+40
-40
lines changed

Diff for: deps/chakrashim/core/lib/Backend/BackwardPass.cpp

+20-20
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ BackwardPass::DoTrackNegativeZero() const
160160
bool
161161
BackwardPass::DoTrackBitOpsOrNumber() const
162162
{
163-
#if _WIN64
163+
#if defined(_WIN32) && defined(TARGET_64)
164164
return
165165
!PHASE_OFF1(Js::TypedArrayVirtualPhase) &&
166166
tag == Js::BackwardPhase &&
@@ -316,8 +316,8 @@ BackwardPass::ProcessBailOnStackArgsOutOfActualsRange()
316316
{
317317
IR::Instr * instr = this->currentInstr;
318318

319-
if (tag == Js::DeadStorePhase &&
320-
(instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
319+
if (tag == Js::DeadStorePhase &&
320+
(instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
321321
instr->HasBailOutInfo() && !IsPrePass())
322322
{
323323
if (instr->DoStackArgsOpt(this->func))
@@ -1735,7 +1735,7 @@ BackwardPass::ProcessBailOutCopyProps(BailOutInfo * bailOutInfo, BVSparse<JitAre
17351735
StackSym * float64StackSym = nullptr;
17361736
StackSym * simd128StackSym = nullptr;
17371737

1738-
// If the sym is type specialized, we need to check for upward exposed uses of the specialized sym and not the equivalent var sym. If there are no
1738+
// If the sym is type specialized, we need to check for upward exposed uses of the specialized sym and not the equivalent var sym. If there are no
17391739
// uses and we use the copy prop sym to restore, we'll need to find the type specialize sym for that sym as well.
17401740
StackSym * typeSpecSym = nullptr;
17411741
auto findTypeSpecSym = [&]()
@@ -2590,7 +2590,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
25902590

25912591
this->currentInstr = instr;
25922592
this->currentRegion = this->currentBlock->GetFirstInstr()->AsLabelInstr()->GetRegion();
2593-
2593+
25942594
IR::Instr * insertedInstr = TryChangeInstrForStackArgOpt();
25952595
if (insertedInstr != nullptr)
25962596
{
@@ -2600,7 +2600,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
26002600

26012601
MarkScopeObjSymUseForStackArgOpt();
26022602
ProcessBailOnStackArgsOutOfActualsRange();
2603-
2603+
26042604
if (ProcessNoImplicitCallUses(instr) || this->ProcessBailOutInfo(instr))
26052605
{
26062606
continue;
@@ -2943,7 +2943,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
29432943
#endif
29442944
}
29452945

2946-
bool
2946+
bool
29472947
BackwardPass::CanDeadStoreInstrForScopeObjRemoval(Sym *sym) const
29482948
{
29492949
if (tag == Js::DeadStorePhase && this->currentInstr->m_func->IsStackArgsEnabled())
@@ -3099,7 +3099,7 @@ BackwardPass::DeadStoreOrChangeInstrForScopeObjRemoval(IR::Instr ** pInstrPrev)
30993099
case Js::OpCode::GetCachedFunc:
31003100
{
31013101
// <dst> = GetCachedFunc <scopeObject>, <functionNum>
3102-
// is converted to
3102+
// is converted to
31033103
// <dst> = NewScFunc <functionNum>, <env: FrameDisplay>
31043104

31053105
if (instr->GetSrc1()->IsScopeObjOpnd(currFunc))
@@ -3161,8 +3161,8 @@ BackwardPass::TryChangeInstrForStackArgOpt()
31613161
* -This is to facilitate Bailout to record the live Scope object Sym, whenever required.
31623162
* -Reason for doing is this because - Scope object has to be implicitly live whenever Heap Arguments object is live.
31633163
* -When we restore HeapArguments object in the bail out path, it expects the scope object also to be restored - if one was created.
3164-
* -We do not know detailed information about Heap arguments obj syms(aliasing etc.) until we complete Forward Pass.
3165-
* -And we want to avoid dead sym clean up (in this case, scope object though not explicitly live, it is live implicitly) during Block merging in the forward pass.
3164+
* -We do not know detailed information about Heap arguments obj syms(aliasing etc.) until we complete Forward Pass.
3165+
* -And we want to avoid dead sym clean up (in this case, scope object though not explicitly live, it is live implicitly) during Block merging in the forward pass.
31663166
* -Hence this is the optimal spot to do this.
31673167
*/
31683168

@@ -3196,10 +3196,10 @@ bool
31963196
BackwardPass::IsFormalParamSym(Func * func, Sym * sym) const
31973197
{
31983198
Assert(sym);
3199-
3199+
32003200
if (sym->IsPropertySym())
32013201
{
3202-
//If the sym is a propertySym, then see if the propertyId is within the range of the formals
3202+
//If the sym is a propertySym, then see if the propertyId is within the range of the formals
32033203
//We can have other properties stored in the scope object other than the formals (following the formals).
32043204
PropertySym * propSym = sym->AsPropertySym();
32053205
IntConstType value = propSym->m_propertyId;
@@ -4250,8 +4250,8 @@ bool
42504250
BackwardPass::ProcessSymUse(Sym * sym, bool isRegOpndUse, BOOLEAN isNonByteCodeUse)
42514251
{
42524252
BasicBlock * block = this->currentBlock;
4253-
4254-
if (CanDeadStoreInstrForScopeObjRemoval(sym))
4253+
4254+
if (CanDeadStoreInstrForScopeObjRemoval(sym))
42554255
{
42564256
return false;
42574257
}
@@ -4537,7 +4537,7 @@ BackwardPass::TrackObjTypeSpecProperties(IR::PropertySymOpnd *opnd, BasicBlock *
45374537
}
45384538
bucket->SetMonoGuardType(nullptr);
45394539
}
4540-
4540+
45414541
if (!opnd->IsTypeAvailable())
45424542
{
45434543
// Stop tracking the guarded properties if there's not another type check upstream.
@@ -5651,7 +5651,7 @@ BackwardPass::TrackIntUsage(IR::Instr *const instr)
56515651
SetNegativeZeroDoesNotMatterIfLastUse(instr->GetSrc2());
56525652
break;
56535653
}
5654-
5654+
56555655
// -0 + -0 == -0. As long as one src is guaranteed to not be -0, -0 does not matter for the other src. Pick a
56565656
// src for which to ignore negative zero, based on which sym is last-use. If both syms are last-use, src2 is
56575657
// picked arbitrarily.
@@ -6741,9 +6741,9 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
67416741
tempBv.Copy(this->currentBlock->byteCodeUpwardExposedUsed);
67426742
#endif
67436743
PropertySym *unusedPropertySym = nullptr;
6744-
6744+
67456745
GlobOpt::TrackByteCodeSymUsed(instr, this->currentBlock->byteCodeUpwardExposedUsed, &unusedPropertySym);
6746-
6746+
67476747
#if DBG
67486748
BVSparse<JitArenaAllocator> tempBv2(this->tempAlloc);
67496749
tempBv2.Copy(this->currentBlock->byteCodeUpwardExposedUsed);
@@ -6781,7 +6781,7 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
67816781
}
67826782
#endif
67836783

6784-
6784+
67856785
if (instr->m_opcode == Js::OpCode::ArgIn_A)
67866786
{
67876787
//Ignore tracking ArgIn for "this", as argInsCount only tracks other params - unless it is a asmjs function(which doesn't have a "this").
@@ -6793,7 +6793,7 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
67936793
}
67946794

67956795
TraceDeadStoreOfInstrsForScopeObjectRemoval();
6796-
6796+
67976797
block->RemoveInstr(instr);
67986798
return true;
67996799
}

Diff for: deps/chakrashim/core/lib/Backend/Encoder.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ Encoder::Encode()
788788
{
789789
__analysis_assume(m_instrNumber < instrCount);
790790
instr->DumpGlobOptInstrString();
791-
#ifdef _WIN64
791+
#ifdef TARGET_64
792792
Output::Print(_u("%12IX "), m_offsetBuffer[m_instrNumber++] + (BYTE *)m_func->GetJITOutput()->GetCodeAddress());
793793
#else
794794
Output::Print(_u("%8IX "), m_offsetBuffer[m_instrNumber++] + (BYTE *)m_func->GetJITOutput()->GetCodeAddress());

Diff for: deps/chakrashim/core/lib/Common/CommonDefines.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
#endif
296296

297297
// ToDo (SaAgarwa): Disable VirtualTypedArray on ARM64 till we make sure it works correctly
298-
#if _WIN64 && !defined(_M_ARM64)
298+
#if defined(_WIN32) && defined(TARGET_64) && !defined(_M_ARM64)
299299
#define ENABLE_FAST_ARRAYBUFFER 1
300300
#endif
301301
#endif

Diff for: deps/chakrashim/core/lib/Common/CommonPal.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ typedef struct _SINGLE_LIST_ENTRY {
332332
struct _SINGLE_LIST_ENTRY *Next;
333333
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;
334334

335-
#if defined(_WIN64)
335+
#if defined(TARGET_64)
336336

337337
//
338338
// The type SINGLE_LIST_ENTRY is not suitable for use with SLISTs. For
339-
// WIN64, an entry on an SLIST is required to be 16-byte aligned, while a
339+
// TARGET_64, an entry on an SLIST is required to be 16-byte aligned, while a
340340
// SINGLE_LIST_ENTRY structure has only 8 byte alignment.
341341
//
342342
// Therefore, all SLIST code should use the SLIST_ENTRY type instead of the
@@ -352,11 +352,11 @@ typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY {
352352

353353
#pragma warning(pop)
354354

355-
#else
355+
#else // defined(TARGET_64)
356356

357357
typedef struct _SINGLE_LIST_ENTRY SLIST_ENTRY, *PSLIST_ENTRY;
358358

359-
#endif // _WIN64
359+
#endif // defined(TARGET_64)
360360

361361
#if defined(_AMD64_)
362362

Diff for: deps/chakrashim/core/lib/Common/Core/SysInfo.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class AutoSystemInfo : public SYSTEM_INFO
6969
#ifdef STACK_ALIGN
7070
static DWORD const StackAlign = STACK_ALIGN;
7171
#else
72-
# if defined(_WIN64)
72+
# if defined(TARGET_64)
7373
static DWORD const StackAlign = 16;
7474
# elif defined(_M_ARM)
7575
static DWORD const StackAlign = 8;
@@ -84,7 +84,7 @@ class AutoSystemInfo : public SYSTEM_INFO
8484
UINT_PTR dllLoadAddress;
8585
UINT_PTR dllHighAddress;
8686
#endif
87-
87+
8888
private:
8989
AutoSystemInfo() : majorVersion(0), minorVersion(0), buildDateHash(0), buildTimeHash(0), crtSize(0) { Initialize(); }
9090
void Initialize();

Diff for: deps/chakrashim/core/lib/Common/DataStructures/Comparer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct DefaultComparer<size_t>
6565

6666
inline static hash_t GetHashCode(size_t i)
6767
{
68-
#if _WIN64
68+
#ifdef TARGET_64
6969
// For 64 bits we want all 64 bits of the pointer to be represented in the hash code.
7070
uint32 hi = ((UINT_PTR) i >> 32);
7171
uint32 lo = (uint32) (i & 0xFFFFFFFF);

Diff for: deps/chakrashim/core/lib/Common/Memory/MarkContext.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bool MarkContext::AddMarkedObject(void * objectAddress, size_t objectSize)
2323

2424
MarkCandidate markCandidate;
2525

26-
#if defined(_WIN64) && defined(_M_X64)
26+
#if defined(_WIN32) && defined(_M_X64)
2727
// Enabling store forwards. The intrinsic generates stores matching the load in size.
2828
// This enables skipping caches and forwarding the store data to the following load.
2929
*(__m128i *)&markCandidate = _mm_set_epi64x(objectSize, (__int64)objectAddress);

Diff for: deps/chakrashim/core/lib/Common/Memory/RecyclerWriteBarrierManager.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ X64WriteBarrierCardTableManager::OnThreadInit()
6767
VirtualQuery((LPCVOID)teb->StackLimit, &memInfo, sizeof(memInfo));
6868
Assert((char*)memInfo.AllocationBase == stackEnd);
6969
Assert(memInfo.AllocationProtect == PAGE_READWRITE);
70-
#endif
71-
#else
70+
#endif // DBG
71+
#else // defined(_WIN32) && defined(_M_X64) && !defined(_M_ARM64)
7272
ULONG_PTR stackBase = 0;
7373
ULONG_PTR stackEnd = 0;
7474
::GetCurrentThreadStackLimits(&stackEnd, &stackBase);
75-
#endif
75+
#endif // defined(_WIN32) && defined(_M_X64) && !defined(_M_ARM64)
7676

7777
#ifdef X64_WB_DIAG
7878
this->_stackbase = (char*)stackBase;

Diff for: deps/chakrashim/core/lib/Parser/errstr.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static BOOL FGetStringFromLibrary(HMODULE hlib, int istring, __out_ecount(cchMax
9494

9595
LError:
9696

97-
#if !_WIN32 && !_WIN64
97+
#if !defined(_WIN32)
9898

9999
//
100100
// Unlock/FreeResource non-essential on win32/64.
@@ -106,7 +106,7 @@ static BOOL FGetStringFromLibrary(HMODULE hlib, int istring, __out_ecount(cchMax
106106
FreeResource(hgl);
107107
}
108108

109-
#endif
109+
#endif // !defined(_WIN32)
110110
#endif // ENABLE_GLOBALIZATION
111111
return fRet;
112112
}

Diff for: deps/chakrashim/core/lib/Parser/screrror.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const MHR g_rgmhr[] =
111111
/*0x800401F5*/ MAPHR(CO_E_APPNOTFOUND, VBSERR_CantCreateObject),
112112
/*0x800401FE*/ MAPHR(CO_E_APPDIDNTREG, VBSERR_CantCreateObject),
113113

114-
#if _WIN32 || _WIN64
114+
#if _WIN32
115115
// FACILITY_WIN32 errors
116116
/*0x80070005*/ MAPHR(E_ACCESSDENIED, VBSERR_PermissionDenied),
117117
/*0x8007000E*/ MAPHR(E_OUTOFMEMORY, VBSERR_OutOfMemory),
@@ -120,7 +120,7 @@ const MHR g_rgmhr[] =
120120

121121
// FACILITY_WINDOWS
122122
/*0x80080005*/ MAPHR(CO_E_SERVER_EXEC_FAILURE, VBSERR_CantCreateObject),
123-
#endif // _WIN32 || _WIN64
123+
#endif // _WIN32
124124
};
125125
const int32 kcmhr = sizeof(g_rgmhr) / sizeof(g_rgmhr[0]);
126126

Diff for: deps/chakrashim/core/lib/Runtime/Library/ArrayBuffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ namespace Js
166166
static int GetBufferOffset() { return offsetof(ArrayBuffer, buffer); }
167167

168168
virtual void AddParent(ArrayBufferParent* parent) override;
169-
#if _WIN64
169+
#if defined(TARGET_64)
170170
//maximum 2G -1 for amd64
171171
static const uint32 MaxArrayBufferLength = 0x7FFFFFFF;
172172
#else

Diff for: deps/chakrashim/core/lib/Runtime/Library/SharedArrayBuffer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace Js
4242
#if DBG
4343
, allowedAgents(nullptr)
4444
#endif
45-
{
45+
{
4646
}
4747
};
4848

@@ -89,7 +89,7 @@ namespace Js
8989
WaiterList *GetWaiterList(uint index);
9090
SharedContents *GetSharedContents() { return sharedContents; }
9191

92-
#if _WIN64
92+
#if defined(TARGET_64)
9393
//maximum 2G -1 for amd64
9494
static const uint32 MaxSharedArrayBufferLength = 0x7FFFFFFF;
9595
#else

0 commit comments

Comments
 (0)