diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2022-04-30 17:34:11 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2022-05-04 14:57:18 +0800 |
commit | 6d480d82a5e5d223786851865170983a47684930 (patch) | |
tree | 5093f20e0c4054764e3dd5c3937332439519a37e /js/src/jit | |
parent | fa72aef363d3e8b825024d389f3f3bf52ee38c07 (diff) | |
download | uxp-6d480d82a5e5d223786851865170983a47684930.tar.gz |
Issue #1658 - Part 6: Break and return no control flow for jumps emitted by optional chains under IonBuilder
IIUC, we want to process the GOTO in the case of optional chains, and we do not satisfy the requirements mentioned in the comment of snoopControlFlow's caller. Optional chains are not loops, we (probably) don't have a loop in the instruction following the GOTO, and in the GOTO destination, we're either returning an undefined/null value or the actual value.
Diffstat (limited to 'js/src/jit')
-rw-r--r-- | js/src/jit/IonBuilder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index dae86fd92a..dbecec2a7e 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -1649,6 +1649,12 @@ IonBuilder::snoopControlFlow(JSOp op) // while (cond) { } return whileOrForInLoop(sn); + case SRC_OPTCHAIN: + // XXX Instead of aborting early, breaking at this point works. + // However, I'm not sure if we still need to further process + // optional chains under IonBuilder. + break; + default: // Hard assert for now - make an error later. MOZ_CRASH("unknown goto case"); |