Skip to content

Commit c676961

Browse files
elliotttJakeChampion
authored andcommitted
Add a comment explaining why we use setForceFullParse
1 parent bc499c9 commit c676961

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

c-dependencies/js-compute-runtime/js-compute-runtime.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,12 @@ bool eval_stdin(JSContext *cx, MutableHandleValue result) {
235235
}
236236

237237
JS::CompileOptions opts(cx);
238+
239+
// This ensures that we're eagerly loading the sript, and not lazily generating bytecode for
240+
// functions.
241+
// https://searchfox.org/mozilla-central/rev/5b2d2863bd315f232a3f769f76e0eb16cdca7cb0/js/public/CompileOptions.h#571-574
238242
opts.setForceFullParse();
243+
239244
// TODO: investigate passing a filename to Wizer and using that here to
240245
// improve diagnostics.
241246
// TODO: furthermore, investigate whether Wizer by now allows us to pass an

0 commit comments

Comments
 (0)