Skip to content

Instantly share code, notes, and snippets.

View awesomekling's full-sized avatar
🐞
https://youtube.com/c/AndreasKling

Andreas Kling awesomekling

🐞
https://youtube.com/c/AndreasKling
View GitHub Profile
diff --git a/Userland/Libraries/LibJS/CyclicModule.cpp b/Userland/Libraries/LibJS/CyclicModule.cpp
index 4c4cbbc87b..6bcfff1f70 100644
--- a/Userland/Libraries/LibJS/CyclicModule.cpp
+++ b/Userland/Libraries/LibJS/CyclicModule.cpp
@@ -17,11 +17,11 @@ namespace JS {
void GraphLoadingState::visit_edges(Cell::Visitor& visitor)
{
+ Base::visit_edges(visitor);
visitor.visit(m_promise_capability);
#include <AK/DistinctNumeric.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/Vector.h>
#include <LibMain/Main.h>
#include <sys/mman.h>
// JS::Bytecode::Executable (jitme)
// 1:
//[ 0] Store $5
//[ 20] LoadImmediate 0
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index 2e2c483824..ddf3b66c7a 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -289,42 +289,358 @@ Completion FunctionDeclaration::execute(Interpreter& interpreter) const
}
// 15.2.6 Runtime Semantics: Evaluation, https://tc39.es/ecma262/#sec-function-definitions-runtime-semantics-evaluation
+// 15.3.5 Runtime Semantics: Evaluation, https://tc39.es/ecma262/#sec-arrow-function-definitions-runtime-semantics-evaluation
+// 15.5.5 Runtime Semantics: Evaluation, https://tc39.es/ecma262/#sec-generator-function-definitions-runtime-semantics-evaluation

My icecream setup

This is a description of how I run icecc/icecream at home.

I'm using Ubuntu with the icecc and icecc-monitor packages installed. The latter is an optional GUI monitor application.

My "cluster" is currently two machines on a wired LAN:

192.168.10.1 qncvs
commit eafbf372d0bb0013f50f0952f4115dd359772095
Author: Andreas Kling <kling@serenityos.org>
Date: Sat Oct 9 00:42:10 2021 +0200
LibJS: Elide empty declarative environments inside switch statements
Most switch statements don't have any lexically scoped declarations,
so let's avoid allocating an environment in the common case where we
don't have to.
commit 5def8e66eeb15278a55055e06ce798059459abed
Author: Andreas Kling <kling@serenityos.org>
Date: Fri Oct 8 02:25:46 2021 +0200
LibJS: WIP optimization
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index 8eb93d3ded..1f5928da62 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
diff --git a/AK/Optional.h b/AK/Optional.h
index ff0745659..5265d3ce1 100644
--- a/AK/Optional.h
+++ b/AK/Optional.h
@@ -127,18 +127,28 @@ public:
[[nodiscard]] ALWAYS_INLINE bool has_value() const { return m_has_value; }
- [[nodiscard]] ALWAYS_INLINE T& value()
+ [[nodiscard]] ALWAYS_INLINE T& value() &
commit 1a71df350909560a375a8d7c4632f41a042ae42a
Author: Andreas Kling <kling@serenityos.org>
Date: Mon Jun 28 21:19:25 2021 +0200
WIP arg map
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
index b9441a6e4..89928f6d4 100644
--- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index f85376baa..0382f1fba 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -63,6 +63,67 @@ String ASTNode::class_name() const
return demangle(typeid(*this).name()).substring(4);
}
+// 13.3.8.1 Runtime Semantics: ArgumentListEvaluation, https://tc39.es/ecma262/#sec-runtime-semantics-argumentlistevaluation
+Optional<MarkedValueList> argument_list_evaluation(Interpreter& interpreter, GlobalObject& global_object, Vector<CallExpression::Argument> const& arguments)
commit 1fef53a1e8fac223db3a5211a3af4afa79331c19
Author: Andreas Kling <kling@serenityos.org>
Date: Wed Jun 9 23:21:42 2021 +0200
LibJS: Only "var" declarations go in the global object at program level
"let" and "const" go in the lexical environment.
This fixes one part of #4001 (Lexically declared variables are mixed up
with global object properties)