Emanuele Torre
ba67fc68b8
LibJS: Rename variable "max" to "min" in MathObject::min() ( #1665 )
2020-04-06 14:08:56 +02:00
Andreas Kling
67f7763ab9
LibJS: Object needs to protect values in its storage
...
Otherwise the garbage collector will eat them way too soon! This made
it impossible to use "js -g" without crashing.
2020-04-06 13:35:20 +02:00
Xiao NuoFu
bb1ad4b649
Ports: refresh OpenSSL, make it build its command line utils.
...
This patch refreshes the openssl port and makes it build the utilities
in apps/, e.g. the openssl utility.
Now you can do this from Serenity:
$ openssl s_client -connect example.org:443
...
GET / HTTP/1.1
Host: example.org
<HTTP response here>
The download URL was bit-rotten and needed a fix.
2020-04-06 11:44:13 +02:00
Xiao NuoFu
7fd77e9ffe
Kernel/Net: make setsockopt pretend it understands SO_KEEPALIVE.
2020-04-06 11:44:13 +02:00
Xiao NuoFu
5fe521c507
LibC: create a stub for getrusage.
2020-04-06 11:44:13 +02:00
Andreas Kling
e323246517
Meta: Add missing copyright headers
2020-04-06 11:09:01 +02:00
AnotherTest
3ab6c5fd09
DHCPClient: Log errors and cleanup the code
...
Prior to this, we ran the DHCP client as a high-priority service, but
making the system feel laggy "for some network stuff" is not the
greatest of ideas :^)
2020-04-06 10:58:40 +02:00
Linus Groh
bf62625001
Base: Add trigonometry demo webpage
2020-04-06 10:58:16 +02:00
Linus Groh
f5dacfbb5b
LibJS: Add Math.{cos,sin,tan}()
2020-04-06 10:58:16 +02:00
Linus Groh
04a36b247b
LibJS: Simplify MathObject functions
2020-04-06 10:58:16 +02:00
Andreas Kling
20e58c5513
AK: Make dbgprintf() and dbgputstr() go to stderr on non-Serenity hosts
2020-04-06 10:49:27 +02:00
Andreas Kling
0d48fb9a87
AK: Add out() and warn() streams that forward to stdout and stderr
...
Our C++ code generator tools have been relying on host-side dbg() being
forwarded to stdout until now. Now they use out() instead.
Hopefully this will make it easier and more enticing to use streams in
userspace programs as well. :^)
2020-04-06 10:49:27 +02:00
Tibor Nagy
63b11e094d
QuickShow: Miscellaneous improvements
...
Major changes are:
The layout and mouse handling has been rewritten to always center
images in the window.
QuickShow now accepts multiple images on drag and drop. The first
image gets opened in the current window, further images are opened in
new processes.
QSWidget now loads images on its own with QSWidget::load_from_file().
An on_drop callback has been introduced for QSWidget.
Added an open menu.
Added an about box and placeholder icons to the application.
QuickShow now starts without loading the sunset-retro wallpaper.
2020-04-06 09:04:15 +02:00
Oriko
795067e08c
HackStudio: Add new Terminals
2020-04-06 09:01:42 +02:00
Oriko
12c7375cdd
LibGUI: Add remove_tab and on_change to TabWidget
2020-04-06 09:01:42 +02:00
nimelehin
c0a4cf5e8d
Kernel: Support best fit allocation policy in kmalloc()
...
Add find_best_fit() which implements best fit allocation algorithm.
Kmalloc now uses a best fit allocation policy for large allocations.
2020-04-06 08:33:13 +02:00
nimelehin
0d08ed2693
Kernel: Implement kmalloc() using AK::Bitmap
...
kmalloc's bitmap is wrapped with AK::Bitmap to access AK::Bitmap's
functions.
2020-04-06 08:31:48 +02:00
nimelehin
fbcc798f3f
Bitmap: Add Bitmap::find_next_range_of_unset_bits()
...
AK::Bitmap is extended with find_next_range_of_unset_bits().
The function is implemented using count_trailing_zeroes_32(), which is
optimized on many platforms, that gives a huge performance boost.
Functions find_longest_range_of_unset_bits() and find_first_fit() are
implemented with find_next_range_of_unset_bits(). According to
benchmarks, they are 60-100% faster.
2020-04-06 08:31:01 +02:00
nimelehin
471db7ce0a
AK: Add count_trailing_zeroes_32()
...
Add count_trailing_zeroes_32() which is implemented with builtins
if available, otherwise there's a generic fallback.
2020-04-06 08:28:57 +02:00
nimelehin
8137ef6252
AK: Add Bitmap::find_first_fit()
...
Add find_first_fit() which implements first fit algorithm.
2020-04-06 08:27:39 +02:00
nimelehin
73901c9b2b
AK: Add Bitmap::set_range()
...
Add set_range() which sets a range of bits to requested value.
Fix code style.
2020-04-06 08:27:17 +02:00
Andreas Kling
6e7713a5f4
LibJS: Remove unnecessary malloc+free in AssignmentExpression::execute
...
We were creating a temporary AK::Function for no good reason, and this
was dominating profiles. Reorganize the code so it's not necessary.
2020-04-06 08:26:26 +02:00
Andreas Kling
76bb0fab2d
AK: Make FlyString a little less hilariously unoptimized :^)
2020-04-06 08:26:26 +02:00
Andreas Kling
6e5c9970bf
LibWeb: Allow window.setTimeout() with no interval
...
If no interval is specified, it will be treated as 0 and the callback
function will be called on the next event loop iteration.
2020-04-06 08:26:26 +02:00
Andreas Kling
003741db1c
LibJS: Add Math.min()
2020-04-06 08:26:26 +02:00
Linus Groh
9e7dcaa106
LibJS: Return -Infinity in Math.max() with no argument
2020-04-05 19:30:47 +02:00
Andreas Kling
8bfee015bc
LibJS: Make Object::to_string() call the "toString" property if present
2020-04-05 18:19:56 +02:00
Andreas Kling
a7b21ec0f4
LibJS: Add Array.prototype.toString()
2020-04-05 18:07:41 +02:00
Maxim Brunnmeier
2c4a5849f6
LibJS: Fix do..while parsing by consuming parentheses explicitly ( #1652 )
...
Before this patch the parser accepted conditions without enclosing
parentheses (like: .."while number < 9").
2020-04-05 16:57:01 +02:00
AnotherTest
d077637fd6
JS Repl: Add live syntax highlighting
...
This patchset adds live syntax highlighting to the js repl.
It is turned off by default and can be enabled via the -s flag.
2020-04-05 16:11:13 +02:00
AnotherTest
7b54274ac5
LibJS: Report the start position of a token as its line column
2020-04-05 16:11:13 +02:00
AnotherTest
cdb627a516
LibJS: Allow lexer to run without logging errors
2020-04-05 16:11:13 +02:00
AnotherTest
c2f8a5fffa
LibLine: Add live styling support
...
This patchset adds an stylization interface to LibLine, and breaks
multiline editing.
With the most adorable Style constructor I've ever seen :^)
2020-04-05 16:11:13 +02:00
Oriko
2c5faa8ff3
FileManager: Add properties action to directory context menu
2020-04-05 16:02:07 +02:00
Linus Groh
4509350391
LibJS: Remove assert function from exponentiation-basic.js
2020-04-05 16:01:46 +02:00
Linus Groh
30ba2c7cec
LibJS: Simplify Math-constants.js test
...
By borrowing an "expect close" function from LibM/TestMath.cpp, we can
make this a lot simpler. Also the parser now understands decimals!
2020-04-05 16:01:46 +02:00
Linus Groh
0d7a1c3157
LibJS: Update to-number-basic.js test
...
Uncomment lines that are now parsing correctly :^)
2020-04-05 16:01:46 +02:00
Linus Groh
2f775a925b
LibJS: Fix Math.SQRT1_2
...
The value of Math.SQRT1_2 was zero as we were dividing two integers.
2020-04-05 16:01:46 +02:00
Stephan Unverwerth
500f6d9e3a
LibJS: Add numeric literal parsing for different bases and exponents
2020-04-05 16:01:22 +02:00
Stephan Unverwerth
b82a2239c6
LibC: Fix strtod() parsing of negative exponents ( #1645 )
...
Before this fix negative exponents were interpreted as positive.
2020-04-05 15:32:57 +02:00
Linus Groh
0403845d3e
LibJS: Implement exponentiation (** operator)
2020-04-05 15:32:06 +02:00
Linus Groh
eafd3dbaf8
LibJS: Rename BinaryOp::{Plus,Minus,Asterisk,Slash}
2020-04-05 15:31:12 +02:00
Tibor Nagy
a4f6f8e0e7
QuickShow: Use checkerboard background to show transparency
2020-04-05 15:30:53 +02:00
Tibor Nagy
e14d27867c
LibGfx: Implement checkerboard drawing for Gfx::Painter
2020-04-05 15:30:53 +02:00
Brian Gianforcaro
de32fd0347
Toolchain: Fix trailing white space warnings when gcc.patch is applied
...
Noticed the warnings about trailing white space in the patch fly by as
I was running Toolchain/BuildIt.sh on a new machine.
2020-04-05 15:30:03 +02:00
Brendan Coles
ddb8597c0c
IRCClient: Allow CTCP replies to be user configurable in IRCClient.ini
2020-04-05 15:29:48 +02:00
Brian Gianforcaro
bc40908d32
LibJS: Use the native assert() implementation now avaiable in 'js -t'
...
Switch the LibJS test suite to use the native assert implementation
surfaced inside the js repl when it's launched in test mode.
2020-04-05 15:28:45 +02:00
Brian Gianforcaro
4233c8662b
js: Add a new --test-mode option, which exposes an assert() function.
...
Introduce a central assert implementation so that the LibJS test suite
can take advantage of one implementation instead of copy/pasting the
same function into every test case file.
2020-04-05 15:28:45 +02:00
Liav A
a7d708e47d
Kernel: Don't enumerate blocks of ext2 symlinks by default
...
Also, we assert if we encounter a block that is bigger than blocks
count in the superblock.
Fixes #1608 .
2020-04-05 15:27:31 +02:00
Brendan Coles
a1b57216b8
IRCClient: Add handling for server responses and BANLIST command
2020-04-05 12:49:33 +02:00