mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibJS/JIT: Add builtin for Math.log()
Note that we still call out to a C++ helper, but by having a builtin, we still avoid the cost of a full JS function call.
This commit is contained in:
parent
a6106ca221
commit
1d8a601f96
4 changed files with 28 additions and 5 deletions
|
@ -12,8 +12,9 @@
|
|||
namespace JS::Bytecode {
|
||||
|
||||
// TitleCaseName, snake_case_name, base, property, argument_count
|
||||
#define JS_ENUMERATE_BUILTINS(O) \
|
||||
O(MathAbs, math_abs, Math, abs, 1)
|
||||
#define JS_ENUMERATE_BUILTINS(O) \
|
||||
O(MathAbs, math_abs, Math, abs, 1) \
|
||||
O(MathLog, math_log, Math, log, 1)
|
||||
|
||||
enum class Builtin {
|
||||
#define DEFINE_BUILTIN_ENUM(name, ...) name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue