From 0424fd8f6e7549ed779788006acdc97a8467e287 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Thu, 17 Aug 2023 19:34:05 -0700 Subject: 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 --- src/bun.js/bindings/ZigGlobalObject.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp') 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), -- cgit v1.2.3