Commit graph

8236 commits

Author SHA1 Message Date
Linus Groh
0243ac5d04 LibJS: Remove mock String.prototype from tests 2020-04-10 15:51:39 +02:00
Linus Groh
32c27afdf0 LibJS: Add String.prototype.toString() 2020-04-10 15:49:40 +02:00
Andreas Kling
6f3ea75569 LibJS: Add String constructor :^) 2020-04-10 14:14:02 +02:00
Andreas Kling
cb0dfd8f72 LibJS: Use enumerator macros for boilerplate code around native types 2020-04-10 14:06:52 +02:00
Andreas Kling
0bdfb952c5 Meta: Add supercomputer7 to contributor list in ReadMe 2020-04-10 14:06:29 +02:00
Brendan Coles
63f8cbfb56 IRCClient: Add NotifyOnMessage/NotifyOnMention config options
Allow IRCClient user to opt out of notifications.
2020-04-10 13:16:07 +02:00
Andreas Kling
070a8f2689 LibJS: Boolean, Number and String prototypes should have values too
It appears that calling .valueOf() on an objectified primitive's
prototype should return a value after all.

This matches what other engines are doing.
2020-04-10 13:09:35 +02:00
Andreas Kling
c06d5ef114 Kernel+LibC: Remove ESUCCESS
There's no official ESUCCESS==0 errno code, and it keeps breaking the
Lagom build when we use it, so let's just say 0 instead.
2020-04-10 13:09:35 +02:00
Andreas Kling
e5da1cc566 LibJS: Throw real TypeError, ReferenceError, etc objects
Instead of just throwing Error objects with a name string, we now throw
the real Error subclass types. :^)
2020-04-10 13:09:35 +02:00
Andreas Kling
58ab76269c LibJS: Add all the Error subclasses
This patch adds instance, constructor and prototype classes for:

    - EvalError
    - InternalError
    - RangeError
    - ReferenceError
    - SyntaxError
    - TypeError
    - URIError

Enumerator macros are used to reduce the amount of typing. :^)
2020-04-10 13:09:35 +02:00
Brendan Coles
df7b617ba1 IRCClient: Add ShowNickChangeMessages/ShowJoinPartMessages conf options
Allow IRCClient to hide nick change spam and join/part spam
2020-04-10 12:56:19 +02:00
Conrad Pankoff
a3edeb5868 Kernel: Add explicit offset parameter to File::read etc 2020-04-10 11:59:30 +02:00
Brendan Coles
68c7ca7d3b IRCClient: Autojoin channels after client registration
Wait for the server to advise negotiation was successful (RPL_WELCOME)
before autojoining channels.

Fixes #1713
2020-04-10 11:29:46 +02:00
rhin123
cd84544706 Calendar: Implement add event action 2020-04-10 11:28:34 +02:00
rhin123
06604c3786 Calendar: Implement add event UI 2020-04-10 11:28:34 +02:00
Barney Wilks
4f48fcdb94 LibJS: Add tests for exception if assignment LHS is invalid 2020-04-10 11:27:10 +02:00
Barney Wilks
56474bab15 LibJS: Throw exception if LHS of assignment is of unexpected type 2020-04-10 11:27:10 +02:00
AnotherTest
2315f789cc LibLine: Appropriately react to window size changes 2020-04-10 11:26:44 +02:00
AnotherTest
1b422315fa LibLine: Fix regression with moving around in history misplacing cursor
This commit fixes a regression where the prompt would not be cleared
upon substitution of lines from the history
2020-04-10 11:26:44 +02:00
Hüseyin ASLITÜRK
870936085a DisplayProperties: Replace TextBox with ColorInput.
Use new ColorInput component. Delete unnecessary code lines. Fix local variable names.
2020-04-10 11:25:49 +02:00
Hüseyin ASLITÜRK
bc323c488e LibGUI: Add ColorInput component
ColorInput is a new GUI component for selecting color using ColorPicker dialog.
It is simplify usage of ColorPicker dialog and more elegant view of current selected color.
2020-04-10 11:25:49 +02:00
AnotherTest
6545a74743 JS repl: Fix indentation when a line starts with '})]' 2020-04-10 00:58:59 +02:00
AnotherTest
da9335dbec LibLine: Implement multiline editing
This commit also adds the ability to change the prompt mid-edit :^)
2020-04-10 00:58:59 +02:00
AnotherTest
2663739db1 LibVT: Implement Device Status Report (cursor position report) 2020-04-10 00:58:59 +02:00
Andreas Kling
8286f8b996 LibJS: Add property configuration transitions
Object.defineProperty() can now change the attributes of a property
already on the object. Internally this becomes a shape transition with
the TransitionType::Configure. Such transitions don't expand the
property storage capacity, but rather simply keep attributes up to date
when generating a property table.
2020-04-10 00:36:06 +02:00
Andreas Kling
e6d920d87d LibJS: Add Object.defineProperty() and start caring about attributes
We now care (a little bit) about the "configurable" and "writable"
property attributes.

Property attributes are stored together with the property name in
the Shape object. Forward transitions are not attribute-savvy and will
cause poor Shape reuse in the case of multiple same-name properties
with different attributes.

Oh, and this patch also adds Object.getOwnPropertyDescriptor() :^)
2020-04-10 00:36:06 +02:00
Liav A
1570e67881 Kernel: Allow again to boot with partitioned disk
This change ensures that we don't return a zero value blindly
from DiskPartition write/read methods.

Fixes #1719.
2020-04-09 23:43:30 +02:00
Liav A
9bb4a6ecf6 Kernel: Create BXVGA device if found in the PCI bus 2020-04-09 23:43:30 +02:00
Liav A
4d44a3bdfe Kernel: Reorder bitwise operations when creating PCI interrupt overrides 2020-04-09 20:45:44 +02:00
Liav A
e4ad1b92fb MultiProcessor: Silence debug message spam 2020-04-09 20:45:44 +02:00
Liav A
0fa50b6405 Interrupts: Simplify initialization a bit more 2020-04-09 20:45:44 +02:00
Liav A
6b38befd91 Interrupts: Remove irrelevant FIXME comment 2020-04-09 20:45:44 +02:00
Brendan Coles
64536f19f0 WindowServer: MenuManager::handle_mouse_event() return if window is null
Previously the WindowServer would assert `topmost_menu->menu_window()`
and crash.

Fixes #1716
2020-04-09 20:00:23 +02:00
Liav A
fec8763c21 Interrupts: Make the MultiProcessorParser functional again 2020-04-09 19:59:53 +02:00
Liav A
a7c5a1fe69 Kernel: Simplify the Time management initialization 2020-04-09 19:59:53 +02:00
Liav A
8e336798b5 Kernel: Run clang-format on init.cpp 2020-04-09 19:59:53 +02:00
Liav A
8139688ef1 Kernel: Simplify the Interrupt management initialization 2020-04-09 19:59:53 +02:00
Liav A
caa7a6c2fb Kernel: Simplify PCI messages on initialization 2020-04-09 19:59:53 +02:00
Andreas Kling
871d450b93 Kernel: Remove redundant "ACPI" from filenames in ACPI/ 2020-04-09 18:17:27 +02:00
Andreas Kling
1c865ee8d4 Kernel: Merge ACPI::StaticParser into ACPI::Parser
There's no need for StaticParser to be a separate thing from Parser.
2020-04-09 18:15:02 +02:00
Andreas Kling
a3ca745b5a Kernel: Use StringView for ACPI table signatures 2020-04-09 18:03:57 +02:00
Andreas Kling
f614f0e2cb Kernel: Add typed_map<T>(PhysicalAddress) and use it in ACPI parsing
There was a frequently occurring pattern of "map this physical address
into kernel VM, then read from it, then unmap it again".

This new typed_map() encapsulates that logic by giving you back a
typed pointer to the kind of structure you're interested in accessing.

It returns a TypedMapping<T> that can be used mostly like a pointer.
When destroyed, the TypedMapping object will unmap the memory. :^)
2020-04-09 17:19:11 +02:00
Andreas Kling
4644217094 Kernel: Remove "non-operational" ACPI parser state
If we don't support ACPI, just don't instantiate an ACPI parser.
This is way less confusing than having a special parser class whose
only purpose is to do nothing.

We now search for the RSDP in ACPI::initialize() instead of letting
the parser constructor do it. This allows us to defer the decision
to create a parser until we're sure we can make a useful one.
2020-04-09 17:19:11 +02:00
Brendan Coles
d95362d8cd IRCClient: Set nick and userinfo to OS username when not set in config 2020-04-09 17:18:56 +02:00
Linus Groh
c06a6c67d5 LibJS: Add globalThis
We already have "global" as a way to access the global object in js(1)
(both REPL and script mode). This replaces it with "globalThis", which
is available in all environments, not just js.
2020-04-09 15:58:49 +02:00
Andreas Kling
cbecb23e1d LibJS: Fix BooleanPrototype build 2020-04-09 14:29:57 +02:00
Andreas Kling
e983c745f7 Kernel: Simplify ACPI initialization a bit
Construct the parser, no matter which kind, in ACPI::initialize().
2020-04-09 14:10:44 +02:00
Andreas Kling
85c0557839 Kernel: Simplify PCI::initialize() a bit more 2020-04-09 13:42:17 +02:00
Andreas Kling
95e44a33c1 Kernel: Move ACPI initialization from init.cpp to ACPI::initialize() 2020-04-09 13:39:10 +02:00
Andreas Kling
f25d2f5518 Kernel: Move NetworkTask startup into NetworkTask::spawn() 2020-04-09 13:31:05 +02:00