Closed Bug 937886 Opened 6 years ago Closed 6 years ago

Build content/canvas/src in unified mode

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: bjacob, Assigned: bjacob)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files)

Attached patch patchSplinter Review
Measurements on Thinkpad W520, 8 cores, 8M cache:

Before:

$ time make -s -j8 -C obj-mobile-debug/content/canvas/src/
real    0m23.123s
user    2m34.718s
sys     0m8.765s

After:

$ time make -s -j8 -C obj-mobile-debug/content/canvas/src/
real    0m10.609s
user    0m24.534s
sys     0m0.908s
Attachment #831129 - Flags: review?(ehsan)
Comment on attachment 831129 [details] [diff] [review]
patch

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

So it's only 5 times faster?  Bleh!
Attachment #831129 - Flags: review?(ehsan) → review+
The previous patch failed to build on b2g because 'using namespace' statements were causing 'ipc' to be an ambiguous namespace specifier because we have

  mozilla::ipc

and

  mozilla::dom::ipc

Not sure whether namespaces suck or 'using' sucks.
Attachment #832701 - Flags: review+
(In reply to comment #2)
> Created attachment 832701 [details] [diff] [review]
>   --> https://bugzilla.mozilla.org/attachment.cgi?id=832701&action=edit
> patch fixed on b2g
> 
> The previous patch failed to build on b2g because 'using namespace' statements
> were causing 'ipc' to be an ambiguous namespace specifier because we have
> 
>   mozilla::ipc
> 
> and
> 
>   mozilla::dom::ipc
> 
> Not sure whether namespaces suck or 'using' sucks.

Neither.  Old gcc sucks.
Actually, the issue is not what I thought it was (and in particular, I don't understand c++ namespace rules.)
(In reply to comment #4)
> Actually, the issue is not what I thought it was (and in particular, I don't
> understand c++ namespace rules.)

What was it then?
Ah no, the issue _is_ what I thought it was. Consider this code:

    namespace mozilla {
      namespace ipc {
        class Ehsan;
      }
    }

    namespace mozilla {
      namespace dom {
        namespace ipc {
          class Ehsan;
        }
      }
    }

    using namespace mozilla;
    using namespace mozilla::dom;
    using namespace mozilla::dom::ipc;

    ipc::Ehsan* p;


This gives me (GCC 4.6):

a.cpp:20:1: error: reference to ‘ipc’ is ambiguous
a.cpp:10:19: error: candidates are: namespace mozilla::dom::ipc { }
a.cpp:3:17: error:                 namespace mozilla::ipc { }
a.cpp:20:1: error: ‘ipc’ does not name a type

So I maintain that one of the following must hold: namespaces suck, or 'using' sucks.
Assignee: nobody → bjacob
Blocks: unified
Summary: Use UNIFIED_SOURCES in content/canvas/src → Build content/canvas/src in unified mode
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.