Skip to content

swb: a few fixes (module namespace, Debugger)#2364

Merged
jianchun merged 3 commits into
chakra-core:swbfrom
jianchun:swbmodule
Jan 12, 2017
Merged

swb: a few fixes (module namespace, Debugger)#2364
jianchun merged 3 commits into
chakra-core:swbfrom
jianchun:swbmodule

Conversation

@jianchun
Copy link
Copy Markdown

swb: fix module namespace annotation

OP_StModuleSlot was changing slot without write barrier. Annotate all
related code.

(Credit to Lei for finding it is module namespace related.)

Revert "fix a pal build issue on my machine"

This reverts commit c49e4af.

It should now work after Oguz removed wchar_t redef from PAL.

pin Debugger::m_context

Found under stress unit testing. Debugger::m_context was not pinned
and could be GC collected when not in use.

Jianchun Xu added 3 commits January 11, 2017 18:23
OP_StModuleSlot was changing slot without write barrier. Annotate all
related code.

(Credit to Lei for finding it is module namespace related.)
This reverts commit c49e4af.

It should now work after Oguz removed wchar_t redef from PAL.
Found under stress unit testing. Debugger::m_context was not pinned
and could be GC collected when not in use.
Comment thread lib/Backend/IRBuilder.cpp
case Js::OpCode::StModuleSlot:
{
Js::Var* moduleExportVarArrayAddr = Js::JavascriptOperators::OP_GetModuleExportSlotArrayAddress(slotId1, slotId2, m_func->GetScriptContextInfo());
Field(Js::Var)* moduleExportVarArrayAddr = Js::JavascriptOperators::OP_GetModuleExportSlotArrayAddress(slotId1, slotId2, m_func->GetScriptContextInfo());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why do you need this change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah, I see, you changed the return type. however I think we should avoid using Field() in backend code. may be create a version of OP_GetModuleExportSlotArrayAddress_Backend, or force cast to Js::Var*

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here it is a pointer use only, I hate cast if unnecessary...

@agarwal-sandeep
Copy link
Copy Markdown
Collaborator

Debugger change to pin/unpin looks good to me

double
__cdecl
double
__cdecl
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: some empty spaces here and below

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, I simply reverted to previous version. It contains spaces but would be identical and easier to merge back to master.

@jianchun
Copy link
Copy Markdown
Author

@leirocks @agarwal-sandeep @obastemur Thanks for CR!

@jianchun jianchun merged commit 36659e8 into chakra-core:swb Jan 12, 2017
jianchun pushed a commit that referenced this pull request Jan 12, 2017
Merge pull request #2364 from jianchun:swbmodule

### swb: fix module namespace annotation

OP_StModuleSlot was changing slot without write barrier. Annotate all
related code.

(Credit to Lei for finding it is module namespace related.)

### Revert "fix a pal build issue on my machine"

This reverts commit c49e4af.

It should now work after Oguz removed wchar_t redef from PAL.

### pin Debugger::m_context

Found under stress unit testing. Debugger::m_context was not pinned
and could be GC collected when not in use.
@jianchun jianchun deleted the swbmodule branch January 12, 2017 18:04
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