ladybird/Userland/Libraries/LibJS/Bytecode
Luke Wilde 1fc6bbcdc3 LibJS: Stop generating switch case statements on block termination
After we terminate a block (e.g. break, continue), we cannot generate
anymore bytecode for the block. This caused us to crash with this
example code:
```
a = 0;
switch (a) {
    case 0:
        break;
        console.log("hello world");
}
```
Anything after a block terminating instruction is considered
unreachable code, so we can safely skip any statements after it.
2022-03-15 11:57:51 +03:30
..
Pass LibJS/Bytecode: Replace merged block references before copying them 2022-03-14 22:28:53 +01:00
ASTCodegen.cpp LibJS: Stop generating switch case statements on block termination 2022-03-15 11:57:51 +03:30
BasicBlock.cpp LibJS: Always inline the bytecode instruction iterator's operator++ 2021-10-25 13:37:02 +02:00
BasicBlock.h LibJS: Always inline the bytecode instruction iterator's operator++ 2021-10-25 13:37:02 +02:00
CodeGenerationError.h LibJS: Make ASTNode::generate_bytecode() fallible 2022-02-13 14:41:33 +00:00
Executable.cpp LibJS: Add a separate "identifier table" to bytecode executables 2021-10-24 17:18:07 +02:00
Executable.h LibJS: Add a separate "identifier table" to bytecode executables 2021-10-24 17:18:07 +02:00
Generator.cpp LibJS/Bytecode: Unwind environments before block terminating instruction 2022-03-14 21:15:27 +03:30
Generator.h LibJS/Bytecode: Unwind to closest unwind boundary on Throw 2022-03-14 21:15:27 +03:30
IdentifierTable.cpp LibJS: Add a separate "identifier table" to bytecode executables 2021-10-24 17:18:07 +02:00
IdentifierTable.h LibJS: Add a separate "identifier table" to bytecode executables 2021-10-24 17:18:07 +02:00
Instruction.cpp LibJS: Move Instruction::length() to the Op.h header 2021-06-09 09:24:32 +02:00
Instruction.h LibJS: Implement bytecode generation for WithStatement 2022-03-13 17:50:21 +01:00
Interpreter.cpp LibJS: Leave unwind context if it has no finalizer when using handler 2022-03-14 21:15:27 +03:30
Interpreter.h LibJS: More properly implement scoping rules in bytecode codegen 2022-02-13 14:41:33 +00:00
Label.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
Op.cpp LibJS: Use ranges instead of specifying all registers for NewArray 2022-03-14 21:15:27 +03:30
Op.h LibJS: Use ranges instead of specifying all registers for NewArray 2022-03-14 21:15:27 +03:30
PassManager.h LibJS: Add a basic pass manager and add some basic passes 2021-06-15 22:06:33 +04:30
Register.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
StringTable.cpp LibJS: Use String and move semantics in Bytecode::StringTable 2021-10-24 17:18:07 +02:00
StringTable.h LibJS: Use String and move semantics in Bytecode::StringTable 2021-10-24 17:18:07 +02:00