mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibJS/JIT: Add a builtin for Math.abs
This commit is contained in:
committed by
Andreas Kling
parent
86b85aa68b
commit
6c8ab1ca0d
@@ -27,7 +27,7 @@ void MathObject::initialize(Realm& realm)
|
||||
auto& vm = this->vm();
|
||||
Base::initialize(realm);
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(realm, vm.names.abs, abs, 1, attr);
|
||||
define_native_function(realm, vm.names.abs, abs, 1, attr, Bytecode::Builtin::MathAbs);
|
||||
define_native_function(realm, vm.names.random, random, 0, attr);
|
||||
define_native_function(realm, vm.names.sqrt, sqrt, 1, attr);
|
||||
define_native_function(realm, vm.names.floor, floor, 1, attr);
|
||||
|
||||
Reference in New Issue
Block a user