ladybird/Userland/Libraries/LibJS/Runtime
Andreas Kling 80b1604b0a LibJS: Compile ScriptFunctions into bytecode and run them that way :^)
If there's a current Bytecode::Interpreter in action, ScriptFunction
will now compile itself into bytecode and execute in that context.

This patch also adds the Return bytecode instruction so that we can
actually return values from called functions. :^)

Return values are propagated from callee to caller via the caller's
$0 register. Bytecode::Interpreter now keeps a stack of register
"windows". These are not very efficient, but it should be pretty
straightforward to convert them to e.g a sliding register window
architecture later on.

This is pretty dang cool! :^)
2021-06-07 18:11:59 +02:00
..
Accessor.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
Array.cpp LibJS: Add length parameter to Array::create() 2021-06-06 23:25:33 +01:00
Array.h LibJS: Add length parameter to Array::create() 2021-06-06 23:25:33 +01:00
ArrayBuffer.cpp LibJS: Allow ArrayBuffer to not own its backing data buffer as well 2021-05-26 15:34:13 +04:30
ArrayBuffer.h LibJS: Allow ArrayBuffer to not own its backing data buffer as well 2021-05-26 15:34:13 +04:30
ArrayBufferConstructor.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ArrayBufferConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ArrayBufferPrototype.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ArrayBufferPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ArrayConstructor.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ArrayConstructor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ArrayIterator.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ArrayIterator.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ArrayIteratorPrototype.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ArrayIteratorPrototype.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ArrayPrototype.cpp LibJS: Use Array::create() length arg in favor of set_array_like_size() 2021-06-06 23:27:47 +01:00
ArrayPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigInt.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigInt.h LibJS: Move Cell.{cpp,h} from Runtime/ to Heap/ 2021-05-17 19:53:00 +02:00
BigIntConstructor.cpp LibJS: Remove declarations of some TODO()'d BigInt and Promise functions 2021-06-02 21:06:21 +01:00
BigIntConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigIntObject.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigIntObject.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BigIntPrototype.cpp LibJS: Replace bigint_object_from() with this_bigint_value() 2021-06-06 19:34:43 +02:00
BigIntPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
BooleanConstructor.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanConstructor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanPrototype.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BooleanPrototype.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoundFunction.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoundFunction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CommonPropertyNames.h LibJS: Add Date.setUTC{Date, Month, Hours, ...}() aliases 2021-06-06 19:14:11 +01:00
ConsoleObject.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ConsoleObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Date.cpp LibJS: Store Date milliseconds as signed to support negative offsets 2021-06-06 19:14:11 +01:00
Date.h LibJS: Check dates are below the time_clip threshold 2021-06-06 19:14:11 +01:00
DateConstructor.cpp LibJS: Check dates are below the time_clip threshold 2021-06-06 19:14:11 +01:00
DateConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
DatePrototype.cpp LibJS: Check dates are below the time_clip threshold 2021-06-06 19:14:11 +01:00
DatePrototype.h LibJS: Add Date.prototype.toJSON() 2021-06-06 19:14:11 +01:00
Error.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Error.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ErrorConstructor.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ErrorConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ErrorPrototype.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
ErrorPrototype.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ErrorTypes.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ErrorTypes.h LibJS: Add Date.prototype[@@toPrimitive]() 2021-06-06 19:14:11 +01:00
Exception.cpp LibJS: Optimize insertion order in the Exception constructor 2021-06-03 14:47:15 +01:00
Exception.h LibJS: Avoid allocations in the Exception constructor 2021-06-03 14:47:15 +01:00
Function.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Function.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FunctionConstructor.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
FunctionConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
FunctionPrototype.cpp LibJS: Implement destructuring assignments and function parameters 2021-05-29 23:02:23 +04:30
FunctionPrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
GlobalObject.cpp LibJS: Trim initial whitespace in parseFloat 2021-06-06 01:34:22 +01:00
GlobalObject.h LibJS: Add the global escape() & unescape() methods 2021-06-05 18:55:08 +01:00
IndexedProperties.cpp LibJS: Handle OOB access in GenericIndexedPropertyStorage::take_last() 2021-05-17 23:20:29 +01:00
IndexedProperties.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
IteratorOperations.cpp LibJS: Replace iterator hint string argument with an enum 2021-06-02 20:52:46 +01:00
IteratorOperations.h LibJS: Replace iterator hint string argument with an enum 2021-06-02 20:52:46 +01:00
IteratorPrototype.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
IteratorPrototype.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
JobCallback.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
JSONObject.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
JSONObject.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
LexicalEnvironment.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LexicalEnvironment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MarkedValueList.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MarkedValueList.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MathObject.cpp LibJS: Correctly handle NaN and negative infinity in Math.atan2 2021-06-05 14:56:58 +01:00
MathObject.h LibJS: Add Math.imul() 2021-06-05 14:56:58 +01:00
NativeFunction.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NativeFunction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NativeProperty.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NativeProperty.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberConstructor.cpp LibJS: Add the Number.{MAX, MIN}_VALUE constants 2021-06-05 02:38:37 +01:00
NumberConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
NumberObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NumberPrototype.cpp LibJS: Update NumberPrototype's this_number_value() to take a Value 2021-06-06 19:34:43 +02:00
NumberPrototype.h LibJS: Implement Number.prototype.valueOf() 2021-06-06 06:56:08 +01:00
Object.cpp LibJS: Throw TypeError on write to non-writable property in strict mode 2021-06-05 23:54:08 +01:00
Object.h LibJS: Move Cell.{cpp,h} from Runtime/ to Heap/ 2021-05-17 19:53:00 +02:00
ObjectConstructor.cpp LibJS: Use ToPropertyKey in Object.getOwnPropertyDescriptor 2021-06-07 16:51:09 +01:00
ObjectConstructor.h LibJS: Implement Object.hasOwn() :^) 2021-05-18 11:18:19 +02:00
ObjectPrototype.cpp LibJS: Support symbol keys in Object.prototype.propertyIsEnumerable 2021-06-05 14:15:28 +01:00
ObjectPrototype.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PrimitiveString.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PrimitiveString.h LibJS: Move Cell.{cpp,h} from Runtime/ to Heap/ 2021-05-17 19:53:00 +02:00
Promise.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Promise.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseConstructor.cpp LibJS: Remove declarations of some TODO()'d BigInt and Promise functions 2021-06-02 21:06:21 +01:00
PromiseConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseJobs.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseJobs.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromisePrototype.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromisePrototype.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseReaction.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseReaction.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseResolvingFunction.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PromiseResolvingFunction.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
PropertyAttributes.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
PropertyName.h LibJS: Change PropertyName::as_number() return type to u32 2021-04-25 22:42:48 +02:00
ProxyConstructor.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ProxyConstructor.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ProxyObject.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ProxyObject.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
Reference.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Reference.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ReflectObject.cpp LibJS: Replace StringOrSymbol::from_value with Value::to_property_key 2021-06-05 14:15:28 +01:00
ReflectObject.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
RegExpConstructor.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
RegExpConstructor.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
RegExpObject.cpp LibJS: Bring back runtime validation of RegExp flags 2021-05-11 22:47:14 +01:00
RegExpObject.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
RegExpPrototype.cpp LibJS: Use Array::create() length arg in favor of set_array_like_size() 2021-06-06 23:27:47 +01:00
RegExpPrototype.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
ScopeObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ScopeObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ScriptFunction.cpp LibJS: Compile ScriptFunctions into bytecode and run them that way :^) 2021-06-07 18:11:59 +02:00
ScriptFunction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Shape.cpp LibJS: Flatten Shape::property_table() 2021-06-07 10:22:25 +02:00
Shape.h LibJS: Make the forward transition chain weakly cached 2021-05-17 21:40:18 +02:00
StringConstructor.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StringConstructor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StringIterator.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
StringIterator.h AK: Rename Utf8CodepointIterator => Utf8CodePointIterator 2021-06-01 09:45:52 +02:00
StringIteratorPrototype.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
StringIteratorPrototype.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
StringObject.cpp LibJS: Remove String.prototype.length 2021-06-06 19:34:43 +02:00
StringObject.h LibJS: Remove String.prototype.length 2021-06-06 19:34:43 +02:00
StringOrSymbol.h LibJS: Replace StringOrSymbol::from_value with Value::to_property_key 2021-06-05 14:15:28 +01:00
StringPrototype.cpp LibJS: Add String.prototype.valueOf() 2021-06-06 19:34:43 +02:00
StringPrototype.h LibJS: Add String.prototype.valueOf() 2021-06-06 19:34:43 +02:00
Symbol.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
Symbol.h LibJS: Move Cell.{cpp,h} from Runtime/ to Heap/ 2021-05-17 19:53:00 +02:00
SymbolConstructor.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
SymbolConstructor.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
SymbolObject.cpp Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
SymbolObject.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
SymbolPrototype.cpp LibJS: Add missing length field to Symbol.prototype[Symbol.ToPrimitive] 2021-06-07 16:51:09 +01:00
SymbolPrototype.h LibJS: Implement String.prototype[@@toPrimitive]() 2021-06-06 19:34:43 +02:00
TemporaryClearException.h LibJS: Use linusg@serenityos.org for my new copyright headers, too 2021-04-24 20:16:31 +02:00
TypedArray.cpp LibJS: Expose BYTES_PER_ELEMENT on each TypedArray 2021-05-21 22:52:35 +01:00
TypedArray.h LibJS+LibWeb: Make Uint8ClampedArray use TypedArray 2021-05-26 15:34:13 +04:30
TypedArrayConstructor.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
TypedArrayConstructor.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
TypedArrayPrototype.cpp LibJS: Expose TypedArray.prototype.byteOffset 2021-05-21 22:52:35 +01:00
TypedArrayPrototype.h LibJS: Expose TypedArray.prototype.byteOffset 2021-05-21 22:52:35 +01:00
Value.cpp LibJS: Implement the RequireObjectCoercible abstract operation 2021-06-06 19:34:43 +02:00
Value.h LibJS: Implement the RequireObjectCoercible abstract operation 2021-06-06 19:34:43 +02:00
VM.cpp LibJS: Add VM::dump_backtrace() 2021-06-07 10:22:25 +02:00
VM.h LibJS: Add VM::dump_backtrace() 2021-06-07 10:22:25 +02:00
WithScope.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
WithScope.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00