ladybird/Userland/Libraries/LibJS/Bytecode
Shannon Booth 30ab198b40 LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode
Our implementation of environment.CreateImmutableBinding(name, true)
in this AO was not correctly initializing const variables in strict
mode. This would mean that constant declarations in for loop bodies
would not throw if they were modified.

To fix this, add a new parameter to CreateVariable to set strict mode.
Also remove the vm.is_strict mode check here, as it doesn't look like
anywhere in the spec will change strict mode depending on whether the
script itself is running in script mode or not.

This fixes two of our test-js tests, no change to test262.
2023-09-21 16:19:05 +02:00
..
ASTCodegen.cpp LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode 2023-09-21 16:19:05 +02:00
BasicBlock.cpp LibJS/Bytecode: Use malloc instead of mmap for BasicBlock buffers 2023-07-13 10:19:10 +02:00
BasicBlock.h LibJS/Bytecode: Do not rethrow caught exception from finally 2023-07-14 17:05:29 +02:00
CodeGenerationError.cpp LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
CodeGenerationError.h LibJS: Remove unused CodeGenerationError::to_deprecated_string 2023-02-17 09:14:23 -05:00
Executable.cpp Everywhere: Stop using NonnullOwnPtrVector 2023-03-06 23:46:35 +01:00
Executable.h LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
Generator.cpp LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
Generator.h LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
IdentifierTable.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
IdentifierTable.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Instruction.cpp LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
Instruction.h LibJS: Store bytecode instruction length in instruction itself 2023-09-14 16:11:14 +02:00
Interpreter.cpp LibJS: Only update EC instruction pointer when pushing to EC stack 2023-09-02 19:24:29 +02:00
Interpreter.h LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
Label.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
Op.cpp LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode 2023-09-21 16:19:05 +02:00
Op.h LibJS: Create const variables in ForIn/OfBodyEvaluation in strict mode 2023-09-21 16:19:05 +02:00
RegexTable.cpp LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
RegexTable.h LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
Register.h LibJS/Bytecode: Keep saved return value in call frame register 2023-07-21 19:15:33 +02:00
StringTable.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
StringTable.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00