mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:07:44 +00:00
LibJS: Inline fast case for Value::to_{boolean,number,numeric,primitive}
These functions all have a very common case that can be dealt with a very simple inline check, often avoiding the need to call an out-of-line function. This patch moves the common case to inline functions in a new ValueInlines.h header (necessary due to header dependency issues..) 8% speed-up on the entire Kraken benchmark :^)
This commit is contained in:
parent
42d80aab06
commit
65717e3b75
53 changed files with 111 additions and 8 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <LibGUI/FileIconProvider.h>
|
||||
#include <LibJS/Bytecode/Interpreter.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
#include <LibJS/Script.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "Spreadsheet.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/TemporaryChange.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
|
||||
namespace Spreadsheet {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "../Spreadsheet.h"
|
||||
#include "Format.h"
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
|
||||
namespace Spreadsheet {
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
#include <LibJS/Runtime/ValueInlines.h>
|
||||
|
||||
namespace Spreadsheet {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue