Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Simplify destructuring for single assignment and identifier cases. (issue 6709068)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
a...@chromium.org  
View profile  
 More options Oct 22 2012, 4:34 pm
From: a...@chromium.org
Date: Mon, 22 Oct 2012 20:34:05 +0000
Local: Mon, Oct 22 2012 4:34 pm
Subject: Re: Simplify destructuring for single assignment and identifier cases. (issue 6709068)

https://codereview.appspot.com/6709068/diff/1/src/codegeneration/Dest...
File src/codegeneration/DestructuringTransformer.js (right):

https://codereview.appspot.com/6709068/diff/1/src/codegeneration/Dest...
src/codegeneration/DestructuringTransformer.js:242: var tempIdent_assign
= createAssignmentExpression(tempIdent, rvalue);
no underscores... tempIdentAsign

https://codereview.appspot.com/6709068/diff/1/src/codegeneration/Dest...
src/codegeneration/DestructuringTransformer.js:501: // -
tree.initializer is an IDENTIFIER_EXPRESSION.
Conceptually this could break if the identifier refers to a getter of
the global object. I'd rather be safe here and not do this optimization.

https://codereview.appspot.com/6709068/diff/1/src/codegeneration/Dest...
src/codegeneration/DestructuringTransformer.js:503: // (paren not
necessary)
// Paren not necessary

Skip the parens in the comments

https://codereview.appspot.com/6709068/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
a...@chromium.org  
View profile  
 More options Oct 23 2012, 10:41 am
From: a...@chromium.org
Date: Tue, 23 Oct 2012 14:41:25 +0000
Local: Tues, Oct 23 2012 10:41 am
Subject: Re: Simplify destructuring for single assignment and identifier cases. (issue 6709068)
LGTM

I'll clean up the style violations and commit this for you

https://codereview.appspot.com/6709068/diff/4/src/codegeneration/Dest...
File src/codegeneration/DestructuringTransformer.js (right):

https://codereview.appspot.com/6709068/diff/4/src/codegeneration/Dest...
src/codegeneration/DestructuringTransformer.js:245:
createAssignmentExpression(tempIdent, rvalue));
Fix indentation, indent 4 spaces in this case.

https://codereview.appspot.com/6709068/diff/4/src/codegeneration/Dest...
src/codegeneration/DestructuringTransformer.js:524: initializer =
initializer || createParenExpression(tree.initializer);
Another option is to have another transformation pass that cleans up
paren expressions that do not have a location (generated by us).

https://codereview.appspot.com/6709068/diff/4/test/feature/Destructur...
File test/feature/Destructuring/Simplify.js (right):

https://codereview.appspot.com/6709068/diff/4/test/feature/Destructur...
test/feature/Destructuring/Simplify.js:11: function check_a() {
No underscores: checkA

https://codereview.appspot.com/6709068/diff/4/test/feature/Destructur...
test/feature/Destructuring/Simplify.js:46: x = { x:{ a:1, b:2, c:3 } };
No space after {
No space before }
Space after :

https://codereview.appspot.com/6709068/diff/4/test/feature/Destructur...
test/feature/Destructuring/Simplify.js:53: x = { x: [1,2,3] };
space after comma

https://codereview.appspot.com/6709068/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
a...@chromium.org  
View profile  
 More options Oct 23 2012, 10:57 am
From: a...@chromium.org
Date: Tue, 23 Oct 2012 14:57:14 +0000
Local: Tues, Oct 23 2012 10:57 am
Subject: Re: Simplify destructuring for single assignment and identifier cases. (issue 6709068)
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »