Age | Commit message (Collapse) | Author |
|
|
|
The following does now work:
outf("{:0{}}", 1, 3); // 001
|
|
The following example should illustrate one issue arising from this:
$ echo 'exit 1' > example.sh
$ Shell example.sh
Good-bye!
This message is meant to be shown to an interactive user, but not in a
shell script.
|
|
It was only comparing header names. Thanks to @Sponji for noticing!
|
|
The problem with our test suite is that it can't detect if a test
failed. When a test fails we simply write 'FAIL ...' to stderr and move
on.
Previously, the test suite would list all tests as passing regardless
how many assertions failed. In the future it might be smart to implement
this properly but test suites for C++ are always hard to do nicely.
(Because C++ execution isn't meant to be embedded.)
|
|
Thanks to @bugaevc for noticing that I didn't account for the 1px space
between columns, and for the space occupied by the item icon.
|
|
Use the new support for HTTP method and request body to implement basic
support for POST'ed forms. This is pretty cool! :^)
|
|
This patch adds the ability for ProtocolServer clients to specify which
HTTP method to use, and also to include an optional HTTP request body.
|
|
This will allow us to create more detailed requests from inside the
web engine.
|
|
It's now save to pass a signed integer as parameter and then use it as
replacement field (previously, this would just cast it to size_t which
would be bad.)
|
|
Also adds support for replacement fields.
|
|
|
|
This finally takes care of the kind-of excessive boilerplate code that were the
ctype adapters. On the other hand, I had to link `LibC/ctype.cpp` to the Kernel
(for `AK/JsonParser.cpp` and `AK/Format.cpp`). The previous commit actually makes
sense now: the `string.h` includes in `ctype.{h,cpp}` would require to link more LibC
stuff to the Kernel when it only needs the `_ctype_` array of `ctype.cpp`, and there
wasn't any string stuff used in ctype.
Instead of all this I could have put static derivatives of `is_any_of()` in the
concerned AK files, however that would have meant more boilerplate and workarounds;
so I went for the Kernel approach.
|
|
And include string.h in the files that actually needed it
|
|
Since commit 1ec59f28cea56f1afced0994127e2df62300e618 turns the ctype macros
into functions we can now feed them directly to a GenericLexer! This will lead to
removing the ctype adapters that were kind-of excessive boilerplate, but needed as
the Kernel doesn't compile with the LibC.
|
|
This gets rid of the doubled-up checks in `Paragraph::parse()`, and
makes a paragraph the last possible kind of block to be parsed.
|
|
This adds support for GFM-like tables.
The HTML rendering ignores the alignments and relative sizes, but the
terminal view does not!
|
|
|
|
|
|
Some constructs will require the width of the terminal (or a general
'width') to be rendered correctly, such as tables.
|
|
No behaviour change; also patches use of `String::TrimMode` in LibJS.
|
|
|
|
This removes assumptions about having an Interpreter, and also unbreaks
requestAnimationFrame which was asserting.
|
|
|
|
|
|
Use VM::call() instead of Interpreter::call().
|
|
We'll want to get rid of all uses of this, to free up the engine from
the old assumption that there's always an Interpreter available.
|
|
|
|
|
|
|
|
|
|
|
|
We don't need the Interpreter& for anything here, the GlobalObject is
enough for getting to the VM and possibly throwing exceptions.
|
|
|
|
|
|
This is no longer needed, we can get everything we need from the VM.
|
|
More work on decoupling the general runtime from Interpreter. The goal
is becoming clearer. Interpreter should be one possible way to execute
code inside a VM. In the future we might have other ways :^)
|
|
This makes a difference inside ScriptFunction::call(), which will now
instantiate a temporary Interpreter if one is not attached to the VM.
|
|
Okay, my vision here is improving. Interpreter should be a thing that
executes an AST. The scope stack is irrelevant to the VM proper,
so we can move that to the Interpreter. Same with execute_statement().
|
|
This patch moves the exception state, call stack and scope stack from
Interpreter to VM. I'm doing this to help myself discover what the
split between Interpreter and VM should be, by shuffling things around
and seeing what falls where.
With these changes, we no longer have a persistent lexical environment
for the current global object on the Interpreter's call stack. Instead,
we push/pop that environment on Interpreter::run() enter/exit.
Since it should only be used to find the global "this", and not for
variable storage (that goes directly into the global object instead!),
I had to insert some short-circuiting when walking the environment
parent chain during variable lookup.
Note that this is a "stepping stone" commit, not a final design.
|
|
Similar to Process, we need to make Thread refcounted. This will solve
problems that will appear once we schedule threads on more than one
processor. This allows us to hold onto threads without necessarily
holding the scheduler lock for the entire duration.
|
|
|
|
|
|
|
|
These are supposed to be both functions and macros. I'm not sure
how to provide the functions at the same time as the macros,
as they collide with each other and cause compile errors.
However, some ports fully expect them to be functions.
For example, OpenSSH stores them into structures as function
pointers.
|
|
I'm not exactly sure if this is in the right spot in the structure,
especially since I read that this is supposed to be cast into other
structures.
|
|
I'm not sure if this is the correct validation. This is based on
it being "read-only after relocation".
|
|
macros
The user/dead process macros are not used anywhere in Serenity right now,
but are required for OpenSSH.
|
|
|
|
|