Closed
Bug 1149001
Opened 9 years ago
Closed 9 years ago
Remove some SpiderMonkey tests for nonstandard let blocks
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1023609
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(4 files)
77.91 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
3.36 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
52.36 KB,
patch
|
Details | Diff | Splinter Review | |
40.09 KB,
patch
|
Details | Diff | Splinter Review |
This patch removes some test files and individual test cases of let blocks and expressions.
Attachment #8585253 -
Flags: review?(shu)
Assignee | ||
Comment 1•9 years ago
|
||
Change some SpiderMonkey tests to use new {} block scopes instead of nonstandard let blocks.
Attachment #8585255 -
Flags: review?(shu)
Assignee | ||
Comment 2•9 years ago
|
||
Change some SpiderMonkey tests to use arrow function IIFEs instead of nonstandard let blocks. Some of these tests are fuzzer jit-tests and won't cover the same code paths using IIFEs instead of let blocks. If you think the modified tests are no longer useful, I can just delete them instead.
Attachment #8585259 -
Flags: review?(shu)
Assignee | ||
Comment 3•9 years ago
|
||
Change some SpiderMonkey tests to use `with` blocks instead of nonstandard let blocks where the `with` blocks are syntactically convenient replacements. Some of these tests are fuzzer jit-tests and won't cover the same code paths or will deoptimize the JIT when using `with` blocks. If you think the modified tests are no longer useful, I can just delete them instead.
Attachment #8585261 -
Flags: review?(shu)
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #0) > This patch removes some test files and individual test cases of let blocks > and expressions. Also, should I wait to remove these let block tests until after SpiderMonkey's let block support has been removed (in bug 1023609)?
Flags: needinfo?(shu)
Assignee | ||
Comment 5•9 years ago
|
||
btw, I intended to remove support for let blocks and expressions at the same time, but I see that for loop heads appear to be desugared to let blocks. I'll try to first remove just let expressions so I will keep all the let block tests for now.
Flags: needinfo?(shu)
Comment 6•9 years ago
|
||
Comment on attachment 8585253 [details] [diff] [review] remove-let-tests.patch Review of attachment 8585253 [details] [diff] [review]: ----------------------------------------------------------------- Wondrous joy ::: js/src/jit-test/tests/debug/Environment-callee-01.js @@ -20,5 @@ > } > > check('debugger;', 'object', null); > check('with({}) { debugger; };', 'with', null); > -check('let (x=1) { debugger; };', 'declarative', null); For just this test we should replace these with let decls: '{ let x = 1; debugger; }' here @@ -43,5 @@ > > g.eval('function m() { debugger; yield true; }'); > check('m().next();', 'declarative', gw.makeDebuggeeValue(g.m)); > > -g.eval('function n() { let (x = 1) { debugger; } }'); 'function n() { let x = 1; debugger; }' here
Attachment #8585253 -
Flags: review?(shu) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8585255 [details] [diff] [review] add-block-scopes.patch Review of attachment 8585255 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit-test/tests/basic/testAliasedLet.js @@ +1,2 @@ > function f() { > + let x, y, z; I don't think these outer decls are necessary.
Attachment #8585255 -
Flags: review?(shu) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8585259 [details] [diff] [review] replace-let-with-functions.patch Review of attachment 8585259 [details] [diff] [review]: ----------------------------------------------------------------- Why were these changed to lambdas instead of just let decls?
Comment 9•9 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #4) > (In reply to Chris Peterson [:cpeterson] from comment #0) > > This patch removes some test files and individual test cases of let blocks > > and expressions. > > Also, should I wait to remove these let block tests until after > SpiderMonkey's let block support has been removed (in bug 1023609)? Shouldn't it be the other way around? These tests will fail if they aren't fixed/removed yet the actual language construct is removed.
Comment 10•9 years ago
|
||
Comment on attachment 8585261 [details] [diff] [review] replace-let-with-with.patch Review of attachment 8585261 [details] [diff] [review]: ----------------------------------------------------------------- I don't think this is a good change. I say remove the fuzz tests and change the non-fuzz tests to use let decls.
Attachment #8585261 -
Flags: review?(shu)
Updated•9 years ago
|
Attachment #8585259 -
Flags: review?(shu)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Shu-yu Guo [:shu] from comment #8) > Why were these changed to lambdas instead of just let decls? I guess let decls would have been easier for replacing let blocks, but the let expression tests needed an expression. I can switch to let decls if you prefer.
Comment 12•9 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #11) > (In reply to Shu-yu Guo [:shu] from comment #8) > > Why were these changed to lambdas instead of just let decls? > > I guess let decls would have been easier for replacing let blocks, but the > let expression tests needed an expression. I can switch to let decls if you > prefer. If you would, thanks. Lambdas would be testing something completely different than before. I'd just remove the fuzz tests and only change those that aren't obviously fuzz tests.
Assignee | ||
Comment 13•9 years ago
|
||
I posted a simpler patch to just remove tests of let expressions in bug 1023609 comment 1.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•