Skip to content

Conversation

@pleath
Copy link
Contributor

@pleath pleath commented Aug 10, 2016

Allow the parser to detect nested function escapes of the pattern 'o.f = function(){...}' or 'o[s] = function(){...}'. Doing so at parse time allows us to disable stack-nested-functions in common cases where an escape is not detected at byte code gen time because of deferred parsing.

@pleath
Copy link
Contributor Author

pleath commented Aug 10, 2016

@dilijev @mmitche Hits of the XamlTaskFactory issue on arm_debug and x64_release.

@pleath
Copy link
Contributor Author

pleath commented Aug 10, 2016

@dotnet-bot test Windows arm_debug please
@dotnet-bot test Windows x64_release please

@dilijev
Copy link
Contributor

dilijev commented Aug 10, 2016

@pleath Thanks, I'm logging into the VMs to take a look.

@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@dotnet-bot test Windows arm_test please
@dotnet-bot test Windows x64_test please

@dilijev
Copy link
Contributor

dilijev commented Aug 11, 2016

@pleath Thanks. Looking into these as well. Not sure I'm seeing a pattern yet.

@dilijev
Copy link
Contributor

dilijev commented Aug 11, 2016

@pleath OS X failure is #1406

@obastemur
Copy link
Collaborator

@dotnet-bot test OSX osx_osx_debug_static please.

@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@curtisman @rajatd

// Parse the operand, make a new node, and look for more
pnodeT = ParseExpr<buildAST>(opl, NULL, fAllowIn, FALSE, pNameHint, &hintLength, &hintOffset, nullptr);

// Detect nested function escapes of the pattern "o.f = function(){...}" or "o[s] = function(){...}".
Copy link
Contributor

Choose a reason for hiding this comment

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

will it handle the case as
[o.x] = [function() {...}];
?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it won't. It's not actually meant to be exhaustive, just a cheap pattern-match to catch a certain common class of cases.

@akroshg
Copy link
Contributor

akroshg commented Aug 11, 2016

Other than few clarifications code wise looks good to me.

function(){...}', 'o[s] = function(){...}', or 'return f(){...}'. Doing so at parse time allows us to disable stack-nested-functions in common cases where an escape is not detected at byte code gen time because of deferred parsing.
@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@dotnet-bot test Windows x86_release please

@pleath
Copy link
Contributor Author

pleath commented Aug 11, 2016

@dotnet-bot test Windows arm_release please

@dilijev
Copy link
Contributor

dilijev commented Aug 11, 2016

Thanks @pleath

@chakrabot chakrabot merged commit e6a5212 into chakra-core:master Aug 11, 2016
chakrabot pushed a commit that referenced this pull request Aug 11, 2016
Merge pull request #1416 from pleath:8090616

Allow the parser to detect nested function escapes of the pattern 'o.f = function(){...}' or 'o[s] = function(){...}'. Doing so at parse time allows us to disable stack-nested-functions in common cases where an escape is not detected at byte code gen time because of deferred parsing.
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.

6 participants