Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Remove parameter binding logic as it has abysmal performance in its
current form. This also makes bindCallAtPath obsolete again. Instead we always assume that parameters have unknown values when determining side effects. The hack that calling a member of an included variable is always a side effect also needs to stay in place until we find a way to determine with absolute certainty it was not overridden e.g. by assuming unknown function calls always mutate their parameters.
- Loading branch information
1 parent
eb1c581
commit 75f36d1
Showing
32 changed files
with
113 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 18 additions & 18 deletions
36
test/form/samples/arrow-function-call-parameters/_expected/amd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
define(function () { 'use strict'; | ||
|
||
const callArg2 = arg => arg(); | ||
callArg2( () => console.log( 'effect' ) ); | ||
const callArg = arg => arg(); | ||
callArg( () => console.log( 'effect' ) ); | ||
|
||
const assignArg2 = arg => arg.foo.bar = 1; | ||
assignArg2( {} ); | ||
const assignArg = arg => arg.foo.bar = 1; | ||
assignArg( {} ); | ||
|
||
const returnArg = arg => arg; | ||
returnArg( () => console.log( 'effect' ) )(); | ||
|
||
const returnArg2 = arg => arg; | ||
returnArg2( () => console.log( 'effect' ) )(); | ||
returnArg2( {} ).foo.bar = 1; | ||
|
||
const returnArg4 = arg => arg; | ||
returnArg4( {} ).foo.bar = 1; | ||
const returnArg3 = arg => arg; | ||
returnArg3( () => () => console.log( 'effect' ) )()(); | ||
|
||
const returnArg6 = arg => arg; | ||
returnArg6( () => () => console.log( 'effect' ) )()(); | ||
const returnArgReturn = arg => arg(); | ||
returnArgReturn( () => () => console.log( 'effect' ) )(); | ||
|
||
const returnArgReturn2 = arg => arg(); | ||
returnArgReturn2( () => () => console.log( 'effect' ) )(); | ||
returnArgReturn2( () => ({}) ).foo.bar = 1; | ||
|
||
const returnArgReturn4 = arg => arg(); | ||
returnArgReturn4( () => ({}) ).foo.bar = 1; | ||
const returnArgReturn3 = arg => arg(); | ||
returnArgReturn3( () => () => () => console.log( 'effect' ) )()(); | ||
|
||
const returnArgReturn6 = arg => arg(); | ||
returnArgReturn6( () => () => () => console.log( 'effect' ) )()(); | ||
const multiArgument = ( func, obj ) => func( obj ); | ||
multiArgument( obj => obj(), () => console.log( 'effect' ) ); | ||
|
||
const multiArgument2 = ( func, obj ) => func( obj ); | ||
multiArgument2( obj => obj(), () => console.log( 'effect' ) ); | ||
|
||
const multiArgument4 = ( func, obj ) => func( obj ); | ||
multiArgument4( obj => obj.foo.bar = 1, {} ); | ||
multiArgument2( obj => obj.foo.bar = 1, {} ); | ||
|
||
}); |
Oops, something went wrong.