From Jonne Ransijn to ~mpu/qbe
> I'd like to keep syntactic sugar out of the IL. A respectable choice. > I suggest you have a single way of emitting loads and stores I have exactly that, but they operate on syntax nodes. There are a few places in the codegen that implicitly load a field. (Examples: Bounds checking, tagged unions) > and maybe add a comment in the generated IL that makes it clear for > you what's happening. I initially solved my problem by _removing_ all comments and rewriting
From Jonne Ransijn to ~mpu/qbe
---
This has been my no. 1 pain point with QBE. Debugging invalid loads and
stores has caused me many problems because the add (and mul)
instructions to calculate the address are interleaved.
The syntax is limited to loads and stores because adding constants to
non-addresses is usually specified explicitly in the front-end.
+%b
+%b*N
would be nice too, but +N deals with the most common case of
a static field access, and this syntax is also already supported in
'data' definitions aswell.
[message trimmed]
From Jonne Ransijn to ~sircmpwn/sr.ht-dev
--- Fix the PATCH line This fixes the XSS vulnerability mentioned by Umar Getagazov gitsrht/blueprints/repo.py | 9 +++++++-- gitsrht/templates/utils.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 230a5f1..ef379b2 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -6,7 +6,7 @@ import pygments import subprocess [message trimmed]
From Jonne Ransijn to ~sircmpwn/sr.ht-dev
Adds a `Content-Type` header to image files. This allows images to be rendered by the browser. In particular, it allows SVGs to be used in READMEs. I have restricted this feature to only work on image files for now, but it might make sense to send this header for other file types as well if we can reasonably assume that the browser is able to render it, such as PDFs and XML documents. --- Fix the PATCH line gitsrht/blueprints/repo.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) [message trimmed]
From Jonne Ransijn to ~sircmpwn/sr.ht-dev
--- This fixes the XSS vulnerability mentioned by Umar Getagazov gitsrht/blueprints/repo.py | 9 +++++++-- gitsrht/templates/utils.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 230a5f1..ef379b2 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -6,7 +6,7 @@ import pygments import subprocess import sys [message trimmed]
From Jonne Ransijn to ~sircmpwn/sr.ht-dev
Adds a `Content-Type` header to image files. This allows images to be rendered by the browser. In particular, it allows SVGs to be used in READMEs. I have restricted this feature to only work on image files for now, but it might make sense to send this header for other file types as well if we can reasonably assume that the browser is able to render it, such as PDFs and XML documents. --- gitsrht/blueprints/repo.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index e35937c..230a5f1 100644 [message trimmed]