Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1604 from lukastaegert/use-paranoid-defaults
Assume we always have all of the new effects unless specified otherwise
- Loading branch information
Showing
37 changed files
with
432 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Node from '../Node.js'; | ||
|
||
export default class AssignmentPattern extends Node { | ||
hasEffectsWhenAssigned ( options ) { | ||
return this.left.hasEffectsWhenAssigned( options ); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Node from '../Node.js'; | ||
|
||
export default class ObjectExpression extends Node { | ||
hasEffectsWhenMutated () { | ||
return false; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
description: 'assignment to views of buffers should be kept', | ||
options: { name: 'bundle' } | ||
}; |
14 changes: 14 additions & 0 deletions
14
test/form/samples/assignment-to-array-buffer-view/_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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
12 changes: 12 additions & 0 deletions
12
test/form/samples/assignment-to-array-buffer-view/_expected/cjs.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; |
8 changes: 8 additions & 0 deletions
8
test/form/samples/assignment-to-array-buffer-view/_expected/es.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
export { view8 }; |
15 changes: 15 additions & 0 deletions
15
test/form/samples/assignment-to-array-buffer-view/_expected/iife.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var bundle = (function (exports) { | ||
'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
return exports; | ||
|
||
}({})); |
18 changes: 18 additions & 0 deletions
18
test/form/samples/assignment-to-array-buffer-view/_expected/umd.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.bundle = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
|
||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
exports.view8 = view8; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}))); |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var buffer = new ArrayBuffer( 8 ); | ||
|
||
var view8 = new Int8Array( buffer ); | ||
var view16 = new Int16Array( buffer ); | ||
|
||
view16[ 0 ] = 3; | ||
|
||
export { view8 }; |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
description: 'properly handle the results of mutating logical expressions', | ||
options: { name: 'bundle' } | ||
}; |
26 changes: 26 additions & 0 deletions
26
test/form/samples/mutate-logical-expression/_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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
var aExp = {}; | ||
var logicalAExp = aExp || true; | ||
logicalAExp.bar = 1; | ||
|
||
var bExp = {}; | ||
var cExp = {}; | ||
var logicalCExp = false || cExp; | ||
logicalCExp.bar = 1; | ||
|
||
var dExp = {}; | ||
var logicalDExp = true && dExp; | ||
logicalDExp.bar = 1; | ||
|
||
var eExp = {}; | ||
|
||
exports.aExp = aExp; | ||
exports.bExp = bExp; | ||
exports.cExp = cExp; | ||
exports.dExp = dExp; | ||
exports.eExp = eExp; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
24 changes: 24 additions & 0 deletions
24
test/form/samples/mutate-logical-expression/_expected/cjs.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var aExp = {}; | ||
var logicalAExp = aExp || true; | ||
logicalAExp.bar = 1; | ||
|
||
var bExp = {}; | ||
var cExp = {}; | ||
var logicalCExp = false || cExp; | ||
logicalCExp.bar = 1; | ||
|
||
var dExp = {}; | ||
var logicalDExp = true && dExp; | ||
logicalDExp.bar = 1; | ||
|
||
var eExp = {}; | ||
|
||
exports.aExp = aExp; | ||
exports.bExp = bExp; | ||
exports.cExp = cExp; | ||
exports.dExp = dExp; | ||
exports.eExp = eExp; |
16 changes: 16 additions & 0 deletions
16
test/form/samples/mutate-logical-expression/_expected/es.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var aExp = {}; | ||
var logicalAExp = aExp || true; | ||
logicalAExp.bar = 1; | ||
|
||
var bExp = {}; | ||
var cExp = {}; | ||
var logicalCExp = false || cExp; | ||
logicalCExp.bar = 1; | ||
|
||
var dExp = {}; | ||
var logicalDExp = true && dExp; | ||
logicalDExp.bar = 1; | ||
|
||
var eExp = {}; | ||
|
||
export { aExp, bExp, cExp, dExp, eExp }; |
27 changes: 27 additions & 0 deletions
27
test/form/samples/mutate-logical-expression/_expected/iife.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var bundle = (function (exports) { | ||
'use strict'; | ||
|
||
var aExp = {}; | ||
var logicalAExp = aExp || true; | ||
logicalAExp.bar = 1; | ||
|
||
var bExp = {}; | ||
var cExp = {}; | ||
var logicalCExp = false || cExp; | ||
logicalCExp.bar = 1; | ||
|
||
var dExp = {}; | ||
var logicalDExp = true && dExp; | ||
logicalDExp.bar = 1; | ||
|
||
var eExp = {}; | ||
|
||
exports.aExp = aExp; | ||
exports.bExp = bExp; | ||
exports.cExp = cExp; | ||
exports.dExp = dExp; | ||
exports.eExp = eExp; | ||
|
||
return exports; | ||
|
||
}({})); |
Oops, something went wrong.