Closed Bug 895168 Opened 11 years ago Closed 11 years ago

Remove the remaining usages of LL_ macros from the tree

Categories

(Core :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug, )

Details

Attachments

(6 files)

      No description provided.
Attached patch Part 1: LL_I2LSplinter Review
Attachment #777437 - Flags: review?(Pidgeot18)
Attached patch Part 2: LL_ZEROSplinter Review
Attachment #777438 - Flags: review?(Pidgeot18)
Attached patch Part 3: LL_SHRSplinter Review
Attachment #777439 - Flags: review?(Pidgeot18)
Attached patch Part 4: LL_L2DSplinter Review
Attachment #777440 - Flags: review?(Pidgeot18)
Attached patch Part 5: LL_EQSplinter Review
Attachment #777441 - Flags: review?(Pidgeot18)
Attached patch Part 6: LL_DIVSplinter Review
Attachment #777442 - Flags: review?(Pidgeot18)
Attachment #777442 - Attachment description: Part 5: LL_DIV → Part 6: LL_DIV
Attachment #777438 - Flags: review?(Pidgeot18) → review+
Comment on attachment 777440 [details] [diff] [review]
Part 4: LL_L2D

Review of attachment 777440 [details] [diff] [review]:
-----------------------------------------------------------------

::: docshell/shistory/src/nsSHistory.cpp
@@ +312,5 @@
>      bytes = INT64_MAX;
>  
>    uint64_t kbytes = bytes >> 10;
>  
> +  double kBytesD = kbytes;

Couldn't you just make this double kBytesD = (double)(bytes >> 10)?

Actually, on further glance, this method could be entirely rewritten without using a double conversion as well, using stuff from prbit.h, but I'd expect an actual docshell reviewer to own that conversion.
Attachment #777440 - Flags: review?(Pidgeot18) → review+
Attachment #777439 - Flags: review?(Pidgeot18) → review+
Attachment #777442 - Flags: review?(Pidgeot18) → review+
Attachment #777441 - Flags: review?(Pidgeot18) → review+
Comment on attachment 777437 [details] [diff] [review]
Part 1: LL_I2L

Review of attachment 777437 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/nsContentSink.cpp
@@ +1263,1 @@
>    diff = now - mLastNotificationTime;

You could combine these with the declarations, so it looks like:

int64_t interval = GetNotificationInterval();
int64_t diff = PR_Now() - mLastNotificationTime;

::: rdf/base/src/rdfutil.cpp
@@ +108,1 @@
>          t += temp;

Just say t += usec; ?

::: rdf/datasource/src/nsFileSystemDataSource.cpp
@@ +1114,3 @@
>      temp64 = lastModDate * thousand;
>  
>      mRDFService->GetDateLiteral(temp64, aResult);

mRDFService->GetDateLiteral(lastModDate * PR_MSEC_PER_SEC, aResult); ?
Attachment #777437 - Flags: review?(Pidgeot18) → review+
(In reply to Joshua Cranmer [:jcranmer] from comment #7)
> Comment on attachment 777440 [details] [diff] [review]
> Part 4: LL_L2D
> 
> Review of attachment 777440 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: docshell/shistory/src/nsSHistory.cpp
> @@ +312,5 @@
> >      bytes = INT64_MAX;
> >  
> >    uint64_t kbytes = bytes >> 10;
> >  
> > +  double kBytesD = kbytes;
> 
> Couldn't you just make this double kBytesD = (double)(bytes >> 10)?

I guess so, I don't see the benefit of doing that though.

> Actually, on further glance, this method could be entirely rewritten without
> using a double conversion as well, using stuff from prbit.h, but I'd expect
> an actual docshell reviewer to own that conversion.

It should probably be done in another bug.  :-)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: