Skip to content

Instantly share code, notes, and snippets.

@jimblandy
Created April 15, 2019 18:21
Show Gist options
  • Save jimblandy/7e22b1af736ecf02905a8638c47931f2 to your computer and use it in GitHub Desktop.
Save jimblandy/7e22b1af736ecf02905a8638c47931f2 to your computer and use it in GitHub Desktop.
Fix comment in jit::CanEnterBaselineAtBranch
diff --git a/js/src/jit/BaselineJIT.cpp b/js/src/jit/BaselineJIT.cpp
--- a/js/src/jit/BaselineJIT.cpp
+++ b/js/src/jit/BaselineJIT.cpp
@@ -276,19 +276,19 @@ MethodStatus jit::CanEnterBaselineAtBran
InterpreterFrame* fp) {
if (!CheckFrame(fp)) {
return Method_CantCompile;
}
// This check is needed in the following corner case. Consider a function h,
//
// function h(x) {
- // h(false);
// if (!x)
// return;
+ // h(false);
// for (var i = 0; i < N; i++)
// /* do stuff */
// }
//
// Suppose h is not yet compiled in baseline and is executing in the
// interpreter. Let this interpreter frame be f_older. The debugger marks
// f_older as isDebuggee. At the point of the recursive call h(false), h is
// compiled in baseline without debug instrumentation, pushing a baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment