Skip to content

Conversation

@rajatd
Copy link
Contributor

@rajatd rajatd commented Jul 19, 2018

No description provided.

@rajatd rajatd force-pushed the inlineeCallInfo-type branch 2 times, most recently from 78b1840 to 8fa0e00 Compare July 24, 2018 20:26
@rajatd rajatd requested review from LouisLaf, meg-gupta and tcare July 24, 2018 20:29
{
this->PopulateParent(inlinee);
#if TARGET_32
const size_t offsetMask = (~(size_t)0) >> 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Why not use uint32 here? Why hardcode 4 instead of (32 - ksizeofInlineeStartOffset) or (sizeof(uint) * CHAR_BIT - ksizeofInlineeStartOffset)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I should use uint32. Regarding the shift, I only want to make sure we are within the 28-bit limit on x86. currentOffset is uint32, so there's no point checking for 32 bit limit


In reply to: 204944353 [](ancestors = 204944353)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, regardless of which platform I want to do this check on, hardcoding 4 is probably not the best idea. I'll change that. Thanks.

uint32 Encoder::GetCurrentOffset() const
{
Assert(m_pc - m_encodeBuffer <= UINT_MAX); // encode buffer size is uint32
AssertOrFailFast(m_pc - m_encodeBuffer <= UINT_MAX); // encode buffer size is uint32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertOrFailFast [](start = 4, length = 16)

m_encodeBufferSize is a UINT32, so this failfast is redundant. Given that it can get called multiple times per instr, let's leave it as an assert.

Copy link
Collaborator

@LouisLaf LouisLaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rajatd rajatd force-pushed the inlineeCallInfo-type branch from 8fa0e00 to a1fc0ae Compare July 25, 2018 18:52
@chakrabot chakrabot merged commit a1fc0ae into chakra-core:release/1.10 Jul 25, 2018
chakrabot pushed a commit that referenced this pull request Jul 25, 2018
Merge pull request #5490 from rajatd:inlineeCallInfo-type
chakrabot pushed a commit that referenced this pull request Jul 25, 2018
…o. OS #15566165

Merge pull request #5490 from rajatd:inlineeCallInfo-type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants