11diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
2- index ce0509b313ab..cc8388155285 100644
2+ index 24b2d7c44886..0594197a17bd 100644
33--- a/js/src/shell/js.cpp
44+++ b/js/src/shell/js.cpp
5- @@ -185 ,6 +185 ,89 @@ using mozilla::TimeStamp;
5+ @@ -184 ,6 +184 ,89 @@ using mozilla::TimeStamp;
66 using mozilla::Utf8Unit;
77 using mozilla::Variant;
88
@@ -92,7 +92,7 @@ index ce0509b313ab..cc8388155285 100644
9292 enum JSShellExitCode {
9393 EXITCODE_RUNTIME_ERROR = 3,
9494 EXITCODE_FILE_NOT_FOUND = 4,
95- @@ -3727 ,6 +3810 ,64 @@ static bool Intern(JSContext* cx, unsigned argc, Value* vp) {
95+ @@ -3685 ,6 +3768 ,64 @@ static bool Intern(JSContext* cx, unsigned argc, Value* vp) {
9696 return true;
9797 }
9898
@@ -157,7 +157,7 @@ index ce0509b313ab..cc8388155285 100644
157157 static bool Crash(JSContext* cx, unsigned argc, Value* vp) {
158158 CallArgs args = CallArgsFromVp(argc, vp);
159159 if (args.length() == 0) {
160- @@ -9360 ,6 +9501 ,10 @@ JS_FN_HELP("parseBin ", BinParse, 1 , 0,
160+ @@ -8952 ,6 +9093 ,10 @@ JS_FN_HELP("rateMyCacheIR ", RateMyCacheIR, 0 , 0,
161161 " Returns the approximate processor time used by the process since an arbitrary epoch, in seconds.\n"
162162 " Only the difference between two calls to `cpuNow()` is meaningful."),
163163
@@ -168,9 +168,9 @@ index ce0509b313ab..cc8388155285 100644
168168 JS_FS_HELP_END
169169 };
170170 // clang-format on
171- @@ -10336 ,6 +10481 ,57 @@ static MOZ_MUST_USE bool ProcessArgs(JSContext* cx, OptionParser* op) {
172- }
173- #endif // JS_BUILD_BINAST
171+ @@ -9914 ,6 +10059 ,57 @@ static MOZ_MUST_USE bool ProcessArgs(JSContext* cx, OptionParser* op) {
172+ MultiStringRange codeChunks = op->getMultiStringOption('e');
173+ MultiStringRange modulePaths = op->getMultiStringOption('m');
174174
175175+ // Check for REPRL file source
176176+ if (op->getBoolOption("reprl")) {
@@ -224,9 +224,9 @@ index ce0509b313ab..cc8388155285 100644
224224+ }
225225+
226226 if (filePaths.empty() && utf16FilePaths.empty() && codeChunks.empty() &&
227- modulePaths.empty() && binASTPaths.empty() &&
228- !op->getStringArg("script")) {
229- @@ -11090 ,6 +11286 ,27 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
227+ modulePaths.empty() && !op->getStringArg("script")) {
228+ // Always use the interactive shell when -i is used. Without -i we let
229+ @@ -10653 ,6 +10849 ,27 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
230230 defaultToSameCompartment = false;
231231 }
232232
@@ -254,7 +254,7 @@ index ce0509b313ab..cc8388155285 100644
254254 JS::RealmOptions options;
255255 SetStandardRealmOptions(options);
256256 RootedObject glob(
257- @@ -11107 ,7 +11324 ,8 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
257+ @@ -10670 ,7 +10887 ,8 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
258258 #endif
259259
260260 ShellContext* sc = GetShellContext(cx);
@@ -264,7 +264,7 @@ index ce0509b313ab..cc8388155285 100644
264264 {
265265 AutoReportException are(cx);
266266 if (!ProcessArgs(cx, op) && !sc->quitting) {
267- @@ -11135 ,6 +11353 ,18 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
267+ @@ -10698 ,6 +10916 ,18 @@ static int Shell(JSContext* cx, OptionParser* op, char** envp) {
268268 result = sc->exitCode;
269269 }
270270
@@ -283,7 +283,7 @@ index ce0509b313ab..cc8388155285 100644
283283 if (enableDisassemblyDumps) {
284284 AutoReportException are(cx);
285285 if (!js::DumpRealmPCCounts(cx)) {
286- @@ -11579 ,7 +11809 ,9 @@ int main(int argc, char** argv, char** envp) {
286+ @@ -11150 ,7 +11380 ,9 @@ int main(int argc, char** argv, char** envp) {
287287 #endif
288288 !op.addBoolOption('\0', "wasm-compile-and-serialize",
289289 "Compile the wasm bytecode from stdin and serialize "
0 commit comments