Closed
Bug 904110
Opened 13 years ago
Closed 13 years ago
Move alignment stuff out of Util.h
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
Attachments
(1 file)
|
21.87 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #789023 -
Flags: review?(jwalden+bmo)
Comment 1•13 years ago
|
||
Comment on attachment 789023 [details] [diff] [review]
Alignment-header
Review of attachment 789023 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit/BaselineFrameInfo.h
@@ +11,5 @@
>
> #include "jscntxt.h"
> #include "jscompartment.h"
>
> +#include "mozilla/Alignment.h"
This should go above the "jscntxt.h" #include, per <https://wiki.mozilla.org/JavaScript:SpiderMonkey:Coding_Style>.
::: mfbt/Alignment.h
@@ +3,5 @@
> +/* This Source Code Form is subject to the terms of the Mozilla Public
> + * License, v. 2.0. If a copy of the MPL was not distributed with this
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +/* Functionality related to memory alignment */
Looks like precedent should have this with a period at end.
@@ +14,5 @@
> +
> +namespace mozilla {
> +
> +/*
> + * This class, and the corresponding macro MOZ_ALIGNOF, figures out how many
trailing whitespace
@@ +59,5 @@
> + * bytes.
> + *
> + * We support 1, 2, 4, 8, and 16-bit alignment.
> + */
> +template<size_t align>
Align, please, per STYLE.
@@ +107,5 @@
> + * enough obfuscation to confuse gcc's strict-aliasing analysis into not giving
> + * false negatives when we cast from the char buffer to whatever type we've
> + * constructed using the bytes.
> + */
> +template<size_t nbytes>
Nbytes
@@ +119,5 @@
> + const void* addr() const { return u.bytes; }
> + void* addr() { return u.bytes; }
> +};
> +
> +template<class T>
typename T
Attachment #789023 -
Flags: review?(jwalden+bmo) → review+
| Assignee | ||
Comment 2•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•