Commit Graph

245 Commits

Author SHA256 Message Date
adam 4dde1e6f74 This uses a tokenizer system for functions to call.
It seems slower, though.  I'm preserving it in this branch, for now.
2025-09-17 20:59:18 -04:00
adam cc4e57d6b5 Switch to 32-bit math by default.
I'll need a way to get back into 64-bit mode.
2025-09-17 11:38:29 -04:00
adam e8e2027a1a Use vectors for storage, to cut down on cache-misses. 2025-09-16 22:43:11 -04:00
adam 905a01efd3 A bit less overhead, by pre-building SV's. 2025-09-16 22:29:43 -04:00
adam 86b5ea6a05 Unordered map was slightly faster... 2025-09-16 21:25:39 -04:00
adam e1d86a737f Fix memory errors wrt stashed function names 2025-09-16 20:53:07 -04:00
adam a3dc7e980e Significant speed improvements.
By not cloning code for recursion directly into the processing
buffer and by not copying as many strings and by not doing
string->int conversions all the time, it's significantly faster.

Specifically, it's about 5.5x slower than Python.
2025-09-16 17:21:29 -04:00
adam 02c5daca3c The general idea seems to be working.
I also went with "{}" syntax.

Now to see about pre-parsing ints for speed?
2025-09-16 16:21:50 -04:00
adam 245099c07a Partially working with nested conditionals.
Some of the conditional-skip code is a bit wrong...
2025-09-16 04:52:29 -04:00
adam a96dbe2953 Initial draft of stack-based machine for JS.
The idea I have is that I'll translate/compile JavaScript
into a rudimentary Forth like language.  This sketch forms
the basis for that language's engine.
2025-09-16 03:34:51 -04:00
adam 1bf12c858f String alloc shouldn't convert to std::string.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
As I work through making code use more C++ RAII and such, most
of the work is handling strings, especially temporaries.  As member
variables which manage string memory get turned into `std::string`,
some use cases might wind up leaking memory.  (One was found in
this change.)

By using a non-convertible-to-string result, such accidents should
be avoided.
2025-09-08 13:24:56 -04:00
adam 97baa28f57 Dillo web objects get owned.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-09-08 01:08:49 -04:00
adam e76b6e78a2 Style Sheet member ownership 2025-09-08 00:47:36 -04:00
adam 77859c704e Track another URL by smart pointer. 2025-09-07 17:52:27 -04:00
adam dea296a063 Link the COPYING file to the AGPL license.
This prevents the autoconf step from creating it again, with an
incorrect license.
2025-08-26 16:36:47 -04:00
adam d3933134c8 Merge branch 'fix-dangling-anchor' into master
* fix-dangling-anchor:
  Fix dangling anchor
2025-08-23 09:29:50 -04:00
adam 23eea47336 Fix dangling anchor 2025-08-23 09:29:37 -04:00
adam 13f931d82e More virtual base fixups. 2025-08-23 08:55:48 -04:00
adam 0bc863faf1 Const correctness on Java Collection Size.
I need to get rid of these, but cleaning them up first lets me
address them in-situ for const correctness _before_ I unravel
the runtime type maze.
2025-08-23 02:37:14 -04:00
adam 412adaa492 Rename getline function to unsafe, to make it greppable.
Now i can trim them one-by-one.
2025-08-23 02:20:05 -04:00
adam f283391b46 Get some of the last remaining C files into C++
They still need to be fixed up, but they now build with C++.
2025-08-23 02:09:47 -04:00
adam e4f1102e32 Some of the Object::equals now are const correct.
There's more to do.

Why make this const-correct, instead of ditch it?  Because whatever
I replace it with has to be ready for const correctness.
2025-08-22 13:58:05 -04:00
adam f6841f59e0 Merge branch 'widget-rewrite-1' into master
* widget-rewrite-1:
  Now it's done.
  Partially done.
  Local RAII
  Requested anchor RAIIed.
  Image owns its alt text.
  Some const correctness in the Java pseudo core.
  Local ownership for font name.
  Fix building with no libjpeg.
2025-08-21 23:38:12 -04:00
adam d035bd4427 Now it's done. 2025-08-21 23:37:54 -04:00
adam a41d0b067d Partially done. 2025-08-21 19:19:28 -04:00
adam 92d679e098 Local RAII 2025-08-21 18:11:10 -04:00
adam 2d1e95d36b Requested anchor RAIIed. 2025-08-21 17:52:30 -04:00
adam 4274490a86 Image owns its alt text. 2025-08-21 17:36:42 -04:00
adam b934b115ed Some const correctness in the Java pseudo core. 2025-08-21 17:17:43 -04:00
adam 455169074a Local ownership for font name. 2025-08-21 16:41:52 -04:00
adam e71808d579 Fix building with no libjpeg. 2025-08-21 16:41:30 -04:00
adam 24ec94e5b4 More local ownership
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-21 15:46:10 -04:00
adam d1f5756670 Use standard bool types.
I'm using `stdbool.h` for the few remaining C files.  That will
have to change, soon.
2025-08-21 13:59:12 -04:00
adam cc657de8fb Fix crash on void(0) javascripts.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-20 13:14:01 -04:00
adam f6eb2ebf87 Ready to start C++ifying a virtual base...
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-18 03:13:39 -04:00
adam 871a6e72e1 Another RAII member. 2025-08-18 03:10:56 -04:00
adam b1e1f8e98e HAnother member RAII'ed. 2025-08-18 02:53:32 -04:00
adam 2d6deff51b Some ownership of the Cache types. 2025-08-18 01:25:20 -04:00
adam 2ce2468007 Start modernizing the cache a bit. 2025-08-17 21:44:49 -04:00
adam a51b81a970 About text is now C++-ified. 2025-08-17 20:17:59 -04:00
adam 3e5badfaa1 Fix a use-after-free.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-17 02:45:15 -04:00
adam f7a057b070 Adopt the AGPL-3.0.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-17 02:18:28 -04:00
adam a364eee1c3 Try to get the license to appear correctly in gitea.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-14 16:19:10 -04:00
adam 41be8d8c4f Another local string.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
2025-08-12 04:00:21 -04:00
adam 2dd41b440e A lot of string returns made RAII 2025-08-12 03:48:47 -04:00
adam 065edc3fd0 Retire some dStr usage. 2025-08-12 03:25:07 -04:00
adam d12cf52b73 HTML Object nearly RAII complete. 2025-08-12 03:25:07 -04:00
adam a02ed91d3b A few assorted cleanups. 2025-08-12 03:25:07 -04:00
adam b4600db393 A lot of typesafety in the older C UI code.
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled
More to come.
2025-08-12 02:09:40 -04:00
adam 06a2b527a6 Another string map.
This time the font tables.
2025-08-11 04:01:27 -04:00