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

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@acd74547f7
Browse files Browse the repository at this point in the history
[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 <chakrabot@users.noreply.github.com>
  • Loading branch information
obastemur authored and chakrabot committed Jan 26, 2018
1 parent d3af30f commit f8d2a28
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 40 deletions.
40 changes: 20 additions & 20 deletions deps/chakrashim/core/lib/Backend/BackwardPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ BackwardPass::DoTrackNegativeZero() const
bool
BackwardPass::DoTrackBitOpsOrNumber() const
{
#if _WIN64
#if defined(_WIN32) && defined(TARGET_64)
return
!PHASE_OFF1(Js::TypedArrayVirtualPhase) &&
tag == Js::BackwardPhase &&
Expand Down Expand Up @@ -316,8 +316,8 @@ BackwardPass::ProcessBailOnStackArgsOutOfActualsRange()
{
IR::Instr * instr = this->currentInstr;

if (tag == Js::DeadStorePhase &&
(instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
if (tag == Js::DeadStorePhase &&
(instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
instr->HasBailOutInfo() && !IsPrePass())
{
if (instr->DoStackArgsOpt(this->func))
Expand Down Expand Up @@ -1735,7 +1735,7 @@ BackwardPass::ProcessBailOutCopyProps(BailOutInfo * bailOutInfo, BVSparse<JitAre
StackSym * float64StackSym = nullptr;
StackSym * simd128StackSym = nullptr;

// 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
// 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
// uses and we use the copy prop sym to restore, we'll need to find the type specialize sym for that sym as well.
StackSym * typeSpecSym = nullptr;
auto findTypeSpecSym = [&]()
Expand Down Expand Up @@ -2590,7 +2590,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)

this->currentInstr = instr;
this->currentRegion = this->currentBlock->GetFirstInstr()->AsLabelInstr()->GetRegion();

IR::Instr * insertedInstr = TryChangeInstrForStackArgOpt();
if (insertedInstr != nullptr)
{
Expand All @@ -2600,7 +2600,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)

MarkScopeObjSymUseForStackArgOpt();
ProcessBailOnStackArgsOutOfActualsRange();

if (ProcessNoImplicitCallUses(instr) || this->ProcessBailOutInfo(instr))
{
continue;
Expand Down Expand Up @@ -2943,7 +2943,7 @@ BackwardPass::ProcessBlock(BasicBlock * block)
#endif
}

bool
bool
BackwardPass::CanDeadStoreInstrForScopeObjRemoval(Sym *sym) const
{
if (tag == Js::DeadStorePhase && this->currentInstr->m_func->IsStackArgsEnabled())
Expand Down Expand Up @@ -3099,7 +3099,7 @@ BackwardPass::DeadStoreOrChangeInstrForScopeObjRemoval(IR::Instr ** pInstrPrev)
case Js::OpCode::GetCachedFunc:
{
// <dst> = GetCachedFunc <scopeObject>, <functionNum>
// is converted to
// is converted to
// <dst> = NewScFunc <functionNum>, <env: FrameDisplay>

if (instr->GetSrc1()->IsScopeObjOpnd(currFunc))
Expand Down Expand Up @@ -3161,8 +3161,8 @@ BackwardPass::TryChangeInstrForStackArgOpt()
* -This is to facilitate Bailout to record the live Scope object Sym, whenever required.
* -Reason for doing is this because - Scope object has to be implicitly live whenever Heap Arguments object is live.
* -When we restore HeapArguments object in the bail out path, it expects the scope object also to be restored - if one was created.
* -We do not know detailed information about Heap arguments obj syms(aliasing etc.) until we complete Forward Pass.
* -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.
* -We do not know detailed information about Heap arguments obj syms(aliasing etc.) until we complete Forward Pass.
* -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.
* -Hence this is the optimal spot to do this.
*/

Expand Down Expand Up @@ -3196,10 +3196,10 @@ bool
BackwardPass::IsFormalParamSym(Func * func, Sym * sym) const
{
Assert(sym);

if (sym->IsPropertySym())
{
//If the sym is a propertySym, then see if the propertyId is within the range of the formals
//If the sym is a propertySym, then see if the propertyId is within the range of the formals
//We can have other properties stored in the scope object other than the formals (following the formals).
PropertySym * propSym = sym->AsPropertySym();
IntConstType value = propSym->m_propertyId;
Expand Down Expand Up @@ -4250,8 +4250,8 @@ bool
BackwardPass::ProcessSymUse(Sym * sym, bool isRegOpndUse, BOOLEAN isNonByteCodeUse)
{
BasicBlock * block = this->currentBlock;
if (CanDeadStoreInstrForScopeObjRemoval(sym))

if (CanDeadStoreInstrForScopeObjRemoval(sym))
{
return false;
}
Expand Down Expand Up @@ -4537,7 +4537,7 @@ BackwardPass::TrackObjTypeSpecProperties(IR::PropertySymOpnd *opnd, BasicBlock *
}
bucket->SetMonoGuardType(nullptr);
}

if (!opnd->IsTypeAvailable())
{
// Stop tracking the guarded properties if there's not another type check upstream.
Expand Down Expand Up @@ -5651,7 +5651,7 @@ BackwardPass::TrackIntUsage(IR::Instr *const instr)
SetNegativeZeroDoesNotMatterIfLastUse(instr->GetSrc2());
break;
}

// -0 + -0 == -0. As long as one src is guaranteed to not be -0, -0 does not matter for the other src. Pick a
// src for which to ignore negative zero, based on which sym is last-use. If both syms are last-use, src2 is
// picked arbitrarily.
Expand Down Expand Up @@ -6741,9 +6741,9 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
tempBv.Copy(this->currentBlock->byteCodeUpwardExposedUsed);
#endif
PropertySym *unusedPropertySym = nullptr;

GlobOpt::TrackByteCodeSymUsed(instr, this->currentBlock->byteCodeUpwardExposedUsed, &unusedPropertySym);

#if DBG
BVSparse<JitArenaAllocator> tempBv2(this->tempAlloc);
tempBv2.Copy(this->currentBlock->byteCodeUpwardExposedUsed);
Expand Down Expand Up @@ -6781,7 +6781,7 @@ BackwardPass::DeadStoreInstr(IR::Instr *instr)
}
#endif


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

TraceDeadStoreOfInstrsForScopeObjectRemoval();

block->RemoveInstr(instr);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/lib/Backend/Encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ Encoder::Encode()
{
__analysis_assume(m_instrNumber < instrCount);
instr->DumpGlobOptInstrString();
#ifdef _WIN64
#ifdef TARGET_64
Output::Print(_u("%12IX "), m_offsetBuffer[m_instrNumber++] + (BYTE *)m_func->GetJITOutput()->GetCodeAddress());
#else
Output::Print(_u("%8IX "), m_offsetBuffer[m_instrNumber++] + (BYTE *)m_func->GetJITOutput()->GetCodeAddress());
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/lib/Common/CommonDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
#endif

// ToDo (SaAgarwa): Disable VirtualTypedArray on ARM64 till we make sure it works correctly
#if _WIN64 && !defined(_M_ARM64)
#if defined(_WIN32) && defined(TARGET_64) && !defined(_M_ARM64)
#define ENABLE_FAST_ARRAYBUFFER 1
#endif
#endif
Expand Down
8 changes: 4 additions & 4 deletions deps/chakrashim/core/lib/Common/CommonPal.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ typedef struct _SINGLE_LIST_ENTRY {
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY, *PSINGLE_LIST_ENTRY;

#if defined(_WIN64)
#if defined(TARGET_64)

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

#pragma warning(pop)

#else
#else // defined(TARGET_64)

typedef struct _SINGLE_LIST_ENTRY SLIST_ENTRY, *PSLIST_ENTRY;

#endif // _WIN64
#endif // defined(TARGET_64)

#if defined(_AMD64_)

Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/lib/Common/Core/SysInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AutoSystemInfo : public SYSTEM_INFO
#ifdef STACK_ALIGN
static DWORD const StackAlign = STACK_ALIGN;
#else
# if defined(_WIN64)
# if defined(TARGET_64)
static DWORD const StackAlign = 16;
# elif defined(_M_ARM)
static DWORD const StackAlign = 8;
Expand All @@ -84,7 +84,7 @@ class AutoSystemInfo : public SYSTEM_INFO
UINT_PTR dllLoadAddress;
UINT_PTR dllHighAddress;
#endif

private:
AutoSystemInfo() : majorVersion(0), minorVersion(0), buildDateHash(0), buildTimeHash(0), crtSize(0) { Initialize(); }
void Initialize();
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/lib/Common/DataStructures/Comparer.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct DefaultComparer<size_t>

inline static hash_t GetHashCode(size_t i)
{
#if _WIN64
#ifdef TARGET_64
// For 64 bits we want all 64 bits of the pointer to be represented in the hash code.
uint32 hi = ((UINT_PTR) i >> 32);
uint32 lo = (uint32) (i & 0xFFFFFFFF);
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/lib/Common/Memory/MarkContext.inl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bool MarkContext::AddMarkedObject(void * objectAddress, size_t objectSize)

MarkCandidate markCandidate;

#if defined(_WIN64) && defined(_M_X64)
#if defined(_WIN32) && defined(_M_X64)
// Enabling store forwards. The intrinsic generates stores matching the load in size.
// This enables skipping caches and forwarding the store data to the following load.
*(__m128i *)&markCandidate = _mm_set_epi64x(objectSize, (__int64)objectAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ X64WriteBarrierCardTableManager::OnThreadInit()
VirtualQuery((LPCVOID)teb->StackLimit, &memInfo, sizeof(memInfo));
Assert((char*)memInfo.AllocationBase == stackEnd);
Assert(memInfo.AllocationProtect == PAGE_READWRITE);
#endif
#else
#endif // DBG
#else // defined(_WIN32) && defined(_M_X64) && !defined(_M_ARM64)
ULONG_PTR stackBase = 0;
ULONG_PTR stackEnd = 0;
::GetCurrentThreadStackLimits(&stackEnd, &stackBase);
#endif
#endif // defined(_WIN32) && defined(_M_X64) && !defined(_M_ARM64)

#ifdef X64_WB_DIAG
this->_stackbase = (char*)stackBase;
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/lib/Parser/errstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static BOOL FGetStringFromLibrary(HMODULE hlib, int istring, __out_ecount(cchMax

LError:

#if !_WIN32 && !_WIN64
#if !defined(_WIN32)

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

#endif
#endif // !defined(_WIN32)
#endif // ENABLE_GLOBALIZATION
return fRet;
}
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/lib/Parser/screrror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const MHR g_rgmhr[] =
/*0x800401F5*/ MAPHR(CO_E_APPNOTFOUND, VBSERR_CantCreateObject),
/*0x800401FE*/ MAPHR(CO_E_APPDIDNTREG, VBSERR_CantCreateObject),

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

// FACILITY_WINDOWS
/*0x80080005*/ MAPHR(CO_E_SERVER_EXEC_FAILURE, VBSERR_CantCreateObject),
#endif // _WIN32 || _WIN64
#endif // _WIN32
};
const int32 kcmhr = sizeof(g_rgmhr) / sizeof(g_rgmhr[0]);

Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/lib/Runtime/Library/ArrayBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ namespace Js
static int GetBufferOffset() { return offsetof(ArrayBuffer, buffer); }

virtual void AddParent(ArrayBufferParent* parent) override;
#if _WIN64
#if defined(TARGET_64)
//maximum 2G -1 for amd64
static const uint32 MaxArrayBufferLength = 0x7FFFFFFF;
#else
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/lib/Runtime/Library/SharedArrayBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Js
#if DBG
, allowedAgents(nullptr)
#endif
{
{
}
};

Expand Down Expand Up @@ -89,7 +89,7 @@ namespace Js
WaiterList *GetWaiterList(uint index);
SharedContents *GetSharedContents() { return sharedContents; }

#if _WIN64
#if defined(TARGET_64)
//maximum 2G -1 for amd64
static const uint32 MaxSharedArrayBufferLength = 0x7FFFFFFF;
#else
Expand Down

0 comments on commit f8d2a28

Please sign in to comment.