preserve ThisBinding for side_effects

This commit is contained in:
alexlamsl
2016-02-17 02:52:28 +08:00
committed by Richard van Velzen
parent 9662228f6a
commit 6547437725
5 changed files with 144 additions and 24 deletions

View File

@@ -1,10 +1,12 @@
remove_redundant_sequence_items: {
options = { side_effects: true };
input: {
(0, 1, eval)();
(0, 1, logThis)();
(0, 1, _decorators.logThis)();
}
expect: {
(0, eval)();
logThis();
(0, _decorators.logThis)();
}
@@ -13,10 +15,12 @@ remove_redundant_sequence_items: {
dont_remove_this_binding_sequence: {
options = { side_effects: true };
input: {
(0, eval)();
(0, logThis)();
(0, _decorators.logThis)();
}
expect: {
(0, eval)();
logThis();
(0, _decorators.logThis)();
}