JavaScript: Refactor InconsistentNew to improve performance.

All the filtering is now done in `getALikelyCallee`, to which I have also added an additional parameter that improves the join in the `select` clause.

I've also simplified the alert message to no longer use `toString`, which isn't meant for alert messages anyway. (This is an old query.)
This commit is contained in:
Max Schaefer
2018-11-30 15:40:45 +00:00
parent 595e6fcbf8
commit b17518a5eb
2 changed files with 42 additions and 21 deletions

View File

@@ -1,2 +1,2 @@
| m.js:1:8:1:22 | functio ... = x;\\n} | Function A is invoked as a constructor here $@, and as a normal function here $@. | c1.js:2:1:2:9 | new A(42) | new A(42) | c2.js:2:1:2:5 | A(23) | A(23) |
| tst.js:1:1:1:22 | functio ... = y;\\n} | Function Point is invoked as a constructor here $@, and as a normal function here $@. | tst.js:6:1:6:17 | new Point(23, 42) | new Point(23, 42) | tst.js:7:1:7:13 | Point(56, 72) | Point(56, 72) |
| m.js:1:8:1:22 | functio ... = x;\\n} | Function A is invoked as a constructor $@, and as a normal function $@. | c1.js:2:1:2:9 | new A(42) | here | c2.js:2:1:2:5 | A(23) | here |
| tst.js:1:1:1:22 | functio ... = y;\\n} | Function Point is invoked as a constructor $@, and as a normal function $@. | tst.js:6:1:6:17 | new Point(23, 42) | here | tst.js:7:1:7:13 | Point(56, 72) | here |