Commit graph

4 commits

Author SHA1 Message Date
Sergey Bugaev
83c809df5f LibC: Remove endless loop after abort() call
We (rightfully) mark abort() noreturn, so the loop just gets compiled out.
2020-05-26 14:35:10 +02:00
Andreas Kling
038fdc2017 LibC: Simplify ASSERT() to reduce code size
Instead of pushing the message, file name, line# and function name
separately, we now mash the message, file name and line# into a string
constant and pass that.

This means that the failure path only has to push a single address onto
the stack, reducing the code size and causing the compiler to inline
many more functions containing an assertions (e.g RefPtr::operator*())

Obviously if you wanted minimal size, you could turn assertions off
entirely, but I really like running with assertions, so let's make
a little effort to reduce their impact. :^)
2020-04-13 12:27:05 +02:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibC/assert.cpp (Browse further)