Closed Bug 1192329 Opened 5 years ago Closed 5 years ago
Change JS shell to default to the standard version of JS (not 1
As reported in bug 1146532: js> var yield; typein:1:4 SyntaxError: yield is a reserved identifier: Nonsense. The js shell should default to standard, Web-compatible JS. The version() shell builtin is still there for testing legacy features.
Snagging this ^.^
+1 I encountered this when working on let in V8. I mistakenly thought SpiderMonkey reserved let as a keyword for a while. I am using the easy workaround of writing a web page for it, but it'd be great if the js repl were fixed.
Start by changing JSVERSION_LATEST to JSVERSION_DEFAULT throughout js/src/shell/js.cpp. If there's an interesting part, it'll involve fixing busted tests. Broad-spectrum restoration of the old gross version for particular directories of tests is OK: the goal of this bug is to fix the shell for people using it interactively.
This is a dupe of Bug 1173883...
Not really. Web console is not the same as the JS shell.
Sorry for the long turnaround time here. The changes to JSVERSION_DEFAULT in shell/js.cpp didn't break tests because the shell tests were already calling "version(0)" before running. I went ahead and removed that since it's unnecessary now.
Comment on attachment 8677863 [details] [diff] [review] smshell.1.diff Review of attachment 8677863 [details] [diff] [review]: ----------------------------------------------------------------- Great! Glad this turned out to be easy for once.
Attachment #8677863 - Flags: review?(jorendorff) → review+
Attachment #8677864 - Flags: review?(jorendorff) → review+
This fixes the asm tests by explicitly setting a version.
Attachment #8678298 - Flags: review?(jorendorff)
Comment on attachment 8678298 [details] [diff] [review] smshell.3.diff I already gave this review on IRC, but it doesn't hurt to have it here too.
2 years ago
Depends on: 1501998
You need to log in before you can comment on or make changes to this bug.