@@ -652,22 +652,22 @@ BindingData::BindingData(Realm* realm,
652
652
hrtime_buffer_.MakeWeak ();
653
653
}
654
654
655
- v8:: CFunction BindingData::fast_number_ (v8:: CFunction::Make(FastNumber ));
656
- v8:: CFunction BindingData::fast_bigint_ (v8:: CFunction::Make(FastBigInt ));
655
+ CFunction BindingData::fast_hrtime_ ( CFunction::Make(FastHrtime ));
656
+ CFunction BindingData::fast_hrtime_bigint_ ( CFunction::Make(FastHrtimeBigInt ));
657
657
658
658
void BindingData::AddMethods (Isolate* isolate, Local<ObjectTemplate> target) {
659
659
SetFastMethodNoSideEffect (
660
- isolate, target, " hrtime" , SlowNumber , &fast_number_ );
660
+ isolate, target, " hrtime" , SlowHrtime , &fast_hrtime_ );
661
661
SetFastMethodNoSideEffect (
662
- isolate, target, " hrtimeBigInt" , SlowBigInt , &fast_bigint_ );
662
+ isolate, target, " hrtimeBigInt" , SlowHrtimeBigInt , &fast_hrtime_bigint_ );
663
663
}
664
664
665
665
void BindingData::RegisterExternalReferences (
666
666
ExternalReferenceRegistry* registry) {
667
- registry->Register (SlowNumber );
668
- registry->Register (SlowBigInt );
669
- registry->Register (fast_number_ );
670
- registry->Register (fast_bigint_ );
667
+ registry->Register (SlowHrtime );
668
+ registry->Register (SlowHrtimeBigInt );
669
+ registry->Register (fast_hrtime_ );
670
+ registry->Register (fast_hrtime_bigint_ );
671
671
}
672
672
673
673
BindingData* BindingData::FromV8Value (Local<Value> value) {
@@ -689,14 +689,14 @@ void BindingData::MemoryInfo(MemoryTracker* tracker) const {
689
689
// broken into the upper/lower 32 bits to be converted back in JS,
690
690
// because there is no Uint64Array in JS.
691
691
// The third entry contains the remaining nanosecond part of the value.
692
- void BindingData::NumberImpl (BindingData* receiver) {
692
+ void BindingData::HrtimeImpl (BindingData* receiver) {
693
693
uint64_t t = uv_hrtime ();
694
694
receiver->hrtime_buffer_ [0 ] = (t / NANOS_PER_SEC) >> 32 ;
695
695
receiver->hrtime_buffer_ [1 ] = (t / NANOS_PER_SEC) & 0xffffffff ;
696
696
receiver->hrtime_buffer_ [2 ] = t % NANOS_PER_SEC;
697
697
}
698
698
699
- void BindingData::BigIntImpl (BindingData* receiver) {
699
+ void BindingData::HrtimeBigIntImpl (BindingData* receiver) {
700
700
uint64_t t = uv_hrtime ();
701
701
// The buffer is a Uint32Array, so we need to reinterpret it as a
702
702
// Uint64Array to write the value. The buffer is valid at this scope so we
@@ -706,12 +706,12 @@ void BindingData::BigIntImpl(BindingData* receiver) {
706
706
fields[0 ] = t;
707
707
}
708
708
709
- void BindingData::SlowBigInt (const FunctionCallbackInfo<Value>& args) {
710
- BigIntImpl (FromJSObject<BindingData>(args.This ()));
709
+ void BindingData::SlowHrtimeBigInt (const FunctionCallbackInfo<Value>& args) {
710
+ HrtimeBigIntImpl (FromJSObject<BindingData>(args.This ()));
711
711
}
712
712
713
- void BindingData::SlowNumber (const v8:: FunctionCallbackInfo<v8:: Value>& args) {
714
- NumberImpl (FromJSObject<BindingData>(args.This ()));
713
+ void BindingData::SlowHrtime (const FunctionCallbackInfo<Value>& args) {
714
+ HrtimeImpl (FromJSObject<BindingData>(args.This ()));
715
715
}
716
716
717
717
bool BindingData::PrepareForSerialization (Local<Context> context,
0 commit comments