Daniel Bertalan
9feb1ce39f
LibJS+LibWeb: Apply the Rule of Zero to {Nonnull,}GCPtr<T>
...
The compiler-generated copy constructor and copy assignment operator
already do the right thing (which is to simply copy the underlying
pointer).
The [Itanium C++ ABI][1] treats any class with non-trivial copy/move
constructors and destructors as non-trivial for the purposes of calls --
even if they are functionally identical to the compiler-generated ones.
If a class is non-trivial, it cannot be passed or returned in registers,
only via an invisible reference, which is worse for codegen. This commit
makes `{Nonnull,}GCPtr` trivial.
As the compiler can be sure that capturing a `GCPtr` by value has no
side effects, a few `-Wunused-lambda-capture` warnings had to be
addressed in LibWeb.
GCC seems to have a bug that prevents `ExceptionOr<Variant<GCPtr<T>>>`
from being implicitly constructed from `GCPtr<T>` after this change. A
non-invasive workaround is to explicitly construct the inner Variant
type.
[1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#non-trivial
2023-08-07 22:20:03 -04:00
..
2023-08-05 17:17:08 +02:00
2023-05-28 18:00:54 +02:00
2023-08-07 16:03:27 +02:00
2023-08-04 11:05:55 +02:00
2023-07-15 16:21:29 +02:00
2023-08-07 22:20:03 -04:00
2023-04-24 07:55:20 +02:00
2023-05-21 07:44:29 +02:00
2023-05-21 07:44:29 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-06-21 06:14:15 +02:00
2023-06-21 06:14:15 +02:00
2023-06-13 06:14:01 +02:00
2023-06-13 06:14:01 +02:00
2023-06-13 06:14:01 +02:00
2023-06-13 06:14:01 +02:00
2023-07-31 05:18:51 +02:00
2023-07-08 10:32:56 +01:00
2023-04-26 15:51:50 +02:00
2023-04-26 15:51:50 +02:00
2023-08-05 17:17:08 +02:00
2023-08-05 17:17:08 +02:00
2023-08-05 17:17:08 +02:00
2023-05-12 05:47:36 +02:00
2023-05-12 05:47:36 +02:00
2023-05-21 07:44:29 +02:00
2023-05-21 07:44:29 +02:00
2023-04-28 18:11:44 +02:00
2023-05-03 09:39:49 +02:00
2023-06-21 16:30:27 +02:00
2023-04-30 06:04:33 +02:00
2023-04-30 06:04:33 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-04-19 18:26:45 +02:00
2023-06-19 06:12:26 +02:00
2023-08-07 16:03:27 +02:00
2023-06-19 06:12:26 +02:00
2023-04-25 12:54:01 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-06-16 13:50:15 +02:00
2023-06-16 13:50:15 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-05-08 09:29:44 +02:00
2023-07-03 19:04:45 +02:00
2023-07-08 10:32:56 +01:00
2023-06-19 06:12:26 +02:00
2023-06-19 06:12:26 +02:00
2023-06-18 19:07:06 +02:00
2023-08-04 11:05:55 +02:00
2023-08-04 11:05:55 +02:00
2023-08-04 11:05:55 +02:00
2023-06-03 05:56:00 +02:00
2023-07-08 10:32:56 +01:00
2023-06-16 06:55:21 +02:00
2023-06-16 06:55:21 +02:00
2023-06-21 16:30:27 +02:00
2023-06-21 16:30:27 +02:00
2023-06-21 16:30:27 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-05-28 13:24:37 +02:00
2023-06-25 11:28:32 +02:00
2023-06-25 11:28:32 +02:00
2023-06-19 06:12:26 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-05-08 09:29:44 +02:00
2023-05-08 09:29:44 +02:00
2023-07-31 05:18:51 +02:00
2023-06-19 06:12:26 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-08-05 11:41:41 +02:00
2023-07-29 11:58:51 +02:00
2023-07-03 19:04:45 +02:00
2023-07-08 10:32:56 +01:00
2023-07-08 10:32:56 +01:00
2023-07-24 02:28:21 +02:00
2023-07-03 19:04:45 +02:00
2023-05-28 13:24:37 +02:00
2023-08-07 16:03:27 +02:00
2023-08-06 22:23:00 -04:00
2023-06-16 13:50:15 +02:00
2023-07-28 11:12:25 +02:00
2023-07-28 11:12:25 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-05-23 14:38:45 +02:00
2023-05-08 09:29:44 +02:00
2023-05-08 09:29:44 +02:00
2023-05-26 05:23:09 +02:00
2023-05-26 05:23:09 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-05-12 05:47:36 +02:00
2023-05-13 15:51:44 +02:00
2023-05-13 15:51:44 +02:00
2023-06-09 17:14:50 +02:00
2023-06-09 17:14:50 +02:00
2023-06-03 05:56:00 +02:00
2023-07-08 10:32:56 +01:00
2023-05-08 09:29:44 +02:00
2023-07-07 19:09:55 +01:00
2023-05-26 05:23:09 +02:00
2023-07-05 12:31:54 +01:00
2023-05-26 05:23:09 +02:00
2023-07-07 19:09:55 +01:00
2023-07-05 08:19:55 +01:00
2023-05-23 14:38:45 +02:00
2023-07-03 19:04:45 +02:00
2023-07-03 19:04:45 +02:00
2023-06-14 14:23:17 +02:00
2023-06-14 14:23:17 +02:00
2023-05-13 09:08:42 +02:00
2023-05-13 09:08:42 +02:00
2023-08-06 08:57:23 +02:00
2023-07-09 12:54:06 +02:00
2023-05-16 11:25:44 +02:00
2023-04-23 16:22:45 +02:00
2023-04-23 16:22:45 +02:00
2023-04-23 16:22:45 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-06-23 16:20:29 +02:00
2023-07-08 10:32:56 +01:00
2023-07-31 05:18:51 +02:00
2023-07-11 06:48:25 +02:00
2023-05-03 09:39:49 +02:00
2023-07-31 05:18:51 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-05-03 09:39:49 +02:00
2023-07-08 10:32:56 +01:00
2023-07-08 10:32:56 +01:00
2023-05-08 09:29:44 +02:00
2023-04-26 15:51:50 +02:00
2023-06-14 14:23:17 +02:00
2023-06-14 14:23:17 +02:00
2023-07-29 11:58:51 +02:00
2023-07-29 11:58:51 +02:00
2023-05-03 09:39:49 +02:00
2023-08-02 14:52:37 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-06-14 17:54:40 +02:00
2023-06-14 17:54:40 +02:00
2023-06-14 17:54:40 +02:00
2023-07-11 09:38:37 +03:30
2023-07-08 10:32:56 +01:00
2023-05-24 23:18:07 +02:00
2023-05-24 23:18:07 +02:00
2023-08-07 16:03:27 +02:00
2023-08-06 16:29:24 +02:00
2023-08-06 16:29:24 +02:00
2023-05-13 16:31:10 +02:00
2023-07-25 15:45:44 +02:00
2023-07-09 12:54:06 +02:00
2023-08-07 16:03:27 +02:00
2023-08-07 16:03:27 +02:00
2023-07-31 05:18:51 +02:00