1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 04:25:13 +00:00
serenity/Userland/Libraries/LibJS/Bytecode
Ali Mohammad Pur 3194177dce LibJS: Correctly parse yield-from expressions
This commit implements parsing for `yield *expr`, and the multiple
ways something can or can't be parsed like that.
Also makes yield-from a TODO in the bytecode generator.
Behold, the glory of javascript syntax:
```js
// 'yield' = expression in generators.
function* foo() {
    yield
    *bar; // <- Syntax error here, expression can't start with *
}

// 'yield' = identifier anywhere else.
function foo() {
    yield
    *bar; // Perfectly fine, this is just `yield * bar`
}
```
2021-06-14 13:06:08 +01:00
..
ASTCodegen.cpp LibJS: Correctly parse yield-from expressions 2021-06-14 13:06:08 +01:00
BasicBlock.cpp LibJS: Allocate 4 KiB for Bytecode::BasicBlock 2021-06-10 21:59:49 +02:00
BasicBlock.h LibJS: Automatically split linear bytecode into multiple blocks 2021-06-11 00:30:09 +02:00
Generator.cpp LibJS: Implement generator functions (only in bytecode mode) 2021-06-11 00:30:09 +02:00
Generator.h LibJS: Implement generator functions (only in bytecode mode) 2021-06-11 00:30:09 +02:00
Instruction.cpp LibJS: Move Instruction::length() to the Op.h header 2021-06-09 09:24:32 +02:00
Instruction.h LibJS: Add LoadArgument bytecode instruction for fast argument access 2021-06-14 11:26:12 +02:00
Interpreter.cpp LibJS: Store and maintain an "execution generation" counter 2021-06-12 18:39:23 +01:00
Interpreter.h LibJS: Implement generator functions (only in bytecode mode) 2021-06-11 00:30:09 +02:00
Label.h LibJS: Generate bytecode in basic blocks instead of one big block 2021-06-09 09:07:29 +02:00
Op.cpp LibJS: Add LoadArgument bytecode instruction for fast argument access 2021-06-14 11:26:12 +02:00
Op.h LibJS: Add LoadArgument bytecode instruction for fast argument access 2021-06-14 11:26:12 +02:00
Register.h LibJS: Always keep the global object in bytecode VM register $1 2021-06-10 21:59:49 +02:00
StringTable.cpp LibJS: Store strings in a string table 2021-06-09 17:42:52 +02:00
StringTable.h LibJS: Store strings in a string table 2021-06-09 17:42:52 +02:00