diff options
author | 2023-08-17 19:34:05 -0700 | |
---|---|---|
committer | 2023-08-17 19:34:05 -0700 | |
commit | 0424fd8f6e7549ed779788006acdc97a8467e287 (patch) | |
tree | faec04e9f167eca0b72c6a19291f5bbae06068db /src/bun.js/bindings/ZigGlobalObject.cpp | |
parent | cfbd1373e2cc8066493de74b551aeb53061e84a7 (diff) | |
download | bun-0424fd8f6e7549ed779788006acdc97a8467e287.tar.gz bun-0424fd8f6e7549ed779788006acdc97a8467e287.tar.zst bun-0424fd8f6e7549ed779788006acdc97a8467e287.zip |
Support Nitro (#4098)
* Add formatWithOptions
* tests and tweaks
* adjust
* changes
* hi
* add mark/measure stubs
* stuff
* allow unix absolute paths here
* typo
* rebase
* fix stats
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp')
-rw-r--r-- | src/bun.js/bindings/ZigGlobalObject.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index e7967d256..5524166c3 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -2421,15 +2421,25 @@ private: JSC::DOMJIT::Effect::forWriteKinds(DFG::AbstractHeapKind::SideState), SpecBytecodeDouble); - JSFunction* function = JSFunction::create( + JSFunction* now = JSFunction::create( vm, globalObject(), 0, String("now"_s), functionPerformanceNow, ImplementationVisibility::Public, NoIntrinsic, functionPerformanceNow, &DOMJITSignatureForPerformanceNow); + this->putDirect(vm, JSC::Identifier::fromString(vm, "now"_s), now, JSC::PropertyAttribute::DOMJITFunction | JSC::PropertyAttribute::Function); + + JSFunction* noopNotImplemented = JSFunction::create( + vm, + globalObject(), + 0, + String("noopNotImplemented"_s), + functionNoop, ImplementationVisibility::Public, NoIntrinsic, functionNoop, + &DOMJITSignatureForPerformanceNow); + this->putDirect(vm, JSC::Identifier::fromString(vm, "mark"_s), noopNotImplemented, JSC::PropertyAttribute::DOMJITFunction | JSC::PropertyAttribute::Function); + this->putDirect(vm, JSC::Identifier::fromString(vm, "measure"_s), noopNotImplemented, JSC::PropertyAttribute::DOMJITFunction | JSC::PropertyAttribute::Function); - this->putDirect(vm, JSC::Identifier::fromString(vm, "now"_s), function, JSC::PropertyAttribute::DOMJITFunction | JSC::PropertyAttribute::Function); this->putDirect( vm, JSC::Identifier::fromString(vm, "timeOrigin"_s), |